-
Notifications
You must be signed in to change notification settings - Fork 40
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
Sharp Air Purifier KI-PX70 Stuck at Integration's Initializing Stage #169
Comments
After the entire integration stopped receiving data, I had to temporarily disable the integration. Surprisingly, after waiting for approximately half an hour to an hour, I re-enabled it and it started functioning normally. However, after around 15-20 minutes, the same issue reoccurred. Interestingly, if I modify the code and disable the Here is my speculation based on my years of experience as a web designer: This issue appears to be some form of flow control measure. It seems that we may be making incorrect requests for certain data or urls that we shouldn't be requesting. Alternatively, it could be due to a lack of ratelimit restrictions, resulting in a temporary ban that automatically lifts after a while. I'm not sure if this speculation will be helpful to everyone, but it's worth considering. |
@hldh214 I looked at your logs and found a bug in pychonet, so I fixed it. I also reviewed the sensor configuration of HomeAirCleaner. However, I don't have an environment to test it, so could you help us verify it? This fix is currently available to try on my edge branch. See below for how to deploy my edge branch. |
@nao-pon I've been tested for a while, and everything seems to be OK for now. Additionally, a new sensor has appeared and is displaying the correct value, while the two old sensors with no data have disappeared. Therefore, I believe this issue has been fixed. Thank you again. |
@hldh214 Thank you for your cooperation in the verification! 👍 |
Seems the original issue remains unresolved, and I am reopening it. I have updated to the latest commit, and it appears that the sensor, which previously had no data, now has some data. I am unsure if it is the correct data. However, after approximately 15 minutes, the original issue reoccurred: the integration stopped receiving any data. Here is the debug log, hope it helps.
|
Starting using commit ea2c875 and seems OK. |
Yes, please accept my apologies for the confusion. Previously, I was using the latest commit 0e6c320 . I took some additional time to bisect those commits and discovered that the problem began to appear with commit 8047116 . This commit introduced the power-related sensors. Is there anything I can provide for further debugging? |
Thank you for your detailed explanation. Well, there is a possibility that the value cannot be obtained from power-related inquiries and the system is determined to be offline. If you enable debug logging in the latest version, restart HA, wait until the symptoms appear, then disable debug logging, you can download the logs. Please upload that log here. |
The log between 2024-02-28 09:16:06 and 2024-02-28 09:26:06 has been omitted as it appears to consist of repetitive pooling information.
|
The fact that the device is OFF may be contributing to this issue. Can you try turning on the device? If there is no problem when ON, I will adjust the inquiry data when OFF. |
Seems like a similar situation to a turned-off case. I thought that we may need to add a sensor selection in the config flow, allowing the user to choose which sensor to poll.
|
I agree. This is a result that is not included in the specifications, so it seems that an option that can be handled individually is required. |
@hldh214 I pushed the changes to master. Select master in HACS, install it, and try disabling energy-related sensors using the options. You can reopen it if there are any problems. |
After modifying this option, it seems that reloading the integration does not have any effect. It is necessary to restart Home Assistant for the changes to take effect. I'm not sure if this is the expected behavior. Additionally, I have noticed that even though the "energy-related sensors" option is not checked, after restarting, the output values of those sensors are indeed not displayed. However, when I manually reload the integration once(without any options change), the sensor data reappears and the original issue still exists. |
The only device I own that I can test is a Panasonic air conditioner, so here's how it works on that device.
133(0x85) is the sensor in question.
At least in my tests, there seems to be no problem, but in a situation where all sensor updates have stopped, there is a possibility that it will not recover unless you restart HA. Have you noticed anything? Please note that even if you restart with the option unchecked, the sensor will remain unavailable. Reloading with it unchecked shouldn't change that state, making your experience a bit strange. |
I have performed some basic debugging and have identified a potential cause for this. It appears that we unintentionally modified a constant, causing the if-condition to behave differently upon reloading the integration. echonetlite_homeassistant/custom_components/echonetlite/__init__.py Lines 544 to 552 in 6a8942b
And here is the possible fix. diff --git a/custom_components/echonetlite/time.py b/custom_components/echonetlite/time.py
index 1bf5e42..863c8ec 100644
--- a/custom_components/echonetlite/time.py
+++ b/custom_components/echonetlite/time.py
@@ -23,7 +23,7 @@ async def async_setup_entry(hass, config, async_add_entities, discovery_info=Non
for entity in hass.data[DOMAIN][config.entry_id]:
eojgc = entity["instance"]["eojgc"]
eojcc = entity["instance"]["eojcc"]
- _enl_op_codes = ENL_OP_CODES.get(eojgc, {}).get(eojcc, {})
+ _enl_op_codes = ENL_OP_CODES.get(eojgc, {}).get(eojcc, {}).copy()
_enl_op_codes.update(ENL_SUPER_CODES)
# configure select entities by looking up full ENL_OP_CODE dict
for op_code in entity["instance"]["setmap"]:
|
Plus, above patch also fix this:
|
Maybe related to #167
My model is Sharp KI-PX70, and I thought it was similar to KI-HS70 which the README says is supported.
This issue is a bit amusing for me because everything was working fine when I first started using Version 3.8.0-beta9.
Until one day, when I happened to check the homeassistant logs, I noticed an error message indicating a syntax error in this plugin. You can refer to:
623e597#r138870175
After manually fixing the code, two additional sensors did appear as expected. Previously, there was only a switch for control and a select for mode selection. However, these two additional sensors have been stuck in a state without any data.
After a while, approximately 15-20 minutes later, the entire integration stopped receiving data. I tried reloading the integration, but the issue persisted.
I enabled debug mode and checked the logs, which I have provided below. Since I'm not as familiar with this project and the ECHONET protocol as everyone else, I wanted to raise this issue and seek your opinions. Thank you.
The text was updated successfully, but these errors were encountered: