cyr-ius / hass-cozytouch

Cozytouch support for Home Assistant
GNU General Public License v2.0
23 stars 14 forks source link

Error with version 1.5.6.1... Cozytouch is not starting anymore... #13

Closed browetd closed 4 years ago

browetd commented 4 years ago

Cozytouch is not starting anymore... Running HA 0.111.1 in venv with Python 3.7.3 I got this error (previous version was working fine: 1.4.4)...

2020-06-12 18:21:19 ERROR (MainThread) [homeassistant.components.climate] Error while setting up cozytouch platform for climate Traceback (most recent call last): File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 186, in _async_setup_platform await asyncio.gather(pending) File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 292, in async_add_entities await asyncio.gather(tasks) File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 443, in _async_add_entity entity.async_write_ha_state() File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 297, in async_write_ha_state self._async_write_ha_state() # type: ignore File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 320, in _async_write_ha_state state = self.state File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/climate/init.py", line 173, in state return self.hvac_mode File "/home/homeassistant/.homeassistant/custom_components/cozytouch/climate.py", line 177, in hvac_mode return HEATER_TO_HVAC_MODE[self.climate.operating_mode] KeyError: 'standby'

cyr-ius commented 4 years ago

Please update to 1.5.2

browetd commented 4 years ago

@Cyr-ius Thank you for your quick update... Upgraded to 1.5.2, now I am getting this error:

2020-06-13 18:48:01 ERROR (MainThread) [homeassistant.components.climate] Error while setting up cozytouch platform for climate Traceback (most recent call last): File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 186, in _async_setup_platform await asyncio.gather(pending) File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 292, in async_add_entities await asyncio.gather(tasks) File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 443, in _async_add_entity entity.async_write_ha_state() File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 297, in async_write_ha_state self._async_write_ha_state() # type: ignore File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 323, in _async_write_ha_state attr.update(self.state_attributes or {}) File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/climate/init.py", line 262, in state_attributes data[ATTR_PRESET_MODE] = self.preset_mode File "/home/homeassistant/.homeassistant/custom_components/cozytouch/climate.py", line 199, in preset_mode return COZY_TO_PRESET_MODE[preset] KeyError: 'off'

browetd commented 4 years ago

I downgraded to version 1.4.4... This is the last release working for my environment...

cyr-ius commented 4 years ago

Please up to 1.5.3

browetd commented 4 years ago

@Cyr-ius Now I am getting this error (downgraded to 1.4.4):

2020-06-14 17:57:59 ERROR (MainThread) [homeassistant.components.climate] Error while setting up cozytouch platform for climate Traceback (most recent call last): File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 186, in _async_setup_platform await asyncio.gather(pending) File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 292, in async_add_entities await asyncio.gather(tasks) File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 443, in _async_add_entity entity.async_write_ha_state() File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 297, in async_write_ha_state self._async_write_ha_state() # type: ignore File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 323, in _async_write_ha_state attr.update(self.state_attributes or {}) File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/climate/init.py", line 262, in state_attributes data[ATTR_PRESET_MODE] = self.preset_mode File "/home/homeassistant/.homeassistant/custom_components/cozytouch/climate.py", line 199, in preset_mode return COZY_TO_PRESET_MODE[preset] KeyError: 'off'

browetd commented 4 years ago

@Cyr-ius Tried 1.5.6.1 still the same error

2020-06-16 20:55:02 ERROR (MainThread) [homeassistant.components.climate] Error while setting up cozytouch platform for climate Traceback (most recent call last): File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 186, in _async_setup_platform await asyncio.gather(pending) File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 292, in async_add_entities await asyncio.gather(tasks) File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 443, in _async_add_entity entity.async_write_ha_state() File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 297, in async_write_ha_state self._async_write_ha_state() # type: ignore File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 323, in _async_write_ha_state attr.update(self.state_attributes or {}) File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/climate/init.py", line 262, in state_attributes data[ATTR_PRESET_MODE] = self.preset_mode File "/home/homeassistant/.homeassistant/custom_components/cozytouch/climate.py", line 199, in preset_mode return COZY_TO_PRESET_MODE[preset] KeyError: 'off'

browetd commented 4 years ago

@Cyr-ius Tried to switch on the heaters with Cozytouch App and restart HA but same result... Thanks for your help.

browetd commented 4 years ago

@Cyr-ius I put cozytouch in debug mode. Here is the log from "home-assistant.log" (see below).. The occupancy (3 entities) and contact (3 entities) IO system device sensors are available and seems to work correctly but not the climate entities... These are unavailable... Let me know if I can do anything to help or if you need more details.

2020-06-16 22:55:03 INFO (MainThread) [custom_components.cozytouch.climate] Found 3 thermostat 2020-06-16 22:55:03 INFO (MainThread) [custom_components.cozytouch.switch] Found 3 switch 2020-06-16 22:55:03 INFO (MainThread) [custom_components.cozytouch.binary_sensor] Found 6 binary sensor 2020-06-16 22:55:03 INFO (MainThread) [custom_components.cozytouch.sensor] Found 6 sensors 2020-06-16 22:55:03 DEBUG (MainThread) [custom_components.cozytouch.climate] Update thermostat I2G_Actuator 2020-06-16 22:55:03 DEBUG (MainThread) [custom_components.cozytouch.climate] Update thermostat I2G_Actuator 2020-06-16 22:55:03 DEBUG (MainThread) [custom_components.cozytouch.climate] Update thermostat I2G_Actuator 2020-06-16 22:55:03 DEBUG (MainThread) [custom_components.cozytouch.switch] Update switch I2G_Actuator 2020-06-16 22:55:03 DEBUG (MainThread) [custom_components.cozytouch.switch] Update switch I2G_Actuator 2020-06-16 22:55:03 DEBUG (MainThread) [custom_components.cozytouch.switch] Update switch I2G_Actuator 2020-06-16 22:55:03 DEBUG (MainThread) [custom_components.cozytouch.binary_sensor] Update binary sensor Salle de bain bas Occupancy IO System Device Sensor 2020-06-16 22:55:03 DEBUG (MainThread) [custom_components.cozytouch.binary_sensor] Update binary sensor Salle de bain bas Contact IO System Device Sensor 2020-06-16 22:55:03 DEBUG (MainThread) [custom_components.cozytouch.binary_sensor] Update binary sensor Chambre Thomas Occupancy IO System Device Sensor 2020-06-16 22:55:03 DEBUG (MainThread) [custom_components.cozytouch.binary_sensor] Update binary sensor Chambre Thomas Contact IO System Device Sensor 2020-06-16 22:55:03 DEBUG (MainThread) [custom_components.cozytouch.binary_sensor] Update binary sensor Hall d'entrée Occupancy IO System Device Sensor 2020-06-16 22:55:03 DEBUG (MainThread) [custom_components.cozytouch.binary_sensor] Update binary sensor Hall d'entrée Contact IO System Device Sensor 2020-06-16 22:55:03 DEBUG (MainThread) [custom_components.cozytouch.sensor] Update sensor Salle de bain bas Temperature In Celcius IO System Device Sensor 2020-06-16 22:55:03 DEBUG (MainThread) [custom_components.cozytouch.sensor] Update sensor Salle de bain bas Cumulated Electrical Energy Consumption IO System Device Sensor 2020-06-16 22:55:03 DEBUG (MainThread) [custom_components.cozytouch.sensor] Update sensor Chambre Thomas Temperature In Celcius IO System Device Sensor 2020-06-16 22:55:03 DEBUG (MainThread) [custom_components.cozytouch.sensor] Update sensor Chambre Thomas Cumulated Electrical Energy Consumption IO System Device Sensor 2020-06-16 22:55:03 DEBUG (MainThread) [custom_components.cozytouch.sensor] Update sensor Hall d'entrée Temperature In Celcius IO System Device Sensor 2020-06-16 22:55:03 DEBUG (MainThread) [custom_components.cozytouch.sensor] Update sensor Hall d'entrée Cumulated Electrical Energy Consumption IO System Device Sensor 2020-06-16 22:55:03 INFO (MainThread) [custom_components.cozytouch.water_heater] Found 0 water heater 2020-06-16 22:55:04 ERROR (MainThread) [homeassistant.components.climate] Error while setting up cozytouch platform for climate Traceback (most recent call last): File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 186, in _async_setup_platform await asyncio.gather(pending) File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 292, in async_add_entities await asyncio.gather(tasks) File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 443, in _async_add_entity entity.async_write_ha_state() File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 297, in async_write_ha_state self._async_write_ha_state() # type: ignore File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 323, in _async_write_ha_state attr.update(self.state_attributes or {}) File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/climate/init.py", line 262, in state_attributes data[ATTR_PRESET_MODE] = self.preset_mode File "/home/homeassistant/.homeassistant/custom_components/cozytouch/climate.py", line 199, in preset_mode return COZY_TO_PRESET_MODE[preset] KeyError: 'off'

browetd commented 4 years ago

@Cyr-ius Today the error message "keyerror: off" (at startup of HA) as been replaced by "keyerror: frostprotection":

2020-06-17 19:33:01 ERROR (MainThread) [homeassistant.components.climate] Error while setting up cozytouch platform for climate Traceback (most recent call last): File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 186, in _async_setup_platform await asyncio.gather(pending) File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 292, in async_add_entities await asyncio.gather(tasks) File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 443, in _async_add_entity entity.async_write_ha_state() File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 297, in async_write_ha_state self._async_write_ha_state() # type: ignore File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 323, in _async_write_ha_state attr.update(self.state_attributes or {}) File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/climate/init.py", line 262, in state_attributes data[ATTR_PRESET_MODE] = self.preset_mode File "/home/homeassistant/.homeassistant/custom_components/cozytouch/climate.py", line 199, in preset_mode return COZY_TO_PRESET_MODE[preset] KeyError: 'frostprotection'

browetd commented 4 years ago

@Cyr-ius I found very strange that the error code was changing without doing anything... So I checked my equipment manually and they were "stuck" on "frostprotection", no way to change temperatureon the heaters. I decided to reset all my equipments and start from scratch... and it is now working !... Cozytouch is starting without error... Sorry for all the updates I sent... I will have maybe to update a little bit my automations but at least it is up and running. Thanks !!!!