Powermax binding

Tags: #<Tag:0x00007f386dc5a038> #<Tag:0x00007f386dc59ef8>

I’ve a couple of rules dealing with this:

1 - runs if panel_alert_in_memory changes from OFF to ON. If Powermax_partition_alarm is ON then turns a virtual switch “alarm” to ON
2 - runs if Powermax_partition_alarm changes from ON to OFF - turns the virtual switch “alarm” to OFF; turns panel_alert_in_memory to OFF; turns another virtual switch “alert in memory” to ON

Dan

Oh yes you’re right I should probably set alarm only when alarm_in_memory is set too.
If I correctly remember, we have to arm again the system to reset alarm_in_memory flag from the panel ?

that’s right

Hi @Lolodomo!

From the beginning, I wrote a connector in Delphi, from which I successfully triggered burglary and fire alarms when they occured. Unfortunatly I’m not able to verify it now, but from what I can remember, it worked :slight_smile: I would gladly send you an email with the complete procedure/function that was used to parse the incoming package, but here goes the part that checked whether the correct bit values was set, and if it should trigger:

            if (pmEvent.SystemStatus=ssArmedAway) and (pmEvent.ZoneEventType in [zeOpen, zeViolatedMotion]) then
                SendToMQTTBus('home/alarm/burgular', 'ON');

            if (pmEvent.ZoneEventType in [zeFireAlarm]) then
                SendToMQTTBus('home/alarm/fire', 'ON');

Don’t know if this can help you?

I finally fixed opehHAB2 compatibilty and “alarm active” status during the entry delay. I still have to trigger the alarm to be sure that it is working fully (will be done in a more appropriate moment).

Then I will compile minimal documentation (configuration file, items and sitemap examples) in this topic and attach the new JAR file.

New configuration for the binding:

################################### PowerMax Binding ##################################

# the serial port to use for connecting to the PowerMax alarm system
# e.g. COM1 for Windows and /dev/ttyS0 or /dev/ttyUSB0 for Linux
powermax:serialPort=COM1

# the IP address and port to use for connecting to the PowerMax alarm system
#powermax:ip=
#powermax:tcpPort=

# The delay in minutes to reset a motion detection (optional, defaults to 3)
#powermax:motionOffDelay=3

# Enable or disable arming the PowerMax alarm system from openHAB
# For security reason, this feature is disabled by default (false)
#powermax:allowArming=false

# Enable or disable disarming the PowerMax alarm system from openHAB
# For security reason, this feature is disabled by default (false)
#powermax:allowDisarming=false

# The PIN code to use for arming/disarming the PowerMax alarm system from openHAB
# Not required except when Powerlink mode cannot be used
#powermax:pinCode=

# Force the standard mode rather than trying using the Powerlink mode
# (optional, defaults to false)
#powermax:forceStandardMode=false

Items examples:

Group GPowerMax "Alarm"

String Powermax_panel_type "Panel type [%s]" (GPowerMax) {powermax="panel_type"}
String Powermax_panel_eeprom "EPROM [%s]" (GPowerMax) {powermax="panel_eprom"}
String Powermax_panel_software "Software version [%s]" (GPowerMax) {powermax="panel_software"}
String Powermax_panel_serial "Serial [%s]" (GPowerMax) {powermax="panel_serial"}
String Powermax_panel_mode "Panel mode [%s]" (GPowerMax) {powermax="panel_mode"}
String Powermax_partition_status "Partition status [%s]" (GPowerMax) {powermax="partition_status"}
Switch Powermax_partition_ready "Partition ready" (GPowerMax) {powermax="partition_ready", autoupdate="false"}
Switch Powermax_partition_bypass "Partition bypass" (GPowerMax) {powermax="partition_bypass", autoupdate="false"}
Switch Powermax_partition_alarm "Partition alarm" (GPowerMax) {powermax="partition_alarm", autoupdate="false"}
Switch Powermax_panel_trouble "Panel trouble" (GPowerMax) {powermax="panel_trouble", autoupdate="false"}
Switch Powermax_panel_alert_in_mem "Panel alert in memory" (GPowerMax) {powermax="panel_alert_in_memory", autoupdate="false"}
Switch Powermax_partition_armed "Partition armed" (GPowerMax) {powermax="partition_armed", autoupdate="false"}
String Powermax_partition_arm_mode "Partition arm mode [%s]" (GPowerMax) {powermax="partition_arm_mode", autoupdate="false"}

Switch Powermax_zone1_status "Zone 1 status" (GPowerMax) {powermax="zone_status:1", autoupdate="false"}
Contact Powermax_zone1_status2 "Zone 1 status [%s]" (GPowerMax) {powermax="zone_status:1"}
DateTime Powermax_zone1_last_trip "Zone 1 last trip [%1$tH:%1$tM]" (GPowerMax) {powermax="zone_last_trip:1"}
Switch Powermax_zone1_bypassed "Zone 1 bypassed" (GPowerMax) {powermax="zone_bypassed:1", autoupdate="false"}
Switch Powermax_zone1_armed "Zone 1 armed" (GPowerMax) {powermax="zone_armed:1", autoupdate="false"}
Switch Powermax_zone1_low_battery "Zone 1 low battery" (GPowerMax) {powermax="zone_low_battery:1", autoupdate="false"}

Switch Powermax_get_event_log "Event log" (GPowerMax) {powermax="get_event_log", autoupdate="false"}
String Powermax_event_log_1 "Event log 1 [%s]" (GPowerMax) {powermax="event_log:1"}
String Powermax_event_log_2 "Event log 2 [%s]" (GPowerMax) {powermax="event_log:2"}
String Powermax_event_log_3 "Event log 3 [%s]" (GPowerMax) {powermax="event_log:3"}
String Powermax_event_log_248 "Event log 248 [%s]" (GPowerMax) {powermax="event_log:248"}
String Powermax_event_log_249 "Event log 249 [%s]" (GPowerMax) {powermax="event_log:249"}
String Powermax_event_log_250 "Event log 250 [%s]" (GPowerMax) {powermax="event_log:250"}

Switch Powermax_PGM_status "PGM status" (GPowerMax) {powermax="PGM_status", autoupdate="false"}

Switch Powermax_X10_1_status "X10 1 status" (GPowerMax) {powermax="X10_status:1", autoupdate="false"}
String Powermax_X10_1_status2 "X10 1 status [%s]" (GPowerMax) {powermax="X10_status:1", autoupdate="false"}

Sitemap example:

    Text label="Security" icon="lock" {
        Switch item=Powermax_partition_armed mappings=[OFF="Disarmed", ON="Armed"]
        Switch item=Powermax_partition_arm_mode mappings=[Disarmed="Disarmed", Stay="Armed Home", Armed="Armed Away"] valuecolor=[=="Armed"="green",=="Stay"="orange"]
        
        Switch item=Powermax_get_event_log mappings=[ON="Refresh"]
        
        Switch item=Powermax_PGM_status mappings=[OFF="Off", ON="On"]
        Switch item=Powermax_X10_1_status2 mappings=[OFF="Off", ON="On", DIM="Dim", BRIGHT="Bright"]

        Group item=GPowerMax label="Alarm"
    }

Unfortunately, it seems it is not possible to attach a file to a pst (only a photo) :cry:

The JAR file is now available here: http://lg.hc.free.fr/openHAB/org.openhab.binding.powermax-1.7.0-SNAPSHOT.jar

By default, the binding is now doing a little more things, in particular it retrieves data from the alarm panel setup. For example, you don’t need to specify your PIN code in the config file, the binding will retrieve it automatically.

I wait for your feedback.

that is brilliant - thank you.

All seems to work perfectly, with one niggle - the switch item Powermax_partition_armed now seems read only, i.e. it won’t arm the system. The string item Powermax_partition_arm_mode works fine (but is less convenient because, from a small mobile device, the three buttons aren’t readable).

Dan

@dan12345: I just tested and you’re right, it is no more possible to arm/disarm with the switch “Powermax_partition_armed”. I will analyze what’s wrong.

By the way, I just tried to trigger my alarm system and unfortunately I discovered that panel_alert_in_memory and partition_alarm items are not switched to ON :frowning:
Considering the flag “alarm in memory” was probably not a good idea as it seems that this flag is not always set when triggering the alarm. As I have disarmed the system relatively quickly, maybe it does not put the alarm in memory in this case ?
So I will probably restore the previous behaviour. I prefer to be informed about the alarm even during the entry delay, rather than never being informed at all !

oh, I haven’t seen that behaviour (although I don’t test alarm triggering very often, because our system is unbelievably loud and it doesn’t endear me to wife/children/neighbours).

My workaround then probably doesn’t work. Perhaps a better approach is to set a 30 second timer when the alarm is triggered and, if the alarm is still on after 30 seconds, run the alarm actions?

Dan

I just uploaded a new JAR that reverts to the previous behaviour regarding item “partition_alarm” (will switch to ON even during the entry delay) and that fixes command action for item “partition_armed”.

http://lg.hc.free.fr/openHAB/org.openhab.binding.powermax-1.7.0-SNAPSHOT.jar

thank you - confirmed everything is working!

I just updated a new version. Same link: http://lg.hc.free.fr/openHAB/org.openhab.binding.powermax-1.7.0-SNAPSHOT.jar

With this new version, you can get event log.
I updated my two previous messages presenting items and sitemap examples. Look for Powermax_get_event_log, Powermax_event_log_1, Powermax_event_log_2, …

You need a swtich attached to “get_event_log”. Push this switch and event log will be retrieved and linked to “event_log:X”.
It does not work well with my PowerMax Pro Part, meaning it retrieves very old events, but it may work with other PowerMax models. Please let me know.
If it works well for you, please tell me if “event_log:1” is linked to the more recent or oldest event. My intention would be to link to the more recent.

well I have a Powermax Pro and it seems to work perfectly - event log 1 is indeed the most recent. I’ll test it in the next few days and let you know if it’s correctly logging events as they happen.

thank you again!

Dan

OK that’s cool.
I never understood why it is not working as expected for me (already with the Vera plugin). Maybe that is different when partitions are enabled…

Next feature to be implemented: time synchronization.

That would make sense - I only have the one partition

Dan

Incidentally, could I be greedy and make two feature requests?

  1. would be handy to monitor the battery level of wireless sirens (the Vera plugin can do this).

  2. would also be useful to be able to trigger a panic alarm. This then gives a way for openhab to independently fire the alarm, even when none of the powermax sensors have tripped (say because motion is detected on a camera).

Dan