Achronite / mqtt-energenie-ener314rt

MQTT interface for Energenie ENER314-RT add-on board for the Raspberry Pi, designed for use by Home Assistant.
MIT License
13 stars 5 forks source link

Thermostat retained topics #61

Closed Achronite closed 5 months ago

Achronite commented 7 months ago

Set the appropriate thermostat topics up to be 'retained' in MQ to survive restarts of HA:

TARGET_TEMP/state THERMOSTAT_MODE/command ??? This could be used to force periodic reporting?

Achronite commented 6 months ago

Also add: TEMP_OFFSET. HUMID_OFFSET, HYSTERISIS, RELAY_POLARITY

Achronite commented 6 months ago

As it is now know when a non-reported command is processed (by reporting telemetry) the code could set the STATE topic when this happens which would help reporting certainty.

NOTE: Unfortunately this wont work for the eTRV non-reported params, as it does not return telemetry on processing a message.

Further thoughts...

The Thermostat never reports the values of TEMP_OFFSET. HUMID_OFFSET, HYSTERISIS, RELAY_POLARITY. So there needs to be a method of reporting these back to MQTT (+node-red). The approach I took for eTRV (cache values in memory) could work for this; but it might be best returning the values in a monitor message once from energenie-ener314rt and subsequently either:

1) For MQTT: setting the retained STATE topics on successful processing, as this would at least survive of restart for the MQTT client.
2) For node clients (e.g. node-red) it would send a response ONCE back on success.