DSC Alarm integration

Its been a month now and im still looking for a solution to send MQTT state_topic updates from the binary_sensors created by the addon to MQTT broker

Any help would be appreciated

Hey all - jumping in here quite late. Have just started tinkering with HomeAssistant and my EVL4 connected to a DSC alarm.
Everything so far looks great! Kudos to all involved.
Something I’d like to see added would be to interrogate the bypass state of zones?
I’m seeing in the TPI API that there seems to be a way to get this:

Bypassed Zones Bitfield Dump
This command is issued upon leaving Zone Bypass programming (*1 on the keypad). It is a 16 character HEX string representing an 8 byte bitfield. This bitfield indicates which zones are currently in bypass. A “1” indicates the zone is in bypass. The lower 8 zones are in the first position of the bitfield.

Sending command 0711*1# gives me the hex dump but only bypassed zones in partition One are shown as bypassed.

0711*1#47
.
.
.
61600000000000000009D

0711*109#B0
.
.

61600010000000000009E

Sadly my python skills are dangerous so I don’t feel comfortable trying to hack this myself - does someone want to take up the challenge??? :smiley:
Thanks!

I’m experiencing this exact issue trying to trigger an alarm. Perhaps a DSC specific bug? I tried switching the default panic action to ‘Fire’ and I get the same issue but the alpha ‘Fire alarm cleared’.

Anybody else using DSC managed to get this working?

How do I make the binary_sensors created by addon report state_topic to mqtt broker?

could someone confirm that if the DSC alarm is armed, then alarmdecoder/envisalink can’t read the state of the sensors anymore ?

I know that it’s true for the Honeywell panels- the Envisalink docs state it’s a limitation of the panel itself. I didn’t see any reference to that for the DSC panels, but it wouldn’t surprise me.

Hey @Cinntax, not sure if you remember but you helped work out a bug I came across last year sometime.
Anyway, I think I may have possibly stumbled across another edge situation.

This envisalink component has worked the charm for a long while but suddenly I’m getting a bunch of errors in the logs that I think are unique to the current status which is that my 12V backup panel battery is dead/dieing and the panel status is updated to show this.

Could this be an edge case that the component does not yet handle properly? Can I do anything to help troubleshoot this?

2018-07-11 10:22:47 ERROR (MainThread) [homeassistant.helpers.entity] Update for binary_sensor.home_away fails
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 197, in async_update_ha_state
  yield from self.async_device_update()
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 320, in async_device_update
yield from self.hass.async_add_job(self.update)
File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
yield self  # This tells Task to wait for completion.
File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)

2018-08-02 02:31:35 ERROR (MainThread) [pyenvisalink.envisalink_base_client] The server closed the connection. Reconnecting...
2018-08-02 02:31:40 ERROR (MainThread) [homeassistant.core] Error doing job: Exception in callback _SelectorSocketTransport._read_ready() 
Traceback (most recent call last):
File "/usr/lib/python3.5/asyncio/events.py", line 126, in _run
self._callback(*self._args)
File "/usr/lib/python3.5/asyncio/selector_events.py", line 730, in _read_ready
self._protocol.data_received(data)
File "/srv/homeassistant/lib/python3.5/site-packages/pyenvisalink/envisalink_base_client.py", line 179, in data_received
callbackFunc(result)
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/envisalink.py", line 127, in connection_success_callback
sync_connect.set_result(True)
File "/usr/lib/python3.5/asyncio/futures.py", line 348, in set_result
raise InvalidStateError('{}: {!r}'.format(self._state, self))

Hey-
Yeah this issue was reported a while back over on github. A few days ago I pushed a fix for it that people have been testing. I’m looking to do a pull request to HA today probably so it can be fixed in the next release!

@kap btw as I was looking at this reconnection issue, I noticed I never got around to deploying my handling of code 849 that we discussed back in January. That change is now in my local branch: https://github.com/Cinntax/home-assistant/tree/fix_envisalink_reconnect?files=1

Would you like to give it a test as a dsc user?

@Cinntax I did not get it to work. I copied your envisalink.py into my custom_components folder (I’m running hassio) and upon startup I do get a warning in the log about how I am using a custom component for envisalink, so it appears to be in use.

However, when I remove AC power I still only get the trouble: flag changing to true. No change to ac_present: or anything else.

Any suggestion on what I should try next?

@kap- hey thanks for giving it a shot. Can you tell if it upgraded to the latest pyenvisalink? It should at the very least change your “alpha”- which is the text based status message. It should be on v2.3.

@Cinntax - here are a couple more clues, hopefully they help:

  1. I’ve now updated to the envisalink.py you posted on 8/13.
  2. I’m running hass.io 0.75.3

Not sure where I should see a pyenvisalink version number. But the “alpha” message is “Ready” all the time except a couple times it changed to “AC Power Lost” for a fraction of a second right after I removed power from the panel. Then immediately changes back to “Ready” even though the power was still disconnected. It didn’t give this “AC Power Lost” every time - usually it stays “Ready” throughout.

Here is one log from my latest attempts (it did not give “AC Power Lost” on this attempt - see the next message for a log that did):

2018-08-15 19:41:12 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] RX < 5109100
8401CD
8402CE
8403CF
8404D0
2018-08-15 19:41:12 DEBUG (MainThread) [pyenvisalink.dsc_client] No handler defined in config for 510, skipping...
2018-08-15 19:41:12 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] No handler configured for evl command.
2018-08-15 19:41:12 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] KeyError: 'handler'
2018-08-15 19:41:12 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] No callback configured for evl command.
2018-08-15 19:41:12 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] ----------------------------------------
2018-08-15 19:41:12 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] calling handler: handle_partition_state_change for code: 840 with data: 1
2018-08-15 19:41:12 DEBUG (MainThread) [pyenvisalink.dsc_client] (partition 1) state has updated: {"trouble": true}
2018-08-15 19:41:12 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] Invoking callback: callback_partition_state_change
2018-08-15 19:41:12 INFO (MainThread) [custom_components.envisalink] The envisalink sent a partition update event
2018-08-15 19:41:12 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] ----------------------------------------
2018-08-15 19:41:12 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] calling handler: handle_partition_state_change for code: 840 with data: 2
2018-08-15 19:41:12 DEBUG (MainThread) [pyenvisalink.dsc_client] (partition 2) state has updated: {"trouble": true}
2018-08-15 19:41:12 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] Invoking callback: callback_partition_state_change
2018-08-15 19:41:12 INFO (MainThread) [custom_components.envisalink] The envisalink sent a partition update event
2018-08-15 19:41:12 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] ----------------------------------------
2018-08-15 19:41:12 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] calling handler: handle_partition_state_change for code: 840 with data: 3
2018-08-15 19:41:12 DEBUG (MainThread) [pyenvisalink.dsc_client] (partition 3) state has updated: {"trouble": true}
2018-08-15 19:41:12 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] Invoking callback: callback_partition_state_change
2018-08-15 19:41:12 INFO (MainThread) [custom_components.envisalink] The envisalink sent a partition update event
2018-08-15 19:41:12 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] ----------------------------------------
2018-08-15 19:41:12 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] calling handler: handle_partition_state_change for code: 840 with data: 4
2018-08-15 19:41:12 DEBUG (MainThread) [pyenvisalink.dsc_client] (partition 4) state has updated: {"trouble": true}
2018-08-15 19:41:12 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] Invoking callback: callback_partition_state_change
2018-08-15 19:41:12 INFO (MainThread) [custom_components.envisalink] The envisalink sent a partition update event
2018-08-15 19:41:12 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] ----------------------------------------
2018-08-15 19:41:12 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.home_alarm_keypad, old_state=<state sensor.home_alarm_keypad=Ready; alarm=False, alarm_in_memory=False, armed_away=False, ac_present=True, armed_bypass=False, chime=False, armed_zero_entry_delay=False, alarm_fire_zone=False, trouble=False, bat_trouble=False, ready=True, fire=False, armed_stay=False, alpha=Ready, beep=False, exit_delay=False, entry_delay=False, last_disarmed_by_user=, last_armed_by_user=, friendly_name=Home Alarm Keypad, icon=mdi:alarm @ 2018-08-15T19:35:41.674484-04:00>, new_state=<state sensor.home_alarm_keypad=Ready; alarm=False, alarm_in_memory=False, armed_away=False, ac_present=True, armed_bypass=False, chime=False, armed_zero_entry_delay=False, alarm_fire_zone=False, trouble=True, bat_trouble=False, ready=True, fire=False, armed_stay=False, alpha=Ready, beep=False, exit_delay=False, entry_delay=False, last_disarmed_by_user=, last_armed_by_user=, friendly_name=Home Alarm Keypad, icon=mdi:alarm @ 2018-08-15T19:35:41.674484-04:00>>
2018-08-15 19:41:12 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=binary_sensor.alarm_panel_trouble, old_state=<state binary_sensor.alarm_panel_trouble=off; friendly_name=Alarm Panel Trouble Status @ 2018-08-15T19:35:15.763458-04:00>, new_state=<state binary_sensor.alarm_panel_trouble=on; friendly_name=Alarm Panel Trouble Status @ 2018-08-15T19:41:12.796933-04:00>>
2018-08-15 19:41:12 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1909137520: Sending {'id': 2, 'type': 'event', 'event': {'event_type': 'state_changed', 'data': {'entity_id': 'sensor.home_alarm_keypad', 'old_state': <state sensor.home_alarm_keypad=Ready; alarm=False, alarm_in_memory=False, armed_away=False, ac_present=True, armed_bypass=False, chime=False, armed_zero_entry_delay=False, alarm_fire_zone=False, trouble=False, bat_trouble=False, ready=True, fire=False, armed_stay=False, alpha=Ready, beep=False, exit_delay=False, entry_delay=False, last_disarmed_by_user=, last_armed_by_user=, friendly_name=Home Alarm Keypad, icon=mdi:alarm @ 2018-08-15T19:35:41.674484-04:00>, 'new_state': <state sensor.home_alarm_keypad=Ready; alarm=False, alarm_in_memory=False, armed_away=False, ac_present=True, armed_bypass=False, chime=False, armed_zero_entry_delay=False, alarm_fire_zone=False, trouble=True, bat_trouble=False, ready=True, fire=False, armed_stay=False, alpha=Ready, beep=False, exit_delay=False, entry_delay=False, last_disarmed_by_user=, last_armed_by_user=, friendly_name=Home Alarm Keypad, icon=mdi:alarm @ 2018-08-15T19:35:41.674484-04:00>}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2018, 8, 15, 23, 41, 12, 773978, tzinfo=<UTC>), 'context': {'id': 'e4c4f539a23b46bcb5326b383ddaa938', 'user_id': None}}}
2018-08-15 19:41:12 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1909137520: Sending {'id': 2, 'type': 'event', 'event': {'event_type': 'state_changed', 'data': {'entity_id': 'binary_sensor.alarm_panel_trouble', 'old_state': <state binary_sensor.alarm_panel_trouble=off; friendly_name=Alarm Panel Trouble Status @ 2018-08-15T19:35:15.763458-04:00>, 'new_state': <state binary_sensor.alarm_panel_trouble=on; friendly_name=Alarm Panel Trouble Status @ 2018-08-15T19:41:12.796933-04:00>}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2018, 8, 15, 23, 41, 12, 797134, tzinfo=<UTC>), 'context': {'id': '14fbc6d33b02444497e40dcb12bb6dd7', 'user_id': None}}}
2018-08-15 19:41:12 INFO (SyncWorker_7) [homeassistant.components.device_tracker.asuswrt] Checking Devices
2018-08-15 19:41:15 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] ----------------------------------------
2018-08-15 19:41:15 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] RX < 51081FF
8411CE
8412CF
8413D0
8414D1
2018-08-15 19:41:15 DEBUG (MainThread) [pyenvisalink.dsc_client] No handler defined in config for 510, skipping...
2018-08-15 19:41:15 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] No handler configured for evl command.
2018-08-15 19:41:15 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] KeyError: 'handler'
2018-08-15 19:41:15 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] No callback configured for evl command.
2018-08-15 19:41:15 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] ----------------------------------------
2018-08-15 19:41:15 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] calling handler: handle_partition_state_change for code: 841 with data: 1
2018-08-15 19:41:15 DEBUG (MainThread) [pyenvisalink.dsc_client] (partition 1) state has updated: {"trouble": false, "ac_present": true}
2018-08-15 19:41:15 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] Invoking callback: callback_partition_state_change
2018-08-15 19:41:15 INFO (MainThread) [custom_components.envisalink] The envisalink sent a partition update event
2018-08-15 19:41:15 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] ----------------------------------------
2018-08-15 19:41:15 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] calling handler: handle_partition_state_change for code: 841 with data: 2
2018-08-15 19:41:15 DEBUG (MainThread) [pyenvisalink.dsc_client] (partition 2) state has updated: {"trouble": false, "ac_present": true}
2018-08-15 19:41:15 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] Invoking callback: callback_partition_state_change
2018-08-15 19:41:15 INFO (MainThread) [custom_components.envisalink] The envisalink sent a partition update event
2018-08-15 19:41:15 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] ----------------------------------------
2018-08-15 19:41:15 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] calling handler: handle_partition_state_change for code: 841 with data: 3
2018-08-15 19:41:15 DEBUG (MainThread) [pyenvisalink.dsc_client] (partition 3) state has updated: {"trouble": false, "ac_present": true}
2018-08-15 19:41:15 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] Invoking callback: callback_partition_state_change
2018-08-15 19:41:15 INFO (MainThread) [custom_components.envisalink] The envisalink sent a partition update event
2018-08-15 19:41:15 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] ----------------------------------------
2018-08-15 19:41:15 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] calling handler: handle_partition_state_change for code: 841 with data: 4
2018-08-15 19:41:15 DEBUG (MainThread) [pyenvisalink.dsc_client] (partition 4) state has updated: {"trouble": false, "ac_present": true}
2018-08-15 19:41:15 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] Invoking callback: callback_partition_state_change
2018-08-15 19:41:15 INFO (MainThread) [custom_components.envisalink] The envisalink sent a partition update event
2018-08-15 19:41:15 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] ----------------------------------------

Here is a log that did pop up the “AC Power Lost” alpha message very briefly:

2018-08-15 20:12:00 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] ----------------------------------------
2018-08-15 20:12:00 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] RX < 5109100
8401CD
8402CE
8403CF
8404D0
2018-08-15 20:12:00 DEBUG (MainThread) [pyenvisalink.dsc_client] No handler defined in config for 510, skipping...
2018-08-15 20:12:00 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] No handler configured for evl command.
2018-08-15 20:12:00 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] KeyError: 'handler'
2018-08-15 20:12:00 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] No callback configured for evl command.
2018-08-15 20:12:00 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] ----------------------------------------
2018-08-15 20:12:00 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] calling handler: handle_partition_state_change for code: 840 with data: 1
2018-08-15 20:12:00 DEBUG (MainThread) [pyenvisalink.dsc_client] (partition 1) state has updated: {"trouble": true}
2018-08-15 20:12:00 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] Invoking callback: callback_partition_state_change
2018-08-15 20:12:00 INFO (MainThread) [custom_components.envisalink] The envisalink sent a partition update event
2018-08-15 20:12:00 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] ----------------------------------------
2018-08-15 20:12:00 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] calling handler: handle_partition_state_change for code: 840 with data: 2
2018-08-15 20:12:00 DEBUG (MainThread) [pyenvisalink.dsc_client] (partition 2) state has updated: {"trouble": true}
2018-08-15 20:12:00 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] Invoking callback: callback_partition_state_change
2018-08-15 20:12:00 INFO (MainThread) [custom_components.envisalink] The envisalink sent a partition update event
2018-08-15 20:12:00 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] ----------------------------------------
2018-08-15 20:12:00 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] calling handler: handle_partition_state_change for code: 840 with data: 3
2018-08-15 20:12:00 DEBUG (MainThread) [pyenvisalink.dsc_client] (partition 3) state has updated: {"trouble": true}
2018-08-15 20:12:00 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] Invoking callback: callback_partition_state_change
2018-08-15 20:12:00 INFO (MainThread) [custom_components.envisalink] The envisalink sent a partition update event
2018-08-15 20:12:00 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] ----------------------------------------
2018-08-15 20:12:00 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] calling handler: handle_partition_state_change for code: 840 with data: 4
2018-08-15 20:12:00 DEBUG (MainThread) [pyenvisalink.dsc_client] (partition 4) state has updated: {"trouble": true}
2018-08-15 20:12:00 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] Invoking callback: callback_partition_state_change
2018-08-15 20:12:00 INFO (MainThread) [custom_components.envisalink] The envisalink sent a partition update event
2018-08-15 20:12:00 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] ----------------------------------------
2018-08-15 20:12:00 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.home_alarm_keypad, old_state=<state sensor.home_alarm_keypad=Ready; alarm=False, alarm_in_memory=False, armed_away=False, ac_present=True, armed_bypass=False, chime=False, armed_zero_entry_delay=False, alarm_fire_zone=False, trouble=False, bat_trouble=False, ready=True, fire=False, armed_stay=False, alpha=Ready, beep=False, exit_delay=False, entry_delay=False, last_disarmed_by_user=, last_armed_by_user=, friendly_name=Home Alarm Keypad, icon=mdi:alarm @ 2018-08-15T20:08:51.542076-04:00>, new_state=<state sensor.home_alarm_keypad=Ready; alarm=False, alarm_in_memory=False, armed_away=False, ac_present=True, armed_bypass=False, chime=False, armed_zero_entry_delay=False, alarm_fire_zone=False, trouble=True, bat_trouble=False, ready=True, fire=False, armed_stay=False, alpha=Ready, beep=False, exit_delay=False, entry_delay=False, last_disarmed_by_user=, last_armed_by_user=, friendly_name=Home Alarm Keypad, icon=mdi:alarm @ 2018-08-15T20:08:51.542076-04:00>>
2018-08-15 20:12:01 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=binary_sensor.alarm_panel_trouble, old_state=<state binary_sensor.alarm_panel_trouble=off; friendly_name=Alarm Panel Trouble Status @ 2018-08-15T20:08:23.408770-04:00>, new_state=<state binary_sensor.alarm_panel_trouble=on; friendly_name=Alarm Panel Trouble Status @ 2018-08-15T20:12:01.002645-04:00>>
2018-08-15 20:12:01 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1872930480: Sending {'id': 2, 'type': 'event', 'event': {'event_type': 'state_changed', 'data': {'entity_id': 'sensor.home_alarm_keypad', 'old_state': <state sensor.home_alarm_keypad=Ready; alarm=False, alarm_in_memory=False, armed_away=False, ac_present=True, armed_bypass=False, chime=False, armed_zero_entry_delay=False, alarm_fire_zone=False, trouble=False, bat_trouble=False, ready=True, fire=False, armed_stay=False, alpha=Ready, beep=False, exit_delay=False, entry_delay=False, last_disarmed_by_user=, last_armed_by_user=, friendly_name=Home Alarm Keypad, icon=mdi:alarm @ 2018-08-15T20:08:51.542076-04:00>, 'new_state': <state sensor.home_alarm_keypad=Ready; alarm=False, alarm_in_memory=False, armed_away=False, ac_present=True, armed_bypass=False, chime=False, armed_zero_entry_delay=False, alarm_fire_zone=False, trouble=True, bat_trouble=False, ready=True, fire=False, armed_stay=False, alpha=Ready, beep=False, exit_delay=False, entry_delay=False, last_disarmed_by_user=, last_armed_by_user=, friendly_name=Home Alarm Keypad, icon=mdi:alarm @ 2018-08-15T20:08:51.542076-04:00>}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2018, 8, 16, 0, 12, 0, 969398, tzinfo=<UTC>), 'context': {'id': '756989b53cbd4e7d98d2d20266b4ed89', 'user_id': None}}}
2018-08-15 20:12:01 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1921996976: Sending {'id': 2, 'type': 'event', 'event': {'event_type': 'state_changed', 'data': {'entity_id': 'sensor.home_alarm_keypad', 'old_state': <state sensor.home_alarm_keypad=Ready; alarm=False, alarm_in_memory=False, armed_away=False, ac_present=True, armed_bypass=False, chime=False, armed_zero_entry_delay=False, alarm_fire_zone=False, trouble=False, bat_trouble=False, ready=True, fire=False, armed_stay=False, alpha=Ready, beep=False, exit_delay=False, entry_delay=False, last_disarmed_by_user=, last_armed_by_user=, friendly_name=Home Alarm Keypad, icon=mdi:alarm @ 2018-08-15T20:08:51.542076-04:00>, 'new_state': <state sensor.home_alarm_keypad=Ready; alarm=False, alarm_in_memory=False, armed_away=False, ac_present=True, armed_bypass=False, chime=False, armed_zero_entry_delay=False, alarm_fire_zone=False, trouble=True, bat_trouble=False, ready=True, fire=False, armed_stay=False, alpha=Ready, beep=False, exit_delay=False, entry_delay=False, last_disarmed_by_user=, last_armed_by_user=, friendly_name=Home Alarm Keypad, icon=mdi:alarm @ 2018-08-15T20:08:51.542076-04:00>}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2018, 8, 16, 0, 12, 0, 969398, tzinfo=<UTC>), 'context': {'id': '756989b53cbd4e7d98d2d20266b4ed89', 'user_id': None}}}
2018-08-15 20:12:01 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1872930480: Sending {'id': 2, 'type': 'event', 'event': {'event_type': 'state_changed', 'data': {'entity_id': 'binary_sensor.alarm_panel_trouble', 'old_state': <state binary_sensor.alarm_panel_trouble=off; friendly_name=Alarm Panel Trouble Status @ 2018-08-15T20:08:23.408770-04:00>, 'new_state': <state binary_sensor.alarm_panel_trouble=on; friendly_name=Alarm Panel Trouble Status @ 2018-08-15T20:12:01.002645-04:00>}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2018, 8, 16, 0, 12, 1, 2856, tzinfo=<UTC>), 'context': {'id': '92b2fbf3f8d54a5c8c89c84d24a1a9a7', 'user_id': None}}}
2018-08-15 20:12:01 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1921996976: Sending {'id': 2, 'type': 'event', 'event': {'event_type': 'state_changed', 'data': {'entity_id': 'binary_sensor.alarm_panel_trouble', 'old_state': <state binary_sensor.alarm_panel_trouble=off; friendly_name=Alarm Panel Trouble Status @ 2018-08-15T20:08:23.408770-04:00>, 'new_state': <state binary_sensor.alarm_panel_trouble=on; friendly_name=Alarm Panel Trouble Status @ 2018-08-15T20:12:01.002645-04:00>}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2018, 8, 16, 0, 12, 1, 2856, tzinfo=<UTC>), 'context': {'id': '92b2fbf3f8d54a5c8c89c84d24a1a9a7', 'user_id': None}}}
2018-08-15 20:12:01 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1872930480: Sending {'id': 2, 'type': 'event', 'event': {'event_type': 'state_changed', 'data': {'entity_id': 'sensor.date__time', 'old_state': <state sensor.date__time=2018-08-15, 20:11; friendly_name=Date & Time, icon=mdi:calendar-clock, hidden=True @ 2018-08-15T20:11:01.348486-04:00>, 'new_state': <state sensor.date__time=2018-08-15, 20:12; friendly_name=Date & Time, icon=mdi:calendar-clock, hidden=True @ 2018-08-15T20:12:01.372499-04:00>}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2018, 8, 16, 0, 12, 1, 372689, tzinfo=<UTC>), 'context': {'id': 'a2b6954e78584562a3e61e81741dead2', 'user_id': None}}}
2018-08-15 20:12:01 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1921996976: Sending {'id': 2, 'type': 'event', 'event': {'event_type': 'state_changed', 'data': {'entity_id': 'sensor.date__time', 'old_state': <state sensor.date__time=2018-08-15, 20:11; friendly_name=Date & Time, icon=mdi:calendar-clock, hidden=True @ 2018-08-15T20:11:01.348486-04:00>, 'new_state': <state sensor.date__time=2018-08-15, 20:12; friendly_name=Date & Time, icon=mdi:calendar-clock, hidden=True @ 2018-08-15T20:12:01.372499-04:00>}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2018, 8, 16, 0, 12, 1, 372689, tzinfo=<UTC>), 'context': {'id': 'a2b6954e78584562a3e61e81741dead2', 'user_id': None}}}
2018-08-15 20:12:05 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] ----------------------------------------
2018-08-15 20:12:05 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] RX < 51110F8
8490207
51080FE
51100F7
2018-08-15 20:12:05 DEBUG (MainThread) [pyenvisalink.dsc_client] No handler defined in config for 511, skipping...
2018-08-15 20:12:05 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] No handler configured for evl command.
2018-08-15 20:12:05 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] KeyError: 'handler'
2018-08-15 20:12:05 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] No callback configured for evl command.
2018-08-15 20:12:05 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] ----------------------------------------
2018-08-15 20:12:05 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] calling handler: handle_keypad_update for code: 849 with data: 02
2018-08-15 20:12:05 DEBUG (MainThread) [pyenvisalink.dsc_client] (All partitions) state has updated: {"alpha": "AC Power Lost", "ac_present": true}
2018-08-15 20:12:05 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] Invoking callback: callback_keypad_update
2018-08-15 20:12:05 INFO (MainThread) [custom_components.envisalink] Envisalink sent new alarm info. Updating alarms...
2018-08-15 20:12:05 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] ----------------------------------------
2018-08-15 20:12:05 DEBUG (MainThread) [pyenvisalink.dsc_client] No handler defined in config for 510, skipping...
2018-08-15 20:12:05 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] No handler configured for evl command.
2018-08-15 20:12:05 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] KeyError: 'handler'
2018-08-15 20:12:05 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] No callback configured for evl command.
2018-08-15 20:12:05 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] ----------------------------------------
2018-08-15 20:12:05 DEBUG (MainThread) [pyenvisalink.dsc_client] No handler defined in config for 511, skipping...
2018-08-15 20:12:05 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] No handler configured for evl command.
2018-08-15 20:12:05 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] KeyError: 'handler'
2018-08-15 20:12:05 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] No callback configured for evl command.
2018-08-15 20:12:05 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] ----------------------------------------
2018-08-15 20:12:05 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.home_alarm_keypad, old_state=<state sensor.home_alarm_keypad=Ready; alarm=False, alarm_in_memory=False, armed_away=False, ac_present=True, armed_bypass=False, chime=False, armed_zero_entry_delay=False, alarm_fire_zone=False, trouble=True, bat_trouble=False, ready=True, fire=False, armed_stay=False, alpha=Ready, beep=False, exit_delay=False, entry_delay=False, last_disarmed_by_user=, last_armed_by_user=, friendly_name=Home Alarm Keypad, icon=mdi:alarm @ 2018-08-15T20:08:51.542076-04:00>, new_state=<state sensor.home_alarm_keypad=AC Power Lost; alarm=False, alarm_in_memory=False, armed_away=False, ac_present=True, armed_bypass=False, chime=False, armed_zero_entry_delay=False, alarm_fire_zone=False, trouble=True, bat_trouble=False, ready=True, fire=False, armed_stay=False, alpha=AC Power Lost, beep=False, exit_delay=False, entry_delay=False, last_disarmed_by_user=, last_armed_by_user=, friendly_name=Home Alarm Keypad, icon=mdi:alarm @ 2018-08-15T20:12:05.967057-04:00>>
2018-08-15 20:12:05 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1872930480: Sending {'id': 2, 'type': 'event', 'event': {'event_type': 'state_changed', 'data': {'entity_id': 'sensor.home_alarm_keypad', 'old_state': <state sensor.home_alarm_keypad=Ready; alarm=False, alarm_in_memory=False, armed_away=False, ac_present=True, armed_bypass=False, chime=False, armed_zero_entry_delay=False, alarm_fire_zone=False, trouble=True, bat_trouble=False, ready=True, fire=False, armed_stay=False, alpha=Ready, beep=False, exit_delay=False, entry_delay=False, last_disarmed_by_user=, last_armed_by_user=, friendly_name=Home Alarm Keypad, icon=mdi:alarm @ 2018-08-15T20:08:51.542076-04:00>, 'new_state': <state sensor.home_alarm_keypad=AC Power Lost; alarm=False, alarm_in_memory=False, armed_away=False, ac_present=True, armed_bypass=False, chime=False, armed_zero_entry_delay=False, alarm_fire_zone=False, trouble=True, bat_trouble=False, ready=True, fire=False, armed_stay=False, alpha=AC Power Lost, beep=False, exit_delay=False, entry_delay=False, last_disarmed_by_user=, last_armed_by_user=, friendly_name=Home Alarm Keypad, icon=mdi:alarm @ 2018-08-15T20:12:05.967057-04:00>}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2018, 8, 16, 0, 12, 5, 967286, tzinfo=<UTC>), 'context': {'id': 'ab194745a3e84141b1534eabad6bcee4', 'user_id': None}}}
2018-08-15 20:12:06 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1921996976: Sending {'id': 2, 'type': 'event', 'event': {'event_type': 'state_changed', 'data': {'entity_id': 'sensor.home_alarm_keypad', 'old_state': <state sensor.home_alarm_keypad=Ready; alarm=False, alarm_in_memory=False, armed_away=False, ac_present=True, armed_bypass=False, chime=False, armed_zero_entry_delay=False, alarm_fire_zone=False, trouble=True, bat_trouble=False, ready=True, fire=False, armed_stay=False, alpha=Ready, beep=False, exit_delay=False, entry_delay=False, last_disarmed_by_user=, last_armed_by_user=, friendly_name=Home Alarm Keypad, icon=mdi:alarm @ 2018-08-15T20:08:51.542076-04:00>, 'new_state': <state sensor.home_alarm_keypad=AC Power Lost; alarm=False, alarm_in_memory=False, armed_away=False, ac_present=True, armed_bypass=False, chime=False, armed_zero_entry_delay=False, alarm_fire_zone=False, trouble=True, bat_trouble=False, ready=True, fire=False, armed_stay=False, alpha=AC Power Lost, beep=False, exit_delay=False, entry_delay=False, last_disarmed_by_user=, last_armed_by_user=, friendly_name=Home Alarm Keypad, icon=mdi:alarm @ 2018-08-15T20:12:05.967057-04:00>}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2018, 8, 16, 0, 12, 5, 967286, tzinfo=<UTC>), 'context': {'id': 'ab194745a3e84141b1534eabad6bcee4', 'user_id': None}}}
2018-08-15 20:12:06 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] ----------------------------------------
2018-08-15 20:12:06 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] RX < 5109100
6501CC
2018-08-15 20:12:06 DEBUG (MainThread) [pyenvisalink.dsc_client] No handler defined in config for 510, skipping...
2018-08-15 20:12:06 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] No handler configured for evl command.
2018-08-15 20:12:06 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] KeyError: 'handler'
2018-08-15 20:12:06 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] No callback configured for evl command.
2018-08-15 20:12:06 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] ----------------------------------------
2018-08-15 20:12:06 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] calling handler: handle_partition_state_change for code: 650 with data: 1
2018-08-15 20:12:06 DEBUG (MainThread) [pyenvisalink.dsc_client] (partition 1) state has updated: {"ready": true, "alpha": "Ready"}
2018-08-15 20:12:06 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] Invoking callback: callback_partition_state_change
2018-08-15 20:12:06 INFO (MainThread) [custom_components.envisalink] The envisalink sent a partition update event
2018-08-15 20:12:06 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] ----------------------------------------
2018-08-15 20:12:06 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.home_alarm_keypad, old_state=<state sensor.home_alarm_keypad=AC Power Lost; alarm=False, alarm_in_memory=False, armed_away=False, ac_present=True, armed_bypass=False, chime=False, armed_zero_entry_delay=False, alarm_fire_zone=False, trouble=True, bat_trouble=False, ready=True, fire=False, armed_stay=False, alpha=AC Power Lost, beep=False, exit_delay=False, entry_delay=False, last_disarmed_by_user=, last_armed_by_user=, friendly_name=Home Alarm Keypad, icon=mdi:alarm @ 2018-08-15T20:12:05.967057-04:00>, new_state=<state sensor.home_alarm_keypad=Ready; alarm=False, alarm_in_memory=False, armed_away=False, ac_present=True, armed_bypass=False, chime=False, armed_zero_entry_delay=False, alarm_fire_zone=False, trouble=True, bat_trouble=False, ready=True, fire=False, armed_stay=False, alpha=Ready, beep=False, exit_delay=False, entry_delay=False, last_disarmed_by_user=, last_armed_by_user=, friendly_name=Home Alarm Keypad, icon=mdi:alarm @ 2018-08-15T20:12:06.444028-04:00>>
2018-08-15 20:12:06 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1872930480: Sending {'id': 2, 'type': 'event', 'event': {'event_type': 'state_changed', 'data': {'entity_id': 'sensor.home_alarm_keypad', 'old_state': <state sensor.home_alarm_keypad=AC Power Lost; alarm=False, alarm_in_memory=False, armed_away=False, ac_present=True, armed_bypass=False, chime=False, armed_zero_entry_delay=False, alarm_fire_zone=False, trouble=True, bat_trouble=False, ready=True, fire=False, armed_stay=False, alpha=AC Power Lost, beep=False, exit_delay=False, entry_delay=False, last_disarmed_by_user=, last_armed_by_user=, friendly_name=Home Alarm Keypad, icon=mdi:alarm @ 2018-08-15T20:12:05.967057-04:00>, 'new_state': <state sensor.home_alarm_keypad=Ready; alarm=False, alarm_in_memory=False, armed_away=False, ac_present=True, armed_bypass=False, chime=False, armed_zero_entry_delay=False, alarm_fire_zone=False, trouble=True, bat_trouble=False, ready=True, fire=False, armed_stay=False, alpha=Ready, beep=False, exit_delay=False, entry_delay=False, last_disarmed_by_user=, last_armed_by_user=, friendly_name=Home Alarm Keypad, icon=mdi:alarm @ 2018-08-15T20:12:06.444028-04:00>}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2018, 8, 16, 0, 12, 6, 444253, tzinfo=<UTC>), 'context': {'id': '20867cae2a214e9c81303673c5abb1e3', 'user_id': None}}}
2018-08-15 20:12:06 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1921996976: Sending {'id': 2, 'type': 'event', 'event': {'event_type': 'state_changed', 'data': {'entity_id': 'sensor.home_alarm_keypad', 'old_state': <state sensor.home_alarm_keypad=AC Power Lost; alarm=False, alarm_in_memory=False, armed_away=False, ac_present=True, armed_bypass=False, chime=False, armed_zero_entry_delay=False, alarm_fire_zone=False, trouble=True, bat_trouble=False, ready=True, fire=False, armed_stay=False, alpha=AC Power Lost, beep=False, exit_delay=False, entry_delay=False, last_disarmed_by_user=, last_armed_by_user=, friendly_name=Home Alarm Keypad, icon=mdi:alarm @ 2018-08-15T20:12:05.967057-04:00>, 'new_state': <state sensor.home_alarm_keypad=Ready; alarm=False, alarm_in_memory=False, armed_away=False, ac_present=True, armed_bypass=False, chime=False, armed_zero_entry_delay=False, alarm_fire_zone=False, trouble=True, bat_trouble=False, ready=True, fire=False, armed_stay=False, alpha=Ready, beep=False, exit_delay=False, entry_delay=False, last_disarmed_by_user=, last_armed_by_user=, friendly_name=Home Alarm Keypad, icon=mdi:alarm @ 2018-08-15T20:12:06.444028-04:00>}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2018, 8, 16, 0, 12, 6, 444253, tzinfo=<UTC>), 'context': {'id': '20867cae2a214e9c81303673c5abb1e3', 'user_id': None}}}
2018-08-15 20:12:10 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] ----------------------------------------
2018-08-15 20:12:10 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] RX < 51081FF
8411CE
8412CF
8413D0
8414D1
2018-08-15 20:12:10 DEBUG (MainThread) [pyenvisalink.dsc_client] No handler defined in config for 510, skipping...
2018-08-15 20:12:10 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] No handler configured for evl command.
2018-08-15 20:12:10 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] KeyError: 'handler'
2018-08-15 20:12:10 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] No callback configured for evl command.
2018-08-15 20:12:10 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] ----------------------------------------
2018-08-15 20:12:10 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] calling handler: handle_partition_state_change for code: 841 with data: 1
2018-08-15 20:12:10 DEBUG (MainThread) [pyenvisalink.dsc_client] (partition 1) state has updated: {"trouble": false, "ac_present": true}
2018-08-15 20:12:10 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] Invoking callback: callback_partition_state_change
2018-08-15 20:12:10 INFO (MainThread) [custom_components.envisalink] The envisalink sent a partition update event
2018-08-15 20:12:10 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] ----------------------------------------
2018-08-15 20:12:10 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] calling handler: handle_partition_state_change for code: 841 with data: 2
2018-08-15 20:12:10 DEBUG (MainThread) [pyenvisalink.dsc_client] (partition 2) state has updated: {"trouble": false, "ac_present": true}
2018-08-15 20:12:10 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] Invoking callback: callback_partition_state_change
2018-08-15 20:12:10 INFO (MainThread) [custom_components.envisalink] The envisalink sent a partition update event
2018-08-15 20:12:10 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] ----------------------------------------
2018-08-15 20:12:10 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] calling handler: handle_partition_state_change for code: 841 with data: 3
2018-08-15 20:12:10 DEBUG (MainThread) [pyenvisalink.dsc_client] (partition 3) state has updated: {"trouble": false, "ac_present": true}
2018-08-15 20:12:10 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] Invoking callback: callback_partition_state_change
2018-08-15 20:12:10 INFO (MainThread) [custom_components.envisalink] The envisalink sent a partition update event
2018-08-15 20:12:10 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] ----------------------------------------
2018-08-15 20:12:10 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] calling handler: handle_partition_state_change for code: 841 with data: 4
2018-08-15 20:12:10 DEBUG (MainThread) [pyenvisalink.dsc_client] (partition 4) state has updated: {"trouble": false, "ac_present": true}
2018-08-15 20:12:10 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] Invoking callback: callback_partition_state_change
2018-08-15 20:12:10 INFO (MainThread) [custom_components.envisalink] The envisalink sent a partition update event
2018-08-15 20:12:10 DEBUG (MainThread) [pyenvisalink.envisalink_base_client] ----------------------------------------

Ok thanks!

For the first log there, unfortunately i don’t think there’s anything i can do. I actually don’t see the DSC panel even sending the proper event that I could use. It’s sending status 840, which is just “the trouble LED is on”, without a detailed status, and then again sending 841, which is “trouble cleared”. Maybe if you lost power long enough it’d eventually send the proper status…

For the second log- I do see a mistake. When i handle event 849, I’m failing to set the ac_present flag properly. I see the error on the pyenvisalink side. In terms of it clearing right away- that’s happening because the panel is coming back and stating that it’s “ready”- showing that it properly failed over- so it’s quickly overwriting the status.

What do you think? At the very least i should fix the ac_present issue. Otherwise i’m a little torn on how to handle the actual status message… perhaps we could have a new field called “trouble_description”, or something like that.

My opinion, if I’m understanding the situation correctly, would be to just follow exactly what the panel is telling you. If the status message comes and goes quickly, so be it. One can still trigger an automation on that pulse + the ac_present flag. Or on the ac_present flag alone. Once you have ac_present behaving as you’d expect, I can test it a little more to see what happens when AC power is removed for a little longer - in most cases I just pulled power and reapplied it within a few seconds.

Thanks for your work on this. I use your envisalink integration for a bunch of automations and adding some more for power outage detection is an added bonus.

I’ve got the Envisalink 4 installed with my DSC alarm…and got an issue : Password is incorrect

envisalink:
  host: 192.168.0.90
  panel_type: DSC
  code: '1234'
  user_name: [email protected]
  password: evz281
  evl_version: 4


2018-10-02 19:39:57 INFO (MainThread) [homeassistant.setup] Setting up envisalink
2018-10-02 19:39:57 INFO (MainThread) [homeassistant.components.envisalink] Start envisalink.
2018-10-02 19:39:57 INFO (MainThread) [root] Connecting to envisalink on host: 192.168.0.90, port: 4025
2018-10-02 19:39:57 INFO (MainThread) [pyenvisalink.envisalink_base_client] Latching onto an existing event loop.
2018-10-02 19:39:57 INFO (MainThread) [pyenvisalink.envisalink_base_client] Started to connect to Envisalink... at 192.168.0.90:4025
2018-10-02 19:39:57 INFO (MainThread) [pyenvisalink.envisalink_base_client] Connection Successful!
2018-10-02 19:39:57 ERROR (MainThread) [pyenvisalink.envisalink_base_client] Password is incorrect. Server is closing socket connection.
2018-10-02 19:39:57 INFO (MainThread) [pyenvisalink.envisalink_base_client] An event loop was given to us- we will shutdown when that event loop shuts down.
2018-10-02 19:39:57 ERROR (MainThread) [homeassistant.components.envisalink] The Envisalink rejected your credentials
2018-10-02 19:39:57 INFO (MainThread) [homeassistant.setup] Setup of domain envisalink took 0.1 seconds.
2018-10-02 19:39:57 ERROR (MainThread) [homeassistant.setup] Setup failed for envisalink: Component failed to initialize.
2018-10-02 19:39:57 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=persistent_notification, service=create, service_data=title=Invalid config, message=The following components and platforms could not be set up:

 - [envisalink](https://home-assistant.io/components/envisalink/)

Please check your config., notification_id=invalid_config>
2018-10-02 19:39:57 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=persistent_notification.invalid_config, old_state=None, new_state=<state persistent_notification.invalid_config=notifying; title=Invalid config, message=The following components and platforms could not be set up:

 - [envisalink](https://home-assistant.io/components/envisalink/)

Please check your config. @ 2018-10-02T19:39:57.109645+01:00>>

I’m only using 6 chars for the password
The user_name/password are working in the web UI of https://www.eyez-on.com/ where I can see my alarm, “EVL4 DSC”, and the 3 zones.
I’m running Home Assistant 0.76.2 in Docker

Any idea what’s wrong ?

Are you using the user name and password for the Envisalink online service or the one for your local card/interface, i.e. at http://192.168.0.90?
It needs to be the one for the local address.

1 Like

Thanks @chairstacker I didn’t see that in the documentation but you’re right, I’ve now set user/user and it works.

I didn’t even know that the board had an integrated webserver, I’ve only read about the UI on the Ez website

Surprisingly, nothing about alarm or envisalink in /dev-state

What else do you have in your configuration - anything like this?

  keepalive_interval: 60
  zonedump_interval: 60
#  panic_type: Police
  zones:
    09:
      name: 'Front Door'
#      type: 'opening' = default
    11:
      name: 'Office Window'
    16:
      name: 'Living Room Motion'
      type: 'motion'

Once the zones have been defined you should see them show up as binary_sensors.
But I think you should at least be able to find entries for these entities:

  • alarm_control_panel.home_alarm
  • sensor.home_alarm_keypad

Thanks @chairstacker, I’ve edited my config to have

envisalink:
  host: 192.168.0.90
  panel_type: DSC
  code: '1234'
  user_name: user
  password: user
  evl_version: 4
  zones:
    2:
      name: 'Zone 2'
      type: 'opening'
    3:
      name: 'Zone 3'
      type: 'motion'
    4:
      name: 'Zone 4'
      type: 'motion'
    5:
      name: 'Zone 5'
      type: 'motion'
    6:
      name: 'Zone 6'
      type: 'motion'

But surprisingly I don’t see any object with ‘alarm’ in its name, in /dev-state.
But I see the zones as binary sensors.

in the EV4 web UI I can see


and

I can see in

What do I need to add to be able to arm/disarm the alarm, and see the alarm arming state ?

Log is

2018-10-03 10:47:37 INFO (MainThread) [homeassistant.loader] Loaded envisalink from homeassistant.components.envisalink
2018-10-03 10:47:39 INFO (MainThread) [homeassistant.setup] Setting up envisalink
2018-10-03 10:47:39 INFO (MainThread) [homeassistant.components.envisalink] Start envisalink.
2018-10-03 10:47:39 INFO (MainThread) [root] Connecting to envisalink on host: 192.168.0.90, port: 4025
2018-10-03 10:47:39 INFO (MainThread) [pyenvisalink.envisalink_base_client] Latching onto an existing event loop.
2018-10-03 10:47:39 INFO (MainThread) [pyenvisalink.envisalink_base_client] Started to connect to Envisalink... at 192.168.0.90:4025
2018-10-03 10:47:39 INFO (MainThread) [pyenvisalink.envisalink_base_client] Connection Successful!
2018-10-03 10:47:39 INFO (MainThread) [homeassistant.components.envisalink] Established a connection with the Envisalink
2018-10-03 10:47:39 INFO (MainThread) [homeassistant.setup] Setup of domain envisalink took 0.1 seconds.
2018-10-03 10:47:39 INFO (MainThread) [homeassistant.core] Bus:Handling <Event component_loaded[L]: component=envisalink>
2018-10-03 10:47:39 INFO (MainThread) [homeassistant.components.envisalink] Envisalink sent a zone update event. Updating zones...

I also tried to remove the zones config, and I still don’t have

  • alarm_control_panel.home_alarm
  • sensor.home_alarm_keypad