Powermax binding

Unfortunately I can confirm that the Powermax binding is no more working in openHAB2.
I will have to update it. I let you know when it is done.

1 Like

I just uploaded a new version (my final version). You can download the jar file

There are minor changes.

I have now created a PR to provide my code. I am waiting for comments.
During this time, feel free to test the new jar and comment whether eveything is ok or not for you.

I will create the wiki page to explain everything.

1 Like

For users forcing the standard mode, there is now an additional configuration setting:

# Define the panel type
# Value must be one of these values: PowerMax, PowerMax+, PowerMaxPro,
# PowerMaxComplete, PowerMaxProPart, PowerMaxCompletePart, PowerMaxExpress,
# PowerMaster10, PowerMaster30
# Only required when forcing the standard mode
# (optional, defaults to PowerMaxPro)
#powermax:panelType=PowerMaxPro
1 Like

Previous item selectors “get_event_log” and “download_setup” have been removed.
A new item selector “command” is now available. You have to create an item like this:

String AlarmeCmd "Command [%s]" (GPowerMax) {powermax="command", autoupdate="false"}

and in your sitemap something like that:

Switch item=AlarmeCmd mappings=[get_event_log="Event log", download_setup="Get setup", log_setup="Log setup", help_items="Help items"]

So you can post the following commands to this item:

  • get_event_log to retrieve the event log
  • download_setup to download setup (and sync time)
  • log_setup to log setup
  • help_items to get help about items and sitemap entries to create
1 Like

You can now find a Wiki page for this binding.
I will add items example in the wiki later.

1 Like

just wanted to thank you for all your work on this

Dan

Of course the binding is compatible with OH2.

Hi
First of all thanks for spending the time of doing this binding. It is great or will be when it works for me. :slight_smile:

I have OH2 SNAPSHOT on RPi2 (Mars 5th) and have PowerMax connected via a ser2net on a separate RPi2. Connection seems to work since I see a lot of readings in the debug log and I see when alarm sensors are tripped.
But I can not get any Items to be updated and I do not see any trace at all of powerMax in the PaperUI (no binding, things,Items).

Items are setup as in the wiki-example.

Any Idea what is wrong?

STARTUP:
2016-03-08 05:57:08.984 [INFO ] [b.core.service.AbstractActiveService] - PowerMax Refresh Service has been started
2016-03-08 05:57:09.009 [DEBUG] [ng.powermax.internal.PowerMaxBinding] - PowerMax alarm Execute
2016-03-08 05:57:09.010 [DEBUG] [ng.powermax.internal.PowerMaxBinding] - execute(): trying to reconnect…
2016-03-08 05:57:09.012 [DEBUG] [ng.powermax.internal.PowerMaxBinding] - closeConnection(): disconnected
2016-03-08 05:57:09.037 [DEBUG] [ernal.connector.PowerMaxTcpConnector] - open(): Opening TCP Connection
2016-03-08 05:57:09.059 [INFO ] [ng.powermax.internal.PowerMaxBinding] - PowerMax alarm binding: TCP connection (IP 192.168.1.11 port 2001): connected
2016-03-08 05:57:09.060 [DEBUG] [ng.powermax.internal.PowerMaxBinding] - openConnection(): connected
2016-03-08 05:57:09.068 [DEBUG] [ernal.connector.PowerMaxReaderThread] - Data listener started
2016-03-08 05:57:09.084 [DEBUG] [.internal.message.PowerMaxCommDriver] - sendMessage(): add message in queue (type DOWNLOAD)
2016-03-08 05:57:09.106 [DEBUG] [.internal.message.PowerMaxCommDriver] - sendMessage(): sending DOWNLOAD message 0D2400004F48000000000000000A
2016-03-08 05:57:09.134 [DEBUG] [ng.powermax.internal.PowerMaxBinding] - powerMaxEventReceived(): received message ACK
2016-03-08 05:57:09.138 [DEBUG] [internal.message.PowerMaxBaseMessage] - message handled by class PowerMaxAckMessage:

  • Raw data = 0D02FD0A
  • type = 02 ( ACK )
    2016-03-08 05:57:09.150 [DEBUG] [ng.powermax.internal.PowerMaxBinding] - powerMaxEventReceived(): received message INFO
    2016-03-08 05:57:09.156 [DEBUG] [.internal.message.PowerMaxCommDriver] - sendAck(): sending message 0D02000A
    2016-03-08 05:57:09.160 [DEBUG] [internal.message.PowerMaxBaseMessage] - message handled by class PowerMaxInfoMessage:
  • Raw data = 0D3CFD0A0000200101000000990A
  • type = 3C ( INFO )
  • panel type number = 01
    2016-03-08 05:57:09.163 [DEBUG] [internal.message.PowerMaxInfoMessage] - Reading panel settings

DETECTOR alert:
2016-03-08 06:22:31.242 [DEBUG] [ng.powermax.internal.PowerMaxBinding] - powerMaxEventReceived(): received message STATUS
2016-03-08 06:22:31.244 [DEBUG] [.internal.message.PowerMaxCommDriver] - sendAck(): sending message 0D0243000A
2016-03-08 06:22:31.246 [DEBUG] [internal.message.PowerMaxBaseMessage] - message handled by class PowerMaxStatusMessage:

  • Raw data = 0DA50004002303050000000043E70A
  • type = A5 ( STATUS )
  • event type = 04
  • system status = 00
  • system flags = 23
  • event zone = 3
  • zone event type = 05 (Violated (Motion))
  • X10 status = 0000
    2016-03-08 06:22:31.248 [DEBUG] [ng.powermax.internal.PowerMaxBinding] - updateItemsFromAlarmState(): items update disabled
    2016-03-08 06:22:32.763 [INFO ] [marthome.event.ItemStateChangedEvent] - hum01 changed from 30.3 to 30.1
    2016-03-08 06:22:32.773 [INFO ] [marthome.event.ItemStateChangedEvent] - light01 changed from 72 to 75
    2016-03-08 06:22:32.941 [INFO ] [marthome.event.ItemStateChangedEvent] - hum02 changed from 33.6 to 33.5
    2016-03-08 06:22:35.580 [INFO ] [marthome.event.ItemStateChangedEvent] - light01 changed from 75 to 73
    2016-03-08 06:22:37.386 [DEBUG] [ng.powermax.internal.PowerMaxBinding] - PowerMax alarm Execute
    2016-03-08 06:22:37.717 [DEBUG] [ng.powermax.internal.PowerMaxBinding] - powerMaxEventReceived(): received message POWERLINK
    2016-03-08 06:22:37.719 [DEBUG] [internal.message.PowerMaxBaseMessage] - message handled by class PowerMaxPowerlinkMessage:
  • Raw data = 0DAB03001E0033343136000043210A
  • type = AB ( POWERLINK )
  • sub type = keep alive
    2016-03-08 06:22:37.720 [DEBUG] [.internal.message.PowerMaxCommDriver] - sendAck(): sending message 0D0243000A
    2016-03-08 06:22:37.721 [DEBUG] [ng.powermax.internal.PowerMaxBinding] - updateItemsFromAlarmState(): items update disabled

My PR has not yet been merged so it is normal you don’t find any trace of the binding in Paper UI using the last OH2 snapshots.
By the way, when the PR will be merged, you will be able to install the binding from Paper UI but as a 1.x binding you will not be able to create things.

Can you check that your item file was loaded and your items are correctly linked to the binding ? If it was, you should see DEBUG logs with calls to bindingChanged for each of your items.

Hi, thanks for your answer.
Sounds reasonable that the PR has do go trought to see anything in Openhab2.

However I can not get it to link to any Item.
If I tripp a motion sensor I get this:
2016-03-08 23:11:51.888 [DEBUG] [ng.powermax.internal.PowerMaxBinding] - powerMaxEventReceived(): received message STATUS
2016-03-08 23:11:51.890 [DEBUG] [.internal.message.PowerMaxCommDriver] - sendAck(): sending message 0D0243000A
2016-03-08 23:11:51.892 [DEBUG] [internal.message.PowerMaxBaseMessage] - message handled by class PowerMaxStatusMessage:

  • Raw data = 0DA50004002303050000000043E70A
  • type = A5 ( STATUS )
  • event type = 04
  • system status = 00
  • system flags = 23
  • event zone = 3
  • zone event type = 05 (Violated (Motion))
  • X10 status = 0000
    2016-03-08 23:11:51.894 [DEBUG] [ng.powermax.internal.PowerMaxBinding] - updateItemsFromAlarmState(): items update disabled
    2016-03-08 23:11:58.204 [DEBUG] [ng.powermax.internal.PowerMaxBinding] - PowerMax alarm Execute

My Items-file have this:
Switch Upper_status “Zone 3 status” {powermax=“zone_status:3”}
Contact Upper_status3 “Zone 3 status [%s]” {powermax=“zone_status:3”}
DateTime Upper_last_trip “Zone 3 last trip [%1$tH:%1$tM]” {powermax=“zone_last_trip:3”}

And sitemap:
Switch item=Upper_status mappings=[OFF=“Disarmed”, ON=“Armed”]
Text item=Upper_last_trip
Switch item=Upper_status3

Did you install the 1.9 version and not the 1.7 version of the binding ?

I found the problem.
I had an error in my items file that made all Powermax items to fail.

Thanks for your support AND for the binding. It is really cool! :slight_smile:

The binding was finally merged in the official distribution about one week ago.
All openHAB2 nightly builds are now packaged with the binding.
For openHAB 1.x users, you can use this link to download the official jar file: https://openhab.ci.cloudbees.com/job/openHAB1-Addons/ws/bundles/binding/org.openhab.binding.powermax/target/org.openhab.binding.powermax-1.9.0-SNAPSHOT.jar
The binding is not included in openHAB 1.8.2 but will be in future 1.9.

Since I am having a few problems with my PowerMax I am curious to what you mean by that you had a few problems with symlinks? My problem is that I have my Powermax connected to a RPI where i run ser2net, my openHAB installation is running as a Ubuntu server host on one of my ESXI servers with Socat as a pseudo terminal.

I am have spent quite a few hours on this, last update is that at least now i get powermax connected even if no communication is actually happening and this is if I run sudo start.sh, and I’ve added my user to dialout group, changed start.sh to include my custom pty serial port and so on.

Cheers Lolodomo,

I’ve finally made the leap to OH2 from OH1, and very please that your binding works.

many thanks.

For information, I am working on a new native OH 2 binding. It should be available soon.

Hi.
The binding can not get work. In openhab log appears:
08/13/2016 18: 01: 42,314 [INFO] [o.b.p.internal.PowerMaxBinding] - PowerMax alarm binding: serial connection (ttyUSB0): Disconnected
I think I’ve properly configured the binding:
powermax: SERIALPORT = ttyUSB0

It seems that the converter USB TTL PL2303HX not connected, however, if the list of USBs system with> lsusb responds:
Bus 001 Device 004: ID 067b: 2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 001 Device 003: ID 0424: ec00 Standard Microsystems Corp. SMSC9512 / 9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424: 9512 Standard Microsystems Corp. LAN9500 ​​10/100 Ethernet Adapter / SMSC9512 / 9514 Hub
Bus 001 Device 001: ID 1d6b: 0002 Linux Foundation 2.0 root hub

The answer to> dmesg | grep tty is:
[0.000000] Kernel command line: dma.dmachans = 0x7f35 bcm2708_fb.fbheight bcm2708_fb.fbwidth = 656 = 416 = 0xe bcm2708.boardrev bcm2708.serial = 0x9ab6f382 smsc95xx.macaddr = B8: 27: EB: B6: F3: 82 bcm2708_fb.fbswap = 1 bcm2708.uart_clock = 3000000 vc_mem.mem_base = 0x1fa00000 vc_mem.mem_size = 0x20000000 dwc_otg.lpm_enable = 0 console = tty1 console = noop elevator = ttyAMA0,115200 root = / dev / mmcblk0p2 rootfstype = ext4 fsck.repair = yes rootwait
[0.001312] console [tty1] enabled
[0.960112] 20201000.uart: ttyAMA0 at MMIO 0x20201000 (irq = 83, base_baud = 0) is a PL011 rev2
[2.125978] console [ttyAMA0] enabled
[3.845975] systemd [1]: Expecting device dev-ttyAMA0.device …
[4.456301] systemd [1]: Starting system-getty.slice.
[4.469361] systemd [1]: Created slice system-getty.slice.
[4.479235] systemd [1]: Starting system-serial \ x2dgetty.slice.
[4.491125] systemd [1]: Created slice system-serial \ x2dgetty.slice.
[11.724469] usb 1-1.2: PL2303 converter now attached to ttyUSB0

Any idea ?.
I am new to Linux.
Great job this binding. I hope to work soon.
Thank you

SOLVED! Rookie mistake.
Forget to put the full path to the USB PL2303HX in the configuration of binding:
powermax: SERIALPORT = /dev/ttyUSB0
Now it works perfect.
regards

Hi @Lolodomo

I am a bit confused, just want to understand what you mean by “Everything is in one of my previous messages. Look for item Powermax_zone1_status2”

I have everything working with your examples but not sure how to add the door contact sensors and movement sensors,

I guess you are talking about this line: Contact Powermax_zone1_status2 “Zone 1 status [%s]” (GPowerMax) {powermax=“zone_status:1”}

Which shows as “closed” in my UI. Is this the door contact or what, and do i simply change it to “Zone_status:2” for the next item (be that another door contact or a movement sensor…? I am trying to add them so they look the same as they did in my Vera, that showed all the items (door, movement, etc.) the status of the item and the battery status etc.

Sorry if this is a silly question but i just cant get my head around it and work it out on my own.

You just have to match the zone number used in your alarm setup for this contact or motion sensor.
For a motion sensor or a door contact attached to zone 10 for example, use powermax=“zone_status:10”