echonetlite_homeassistant: Sharp Air Purifier KI-PX70 Stuck at Integration's Initializing Stage
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: https://github.com/scottyphillips/echonetlite_homeassistant/commit/623e597dc140f2ccaf4ee39dd04773b7524fd082#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.
2024-02-22 17:55:58.168 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry KIPX70 for echonetlite
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 444, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/echonetlite/__init__.py", line 314, in async_setup_entry
instances = await enumerate_instances(hass, host)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/echonetlite/config_flow.py", line 98, in enumerate_instances
await server.discover(host)
File "/usr/local/lib/python3.12/site-packages/pychonet/echonetapiclient.py", line 223, in discover
return await self.echonetMessage(host, 0x0E, 0xF0, 0x01, GET, opc)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pychonet/echonetapiclient.py", line 345, in echonetMessage
await update_func(False)
File "/config/custom_components/echonetlite/__init__.py", line 668, in async_update_callback
await self.async_update_data(kwargs={"no_request": True})
File "/config/custom_components/echonetlite/__init__.py", line 656, in async_update_data
batch_data = await self._instance.update(flags, no_request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pychonet/EchonetInstance.py", line 137, in update
self._api._state[self._host]["instances"][self._eojgc][self._eojcc][
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
KeyError: 1
About this issue
- Original URL
- State: closed
- Created 4 months ago
- Comments: 19
Commits related to this issue
- Fix #169 add an option "Enable energy-related sensors (if available)" Added superclass energy-related data retrieval option (enabled by default), as frequent retrieval may cause some devices to becom... — committed to nao-pon/echonetlite_homeassistant by nao-pon 4 months ago
- Fixed unintended ENL_OP_CODES rewriting, thx @hldh214 rel. #169 see https://github.com/scottyphillips/echonetlite_homeassistant/issues/169#issuecomment-1982234182 — committed to scottyphillips/echonetlite_homeassistant by nao-pon 4 months ago
@hldh214 You’re right! I fixed it in 1619da1. Thanks! 👍
@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.
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 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.
https://github.com/scottyphillips/echonetlite_homeassistant/issues/161#issuecomment-1911288226