PowerMax ser2net and socat not communicating

I’ve been trying for days getting my Visonic Powermax Complete to communicate over my network using a RPI running ser2net connected through wifi to one of my servers running ESXI and ubuntu server 16.x and openhab 1.8.2 with socat on this end.

I know the rpi and ser2net is working since i can communicate using windows and Trueport in lite mode and the Visonic windows driver. But when i try to use Socat on my openHAB installation it does not work.

The RPI is connected with FTDI based TTL serial directly to Powermax unit as by this guide:
http://www.domoticaforum.eu/viewtopic.php?f=68&t=7152&sid=f73e8c18b7e354e129b9b94a6cdf04b6

My settings:
ser2net = 10001:raw:0:/dev/ttyUSB0:9600 NONE 1STOPBIT 8DATABITS

socat = sudo socat -d -d pty,link=/dev/ttyVIS,raw tcp:10.0.0.252:10001

And socat reports:

2016/05/06 11:05:09 socat[2782] N PTY is /dev/pts/6
2016/05/06 11:05:09 socat[2782] N opening connection to AF=2 10.0.0.252:10001
2016/05/06 11:05:09 socat[2782] N successfully connected from local address AF=2 10.0.0.251:37112
2016/05/06 11:05:09 socat[2782] N starting data transfer loop with FDs [5,5] and [7,7]

All i get from openHAB is that it disconnects all the time, I don’t believe it is actually communicating at all.

In openhab.cfg I have this set:
powermax:serialPort=/dev/ttyVIS
powermax:forceStandardMode=yes
and also the pin code is there.

And after running ./start.sh openHAB reports:

osgi> 2016-05-06 12:20:23.192 [INFO ] [.o.core.internal.CoreActivator] - openHAB runtime has been started (v1.8.2).
2016-05-06 12:20:25.413 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - mDNS service has been started
2016-05-06 12:20:25.517 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - Service Discovery initialization completed.
2016-05-06 12:20:29.617 [INFO ] [penhab.io.rest.RESTApplication] - Started REST API at /rest
2016-05-06 12:20:34.779 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'default.sitemap’
2016-05-06 12:20:35.066 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'home.items’
2016-05-06 12:20:35.743 [INFO ] [.o.u.w.i.servlet.WebAppServlet] - Started Classic UI at /classicui/openhab.app
2016-05-06 12:20:40.597 [INFO ] [.service.AbstractActiveService] - PowerMax Refresh Service has been started
2016-05-06 12:20:40.671 [INFO ] [o.b.p.internal.PowerMaxBinding] - PowerMax alarm binding: serial connection (/dev/ttyVIS): disconnected
2016-05-06 12:21:00.686 [INFO ] [o.b.p.internal.PowerMaxBinding] - PowerMax alarm binding: serial connection (/dev/ttyVIS): disconnected
2016-05-06 12:21:20.695 [INFO ] [o.b.p.internal.PowerMaxBinding] - PowerMax alarm binding: serial connection (/dev/ttyVIS): disconnected
2016-05-06 12:21:40.706 [INFO ] [o.b.p.internal.PowerMaxBinding] - PowerMax alarm binding: serial connection (/dev/ttyVIS): disconnected
2016-05-06 12:22:00.716 [INFO ] [o.b.p.internal.PowerMaxBinding] - PowerMax alarm binding: serial connection (/dev/ttyVIS): disconnected

Which goes on and on.

Would be very happy if someone can point me in the right direction! :slight_smile:

And yes I am totally new woth the openHAB system, but can’t think of more things to check or do to get my PowerMax up and running.

Not a standard configuration !

Can you try starting with start_debug.sh please, we should get a more detailed error.

Just an idea, maybe /dev/ttyVIS is not accessible by the user running openHAB ?

I’ve added my user to the group dialout a while back, didn’t seem to make a difference.

Maybe the problem is as simple as ser2net and socat is set up wrong. Unfortunately I am not sure where to start to solve that.

If I try to connect a terminal program to ttyVIS I don’t see any thing, I believe this is correct behaviour. Although I haven’t really tried on the machine that i know do communicate(windows and Trueport) to make sure I am not totally mistaken… I will try to run start_debug.sh for a while to see if something else comes up.

And you could try to run openHAB on the RPI just to check that the direct serial connection is working well.

Sorry about my late re, takes time to actually get time with a little one in the house :slight_smile:

I’ve tried installing openHAB directly on my RPI which is having the serial interface, and that works without a hitch. So I am back to trying to figure out why ser2net and socat don’t want to communicate. :frowning:

I think, you have to set up the openHAB start script to support /dev/tty/VIS, see informations about /dev/ttyAMA0 in the Wiki. Be aware that you also have to alter the autostart script (depends on which method is used).

Ahh! Now something is happening, i get connection now if I run sudo start.sh, but it seems to stops there. Now it at least feels like it is likely something with my socat setting :wink:

Ok now I finally!! Found the setting that is working, and share it here when someone else is trying to do the same thing and might be struggling like me.

The settings are for ser2net:
10001:raw:0:/dev/ttyUSB0:9600 NONE 1STOPBIT 8DATABITS

Socat:
socat -d -d pty,link=/home/openhab/ttyVIS,cfmakeraw tcp4:10.0.0.252:10001

I haven’t checked if the added line in start.sh actually makes a difference now that the above settings are correct.

-Dgnu.io.rxtx.SerialPorts=/home/openhab/ttyVIS \

2 Likes