Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration not applying settings #52

Open
johnsmoses opened this issue Jun 11, 2023 · 8 comments
Open

Integration not applying settings #52

johnsmoses opened this issue Jun 11, 2023 · 8 comments

Comments

@johnsmoses
Copy link

After upgrading to HA 2023.6.1, seemingly the integration can no longer update the state. Completely reinstalled the integration without success. Only one error in the log:

Logger: homeassistant.helpers.entity
Source: helpers/entity.py:565
First occurred: 6:08:20 PM (1 occurrences)
Last logged: 6:08:20 PM

Entity fan.winix_bedroom (<class 'custom_components.winix.fan.WinixPurifier'>) is using self.async_update_ha_state(), without enabling force_update. Instead it should use self.async_write_ha_state(), please report it to the custom integration author.

@iprak
Copy link
Owner

iprak commented Jun 13, 2023

I am looking at this but have not been able to reproduce it. I am on the same HA version. That message is actually a warning, the integration should still function. Can you enable debug logging and see if it reports something more?

  logs:
    custom_components.winix: debug

@johnsmoses
Copy link
Author

Thanks for looking into it. Here is a debug log after trying to turn it off and change the speed.-

2023-06-13 10:32:49.193 INFO (MainThread) [custom_components.winix.manager] Updating devices
2023-06-13 10:32:49.357 DEBUG (MainThread) [custom_components.winix.driver] {'statusCode': 200, 'headers': {'resultCode': 'S100', 'resultMessage': ''}, 'body': {'deviceId': '847207719A08_bsx36i9r19', 'totalCnt': 1, 'data': [{'apiNo': 'A210', 'apiGroup': '001', 'deviceGroup': 'Air01', 'modelId': 'C545', 'attributes': {'A02': '1', 'A03': '02', 'A04': '05', 'A05': '01', 'A07': '1', 'A21': '6480', 'S07': '01', 'S08': '114', 'S14': '191'}, 'rssi': '-45', 'creationTime': 1686229942006, 'utcDatetime': '2023-06-08 13:12:22', 'utcTimestamp': 1686229942}]}}
2023-06-13 10:32:49.358 DEBUG (MainThread) [custom_components.winix.manager] Bedroom: updated on=True, auto=False, manual=True, sleep=False, airflow=turbo, plasma=True
2023-06-13 10:32:49.358 DEBUG (MainThread) [custom_components.winix.manager] Finished fetching WinixManager data in 0.165 seconds (success: True)
2023-06-13 10:32:53.487 DEBUG (MainThread) [custom_components.winix.manager] Bedroom: Turning off
2023-06-13 10:33:19.194 INFO (MainThread) [custom_components.winix.manager] Updating devices
2023-06-13 10:33:19.358 DEBUG (MainThread) [custom_components.winix.driver] {'statusCode': 200, 'headers': {'resultCode': 'S100', 'resultMessage': ''}, 'body': {'deviceId': '847207719A08_bsx36i9r19', 'totalCnt': 1, 'data': [{'apiNo': 'A210', 'apiGroup': '001', 'deviceGroup': 'Air01', 'modelId': 'C545', 'attributes': {'A02': '1', 'A03': '02', 'A04': '05', 'A05': '01', 'A07': '1', 'A21': '6480', 'S07': '01', 'S08': '114', 'S14': '191'}, 'rssi': '-45', 'creationTime': 1686229942006, 'utcDatetime': '2023-06-08 13:12:22', 'utcTimestamp': 1686229942}]}}
2023-06-13 10:33:19.358 DEBUG (MainThread) [custom_components.winix.manager] Bedroom: updated on=True, auto=False, manual=True, sleep=False, airflow=turbo, plasma=True
2023-06-13 10:33:19.358 DEBUG (MainThread) [custom_components.winix.manager] Finished fetching WinixManager data in 0.165 seconds (success: True)
2023-06-13 10:33:49.194 INFO (MainThread) [custom_components.winix.manager] Updating devices
2023-06-13 10:33:49.326 DEBUG (MainThread) [custom_components.winix.driver] {'statusCode': 200, 'headers': {'resultCode': 'S100', 'resultMessage': ''}, 'body': {'deviceId': '847207719A08_bsx36i9r19', 'totalCnt': 1, 'data': [{'apiNo': 'A210', 'apiGroup': '001', 'deviceGroup': 'Air01', 'modelId': 'C545', 'attributes': {'A02': '1', 'A03': '02', 'A04': '05', 'A05': '01', 'A07': '1', 'A21': '6480', 'S07': '01', 'S08': '114', 'S14': '191'}, 'rssi': '-45', 'creationTime': 1686229942006, 'utcDatetime': '2023-06-08 13:12:22', 'utcTimestamp': 1686229942}]}}
2023-06-13 10:33:49.326 DEBUG (MainThread) [custom_components.winix.manager] Bedroom: updated on=True, auto=False, manual=True, sleep=False, airflow=turbo, plasma=True
2023-06-13 10:33:49.326 DEBUG (MainThread) [custom_components.winix.manager] Finished fetching WinixManager data in 0.132 seconds (success: True)
2023-06-13 10:34:19.193 INFO (MainThread) [custom_components.winix.manager] Updating devices
2023-06-13 10:34:19.369 DEBUG (MainThread) [custom_components.winix.driver] {'statusCode': 200, 'headers': {'resultCode': 'S100', 'resultMessage': ''}, 'body': {'deviceId': '847207719A08_bsx36i9r19', 'totalCnt': 1, 'data': [{'apiNo': 'A210', 'apiGroup': '001', 'deviceGroup': 'Air01', 'modelId': 'C545', 'attributes': {'A02': '1', 'A03': '02', 'A04': '05', 'A05': '01', 'A07': '1', 'A21': '6480', 'S07': '01', 'S08': '114', 'S14': '191'}, 'rssi': '-45', 'creationTime': 1686229942006, 'utcDatetime': '2023-06-08 13:12:22', 'utcTimestamp': 1686229942}]}}
2023-06-13 10:34:19.370 DEBUG (MainThread) [custom_components.winix.manager] Bedroom: updated on=True, auto=False, manual=True, sleep=False, airflow=turbo, plasma=True
2023-06-13 10:34:19.370 DEBUG (MainThread) [custom_components.winix.manager] Finished fetching WinixManager data in 0.177 seconds (success: True)
2023-06-13 10:34:49.195 INFO (MainThread) [custom_components.winix.manager] Updating devices
2023-06-13 10:34:49.330 DEBUG (MainThread) [custom_components.winix.driver] {'statusCode': 200, 'headers': {'resultCode': 'S100', 'resultMessage': ''}, 'body': {'deviceId': '847207719A08_bsx36i9r19', 'totalCnt': 1, 'data': [{'apiNo': 'A210', 'apiGroup': '001', 'deviceGroup': 'Air01', 'modelId': 'C545', 'attributes': {'A02': '1', 'A03': '02', 'A04': '05', 'A05': '01', 'A07': '1', 'A21': '6480', 'S07': '01', 'S08': '114', 'S14': '191'}, 'rssi': '-45', 'creationTime': 1686229942006, 'utcDatetime': '2023-06-08 13:12:22', 'utcTimestamp': 1686229942}]}}
2023-06-13 10:34:49.330 DEBUG (MainThread) [custom_components.winix.manager] Bedroom: updated on=True, auto=False, manual=True, sleep=False, airflow=turbo, plasma=True
2023-06-13 10:34:49.330 DEBUG (MainThread) [custom_components.winix.manager] Finished fetching WinixManager data in 0.136 seconds (success: True)
2023-06-13 10:35:19.194 INFO (MainThread) [custom_components.winix.manager] Updating devices
2023-06-13 10:35:19.319 DEBUG (MainThread) [custom_components.winix.driver] {'statusCode': 200, 'headers': {'resultCode': 'S100', 'resultMessage': ''}, 'body': {'deviceId': '847207719A08_bsx36i9r19', 'totalCnt': 1, 'data': [{'apiNo': 'A210', 'apiGroup': '001', 'deviceGroup': 'Air01', 'modelId': 'C545', 'attributes': {'A02': '1', 'A03': '02', 'A04': '05', 'A05': '01', 'A07': '1', 'A21': '6480', 'S07': '01', 'S08': '114', 'S14': '191'}, 'rssi': '-45', 'creationTime': 1686229942006, 'utcDatetime': '2023-06-08 13:12:22', 'utcTimestamp': 1686229942}]}}
2023-06-13 10:35:19.319 DEBUG (MainThread) [custom_components.winix.manager] Bedroom: updated on=True, auto=False, manual=True, sleep=False, airflow=turbo, plasma=True
2023-06-13 10:35:19.319 DEBUG (MainThread) [custom_components.winix.manager] Finished fetching WinixManager data in 0.125 seconds (success: True)
2023-06-13 10:35:36.708 DEBUG (MainThread) [custom_components.winix.manager] Bedroom: Updated speed to 'medium'
2023-06-13 10:35:49.193 INFO (MainThread) [custom_components.winix.manager] Updating devices
2023-06-13 10:35:49.260 DEBUG (MainThread) [custom_components.winix.driver] {'statusCode': 200, 'headers': {'resultCode': 'S100', 'resultMessage': ''}, 'body': {'deviceId': '847207719A08_bsx36i9r19', 'totalCnt': 1, 'data': [{'apiNo': 'A210', 'apiGroup': '001', 'deviceGroup': 'Air01', 'modelId': 'C545', 'attributes': {'A02': '1', 'A03': '02', 'A04': '05', 'A05': '01', 'A07': '1', 'A21': '6480', 'S07': '01', 'S08': '114', 'S14': '191'}, 'rssi': '-45', 'creationTime': 1686229942006, 'utcDatetime': '2023-06-08 13:12:22', 'utcTimestamp': 1686229942}]}}
2023-06-13 10:35:49.260 DEBUG (MainThread) [custom_components.winix.manager] Bedroom: updated on=True, auto=False, manual=True, sleep=False, airflow=turbo, plasma=True
2023-06-13 10:35:49.260 DEBUG (MainThread) [custom_components.winix.manager] Finished fetching WinixManager data in 0.067 seconds (success: True)

Unsure why but it seems to reset any changes I make from HA. Or rather it simply updates to what the current state of the filter is rather than changing it.

@iprak
Copy link
Owner

iprak commented Jun 13, 2023

I don't see that previous error in the debug log. Maybe it is some sort of timing issue but I will try to replicate it.

I have seen something like this where command to change fan speed is successful i.e. server does not report any error but next data fetch brings old value. I will take a look.

@iprak
Copy link
Owner

iprak commented Jun 14, 2023

Sorry I have not had luck reproducing it. I have the same C545 and have tried on/off on 2 purifiers with consistent results.

@johnsmoses
Copy link
Author

I will completely reset everything and see if that fixes anything. Thank you for looking into it.

@iprak
Copy link
Owner

iprak commented Jun 15, 2023

Did your purifier actually update its state?

@johnsmoses
Copy link
Author

johnsmoses commented Jun 16, 2023

It seemed to not get any input at all. I just reset everything including the filter itself and it seems the issue is remedied. Unsure what the issue was but I suppose it must have been on the cloud side. Many thanks for looking into it.

@iprak
Copy link
Owner

iprak commented Jun 22, 2023

I have pushed out a release v1.1.4 which has more logging along with exception when request to Winix end point fails. Maybe that might reveal what is happening in your case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants