cozylife / hass_cozylife_local_pull

home asstiant plugin
81 stars 35 forks source link

Broken pipe on LED strip #28

Open bithajcsar opened 4 months ago

bithajcsar commented 4 months ago

I have a LED strip recognized in Home Assistant as light.cozylife_music_rhythm_light_strip Connection is frequently broken. Commands cannot be executed due to a "broken pipe" error.

Log:

Logger: homeassistant Source: custom_components/hass_cozylife_local_pull/tcp_client.py:208 Integration: cozylife demo (documentation) First occurred: 2024. február 4. 19:34:20 (536 occurrences) Last logged: 16:08:37

Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 875, in _update_entity_states await entity.async_update_ha_state(True) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 916, in async_update_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1066, in _async_write_ha_state state, attr, capabilities, shadowed_attr = self.async_calculate_state() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1003, in async_calculate_state state = self._stringify_state(available) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 951, in _stringify_state if (state := self.state) is None: ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1557, in state if (is_on := self.is_on) is None: ^^^^^^^^^^ File "/config/custom_components/hass_cozylife_local_pull/light.py", line 150, in is_on self._refresh_state() File "/config/custom_components/hass_cozylife_local_pull/light.py", line 125, in _refresh_state self._state = self._tcp_client.query() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/hass_cozylife_local_pull/tcp_client.py", line 259, in query return self._send_receiver(CMD_QUERY, {}) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/hass_cozylife_local_pull/tcp_client.py", line 208, in _send_receiver self._connect.send(self._get_package(cmd, payload)) ConnectionResetError: [Errno 104] Connection reset by peer

zhaozhenxiang commented 4 months ago

Hello. I will update the code of this repository in the near future.

lcabs commented 3 months ago

Same issue here.