Powermax binding

The complete bit of log reads:

2018-10-14 19:15:11.974 [DEBUG] [wermax.handler.PowermaxBridgeHandler] - trying to reconnect...
2018-10-14 19:15:11.974 [DEBUG] [al.connector.PowermaxSerialConnector] - close(): Closing Serial Connection
2018-10-14 19:15:11.974 [DEBUG] [internal.connector.PowermaxConnector] - cleanup(): cleaning up Connection
2018-10-14 19:15:11.975 [DEBUG] [internal.connector.PowermaxConnector] - cleanup(): Connection Cleanup
2018-10-14 19:15:11.975 [DEBUG] [al.connector.PowermaxSerialConnector] - close(): Serial Connection closed
2018-10-14 19:15:11.976 [DEBUG] [wermax.handler.PowermaxBridgeHandler] - closeConnection(): disconnected
2018-10-14 19:15:11.976 [DEBUG] [al.connector.PowermaxSerialConnector] - open(): Opening Serial Connection
2018-10-14 19:15:11.980 [DEBUG] [al.connector.PowermaxSerialConnector] - open(): No Such Port: /dev/usb_serial
2018-10-14 19:15:11.980 [DEBUG] [wermax.handler.PowermaxBridgeHandler] - openConnection(): disconnected

@dan12345: if the binding tries to reconnect, we can imagine that it was first closed.

@Kai : it seems to be a problem relative to the new ESH serial API !
The line that generates the error is https://github.com/openhab/openhab2-addons/blob/master/addons/binding/org.openhab.binding.powermax/src/main/java/org/openhab/binding/powermax/internal/connector/PowermaxSerialConnector.java#L58
When I look at the new code behind the method serialPortManager.getIdentifier, I can see that it returns null when the “registry” is not set.
https://github.com/eclipse/smarthome/blob/master/bundles/io/org.eclipse.smarthome.io.transport.serial/src/main/java/org/eclipse/smarthome/io/transport/serial/internal/SerialPortManagerImpl.java#L59
Are there scenario while this “registry” (serialportRegistry) could become null ?

@dan12345 does it happen while your OH setup is updated ? Does the binding finally succeeded in reconnecting after a certain time ?

@Kai I think a DEBUG log should be added when the registry is null. It would help to DEBUG such a case.

1 Like

I usually have logging set to INFO - I switched onto DEBUG to see what was happening when the binding stopped responding, but I have nothing in the logs showing the initial disconnection.

Doesn’t seem related to updates.

Doesn’t reconnect (I left it for five hours)

many thanks!

Dan

@dan12345: that’s strange, I have no yet encountered this issue. On what OS is running openHAB in your case ?

By the way, I just proposed a change to add few more logs in the framework that could help to understand what’s wrong in your case.

Ubuntu 16.04 on an i5 (so way overpowered).

Since I increased the logging level it hasn’t happened again, just to be annoying. But many thanks for putting the change through - hopefully if/when it happens again then I’ll have more data.

Now that openHAB 2.4 has been released with the Powermax binding included, I deleted the old version from the Eclipse Smarthome marketplace.

2 Likes

Hi. Sorry to add another question to this already very long thread. I hope you might be able to give me a quick answer as I am a bit stumped. I have been using powermax connected to vera edge successfully for a couple of years. Now I am migrating to raspberry pi openhabian and next task was to try to get my Powermax Express panel connected directly. I have the panel connected using a serial to usb adaptor (that is same hardware as for vera) to one of the usb sockets on the rpi. I started with the openhab2 binding but could not see the USB port in the thing drop down. So now I have reverted to the the old binding and have the following config:

serialPort=ttyUSB0
motionOffDelay=3
allowArming=true
allowDisarming=true
forceStandardMode=false
panelType=PowerMaxExpress

checking the USB connection in the console:

[10:37:44] openhabian@openHABianPi:/dev$ lsusb
Bus 001 Device 006: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 001 Device 005: ID 0424:7800 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I have also done this:

[10:22:46] openhabian@openHABianPi:/dev$ sudo usermod -a -G dialout openhab

but still i get this in the log:

2018-12-31 10:59:10.024 [INFO ] [ng.powermax.internal.PowerMaxBinding] - PowerMax alarm binding: serial connection (ttyUSB0): disconnected

Can anyone tell me the best way to debug this?

Thanks

I will not provide any help for the 1.x binding, that is terribly old for me. Please return to the current version of the binding (2.0).

Try enabling DEBUG logs, it could add additional information: log:set DEBUG org.openhab.binding.powermax

Run command ls /dev/tty* and see if /dev/ttyUSB0 is listed.

Then you will have to tell openHAB to consider this USB port. Personnaly I do it by updating the file runtime/bin/karaf, adding the following line at line 262 (adjusted to your port):
JAVA_OPTS="${JAVA_OPTS} -Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0"

thank you. this was the answer:

and the v2.4.0 binding is now working and talking to the powermaxexpress panel. The reason i reverted to the v1 binding was because it was slightly more informative about telling me that it couldn’t find a connection even though I could see that the rpi could see the serial adapator device on the USB device port. Anyway you have solved it!

Good to know that it works well with a Powermax Express.
Please note that the way I suggested adding the java option is probably not the best as it will be lost by an upgrade. A proper solution should certainly exist.

on the official ubuntu package install, you add into the java options section of /etc/default/openhab2 and that will stay after upgrades.

Hi,

I’m a newbie regarding OpenHAB. Used Domotica for a few years, but now trying to use OpenHAB. Main reasons is the support for the Powermax/master sensors individually.
I have a PowerMaster 10 that I am trying to get working with OpenHAB using a Powerlink3, but no luck. Reading this post and several other post in OpenHAB about this issue, but still can’t find some one that connect with Powerlink IP instead of serial or serial/IP.

The Powermax binding says it’s connected. I get a lot CRC errors in the log, it even seems to read my PowerMaster when I use ‘setup_info’, but that’s it.

Help is needed to get this working?!
Lolodomo?

You cammot run the binding in parallel of a hardware powerlink module. You have to make a choice. I think this point is mentioned in the documentation, isn’t it ?
And the support of powermaster could be worst. I am not sure to have a feedback ever.

Please enable the DEBUG logs to provide more information.

Hi Lolodomo,

With serial/IP I mean the serial to IP converter such as USR-TCP232-T2. In the binding documentation I read ‘powerlink’ which suggest I can use it or is it only PowerLink2?

I just came here to say Thank you !
I had PowerMaxPlus which didn’t play nice, and I just bought brand new PowerMaxPro and I find your binding super useful!
Appreciate the effort you’re doing here.

1 Like

It is a truly excellent binding!

Thank you :wink:

Hi,
Could you detail how you connected to the binding with your PowerMaxPro?