In the past I had made some updates to the upstream python library used by the integration, in order to add additional features. I am now doing the same thing to the integration component, such as supporting the new vacation arm mode. I will list other changes in another post when I get them working.
HOWEVER, I have noticed some things that are either incorrect or could lead to unexpected behavior when auditing the code.
The good:
The integration documentation lists the alarm_keypress function working on DSC and probably on Honeywell. Well, internally ALL the other functions use the keypress function to send commands to the panel, so it is definitely working. Also you can for sure send more than 6 characters at least for Honeywell panels, there does not actually seem to be a defined limit anywhere for those. An example is a zone bypass, CODE615
is the 7 character sequence to bypass zone 15, and that indeed works.
It should be mentioned the Honeywell panels expect a minimum 2 second delay between sending different sequences of commands to the panel, so if you need to toggle a connected relay, you cannot do it for less than 2 seconds, for example, a toggle of relay 11 is a set of 8 character sequences CODE#711
and CODE#811
, but since they need to be different commands, the min 2s delay must be inserted before the 2nd sequence.
The bad:
alarm_trigger does not appear to send the trigger to the specified keypad for Honeywell, but rather the keypad for partition 1, this is hard coded in the library. If you are using multiple partitions, and P2 is set up for say, medical alerts, and you try to trigger it, it will trigger the alarm on P1 instead. In houses/apartments where the partitions are set up for different families or individuals, this can cause problems, potentially serious. The DSC code does not specify a partition at all, I am not sure if that is the correct behavior.
For Honeywell, the library internal partition status codes are not correct for ARMED_MAX and ARMED_INSTANT. Because of this arming MAX does not report the partition status internally at all, and arming INSTANT or NIGHT reports as ARMED_MAX. There is a similar issue in the integration code, where the night arm state is reported solely by the 0-entry delay flag being true. This will be true for MAX and INSTANT arming only, so the integration reports the wrong state 100% of the time if one of those 3 arming modes is used.
The state attribute armed_bypass actually reports the presence of a bypassed zone on Honeywell, regardless of arming status. I will submit a fix to the upstream lib to remove ‘armed_’. The DSC code does not even reference this, and I am not sure it applies.
The ugly:
the panic_type for alarm_trigger is also hardcoded in the library, but it may not match your keypad if you have Honeywell. This means if I try to trigger the default Police type, instead it triggers Fire. This is because the the trigger function in the library maps the type to a signal letter representing the A-C panic keys… and those are defined during panel program. The lib maps Fire,Ambulance,Police to A,B,C. If you need the correct trigger, send the correct keypress to the partition as a letter. DSC keypads have their panic types fixed and the library appears correct for them.
The arming code for the library function arm_night_partition is listed as 7, but this is actually the code for INSTANT arming. What this means is that if you call the function to NIGHT-STAY arm the panel, you INSTANT arm instead, and any night zones which would trigger the alarm remain unarmed. Additionally, NIGHT-STAY arming should include an entry delay, but INSTANT does not, as per its namesake referring to the 0-entry delay, so if somebody comes home at night, and they open the door… the alarm goes off immediately. The correct arming code for night mode is 33. I will also be submitting upstream fixes for this.