I need help with automation that activates the alarm.
Currently I have a NodeMCU with Tasmota connected to the Tecnoalarm alarm control panel.
The NodeMCU reads the status of the Alarm, and if the alarm is activated or deactivated it turns telemetry to ON, or OFF
in this way, through MQTT, Hassio when reading the telemetry of the NodeMCU , through the example automation:
- alias: ‘Activate Alarme Totale
initial_state: 'on'
triggers:
- platform: state
entity_id: switch.state_alarm_total
to: 'on'
condition:
- condition: state
entity_id: alarm_control_panel.allarme
state: disarmed
action:
- service: alarm_control_panel.alarm_arm_away
data:
entity_id: alarm_control_panel.allarme
code:! secret alarm_code
the status of the Manual Alarm change to Arm Away, so I can manage relative automation of Hassio, active only on activated alarm.
The problem arises when the NodeMCU loses connection on MQTT …
the MQTT log says: Client NodeMCU1 has exceeded timeout, disconnecting) and then reconnects, probably for bad connection or other problems
this causes the Arm Away to be disabled,
is there a way to modify the automation so that it reads the status of the NodeMCU and not its change from OFF to ON?
Hi Gianluca, I really interested to your project. Could I have some details (maybe in a private conversation if you prefer) about your physical interface to the tecnoalarm box? I have a Tp8 and I’m searching for a way to connect it with HA. Thank you in advance