emsesp / EMS-ESP

ESP8266 firmware to read and control EMS and Heatronic compatible equipment such as boilers, thermostats, solar modules, and heat pumps
https://emsesp.github.io/docs
GNU Lesser General Public License v3.0
305 stars 97 forks source link

Monitoring EMS ESP somehow? #771

Closed swa72 closed 3 years ago

swa72 commented 3 years ago

Every couple of weeks I notice flat lines of data in HA (no changing data for a couple of hours). I discovered that EMS ESP MQTT service has stopped working.

I now have an automation that checks for sensor.thermostat_damped_outdoor_temperature which should change regularly. And if there is no change within 2 hours, I get a message to look after the system. Is there any better approach?

alias: Monitor heating
description: 'if thermostat sensor''s damped temp does not change for 120min, notify me'
trigger:
  - platform: state
    entity_id: sensor.thermostat_damped_outdoor_temperature
    for: '02:00:00'
action:
  - service: notify.mobile_app_iphone
    data_template:
      message: >-
        {{ trigger.from_state.attributes.friendly_name }} has not updated for
        120min
mode: single
proddy commented 3 years ago

I think it's worth looking into why EMS-ESP is losing the MQTT connection. Put SysLog on and see when it occurs. I could be related to the MQTT server going down for longer than a few minutes (see https://github.com/emsesp/EMS-ESP32/issues/42).

There's also a last will topic called status so you could subscribe to that. See https://www.home-assistant.io/docs/mqtt/birth_will/