I think the page you are looking at there is the event queue. You want to look at the MQTT queue which I thought was on the developer page somewhere, but I can’t see it on my phone.
Great work @dchesterton. I have my own serial to mqtt hardware adapter for Texecom using the Crestron and Simple protocol. What you’ve done here it brilliant! It sucks that Texecom won’t let you release the code.
Does this stop the standard Texecom app and notifications from working? In my early testing the SmartCom could only handle a single TCP connection. So if any other session was open the Texecom cloud can’t connect and the SmartCom will not send updates to it.
Thanks,
Kev
Hi @dchesterton this is a great piece of code that you have written, well done…
I had this working properly yesterday but updated it today after you said that you had done some code updates. But I have now run into a problem setting up the MQTT Alarm Panel within home assistant. I have entered all the new format for topic and command that you have suggested but it returns this error…
Any ideas…
Many thanks
Logger: homeassistant.components.mqtt.alarm_control_panel
Source: components/mqtt/alarm_control_panel.py:199
Integration: MQTT (documentation, issues)
First occurred: 4:36:41 PM (1 occurrences)
Last logged: 4:36:41 PMReceived unexpected payload: {“name”:“House Alarm”,“number”:1,“status”:“disarmed”}
Yeah I believe it does stop the app from working. I think others have it working by connecting both a SmartCom and a ComIP which should allow the 2 connections.
Can you try restarting Home Assistant? There’s a bug in HA where if the discovery code changes, HA doesn’t pick it up until it’s restarted.
That’s strange. I wonder if the old topics are still around which is confusing Home Assistant? You might have to remove the retained topics under homeassistant/alarm_control_panel/texecom-XXXX/...
and homeassistant/binary_sensor/texecom-XXXX/...
I find using a tool like MQTT Explorer easiest for deleting retained messages.
Home Assistant discovery is enabled and HA discovers zones, how do I pull the “other” sensors in?
It should create an Alarm Control Panel entity for each area. If you go to Developer Tools and then search for alarm_control_panel
under ‘Filter entities’ does it show up?
no, I am not seeing that
areas:
# This can either be the area number (A = 1, B = 2, etc.) or the name of the area lowercased and with
# spaces replaced by underscores (e.g. Summer House = summer_house)
house:
mapping:
# Required: mapping of Texecom arm types (full_arm, part_arm_1, part_arm_2, part_arm_3) to Home Assistant arm types (armed_away, armed_home, armed_night)
# Omit any which are not relevant
full_arm: armed_away
part_arm_1: armed_night
part_arm_2: armed_home
options:
# Optional: any additional parameters to pass in the Home Assistant auto discovery configuration
# See https://www.home-assistant.io/integrations/alarm_control_panel.mqtt/#configuration
code_arm_required: false
Do I need to put anything in here?
@dchesterton, I’m sorry there are multiple threads going on now…I deleted the database in mqtt. I now have two instances of MQTT Alarm Control Panel
- alarm_control_panel.house_alarm is showing the green symbol online but has no keypad
2: alarm_control_panel.mqtt_alarm is showing offline but has the keypad
I’m really confused now
It should at least create the entity without configuring anything in there. Have you named the area on your Texecom panel? If not, I think I’ve spotted a bug which might be causing it not to show up in Home Assistant…
Can you change the log level to debug (add log: 0
to your config) and send the log you get when you start the app?
Attaching to texecom2mqtt
texecom2mqtt | 2020-09-12 17:50:23 - INFO: Connected to alarm, sleeping for 0.5 seconds...
texecom2mqtt | 2020-09-12 17:50:23 - INFO: Connection ready
texecom2mqtt | 2020-09-12 17:50:23 - INFO: Fetched serial number: 1184708
texecom2mqtt | 2020-09-12 17:50:23 - INFO: Logging in
texecom2mqtt | 2020-09-12 17:50:23 - DEBUG: Executing command 1
texecom2mqtt | 2020-09-12 17:50:23 - INFO: Successfully logged in
texecom2mqtt | 2020-09-12 17:50:24 - DEBUG: Publishing to texecom2mqtt/1184708/status: online
texecom2mqtt | 2020-09-12 17:50:24 - INFO: Connected to MQTT
texecom2mqtt | 2020-09-12 17:50:24 - DEBUG: Executing command 22
texecom2mqtt | 2020-09-12 17:50:24 - INFO: Fetched panel info: Premier Elite 24 (V5.02.01LS1)
texecom2mqtt | 2020-09-12 17:50:24 - DEBUG: Executing command 25
texecom2mqtt | 2020-09-12 17:50:24 - DEBUG: Publishing to texecom2mqtt/1184708/power: {"battery_charging_current":0,"battery_voltage":13.56,"panel_current":0,"panel_voltage":13.63}
texecom2mqtt | 2020-09-12 17:50:24 - DEBUG: Executing command 37
texecom2mqtt | 2020-09-12 17:50:24 - DEBUG: Executing command 34
texecom2mqtt | 2020-09-12 17:50:25 - DEBUG: Executing command 3
texecom2mqtt | 2020-09-12 17:50:25 - INFO: Fetched zone 1: HALLWAY Motion Sensor (type: Entry/Exit 1) (areas: [1])
texecom2mqtt | 2020-09-12 17:50:25 - DEBUG: Executing command 3
texecom2mqtt | 2020-09-12 17:50:25 - INFO: Fetched zone 2: LOUNGE FRONT Motion Sensor (type: Guard) (areas: [1])
texecom2mqtt | 2020-09-12 17:50:25 - DEBUG: Executing command 3
texecom2mqtt | 2020-09-12 17:50:26 - INFO: Fetched zone 3: LOUNGE REAR Motion Sensor (type: Guard) (areas: [1])
texecom2mqtt | 2020-09-12 17:50:26 - DEBUG: Executing command 3
texecom2mqtt | 2020-09-12 17:50:26 - INFO: Fetched zone 4: BACKROOM Motion Sensor (type: Guard) (areas: [1])
texecom2mqtt | 2020-09-12 17:50:26 - DEBUG: Executing command 3
texecom2mqtt | 2020-09-12 17:50:26 - INFO: Fetched zone 5: KITCHEN Motion Sensor (type: Guard) (areas: [1])
texecom2mqtt | 2020-09-12 17:50:26 - DEBUG: Executing command 3
texecom2mqtt | 2020-09-12 17:50:27 - INFO: Fetched zone 6: UTILITY ROOM Motion Sensor (type: Guard) (areas: [1])
texecom2mqtt | 2020-09-12 17:50:27 - DEBUG: Executing command 3
texecom2mqtt | 2020-09-12 17:50:27 - INFO: Fetched zone 7: GARAGE Motion Sensor (type: Guard) (areas: [1])
texecom2mqtt | 2020-09-12 17:50:27 - DEBUG: Executing command 3
texecom2mqtt | 2020-09-12 17:50:27 - INFO: Fetched zone 8: LANDING Motion Sensor (type: Guard) (areas: [1])
texecom2mqtt | 2020-09-12 17:50:27 - DEBUG: Executing command 3
texecom2mqtt | 2020-09-12 17:50:27 - INFO: Fetched zone 9: MASTER BEDROOM Motion Sensor (type: Guard) (areas: [1])
texecom2mqtt | 2020-09-12 17:50:27 - DEBUG: Executing command 3
texecom2mqtt | 2020-09-12 17:50:28 - INFO: Fetched zone 10: PANIC ALARM (type: PA Audible) (areas: [1])
texecom2mqtt | 2020-09-12 17:50:28 - DEBUG: Executing command 3
texecom2mqtt | 2020-09-12 17:50:28 - DEBUG: Executing command 3
texecom2mqtt | 2020-09-12 17:50:28 - DEBUG: Executing command 3
texecom2mqtt | 2020-09-12 17:50:29 - DEBUG: Executing command 3
texecom2mqtt | 2020-09-12 17:50:29 - DEBUG: Executing command 3
texecom2mqtt | 2020-09-12 17:50:29 - DEBUG: Executing command 3
texecom2mqtt | 2020-09-12 17:50:30 - DEBUG: Executing command 3
texecom2mqtt | 2020-09-12 17:50:30 - DEBUG: Executing command 3
texecom2mqtt | 2020-09-12 17:50:30 - DEBUG: Executing command 3
texecom2mqtt | 2020-09-12 17:50:30 - DEBUG: Executing command 3
texecom2mqtt | 2020-09-12 17:50:31 - DEBUG: Executing command 3
texecom2mqtt | 2020-09-12 17:50:31 - DEBUG: Executing command 3
texecom2mqtt | 2020-09-12 17:50:31 - DEBUG: Executing command 3
texecom2mqtt | 2020-09-12 17:50:32 - DEBUG: Executing command 3
texecom2mqtt | 2020-09-12 17:50:32 - INFO: Updating all zone states
texecom2mqtt | 2020-09-12 17:50:32 - DEBUG: Executing command 2
texecom2mqtt | 2020-09-12 17:50:32 - INFO: Updating all area states
texecom2mqtt | 2020-09-12 17:50:32 - DEBUG: Executing command 11
texecom2mqtt | 2020-09-12 17:50:33 - DEBUG: Executing command 11
texecom2mqtt | 2020-09-12 17:50:33 - DEBUG: Publishing to texecom2mqtt/1184708/zone/hallway_motion_sensor: {"name":"HALLWAY Motion Sensor","number":1,"areas":[1],"status":0,"type":"Entry/Exit 1"}
texecom2mqtt | 2020-09-12 17:50:33 - DEBUG: Publishing to texecom2mqtt/1184708/zone/lounge_front_motion_sensor: {"name":"LOUNGE FRONT Motion Sensor","number":2,"areas":[1],"status":0,"type":"Guard"}
texecom2mqtt | 2020-09-12 17:50:33 - DEBUG: Publishing to texecom2mqtt/1184708/zone/lounge_rear_motion_sensor: {"name":"LOUNGE REAR Motion Sensor","number":3,"areas":[1],"status":0,"type":"Guard"}
texecom2mqtt | 2020-09-12 17:50:33 - DEBUG: Publishing to texecom2mqtt/1184708/zone/backroom_motion_sensor: {"name":"BACKROOM Motion Sensor","number":4,"areas":[1],"status":0,"type":"Guard"}
texecom2mqtt | 2020-09-12 17:50:33 - DEBUG: Publishing to texecom2mqtt/1184708/zone/kitchen_motion_sensor: {"name":"KITCHEN Motion Sensor","number":5,"areas":[1],"status":0,"type":"Guard"}
texecom2mqtt | 2020-09-12 17:50:33 - DEBUG: Publishing to texecom2mqtt/1184708/zone/utility_room_motion_sensor: {"name":"UTILITY ROOM Motion Sensor","number":6,"areas":[1],"status":0,"type":"Guard"}
texecom2mqtt | 2020-09-12 17:50:33 - DEBUG: Publishing to texecom2mqtt/1184708/zone/garage_motion_sensor: {"name":"GARAGE Motion Sensor","number":7,"areas":[1],"status":0,"type":"Guard"}
texecom2mqtt | 2020-09-12 17:50:33 - DEBUG: Publishing to texecom2mqtt/1184708/zone/landing_motion_sensor: {"name":"LANDING Motion Sensor","number":8,"areas":[1],"status":0,"type":"Guard"}
texecom2mqtt | 2020-09-12 17:50:33 - DEBUG: Publishing to texecom2mqtt/1184708/zone/master_bedroom_motion_sensor: {"name":"MASTER BEDROOM Motion Sensor","number":9,"areas":[1],"status":0,"type":"Guard"}
texecom2mqtt | 2020-09-12 17:50:33 - DEBUG: Publishing to texecom2mqtt/1184708/zone/panic_alarm: {"name":"PANIC ALARM","number":10,"areas":[1],"status":0,"type":"PA Audible"}
texecom2mqtt | 2020-09-12 17:50:33 - DEBUG: Deleting topic texecom2mqtt/1184708/zone/hallway_motion_sensor
texecom2mqtt | 2020-09-12 17:50:33 - DEBUG: Deleting topic texecom2mqtt/1184708/zone/backroom_motion_sensor
texecom2mqtt | 2020-09-12 17:50:33 - DEBUG: Deleting topic texecom2mqtt/1184708/zone/garage_motion_sensor
texecom2mqtt | 2020-09-12 17:50:33 - DEBUG: Deleting topic texecom2mqtt/1184708/zone/landing_motion_sensor
texecom2mqtt | 2020-09-12 17:50:33 - DEBUG: Deleting topic texecom2mqtt/1184708/zone/master_bedroom_motion_sensor
texecom2mqtt | 2020-09-12 17:50:33 - DEBUG: Deleting topic texecom2mqtt/1184708/zone/panic_alarm
texecom2mqtt | 2020-09-12 17:50:33 - DEBUG: Publishing to homeassistant/binary_sensor/texecom2mqtt-1184708/hallway_motion_sensor/config: {"name":"HALLWAY Motion Sensor","state_topic":"texecom2mqtt/1184708/zone/hallway_motion_sensor","payload_on":"1","payload_off":"0","value_template":"{{ value_json.status }}","device_class":"motion","unique_id":"1184708.zone.hallway_motion_sensor","json_attributes_topic":"texecom2mqtt/1184708/zone/hallway_motion_sensor","json_attributes_template":"{{ {'zone_number': value_json.number, 'zone_type': value_json.type, 'areas': value_json.areas} | tojson }}","availability_topic":"texecom2mqtt/1184708/status","device":{"name":"Texecom Premier Elite 24","identifiers":"1184708","manufacturer":"Texecom","model":"Premier Elite 24","sw_version":"V5.02.01LS1"}}
texecom2mqtt | 2020-09-12 17:50:33 - DEBUG: Publishing to homeassistant/binary_sensor/texecom2mqtt-1184708/lounge_front_motion_sensor/config: {"name":"LOUNGE FRONT Motion Sensor","state_topic":"texecom2mqtt/1184708/zone/lounge_front_motion_sensor","payload_on":"1","payload_off":"0","value_template":"{{ value_json.status }}","device_class":"motion","unique_id":"1184708.zone.lounge_front_motion_sensor","json_attributes_topic":"texecom2mqtt/1184708/zone/lounge_front_motion_sensor","json_attributes_template":"{{ {'zone_number': value_json.number, 'zone_type': value_json.type, 'areas': value_json.areas} | tojson }}","availability_topic":"texecom2mqtt/1184708/status","device":{"name":"Texecom Premier Elite 24","identifiers":"1184708","manufacturer":"Texecom","model":"Premier Elite 24","sw_version":"V5.02.01LS1"}}
texecom2mqtt | 2020-09-12 17:50:33 - DEBUG: Publishing to homeassistant/binary_sensor/texecom2mqtt-1184708/lounge_rear_motion_sensor/config: {"name":"LOUNGE REAR Motion Sensor","state_topic":"texecom2mqtt/1184708/zone/lounge_rear_motion_sensor","payload_on":"1","payload_off":"0","value_template":"{{ value_json.status }}","device_class":"motion","unique_id":"1184708.zone.lounge_rear_motion_sensor","json_attributes_topic":"texecom2mqtt/1184708/zone/lounge_rear_motion_sensor","json_attributes_template":"{{ {'zone_number': value_json.number, 'zone_type': value_json.type, 'areas': value_json.areas} | tojson }}","availability_topic":"texecom2mqtt/1184708/status","device":{"name":"Texecom Premier Elite 24","identifiers":"1184708","manufacturer":"Texecom","model":"Premier Elite 24","sw_version":"V5.02.01LS1"}}
texecom2mqtt | 2020-09-12 17:50:33 - DEBUG: Publishing to homeassistant/binary_sensor/texecom2mqtt-1184708/backroom_motion_sensor/config: {"name":"BACKROOM Motion Sensor","state_topic":"texecom2mqtt/1184708/zone/backroom_motion_sensor","payload_on":"1","payload_off":"0","value_template":"{{ value_json.status }}","device_class":"motion","unique_id":"1184708.zone.backroom_motion_sensor","json_attributes_topic":"texecom2mqtt/1184708/zone/backroom_motion_sensor","json_attributes_template":"{{ {'zone_number': value_json.number, 'zone_type': value_json.type, 'areas': value_json.areas} | tojson }}","availability_topic":"texecom2mqtt/1184708/status","device":{"name":"Texecom Premier Elite 24","identifiers":"1184708","manufacturer":"Texecom","model":"Premier Elite 24","sw_version":"V5.02.01LS1"}}
texecom2mqtt | 2020-09-12 17:50:33 - DEBUG: Publishing to homeassistant/binary_sensor/texecom2mqtt-1184708/kitchen_motion_sensor/config: {"name":"KITCHEN Motion Sensor","state_topic":"texecom2mqtt/1184708/zone/kitchen_motion_sensor","payload_on":"1","payload_off":"0","value_template":"{{ value_json.status }}","device_class":"motion","unique_id":"1184708.zone.kitchen_motion_sensor","json_attributes_topic":"texecom2mqtt/1184708/zone/kitchen_motion_sensor","json_attributes_template":"{{ {'zone_number': value_json.number, 'zone_type': value_json.type, 'areas': value_json.areas} | tojson }}","availability_topic":"texecom2mqtt/1184708/status","device":{"name":"Texecom Premier Elite 24","identifiers":"1184708","manufacturer":"Texecom","model":"Premier Elite 24","sw_version":"V5.02.01LS1"}}
texecom2mqtt | 2020-09-12 17:50:33 - DEBUG: Publishing to homeassistant/binary_sensor/texecom2mqtt-1184708/utility_room_motion_sensor/config: {"name":"UTILITY ROOM Motion Sensor","state_topic":"texecom2mqtt/1184708/zone/utility_room_motion_sensor","payload_on":"1","payload_off":"0","value_template":"{{ value_json.status }}","device_class":"motion","unique_id":"1184708.zone.utility_room_motion_sensor","json_attributes_topic":"texecom2mqtt/1184708/zone/utility_room_motion_sensor","json_attributes_template":"{{ {'zone_number': value_json.number, 'zone_type': value_json.type, 'areas': value_json.areas} | tojson }}","availability_topic":"texecom2mqtt/1184708/status","device":{"name":"Texecom Premier Elite 24","identifiers":"1184708","manufacturer":"Texecom","model":"Premier Elite 24","sw_version":"V5.02.01LS1"}}
texecom2mqtt | 2020-09-12 17:50:33 - DEBUG: Publishing to homeassistant/binary_sensor/texecom2mqtt-1184708/garage_motion_sensor/config: {"name":"GARAGE Motion Sensor","state_topic":"texecom2mqtt/1184708/zone/garage_motion_sensor","payload_on":"1","payload_off":"0","value_template":"{{ value_json.status }}","device_class":"motion","unique_id":"1184708.zone.garage_motion_sensor","json_attributes_topic":"texecom2mqtt/1184708/zone/garage_motion_sensor","json_attributes_template":"{{ {'zone_number': value_json.number, 'zone_type': value_json.type, 'areas': value_json.areas} | tojson }}","availability_topic":"texecom2mqtt/1184708/status","device":{"name":"Texecom Premier Elite 24","identifiers":"1184708","manufacturer":"Texecom","model":"Premier Elite 24","sw_version":"V5.02.01LS1"}}
texecom2mqtt | 2020-09-12 17:50:33 - DEBUG: Publishing to homeassistant/binary_sensor/texecom2mqtt-1184708/landing_motion_sensor/config: {"name":"LANDING Motion Sensor","state_topic":"texecom2mqtt/1184708/zone/landing_motion_sensor","payload_on":"1","payload_off":"0","value_template":"{{ value_json.status }}","device_class":"motion","unique_id":"1184708.zone.landing_motion_sensor","json_attributes_topic":"texecom2mqtt/1184708/zone/landing_motion_sensor","json_attributes_template":"{{ {'zone_number': value_json.number, 'zone_type': value_json.type, 'areas': value_json.areas} | tojson }}","availability_topic":"texecom2mqtt/1184708/status","device":{"name":"Texecom Premier Elite 24","identifiers":"1184708","manufacturer":"Texecom","model":"Premier Elite 24","sw_version":"V5.02.01LS1"}}
texecom2mqtt | 2020-09-12 17:50:33 - DEBUG: Publishing to homeassistant/binary_sensor/texecom2mqtt-1184708/master_bedroom_motion_sensor/config: {"name":"MASTER BEDROOM Motion Sensor","state_topic":"texecom2mqtt/1184708/zone/master_bedroom_motion_sensor","payload_on":"1","payload_off":"0","value_template":"{{ value_json.status }}","device_class":"motion","unique_id":"1184708.zone.master_bedroom_motion_sensor","json_attributes_topic":"texecom2mqtt/1184708/zone/master_bedroom_motion_sensor","json_attributes_template":"{{ {'zone_number': value_json.number, 'zone_type': value_json.type, 'areas': value_json.areas} | tojson }}","availability_topic":"texecom2mqtt/1184708/status","device":{"name":"Texecom Premier Elite 24","identifiers":"1184708","manufacturer":"Texecom","model":"Premier Elite 24","sw_version":"V5.02.01LS1"}}
texecom2mqtt | 2020-09-12 17:50:33 - DEBUG: Publishing to homeassistant/binary_sensor/texecom2mqtt-1184708/panic_alarm/config: {"name":"PANIC ALARM","state_topic":"texecom2mqtt/1184708/zone/panic_alarm","payload_on":"1","payload_off":"0","value_template":"{{ value_json.status }}","device_class":"safety","unique_id":"1184708.zone.panic_alarm","json_attributes_topic":"texecom2mqtt/1184708/zone/panic_alarm","json_attributes_template":"{{ {'zone_number': value_json.number, 'zone_type': value_json.type, 'areas': value_json.areas} | tojson }}","availability_topic":"texecom2mqtt/1184708/status","device":{"name":"Texecom Premier Elite 24","identifiers":"1184708","manufacturer":"Texecom","model":"Premier Elite 24","sw_version":"V5.02.01LS1"}}
texecom2mqtt | 2020-09-12 17:50:44 - INFO: KITCHEN Motion Sensor status changed to Active
texecom2mqtt | 2020-09-12 17:50:44 - DEBUG: Publishing to texecom2mqtt/1184708/zone/kitchen_motion_sensor: {"name":"KITCHEN Motion Sensor","number":5,"areas":[1],"status":1,"type":"Guard"}
texecom2mqtt | 2020-09-12 17:50:46 - INFO: KITCHEN Motion Sensor status changed to Secure
texecom2mqtt | 2020-09-12 17:50:46 - DEBUG: Publishing to texecom2mqtt/1184708/zone/kitchen_motion_sensor: {"name":"KITCHEN Motion Sensor","number":5,"areas":[1],"status":0,"type":"Guard"}
Ok, I think I see the problem. There’s a bug if you don’t specifically set the area text. Please bare with me and I’ll get a fix out.
Eagerly waiting, thanks, if you need me to test anything,no problem
I’ve pushed an update. Can you try pulling the latest image and seeing if it fixes your problem?