Qolsys IQ Panel 2 and 3rd party integration

  1. Can you share your apps.yaml file ? Those log message don’t seem to include any from qolsys_panel which makes me wonder if you added the debug flag in the right place.

  2. How many sensors do you have setup on your qolsys panel ?

  3. Anonymous means that any client on your network can publish/subscribe without authentication. I didn’t like that so switched to user ID/password

Fixed my issue… had an empty apps.yaml in the same directory as the appdaemon.yaml config file. Deleted it, works fine now!

A few things I noticed (which may be enhancements):

Sensor discovery: Some sensors are published to MQTT but aren’t discovered by Home Assistant, most likely due to the fact that the device_class is empty for sensor types that don’t match the list under device_class_mapping in qolsys_requests.py. I would recommend using a “catch-all” device_class to get the other sensors (maybe ‘moving’ or ‘safety’?); one example is the built-in glass break sensor that reports as type “Panel Glass Break” instead of “GlassBreak”. Same goes for type “Doorbell” and the like. I can provide a list/map of sensor types if that helps - maybe we should implement a catch-all for “unknown” sensor types, or at least ones that don’t line up with a valid HA device_class?

User codes: Is there a way to let the Alarm Card pass whatever code is keyed into the card’s keypad, without having to dedicate a specific code for it to work? Right now it only works for the preconfigured access code in AppDaemon.

Odd MQTT behaviour: For some reason, when I monitor using MQTT Explorer, all the sensor availability values are “offline” even though it’s working fine. Also, it seems the mqtt-states values are posted with retain: off, is that intentional? I suspect this may be what is causing the offline/online issue; if the last will message is set to offline but the online message doesn’t get retained, new connections to the broker will not see the updated topic. Just a theory.

Add Panic feature: Would it be easy to implement if this is not already available? C4 has the ability to send all 3 Panic types through an “action”:“ALARM” message with “alarm_type”:“FIRE”, “POLICE” or “AUXILIARY” parameter.

Quick comment about IQP2’s port 12345 - I have it integrated with both C4 and this integration at the same time (yes call me crazy but it really helps with understanding how it works). The panel does accept 2 simultaneous websocket connections. However, if one of the two devices drop their connection, any subsequent connection will get dropped - you’ll have to reboot the IQPanel. And AppDaemon has a nasty habit of restarting its apps when it reconnects to Home Assistant after a drop, so restarting or upgrading your HA instance is going to reload the app which generates another connection (and fails).

when i post logs is it the logs from the appdaemon webui I need to post or logs from supervisor in HA. I have 11 sensors

hello_world:
  module: hello
  class: HelloWorld

qolsys_panel:
  module: qolsys_client
  class: QolsysClient
  mqtt_namespace: mqtt
  qolsys_host: 192.168.1.197
  qolsys_port: 12345
  qolsys_token: zqwa05
  request_topic: qolsys/requests # Optional
  qolsys_info_topic: qolsys/panel/info # Optional
  qolsys_zone_update_topic: qolsys/panel/zone_update # Optional
  qolsys_zone_event_topic: qolsys/panel/zone_event # Optional
  qolsys_alarming_event_topic: qolsys/panel/alarming # Optional
  qolsys_disarming_event_topic: qolsys/panel/disarm # Optional
  qolsys_disarm_code: 1123
  qolsys_confirm_arm_code: False # Optional
  qolsys_confirm_disarm_code: False # Optional
  qolsys_arm_away_always_instant: False # Optional
  log_level: DEBUG

Did you change/add appdaemon startup flags ? The YAML file looks fine. You should be looking at the logs in Supervisor → Dashboard → AppDaemon 4 → Log. So something like this:

2021-10-19 16:45:33.998537 DEBUG qolsys_panel: Buffer: b''
2021-10-19 16:45:33.999910 DEBUG qolsys_panel: Got zone Update event: {'topic': 'qolsys/zone_event', 'wildcard': '#', 'payload': '{"event":"ZONE_EVENT","zone_event_type":"ZONE_ACTIVE","version":1,"zone":{"status":"Open","zone_id":44},"requestID":"27983e26-9a7d-4504-a206-9f78346914b3"}'}
2021-10-19 16:45:34.001701 DEBUG qolsys_panel: event_name: MQTT_MESSAGE
2021-10-19 16:45:34.003542 DEBUG qolsys_panel: data: {'topic': 'qolsys/zone_event', 'wildcard': '#', 'payload': '{"event":"ZONE_EVENT","zone_event_type":"ZONE_ACTIVE","version":1,"zone":{"status":"Open","zone_id":44},"requestID":"27983e26-9a7d-4504-a206-9f78346914b3"}'}
2021-10-19 16:45:34.005317 DEBUG qolsys_panel: kwargs: {'topic': 'qolsys/zone_event', '__thread_id': 'thread-1'}

If you open the AppDaemon Web UI and go to the logs tab you should be seeing something similar but just INFO messages. Like:

2021-10-19 16:58:05.757327 INFO qolsys_panel: Publishing to: mqtt-states/binary_sensor/mia_north_window_right/state, Payload: Closed
2021-10-19 16:58:05.756564 INFO qolsys_panel: Previous message repeated 1 times
2021-10-19 16:58:05.488973 INFO qolsys_panel: publishing ZONE_EVENT event to: qolsys/zone_event
2021-10-19 16:57:47.119623 INFO qolsys_panel: Publishing to: mqtt-states/binary_sensor/mbr_north_window_right/state, Payload: Closed
2021-10-19 16:57:47.119025 INFO qolsys_panel: Previous message repeated 1 times
2021-10-19 16:57:46.865291 INFO qolsys_panel: publishing ZONE_EVENT event to: qolsys/zone_event
2021-10-19 16:57:45.646619 INFO qolsys_panel: Publishing to: mqtt-states/binary_sensor/mia_north_window_right/state, Payload: Closed
2021-10-19 16:57:45.643422 INFO qolsys_panel: Previous message repeated 1 times
2021-10-19 16:57:45.217274 INFO qolsys_panel: publishing ZONE_EVENT event to: qolsys/zone_event

I had debug on startup config for appdaemon that was my log issues. Here is my logs now.

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Add-on: AppDaemon 4
 Python Apps and Dashboard using AppDaemon 4.x for Home Assistant
-----------------------------------------------------------
 Add-on version: 0.7.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 6.4  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2021.10.1
 Home Assistant Supervisor: 2021.10.0
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] appdaemon.sh: executing... 
[cont-init.d] appdaemon.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[22:09:05] INFO: Starting AppDaemon...
2021-10-20 05:09:08.298007 INFO AppDaemon: AppDaemon Version 4.1.0 starting
2021-10-20 05:09:08.298536 INFO AppDaemon: Python version is 3.9.5
2021-10-20 05:09:08.299209 INFO AppDaemon: Configuration read from: /config/appdaemon/appdaemon.yaml
2021-10-20 05:09:08.300215 INFO AppDaemon: Added log: AppDaemon
2021-10-20 05:09:08.300834 INFO AppDaemon: Added log: Error
2021-10-20 05:09:08.301331 INFO AppDaemon: Added log: Access
2021-10-20 05:09:08.301819 INFO AppDaemon: Added log: Diag
2021-10-20 05:09:08.361290 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module hassplugin
2021-10-20 05:09:08.455370 INFO HASS: HASS Plugin Initializing
2021-10-20 05:09:08.456176 INFO HASS: HASS Plugin initialization complete
2021-10-20 05:09:08.456881 INFO AppDaemon: Loading Plugin MQTT using class MqttPlugin from module mqttplugin
2021-10-20 05:09:08.474272 INFO MQTT: MQTT Plugin Initializing
2021-10-20 05:09:08.474754 INFO MQTT: Using 'mqtt-client/status' as Will Topic
2021-10-20 05:09:08.475338 INFO MQTT: Using 'mqtt-client/status' as Birth Topic
2021-10-20 05:09:08.475831 INFO MQTT: Using appdaemon_mqtt_client as Client ID
2021-10-20 05:09:08.477932 INFO AppDaemon: Initializing HTTP
2021-10-20 05:09:08.478866 INFO AppDaemon: Using 'ws' for event stream
2021-10-20 05:09:08.487117 INFO AppDaemon: Starting API
2021-10-20 05:09:08.495789 INFO AppDaemon: Starting Old Admin Interface
2021-10-20 05:09:08.496691 INFO AppDaemon: Starting Dashboards
2021-10-20 05:09:08.538418 INFO HASS: Connected to Home Assistant 2021.10.1
2021-10-20 05:09:08.551108 INFO MQTT: Connected to Broker at URL 192.168.1.82:1883
2021-10-20 05:09:08.594331 INFO AppDaemon: App 'qolsys_panel' added
2021-10-20 05:09:08.596437 INFO AppDaemon: Found 1 total apps
2021-10-20 05:09:08.597859 INFO AppDaemon: Starting Apps with 1 workers and 1 pins
2021-10-20 05:09:08.600360 INFO AppDaemon: Running on port 5050
2021-10-20 05:09:08.602557 INFO AppDaemon: Got initial state from namespace mqtt
2021-10-20 05:09:08.603528 INFO MQTT: MQTT Plugin initialization complete
2021-10-20 05:09:08.824529 INFO HASS: Evaluating startup conditions
2021-10-20 05:09:08.855723 INFO HASS: Startup condition met: hass state=RUNNING
2021-10-20 05:09:08.857175 INFO HASS: All startup conditions met
2021-10-20 05:09:08.918593 INFO AppDaemon: Got initial state from namespace default
2021-10-20 05:09:10.620634 INFO AppDaemon: Scheduler running in realtime
2021-10-20 05:09:10.627359 INFO AppDaemon: Adding /config/appdaemon/apps to module import path
2021-10-20 05:09:10.629067 INFO AppDaemon: Adding /config/appdaemon/apps/ad-qolsys to module import path
2021-10-20 05:09:10.644634 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/ad-qolsys/qolsys_socket.py - ignoring
2021-10-20 05:09:10.646936 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/ad-qolsys/partition.py - ignoring
2021-10-20 05:09:10.649789 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/ad-qolsys/door_window.py - ignoring
2021-10-20 05:09:10.652267 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/ad-qolsys/qolsys_requests.py - ignoring
2021-10-20 05:09:10.654737 INFO AppDaemon: Loading App Module: /config/appdaemon/apps/ad-qolsys/qolsys_client.py
2021-10-20 05:09:10.677791 INFO AppDaemon: Initializing app qolsys_panel using class QolsysClient from module qolsys_client
2021-10-20 05:09:10.882455 DEBUG qolsys_panel: qolsys_host: 192.168.1.197, qolsys_port: 12345, qolsys_token: zqwa05, qolsys_timeout: 86400, request_topic: qolsys/requests
2021-10-20 05:09:10.884818 INFO qolsys_panel: Creating qolsys_socket
2021-10-20 05:09:10.888664 INFO qolsys_panel: wrapping socket
2021-10-20 05:09:10.895732 INFO qolsys_panel: connecting to socket

If it’s stopping at connecting to socket there’s a connectivity issue to the panel. You’re able to use the curl command to connect to it?

I updated my panel and reboot not sure when fixed it but it’s working now. Thanks so much guys.

FYI, PSA: do NOT upgrade your IQPanels to 2.6.2 as it will force you to have 6-digit user codes if you use C4 integration. Stick with 2.6.1 for now.

@jsb Since this plugin uses the same API as C4 (I think), does that mean this plugin would also be impacted?

Yes, absolutely. No way around it.

Do you mean this forces you to change the 4 digit user codes to 6 digits to arm and disarm the panel? Or is this adding a new type of authentication to the c4 intergration? I dont see anything in the relase notes for this :thinking:

Hmmm. I don’t see how that would break anything for needing a 6 digit code vs a 4 digit code. The integration is a very simple persistant openssl connection that json strings are passed to the control panel and received from the panel. The only time the user code is used (this is assuming that the json string commands haven’t changed) is when an arm/disarm is sent to the panel. Now the script that is being used with appdamond might be limiting it to 4 digits.

This is assuming that Qolsys didn’t change the syntax of the json commands. If they did, we only need to get the new C4 driver, unencrypt it, and look through it’s code to determine the syntax of the json commands to send to the panel.

There is no limit of 4 digits. I believe I check for a minimum of four digits but no max.

Any chance we could see silent arming in future or is it not part of API. Panel wakes my son up when I remote arm stay at night and it counts down. Right now I’m using alarm.com integration in my automations to arm stay to get around this.

Odd, mine doesn’t count down when arming stay.

Have you confirmed that the integration no longer works with 2.6.2? Have you restarted your panel and restarted appdamon after the panel is booted back up?

OK, I apologize - I should’ve clarified.

The integration works just fine with 2.6.2. But you might notice that the panel isn’t sending any info after upgrading. I went to regenerate the token in the dealer menu but got a message on the panel that I needed to enable 6 digits for it to work.

I know some people won’t like being forced to have 6 digit user codes… that’s why I posted the PSA. And I was on mobile so I posted too quickly without any explanation… my bad.

Converting from 4 to 6 merely adds 00 at the end of existing codes if you don’t change them.

My panel does not count down either when arming stay via HA or HomeKit. It does announce “arm stay” but I think that’s a setting on the panel that can be turned on/off.

Thanks when I alarmed stay using alarm.com it was always instant but when I armed stay with panel and this local remote access it counted but there was a setting under install that allowed me to arm stay instant.

It’s there in the docs:

# (Variant) Arm away - Instant
{"event":"ARM", "arm_type":"away", "partition_id": 0, "token":"blah", "instant": true}
1 Like