Devotics / heatzy-home-hassistant

Climate Home Assistant component for Heatzy Pilot
MIT License
23 stars 20 forks source link

Heatzy glow #18

Open cob94440 opened 3 years ago

cob94440 commented 3 years ago

Hi i'd like to know if this is compatible with heatzy glow and latest home assistant version. Thanks for your work.

Dramloc commented 3 years ago

Hi,

This component hasn't been tested with Heatzy Glow yet, but I think it should be easy to make it compatible. My main issue is that I can't find any documentation on the Heatzy Glow API 🙃

Heatzy Glow seems to have the same behavior as the Heatzy Pilot v2 so it might use the same API. If that's the case, we just have to add the Heatzy Glow product key to this project to support it (see https://github.com/Devotics/heatzy-home-hassistant/blob/cb2eb053a319bc96a693c66fc9dccaf731e8a547/heatzy/climate.py#L13-L20).

If you have an Heatzy Glow and install this project, you should see the following message in the Home Assistant logs:

Device XXX with product key YYY is not supported

Adding the product key to this project should be enough to add support for the Heatzy Glow.

Let me know if you can try it!

cob94440 commented 3 years ago

Hello,

I added

Heatzy Glow

'2fd622e45283470f9e27e8e6167d7533': HeatzyGlow,

to climate.py

Before i had an error saying product was not known.

Now i have this error:

Logger: homeassistant.bootstrap Source: custom_components/heatzy/climate.py:17 First occurred: 15:41:40 (1 occurrences) Last logged: 15:41:40

Error setting up integration climate - received exception Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 826, in async_forward_entry_setup result = await async_setup_component(self.hass, domain, self._hass_config) File "/usr/src/homeassistant/homeassistant/setup.py", line 57, in async_setup_component return await setup_tasks[domain] # type: ignore File "/usr/src/homeassistant/homeassistant/components/ozw/init.py", line 262, in start_platforms await asyncio.gather( File "/usr/src/homeassistant/homeassistant/config_entries.py", line 826, in async_forward_entry_setup result = await async_setup_component(self.hass, domain, self._hass_config) File "/usr/src/homeassistant/homeassistant/setup.py", line 57, in async_setup_component return await setup_tasks[domain] # type: ignore File "/usr/src/homeassistant/homeassistant/setup.py", line 64, in async_setup_component return await task # type: ignore File "/usr/src/homeassistant/homeassistant/setup.py", line 174, in _async_setup_component processed_config = await conf_util.async_process_component_config( File "/usr/src/homeassistant/homeassistant/config.py", line 823, in async_process_component_config platform = p_integration.get_platform(domain) File "/usr/src/homeassistant/homeassistant/loader.py", line 424, in get_platform cache[full_name] = self._import_platform(platform_name) File "/usr/src/homeassistant/homeassistant/loader.py", line 429, in _import_platform return importlib.import_module(f"{self.pkg_path}.{platform_name}") File "/usr/local/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 783, in exec_module File "", line 219, in _call_with_frames_removed File "/config/custom_components/heatzy/climate.py", line 17, in '2fd622e45283470f9e27e8e6167d7533': HeatzyGlow, NameError: name 'HeatzyGlow' is not defined

cob94440 commented 3 years ago

my mistake i replace HeatzyGlow for HeatzyPiloteV2Thermostat

climate is now showing but stays at 0° And one click on the name gives an error

cob94440 commented 3 years ago

My heatzy is on program mode actually

cob94440 commented 3 years ago

Do you have another idea?

cob94440 commented 3 years ago

Here is the answer from heatzy :

Bonjour,

Les APIs du GLOW sont identiques aux API du pilote. La seule différence se situe au niveau des requêtes GET_LATEST_STATE et POST_ORDER Le GLOW a ses propres API pour l'envoi d'ordres et la réception d'informations.

Pour la programmation, le système pX_dataY est le même que sur le pilote et a déjà été documenté. Pour les modes de chauffe il faut utiliser le paramètre "mode" : "cft"/"eco"/"fro" Pour allumer/éteindre le radiateur on utilise "on_off" : 0 (éteint) ou 1 (allumé) Pour activer/désactiver la programmation "timer_switch" : 0 (manuel) ou 1 (prog) Pour lire la température de la pièce, on utilise les paramètres "cur_tempL" et "cur_tempH". La température est encodée sur 2 bytes. Pour retrouver la bonne valeur on calcule température = [ cur_tempL + (256 * cur_tempH) ] / 10 Pour les consignes de chauffe du mode éco on utilise "eco_tempH" et "eco_tempL" avec la même logique Pour les consignes de chauffe du mode confort on utilise "cft_tempH" et "cft_tempL" avec la même logique "com_temp" permet de régler l'étalonnage du produit (+- 5 degrés)

cob94440 commented 3 years ago

Antoine?

cob94440 commented 3 years ago

I just received a pilot for my other heater and it seems to have the same behavior. Temps stays at 0°C Mode is auto / eco. If i change to confort it change on the glow and pilot but in HA it come back at auto /eco And a click on the calendar givs an havc error.

Dramloc commented 3 years ago

Hi, I did not have much time to respond lately.

For the heatzy pilot, the 0°C temperature was "normal" (it doesn't have a temperature sensor and Home Assistant climate component always displays the temperature). It's also normal that the HVAC mode is always "auto" as it is the only supported mode for the Pilot. You can check this custom card if you want a better display for the Pilot: https://github.com/DanChaltiel/heatzy-pilote-card.

For the Pilot, you should be able to change the "preset" (the setting that was set to "eco") to confort, eco, etc.

For the Heatzy Glow, it seems like there are some changes necessary to this project (to handle on/off and temperature readings). It might be difficult for me to develop this (as I don't have an Heatzy Glow to test it).

If you (or someone with an Heatzy Glow) want to develop these changes, PR are welcome 🙂

cob94440 commented 3 years ago

Je ne suis pas assez développeur pour ça malheureusement mais si tu veux faire des tests je peux aider

answer35 commented 3 years ago

Hi, I might be interested in the Glow model also but I would like to know if integration is working fine now with this one or not yet ?

cob94440 commented 3 years ago

Hi, I might be interested in the Glow model also but I would like to know if integration is working fine now with this one or not yet ?

No it s not working now.