Powermax binding

As you already got the information you are showing, I think the Powerlink mode is working as expected.
What about the items relative to arm mode ? Are they updated when you arm and disarm your system ?
Maybe your items for sensors are defined with the wrong zone number ?

I could advice to move to the 2.0 version of the bindings as it includes the automatic discovery of zones but it is not yet fully stable and I have not yet released it. But I fixed 2 little bugs yesterday and I should release it soon now.

1 Like

As I am new to openhab, I was wondering if there is an update on the new binding? Or is there a place where we can find it? Can’t wait to test it…

Happy to do some beta testing for you?

For users wanting to test the new version of the binding for openHAB 2, you can download the jar file here: http://lg.hc.free.fr/openHAB/org.openhab.binding.powermax-2.1.0-SNAPSHOT.jar
The documentation is available here: https://github.com/lolodomo/openhab2-addons/blob/powermax/addons/binding/org.openhab.binding.powermax/README.md

Cool! Will start testing after my holidays…

Just dropped it into the addon folder and restated:

2017-07-13 17:10:00.834 [ERROR] [org.openhab.binding.powermax        ] - FrameworkEvent ERROR - org.openhab.binding.powermax
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.powermax [190]
  Unresolved requirement: Import-Package: gnu.io
	at org.eclipse.osgi.container.Module.start(Module.java:434)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

Do i need to add the serial binding via paper UI?

The feature openhab-transport-serial needs to be started.

You have to do it through the console.

An alternative is to install through Paper UI another binding relying on serial connection like the RFXCOM binding.

yep that fixed it. all the zones showed up, so far so good :slight_smile:

Hi @Lolodomo, I’ve just installed your OH2 plugin and I’m quite stucked.

I’ve configure the Bridge Thing to connect over serial (RFXCOM did the trick) and I’ve configured my 5 alarm zones. In paperui they showup green and “Online”.

This is my Bridge Definition

Bridge powermax:serial:home "Alarma" [ serialPort="/dev/ttyUSB0", allowArming=false, panelType="PowerMaxPro", autoSyncTime=true ]                                                                                  
{                                                                                                                                                                                                                  
        Thing zone Salon1  "Salon1" [ zoneNumber=1 ]                                                                                                                                                               
        Thing zone Salon2  "Salon2" [ zoneNumber=2 ]                                                                                                                                                               
        Thing zone Puerta_Ppal  "Puerta Principal" [ zoneNumber=3 ]                                                                                                                                                
        Thing zone Puerta_Titi  "Puerta Titi" [ zoneNumber=4 ]                                                                                                                                                     
        Thing zone Fuego  "Fuego" [ zoneNumber=10 ]                                                                                                                                                                
}   

Just for testing, I have added an item file with a Switch copied from your doc.

Switch SystemArmed "System armed" {channel="powermax:serial:home:system_armed", autoupdate="false"}   

But the SystemArmed Switch does not represent the real state of the alarm.

And this is my log file looks like this (The CRC error repeats every 30 sec)

2017-07-17 19:07:38.112 [DEBUG] [org.openhab.binding.powermax        ] - BundleEvent STARTING - org.openhab.binding.powermax
2017-07-17 19:07:38.161 [DEBUG] [org.openhab.binding.powermax        ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.io.console.extensions.ConsoleCommandExtension}={component.name=binding.powermax.con
sole, component.id=184, service.id=311, service.bundleid=193, service.scope=bundle} - org.openhab.binding.powermax
2017-07-17 19:07:38.186 [DEBUG] [org.openhab.binding.powermax        ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={component.name=binding.powermax, component
.id=185, service.id=312, service.bundleid=193, service.scope=bundle} - org.openhab.binding.powermax
2017-07-17 19:07:38.280 [DEBUG] [org.openhab.binding.powermax        ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=313, service.bundleid=193, service.s
cope=singleton} - org.openhab.binding.powermax                                                                                                                                                               
2017-07-17 19:07:38.290 [DEBUG] [wermax.handler.PowermaxBridgeHandler] - initializing handler for thing powermax:serial:home                                                                                 
2017-07-17 19:07:38.382 [DEBUG] [org.openhab.binding.powermax        ] - BundleEvent STARTED - org.openhab.binding.powermax                                                                                  
2017-07-17 19:07:38.672 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin                                                                                                   
2017-07-17 19:07:48.352 [DEBUG] [wermax.handler.PowermaxBridgeHandler] - Powermax job...                                                                                                                     
2017-07-17 19:07:48.369 [DEBUG] [wermax.handler.PowermaxBridgeHandler] - trying to reconnect...                                                                                                              
2017-07-17 19:07:48.371 [DEBUG] [wermax.handler.PowermaxBridgeHandler] - closeConnection(): disconnected                                                                                                     
2017-07-17 19:07:48.409 [DEBUG] [al.connector.PowermaxSerialConnector] - open(): Opening Serial Connection                                                                                                   
2017-07-17 19:07:49.008 [DEBUG] [ernal.connector.PowermaxReaderThread] - Data listener started                                                                                                               
2017-07-17 19:07:49.008 [INFO ] [wermax.handler.PowermaxBridgeHandler] - Powermax alarm binding: serial connection (/dev/ttyUSB0): connected                                                                 
2017-07-17 19:07:49.009 [DEBUG] [wermax.handler.PowermaxBridgeHandler] - openConnection(): connected                                                                                                         
2017-07-17 19:07:49.034 [DEBUG] [.internal.message.PowermaxCommDriver] - sendMessage(): add message in queue (type DOWNLOAD)                                                                                 
2017-07-17 19:07:49.037 [DEBUG] [owermax.handler.PowermaxThingHandler] - Initializing handler for thing powermax:zone:home:Salon1                                                                            
2017-07-17 19:07:49.039 [DEBUG] [wermax.handler.PowermaxBridgeHandler] - Received command REFRESH from channel system_armed                                                                                  
2017-07-17 19:07:49.043 [DEBUG] [owermax.handler.PowermaxThingHandler] - Set handler status to ONLINE for thing powermax:zone:home:Salon1 (bridge ONLINE)                                                    
2017-07-17 19:07:49.050 [DEBUG] [owermax.handler.PowermaxThingHandler] - Initializing handler for thing powermax:zone:home:Fuego                                                                             
2017-07-17 19:07:49.054 [DEBUG] [owermax.handler.PowermaxThingHandler] - Set handler status to ONLINE for thing powermax:zone:home:Fuego (bridge ONLINE)                                                     
2017-07-17 19:07:49.061 [DEBUG] [owermax.handler.PowermaxThingHandler] - Initializing handler for thing powermax:zone:home:Salon2                                                                            
2017-07-17 19:07:49.064 [DEBUG] [.internal.message.PowermaxCommDriver] - sendMessage(): sending DOWNLOAD message 0D2400004F48000000000000000A                                                                
2017-07-17 19:07:49.066 [DEBUG] [owermax.handler.PowermaxThingHandler] - Set handler status to ONLINE for thing powermax:zone:home:Salon2 (bridge ONLINE)                                                    
2017-07-17 19:07:49.073 [DEBUG] [owermax.handler.PowermaxThingHandler] - Initializing handler for thing powermax:zone:home:Puerta_Titi                                                                       
2017-07-17 19:07:49.076 [DEBUG] [owermax.handler.PowermaxThingHandler] - Set handler status to ONLINE for thing powermax:zone:home:Puerta_Titi (bridge ONLINE)                                               
2017-07-17 19:07:49.085 [DEBUG] [owermax.handler.PowermaxThingHandler] - Initializing handler for thing powermax:zone:home:Puerta_Ppal                                                                       
2017-07-17 19:07:49.089 [DEBUG] [owermax.handler.PowermaxThingHandler] - Set handler status to ONLINE for thing powermax:zone:home:Puerta_Ppal (bridge ONLINE)        
2017-07-17 19:08:08.133 [WARN ] [ernal.connector.PowermaxReaderThread] - Powermax alarm binding: message CRC check failed (expected 29, got 28, message 0DAB03001E00312E3038000043290A)                      
2017-07-17 19:08:09.067 [DEBUG] [wermax.handler.PowermaxBridgeHandler] - Powermax job...                                                                                                                                                                                                                   
2017-07-17 19:08:29.069 [DEBUG] [wermax.handler.PowermaxBridgeHandler] - Powermax job...          
2017-07-17 19:08:38.134 [WARN ] [ernal.connector.PowermaxReaderThread] - Powermax alarm binding: message CRC check failed (expected 29, got 28, message 0DAB03001E00312E3038000043290A)                      
2017-07-17 19:08:49.072 [DEBUG] [wermax.handler.PowermaxBridgeHandler] - Powermax job...                                                                                                                   

Thx on advance for your help
Chano

It seems that it fails at first message received. Are you sure of your serial connection ? Was it working before with the 1.x version of the binding ? Have you uninstalled the 1.x binding ?
You run OH on a Linux machine ?

I should check what is the kind of the message you received.

Maybe I should acknowledge the received messages even in case of CRC failure to avoid “blocking” everything.

Thx for your prompt answer!!.

I’m pretty sure of the serial connection. I’m using the official visonic serial adapter directly attached to an USB-TO-Serial adapter that appears like /dev/TTYUSB0 in my Raspi. If I "cat /dev/TTYUSB0’ I can see some garbage…

It didn’t work either with the 1.x version of the plugin (same behaviour) and, when I was searching the forums I ended up in this thread where you said you have an update, so I decided to try it.

And yes, before installing your JAR file, I’ve uninstalled the previous version from PaperUI and removed all the .cfg, .item files, the I dropped the JAR file in the addons menu and installed RFXCOM from PaperUI.

I’ve restarted a couple times Openhab and the whole rapi to no avail.

There must be something wear in the CRC calculation because it always missed the correct value by 1 (expected 28, got 27. Expected 16, Got 15, …)

Thx again!

If even with the 1.x binding it fails, you have a problem somewhere with serial.
Did you install special drivers on your RPI ? What distribution are you running ?
What is the model of your alarm system ?

No, I didn’t install any special driver on my RPI (Should I??). I’m running Openhabian, this are the versions reported when I log in.

Release = Raspbian GNU/Linux 8 (jessie)
Kernel = Linux 4.9.35-v7+
Platform = Raspberry Pi 3 Model B Rev 1.2

My Alarm its a Visonic PowerMax the Hardware version reported in powerlink is 123 and the software version 6.1.14 (the one that the root password is still unknown and that’s why I must use the Serial port)

I was googling around to try to Sniff traffic in the serial port to see if there is some dialog going on…

At my knowledge, it is not possible to use Powerlink and a serial connection at the same time.

No, I’m not using both at the same time. As I mentioned I’m not able to connect via Powerlink because I don’t know the root password for this version of Powerlink

Hi,

I have an smal question about the binding with the serial part.
I have setup the connection to /dev/ttyUSB0 but I stay receive the next error:

20:06:55.665 [INFO ] [wermax.handler.PowermaxBridgeHandler] - Powermax alarm binding: serial connection (/dev/ttyUSB0): disconnected

When I check in raspbian I see the usb interface PL2303 on USB0 so that must be ok.
And when I connect the cable to an windows pc with the visonic software it runs ok.
I there something I missed?

Check that your user running OH on Linux is in the dialout group.
See wiki for RFXCOM 1.x :

@ Lodomo, that is the trick, thanks!
Other small question, is there an option to enable the arming home function?

Yes, of course, send the value “Stay” to the item linked to the channel “arm_mode” after enabling the arm capability in your thing settings.

I will update the documentation to:

  • talk about dialout group for Linux users using the serial connection
  • mention the accepted values for the channel “arm_mode”.