h4de5 / home-assistant-vimar

VIMAR by-me integration into home-assistant.io
GNU General Public License v3.0
43 stars 6 forks source link

Unsupported climate entity #16

Closed Wadaboa closed 4 years ago

Wadaboa commented 4 years ago

Hi,

I have a Vimar By-Me webserver (firmware version 2.3.0 Rev. 24682) and HomeAssistant 0.114.4. I recently installed home-assistant-vimar and I see that almost every device is being picked up by your HA extension, except for my thermostats. I've seen other issues about climate entities and they all seem solved.

Anyway, I think I've found the problem: HA logs report the following

2020-09-02 17:48:20 WARNING (SyncWorker_10) [custom_components.vimar_platform.vimarlink] Unknown object returned from web server: CH_HVAC_RiscaldamentoNoZonaNeutra / TERMOSTATO TAVERNA
2020-09-02 17:48:20 DEBUG (SyncWorker_10) [custom_components.vimar_platform.vimarlink] Unknown object has states: {'allarme_massetto': {'status_id': '2129', 'status_value': '0', 'status_range': 'min=0|max=1'}, 'regolazione': {'status_id': '2131', 'status_value': '2', 'status_range': ''}, 'modalita_fancoil': {'status_id': '2135', 'status_value': '0', 'status_range': 'min=0|max=1'}, 'velocita_fancoil': {'status_id': '2137', 'status_value': '0', 'status_range': 'min=0|max=100'}, 'funzionamento': {'status_id': '2139', 'status_value': '6', 'status_range': ''}, 'setpoint': {'status_id': '2146', 'status_value': '21.00', 'status_range': 'min=-273|max=670760'}, 'temporizzazione': {'status_id': '2152', 'status_value': '1', 'status_range': 'min=0|max=65535'}, 'temperatura_misurata': {'status_id': '2160', 'status_value': '24.40', 'status_range': 'min=-273|max=670760'}, 'stato_boost on/off': {'status_id': '2163', 'status_value': '0', 'status_range': 'min=0|max=1'}, 'stato_principale_condizionamento on/off': {'status_id': '2164', 'status_value': '0', 'status_range': 'min=0|max=1'}, 'stato_principale_riscaldamento on/off': {'status_id': '2165', 'status_value': '0', 'status_range': 'min=0|max=1'}, 'uscita4': {'status_id': '2944', 'status_value': 'non_utilizzata', 'status_range': 'principale_riscaldamento=0|boost_riscaldamento=0|principale_condizionamento=0|boost_condizionamento=0'}, 'uscita3': {'status_id': '2945', 'status_value': 'non_utilizzata', 'status_range': 'principale_riscaldamento=0|boost_riscaldamento=0|principale_condizionamento=0|boost_condizionamento=0'}, 'uscita2': {'status_id': '2946', 'status_value': 'non_utilizzata', 'status_range': 'principale_riscaldamento=0|boost_riscaldamento=0|principale_condizionamento=0|boost_condizionamento=0'}, 'uscita1': {'status_id': '2947', 'status_value': 'CH_Uscita_ValvolaOnOff', 'status_range': 'principale_riscaldamento=1|boost_riscaldamento=0|principale_condizionamento=0|boost_condizionamento=0'}, 'forzatura off': {'status_id': '3282', 'status_value': '0', 'status_range': ''}}

As you can see, the object CH_HVAC_RiscaldamentoNoZonaNeutra is not getting recognized. However, if you look inside the vimarlink.py file, line 721, this kind of object is not present in the list which categorizes climate entities:

...
elif device["object_type"] in ["CH_Clima", "CH_HVAC_NoZonaNeutra", "CH_Fancoil"]:
...

Ideally, just changing the line above with

...
elif device["object_type"] in ["CH_Clima", "CH_HVAC_NoZonaNeutra", "CH_HVAC_RiscaldamentoNoZonaNeutra", "CH_Fancoil"]:
...

should make everything work, right?

Let me know. Thanks, Alessio Falai.

h4de5 commented 4 years ago

this seems right, yes. have you tested it? it is possible that the list of states or the states values differs from already available thermostats. but you can just add it the way you proposed it, and see how it looks and reacts to changes.

Wadaboa commented 4 years ago

I tried making the edit reported above and now climate entities show up correctly. The remaining thing is that my thermostats are only able to control radiators, hence I should not see the "Fan mode" and "Cool" options. Moreover, an "Aux heat" button is present, but I don't know what it should be doing.

Here are the pictures:

Screenshot 2020-09-03 at 07 57 36 Screenshot 2020-09-03 at 07 57 22

How can I deal with this issue?

Thanks, Alessio Falai.

h4de5 commented 4 years ago

Great. I'll have a look and update the integration. Thanks for the test!

h4de5 commented 4 years ago

I have checked with the list of states you provided above. The aux heat button shows up, whenever the device returns a state named stato_principale_riscaldamento on/off and the Fan mode button is displayed if the state velocita_fancoil is present. so even if you do not have those devices attached, the entity itself is able to control it it seems and as of right now, I cannot determine if those a heater or a fancoil are actually present or not. So I would leave those buttons in.

I'll add your climate in the next release.

let me know if you have other devices that you want to add.