I’m having problems with the way that binary sensors are reporting their last tripped time. I’m getting the sensor data from the Envisalink panel, so not sure if the problem lies with that.
It appears that on the binary sensors, they will report the correct state, and when they are opened, the continually display last tripped time of 10 or 15 seconds even when they have been tripped for much longer.
The logbook and history will accurately show open and close events. But since the last tripped time seems to reset, I can’t do an automation that will take an action when the sensor has been triggered for x minutes or something similar to that.
Looking at the logs here, I opened the door at 20:34:06, and then left it open for a bit. Eventually I shut it around 20:50:00, but the panel does a pretty crappy job on reporting the closure (more on that later in the post). You can see that the last_tripped_time fluctuates between 10 and 15, even though the door never actually shut to cause the sensor to go to a closed state.
Is there anything that I can do to fix this? Is this a binary sensor issue, or maybe something with the envisalink configuration?
[homeassistant]$ cat home-assistant.log | grep 'carport_door='
2018-04-23 20:26:54 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=binary_sensor.carport_door, old_state=None, new_state=<state binary_sensor.carport_door=off; last_tripped_time=0, friendly_name=Carport Door, device_class=door @ 2018-04-23T20:26:54.852033-04:00>>
2018-04-23 20:28:54 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=binary_sensor.carport_door, old_state=<state binary_sensor.carport_door=off; last_tripped_time=0, friendly_name=Carport Door, device_class=door @ 2018-04-23T20:26:54.852033-04:00>, new_state=<state binary_sensor.carport_door=off; last_tripped_time=145, friendly_name=Carport Door, device_class=door @ 2018-04-23T20:26:54.852033-04:00>>
2018-04-23 20:30:54 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=binary_sensor.carport_door, old_state=<state binary_sensor.carport_door=off; last_tripped_time=145, friendly_name=Carport Door, device_class=door @ 2018-04-23T20:26:54.852033-04:00>, new_state=<state binary_sensor.carport_door=off; last_tripped_time=265, friendly_name=Carport Door, device_class=door @ 2018-04-23T20:26:54.852033-04:00>>
2018-04-23 20:32:54 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=binary_sensor.carport_door, old_state=<state binary_sensor.carport_door=off; last_tripped_time=265, friendly_name=Carport Door, device_class=door @ 2018-04-23T20:26:54.852033-04:00>, new_state=<state binary_sensor.carport_door=off; last_tripped_time=385, friendly_name=Carport Door, device_class=door @ 2018-04-23T20:26:54.852033-04:00>>
2018-04-23 20:34:06 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=binary_sensor.carport_door, old_state=<state binary_sensor.carport_door=off; last_tripped_time=385, friendly_name=Carport Door, device_class=door @ 2018-04-23T20:26:54.852033-04:00>, new_state=<state binary_sensor.carport_door=on; last_tripped_time=0, friendly_name=Carport Door, device_class=door @ 2018-04-23T20:34:06.365900-04:00>>
2018-04-23 20:34:54 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=binary_sensor.carport_door, old_state=<state binary_sensor.carport_door=on; last_tripped_time=0, friendly_name=Carport Door, device_class=door @ 2018-04-23T20:34:06.365900-04:00>, new_state=<state binary_sensor.carport_door=on; last_tripped_time=15, friendly_name=Carport Door, device_class=door @ 2018-04-23T20:34:06.365900-04:00>>
2018-04-23 20:40:54 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=binary_sensor.carport_door, old_state=<state binary_sensor.carport_door=on; last_tripped_time=15, friendly_name=Carport Door, device_class=door @ 2018-04-23T20:34:06.365900-04:00>, new_state=<state binary_sensor.carport_door=on; last_tripped_time=10, friendly_name=Carport Door, device_class=door @ 2018-04-23T20:34:06.365900-04:00>>
2018-04-23 20:42:54 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=binary_sensor.carport_door, old_state=<state binary_sensor.carport_door=on; last_tripped_time=10, friendly_name=Carport Door, device_class=door @ 2018-04-23T20:34:06.365900-04:00>, new_state=<state binary_sensor.carport_door=on; last_tripped_time=15, friendly_name=Carport Door, device_class=door @ 2018-04-23T20:34:06.365900-04:00>>
2018-04-23 20:46:54 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=binary_sensor.carport_door, old_state=<state binary_sensor.carport_door=on; last_tripped_time=15, friendly_name=Carport Door, device_class=door @ 2018-04-23T20:34:06.365900-04:00>, new_state=<state binary_sensor.carport_door=on; last_tripped_time=10, friendly_name=Carport Door, device_class=door @ 2018-04-23T20:34:06.365900-04:00>>
2018-04-23 20:48:54 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=binary_sensor.carport_door, old_state=<state binary_sensor.carport_door=on; last_tripped_time=10, friendly_name=Carport Door, device_class=door @ 2018-04-23T20:34:06.365900-04:00>, new_state=<state binary_sensor.carport_door=on; last_tripped_time=15, friendly_name=Carport Door, device_class=door @ 2018-04-23T20:34:06.365900-04:00>>
2018-04-23 20:52:54 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=binary_sensor.carport_door, old_state=<state binary_sensor.carport_door=on; last_tripped_time=15, friendly_name=Carport Door, device_class=door @ 2018-04-23T20:34:06.365900-04:00>, new_state=<state binary_sensor.carport_door=off; last_tripped_time=125, friendly_name=Carport Door, device_class=door @ 2018-04-23T20:52:54.775233-04:00>>
2018-04-23 20:54:54 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=binary_sensor.carport_door, old_state=<state binary_sensor.carport_door=off; last_tripped_time=125, friendly_name=Carport Door, device_class=door @ 2018-04-23T20:52:54.775233-04:00>, new_state=<state binary_sensor.carport_door=off; last_tripped_time=245, friendly_name=Carport Door, device_class=door @ 2018-04-23T20:52:54.775233-04:00>>
2018-04-23 20:56:54 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=binary_sensor.carport_door, old_state=<state binary_sensor.carport_door=off; last_tripped_time=245, friendly_name=Carport Door, device_class=door @ 2018-04-23T20:52:54.775233-04:00>, new_state=<state binary_sensor.carport_door=off; last_tripped_time=365, friendly_name=Carport Door, device_class=door @ 2018-04-23T20:52:54.775233-04:00>>
Here’s the relevant Envisalink configuration, if this could be the potential culprit. I have messed with zonedump_interval. The higher that is, the longer it takes for zone off/closed alerts to report. 120 is too high, and needs to be brought down (60 is default) but I think this may be something to do with the problem. It doesn’t always report every 120 seconds, sometimes it misses a checkin which can be seen from the logs.
envisalink:
host: 192.168.3.10
panel_type: HONEYWELL
user_name: user
password: user
code: '1234'
port: 4025
evl_version: 4
keepalive_interval: 60
zonedump_interval: 120
panic_type: Police
zones:
1:
name: 'Fire'
type: 'smoke'
2:
name: 'Front Door'
type: 'door'
3:
name: 'Carport Door'
type: 'door'
partitions:
1:
name: 'Alarm'
Anyone have any advice here?