OMNILINK Binding - Connection Refused

Hi,

I’ve got an older (pre-Leviton) HAI OMNI PRO II. I am trying to use the OMNILINK binding to connect. My environment is Windows 7, Java 1.8. My configuration settings are:

omnilink:port=4369
omnilink:host=192.168.1.200
omnilink:key1=0X:DX:7X:1X:EX:5X:FX:5X
omnilink:key2=AX:EX:FX:4X:AX:9X:8X:EX
omnilink:generateItems=true

which were all obtained from my panel. My panel indicates software version 3.3. When I launch openHAB, the log shows:

2015-11-03 09:02:22.462 [ERROR] [o.b.o.internal.OmniLinkBinding] - Could not connect
java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method) ~[na:1.8.0_45]
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) ~[na:1.8.0_45]
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) ~[na:1.8.0_45]
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) ~[na:1.8.0_45]
at java.net.AbstractPlainSocketImpl.connect(Unknown Source) ~[na:1.8.0_45]
at java.net.PlainSocketImpl.connect(Unknown Source) ~[na:1.8.0_45]
at java.net.SocksSocketImpl.connect(Unknown Source) ~[na:1.8.0_45]
at java.net.Socket.connect(Unknown Source) ~[na:1.8.0_45]
at java.net.Socket.connect(Unknown Source) ~[na:1.8.0_45]
at java.net.Socket.(Unknown Source) ~[na:1.8.0_45]
at java.net.Socket.(Unknown Source) ~[na:1.8.0_45]
at com.digitaldan.jomnilinkII.Connection.(Unknown Source) ~[na:na]
at org.openhab.binding.omnilink.internal.OmniLinkBinding$OmniConnectionThread.run(OmniLinkBinding.java:358) ~[na:na]

I thought perhaps it was because there was a PC access code set, so I’ve since changed the PC access code to 0000 but no change in the results.

Does anyone know:

  1. Will my older OMNI PRO II work with OMNILINK?
  2. Why I am getting the connection refused error?

Any assistance is greatly appreciated!

Thanks.

Chris

I am also having trouble with connecting to my OmniPro II.

My Omni firmware is 3.4 (older chip based). Raspberian, Java 1.8. New user of Openhab.

I can post my logfiles later.

Jack

Edit:
2015-11-03 22:41:32.050 [ERROR] [o.b.o.internal.OmniLinkBinding] - Could not connect
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method) ~[na:1.8.0]
at java.net.SocketInputStream.read(SocketInputStream.java:150) ~[na:1.8.0]
at java.net.SocketInputStream.read(SocketInputStream.java:121) ~[na:1.8.0]
at java.net.SocketInputStream.read(SocketInputStream.java:107) ~[na:1.8.0]
at com.digitaldan.jomnilinkII.Connection.readBytes(Unknown Source) ~[na:na]
at com.digitaldan.jomnilinkII.Connection.(Unknown Source) ~[na:na]
at org.openhab.binding.omnilink.internal.OmniLinkBinding$OmniConnectionThread.run(OmniLinkBinding.java:358) ~[na:na]
2015-11-03 22:46:42.186 [ERROR] [o.b.o.internal.OmniLinkBinding] - Could not connect
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method) ~[na:1.8.0]
at java.net.SocketInputStream.read(SocketInputStream.java:150) ~[na:1.8.0]
at java.net.SocketInputStream.read(SocketInputStream.java:121) ~[na:1.8.0]
at java.net.SocketInputStream.read(SocketInputStream.java:107) ~[na:1.8.0]
at com.digitaldan.jomnilinkII.Connection.readBytes(Unknown Source) ~[na:na]
at com.digitaldan.jomnilinkII.Connection.(Unknown Source) ~[na:na]
at org.openhab.binding.omnilink.internal.OmniLinkBinding$OmniConnectionThread.run(OmniLinkBinding.java:358) ~[na:na]

I changed my log from INFO to debug as described in this article http://www.makeuseof.com/tag/getting-started-openhab-home-automation-raspberry-pi/ Now the log is more verbose. Maybe someone can make sense of this. I think it means there is a problem at line 358 of a OmnilinkBinding.java file.

at com.digitaldan.jomnilinkII.Connection.<init>(Unknown Source) ~[na:na]
at org.openhab.binding.omnilink.internal.OmniLinkBinding$OmniConnectionThread.run(OmniLinkBinding.java:358) ~[na:na]
at com.digitaldan.jomnilinkII.Connection.readBytes(Unknown Source) ~[na:na]
at com.digitaldan.jomnilinkII.Connection.<init>(Unknown Source) ~[na:na]
at org.openhab.binding.omnilink.internal.OmniLinkBinding$OmniConnectionThread.run(OmniLinkBinding.java:358) ~[na:na]
at com.digitaldan.jomnilinkII.Connection.readBytes(Unknown Source) ~[na:na]
at com.digitaldan.jomnilinkII.Connection.<init>(Unknown Source) ~[na:na]
at org.openhab.binding.omnilink.internal.OmniLinkBinding$OmniConnectionThread.run(OmniLinkBinding.java:358) ~[na:na]
at com.digitaldan.jomnilinkII.Connection.readBytes(Unknown Source) ~[na:na]
at com.digitaldan.jomnilinkII.Connection.<init>(Unknown Source) ~[na:na]
at org.openhab.binding.omnilink.internal.OmniLinkBinding$OmniConnectionThread.run(OmniLinkBinding.java:358) ~[na:na]
at com.digitaldan.jomnilinkII.Connection.readBytes(Unknown Source) ~[na:na]
at com.digitaldan.jomnilinkII.Connection.<init>(Unknown Source) ~[na:na]
at org.openhab.binding.omnilink.internal.OmniLinkBinding$OmniConnectionThread.run(OmniLinkBinding.java:358) ~[na:na]
at com.digitaldan.jomnilinkII.Connection.readBytes(Unknown Source) ~[na:na]
at com.digitaldan.jomnilinkII.Connection.<init>(Unknown Source) ~[na:na]
at org.openhab.binding.omnilink.internal.OmniLinkBinding$OmniConnectionThread.run(OmniLinkBinding.java:358) ~[na:na]
at com.digitaldan.jomnilinkII.Connection.readBytes(Unknown Source) ~[na:na]
at com.digitaldan.jomnilinkII.Connection.<init>(Unknown Source) ~[na:na]
at org.openhab.binding.omnilink.internal.OmniLinkBinding$OmniConnectionThread.run(OmniLinkBinding.java:358) ~[na:na]
at com.digitaldan.jomnilinkII.Connection.readBytes(Unknown Source) ~[na:na]
at com.digitaldan.jomnilinkII.Connection.<init>(Unknown Source) ~[na:na]
at org.openhab.binding.omnilink.internal.OmniLinkBinding$OmniConnectionThread.run(OmniLinkBinding.java:358) ~[na:na]
at com.digitaldan.jomnilinkII.Connection.readBytes(Unknown Source) ~[na:na]
at com.digitaldan.jomnilinkII.Connection.<init>(Unknown Source) ~[na:na]
at org.openhab.binding.omnilink.internal.OmniLinkBinding$OmniConnectionThread.run(OmniLinkBinding.java:358) ~[na:na]
at com.digitaldan.jomnilinkII.Connection.readBytes(Unknown Source) ~[na:na]
at com.digitaldan.jomnilinkII.Connection.<init>(Unknown Source) ~[na:na]
at org.openhab.binding.omnilink.internal.OmniLinkBinding$OmniConnectionThread.run(OmniLinkBinding.java:358) ~[na:na]
at com.digitaldan.jomnilinkII.Connection.readBytes(Unknown Source) ~[na:na]
at com.digitaldan.jomnilinkII.Connection.<init>(Unknown Source) ~[na:na]
at org.openhab.binding.omnilink.internal.OmniLinkBinding$OmniConnectionThread.run(OmniLinkBinding.java:358) ~[na:na]
at com.digitaldan.jomnilinkII.Connection.readBytes(Unknown Source) ~[na:na]
at com.digitaldan.jomnilinkII.Connection.<init>(Unknown Source) ~[na:na]
at org.openhab.binding.omnilink.internal.OmniLinkBinding$OmniConnectionThread.run(OmniLinkBinding.java:358) ~[na:na]
at com.digitaldan.jomnilinkII.Connection.readBytes(Unknown Source) ~[na:na]
at com.digitaldan.jomnilinkII.Connection.<init>(Unknown Source) ~[na:na]
at org.openhab.binding.omnilink.internal.OmniLinkBinding$OmniConnectionThread.run(OmniLinkBinding.java:358) ~[na:na]
at com.digitaldan.jomnilinkII.Connection.readBytes(Unknown Source) ~[na:na]
at com.digitaldan.jomnilinkII.Connection.<init>(Unknown Source) ~[na:na]

Hi Guys, its been awhile since I have worked on this binding, so I’m a
little rusty. Chris, the “Connection refused: connect” message means that
we cannot make a connection to your hai panel. This is typically that the
ip or port is not correct or there is a firewall or router blocking this
connection. Can you verify that these are correct for your system?

Jack, are these the only errors in the log? Line 358 seems to be where we
make the initial connection , I would hope there would be some other
messages earlier telling us why it did not connect.

Dan,
Thanks for responding.

I used the following to check my log file and the above was all I saw. (I snipped some of it off that was just a repeat).

`grep "omni" /var/log/openhab/openhab.log > ~/Documents/omnierrorlog.txt`

I have triple checked my ip, port and key in the config file. I can connect with snaplink and PC Access programs.

I do have an older OmniPro II that you need to swap out a chip to upgrade the firmware. Newer panels are flashable. My firmware version is 3.4.

Hi jack, your firmware should be fine, all that is required is TCP support
which was added in 2.8 if I remember. Your issue is not that it can not
connect but seems to be erroring out reading something. Are you running in
debug mode in openhab (start_debug.sh)? I don’t think we are getting all
the error messages, can you post a more complete log snipped from the first
error occurrence? If you notice Jack’s output has lines that do not
contain the word omni in them, also many lines use Omni (capital O) so
your grep is missing some stuff I would imagine, but in any case more
complete logs are needed.

Jack, also try setting omnilink:generateItems=false , this was a horrible
class I write to save me from writing a items file by hand (I had hundreds
of devices) and is quite buggy.

Dan,
Here is a more complete log. I have generateItems set to false. I modified logback.xml to get into DEBUG mode, but this doesn’t look that different from the log in INFO mode.

 2015-11-06 16:54:59.841 [ERROR] [o.b.o.internal.OmniLinkBinding] - Could not connect
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method) ~[na:1.8.0]
at java.net.SocketInputStream.read(SocketInputStream.java:150) ~[na:1.8.0]
at java.net.SocketInputStream.read(SocketInputStream.java:121) ~[na:1.8.0]
at java.net.SocketInputStream.read(SocketInputStream.java:107) ~[na:1.8.0]
at com.digitaldan.jomnilinkII.Connection.readBytes(Unknown Source) ~[na:na]
at com.digitaldan.jomnilinkII.Connection.<init>(Unknown Source) ~[na:na]
at org.openhab.binding.omnilink.internal.OmniLinkBinding$OmniConnectionThread.run(OmniLinkBinding.java:358) ~[na:na]

2015-11-06 16:55:00.011 [DEBUG] [.o.m.r.i.engine.ExecuteRuleJob] - Executing scheduled rule ’

Hi Dan,

I will verify connectivity tomorrow. I know I pinged the panel before installing the software, but I didn’t specifically check port 4369. Will report back what I find.

Thanks.

Chris

Hey Jack, does the binding work at all? Also I would expect there to be
more logs as the binding starts up. How are you starting openhab? If you
use the debug start script it should use the logback_debug.xml file which
puts everything in debug mode. I would need a complete log file from that.

Hi Dan,
I couldn’t find the debug start script in my install. Then I read somewhere that when you install openhab with apt-get (like I did), you don’t get that file.

I may have some more time to play with this in a few weeks and I’ll keep you updated.

I am indeed running an older OP II (3 serial port) with the binding and all works well.

One think I had been wondering recently is about the possibility of a serial binding version to utilize with older Omni LT boards etc. not sure if @digitaldan might have a suggestion.

I do know of some arduino code written that could talk serial with the Omni LT also as another option. I probably should start another thread on this…

Dan, do you have any updates on resolving this issue with the OmniLink binding? I’m just now installing Openhab and trying to get it to build a sample items file of my OmniPro II system, and when “generateitems=true”, I get an endless stream of “Could not connect to system” errors from the Openhab server. My OmniPro system has enough zones / lights / tstats / etc that the process of manually writing a configuration file for Openhab is a bit daunting.

With “generateitems=false” it doesn’t throw errors. Even with “generateitems=true” it’s successfully connecting to the OmniPro system because it shows me the correct battery level in the Openhab server window, but it seems to fail when it tries to scan the configuration and enumerate the items.

My OmniPro II is running firmware 3.15. I can collect a detailed debug / log file if that would help you track down where it’s breaking.

The idea of being able to have Openhab interact with my OmniPro is very exciting. I really appreciate the work you’ve put into this binding so far. Thanks.

@2MuchTech I’m happy to help if I can. There is more than one issue in this thread, it sounds like you are having trouble with the generate items code. Can you please post a detailed log file with the exception being thrown?

Well, it only took me a few months to get this to you Dan… Sorry about the lengthy delay. I just set up openHAB from scratch (version 1.8.1) and it’s still doing the same thing. Here’s a snippet from the log file that shows the problem. It will loop endlessly trying to do this if generateItems=true. It seems to be getting the initial info from my OmniPro II, so I think the security key is okay.

2016-02-23 18:53:24.086 [INFO ] [o.b.o.internal.OmniLinkBinding] - System: SystemStatus ( timeDateValid = true year = 16 month = 2 day = 23 dayOfWeek = 2 hour = 18 minute = 53 second = 20 daylightSavings = false sunriseHour = 7 sunriseMinute = 17 sunsetHour = 18 sunsetMinute = 21 batteryReading = 229 alarms = {} )
2016-02-23 18:53:24.351 [ERROR] [o.b.o.internal.OmniLinkBinding] - Could not connect to system
java.lang.NullPointerException: null
at org.openhab.binding.omnilink.internal.ui.OmnilinkItemGenerator.generateUnits(OmnilinkItemGenerator.java:250) ~[na:na]
at org.openhab.binding.omnilink.internal.ui.OmnilinkItemGenerator.generateItemsAndGroups(OmnilinkItemGenerator.java:159) ~[na:na]
at org.openhab.binding.omnilink.internal.OmniLinkBinding$OmniConnectionThread.run(OmniLinkBinding.java:412) ~[na:na]
2016-02-23 18:53:24.353 [ERROR] [o.b.o.internal.OmniLinkBinding] - OmniConnectionThread was disconnected, will try again
java.net.SocketException: Socket closed
at java.net.SocketInputStream.socketRead0(Native Method) ~[na:1.8.0_65]
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) ~[na:1.8.0_65]
at java.net.SocketInputStream.read(SocketInputStream.java:170) ~[na:1.8.0_65]
at java.net.SocketInputStream.read(SocketInputStream.java:141) ~[na:1.8.0_65]
at java.net.SocketInputStream.read(SocketInputStream.java:223) ~[na:1.8.0_65]
at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:337) ~[na:1.8.0_65]
at com.digitaldan.jomnilinkII.Connection.readBytesEncrypted2(Unknown Source) [jOmniLinkII-1.0.jar:na]
at com.digitaldan.jomnilinkII.Connection.run(Unknown Source) [jOmniLinkII-1.0.jar:na]

I tried it again with debugging turned on… there’s a little more info in this one:

19:27:39.322 [INFO ] [o.b.o.internal.OmniLinkBinding:398 ] - System: SystemStatus ( timeDateValid = true year = 16 month = 2 day = 23 dayOfWeek = 2 hour = 19 minute = 27 second = 35 daylightSavings = false sunriseHour = 7 sunriseMinute = 17 sunsetHour = 18 sunsetMinute = 21 batteryReading = 229 alarms = {} )
19:27:39.578 [ERROR] [o.b.o.internal.OmniLinkBinding:451 ] - Could not connect to system
java.lang.NullPointerException: null
at org.openhab.binding.omnilink.internal.ui.OmnilinkItemGenerator.generateUnits(OmnilinkItemGenerator.java:250) ~[na:na]
at org.openhab.binding.omnilink.internal.ui.OmnilinkItemGenerator.generateItemsAndGroups(OmnilinkItemGenerator.java:159) ~[na:na]
at org.openhab.binding.omnilink.internal.OmniLinkBinding$OmniConnectionThread.run(OmniLinkBinding.java:412) ~[na:na]
19:27:39.579 [DEBUG] [o.b.o.internal.OmniLinkBinding:355 ] - OmniConnectionThread trying to connect
19:27:39.579 [ERROR] [o.b.o.internal.OmniLinkBinding:383 ] - OmniConnectionThread was disconnected, will try again
java.net.SocketException: Socket closed
at java.net.SocketInputStream.socketRead0(Native Method) ~[na:1.8.0_65]
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) ~[na:1.8.0_65]
at java.net.SocketInputStream.read(SocketInputStream.java:170) ~[na:1.8.0_65]
at java.net.SocketInputStream.read(SocketInputStream.java:141) ~[na:1.8.0_65]
at java.net.SocketInputStream.read(SocketInputStream.java:223) ~[na:1.8.0_65]
at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:337) ~[na:1.8.0_65]
at com.digitaldan.jomnilinkII.Connection.readBytesEncrypted2(Unknown Source) [jOmniLinkII-1.0.jar:na]
at com.digitaldan.jomnilinkII.Connection.run(Unknown Source) [jOmniLinkII-1.0.jar:na]
19:27:39.838 [DEBUG] [o.b.o.internal.OmniLinkBinding:360 ] - OmniConnectionThread connected
19:27:40.029 [INFO ] [o.b.o.internal.OmniLinkBinding:398 ] - System: SystemStatus ( timeDateValid = true year = 16 month = 2 day = 23 dayOfWeek = 2 hour = 19 minute = 27 second = 36 daylightSavings = false sunriseHour = 7 sunriseMinute = 17 sunsetHour = 18 sunsetMinute = 21 batteryReading = 229 alarms = {} )
19:27:40.336 [ERROR] [o.b.o.internal.OmniLinkBinding:451 ] - Could not connect to system
java.lang.NullPointerException: null

Leave omnilink:generateItems=false , that class was a hack to get around my lazyness of hand making items files and sitemaps, but is full of bugs. Its absolutely not needed to run the binding, you can use https://github.com/openhab/openhab/wiki/OmniLink-Binding for examples on how to configure devices. My old house had a huge amount of devices which is why I created this class. Are you running the omnilink jar from the 1.8.1 release? The reason I ask is the line number listed in the error message does not match a line the the source code that in github right now.

Dan, yes, I’m running the jar file from the 1.8.1 release. My file is dated 2-1-2016, and it’s 136,023 bytes.

If there’s nothing confidential in your binding file, would you mind sending it to me? I have a somewhat large number of OmniPro 2 devices as well (50+ Units, 50 Zones, 3 t-stats), and seeing a large example file would undoubtedly make it easier for me to get all of my devices entered correctly. The wiki examples are helpful, but they don’t cover a very wide range of different device types, so I’m worried that I’ll mis-bind some of my devices. For example, I have some moisture detection zones that are set as Water zones in the OmniPro, but I don’t see anything like that in the wiki examples, so I’m wondering if there are special settings required to identify this type of zone in openHab.

Thanks!

So, I finally made some time to play with this. I have Openhab set up on a Windows 8.1 laptop for now. Using the latest OmniLink 1.8.2, I continue to have trouble getting openhab to connect to my OPII.

But for the fun of it, I tried an older 1.6.0 Omnilink jar that you posted on 7/28/14 to the old google group, and it works! The logs showed that it downloaded all of my configurations. I haven’t actually set up a sitemap to test anything, but I am optimistic that it will work.

My guess is that my firmware (3.4) can’t handle an update to the omnilink binding that happened sometime between 1.6.0 and 1.8.1. My panel is not flash upgradable and requires a new chip to upgrade.

I am having the same problem with the Omnilink setup. I am using distribution 1.8.2 and my Omni Pro is older version with Rev 3.13 firmware. I get the same failure “Could not connect to system”. Seems like a problem with the generation of the items. Here is the debug log:

13:55:26.370 [DEBUG] [b.o.internal.OmniLinkActivator:34 ] - OmniLink binding has been started.
13:55:26.388 [DEBUG] [o.b.o.internal.OmniLinkBinding:148 ] - all binding changed
13:55:26.389 [DEBUG] [o.b.o.internal.OmniLinkBinding:242 ] - Starting update
13:55:26.393 [DEBUG] [o.b.o.internal.OmniLinkBinding:308 ] - OmniConnectionThread init
13:55:26.394 [DEBUG] [o.b.o.internal.OmniLinkBinding:347 ] - OmniConnectionThread running
13:55:26.395 [DEBUG] [o.b.o.internal.OmniLinkBinding:355 ] - OmniConnectionThread trying to connect
13:55:26.451 [DEBUG] [o.b.o.internal.OmniLinkBinding:360 ] - OmniConnectionThread connected
13:55:26.616 [INFO ] [o.b.o.internal.OmniLinkBinding:398 ] - System: SystemStatus ( timeDateValid = true year = 16 month = 5 day = 6 dayOfWeek = 5 hour = 14 minute = 0 second = 1 daylightSavings = false sunriseHour = 5 sunriseMinute = 30 sunsetHour = 19 sunsetMinute = 10 batteryReading = 223 alarms = {} )
13:55:41.113 [ERROR] [o.b.o.internal.OmniLinkBinding:449 ] - Could not connect to system
java.lang.NullPointerException: null
at org.openhab.binding.omnilink.internal.ui.OmnilinkItemGenerator.generateSiteMap(OmnilinkItemGenerator.java:590) ~[na:na]
at org.openhab.binding.omnilink.internal.ui.OmnilinkItemGenerator.generateItemsAndGroups(OmnilinkItemGenerator.java:173) ~[na:na]
at org.openhab.binding.omnilink.internal.OmniLinkBinding$OmniConnectionThread.run(OmniLinkBinding.java:410) ~[na:na]
13:55:41.114 [DEBUG] [o.b.o.internal.OmniLinkBinding:355 ] - OmniConnectionThread trying to connect
13:55:41.115 [ERROR] [o.b.o.internal.OmniLinkBinding:383 ] - OmniConnectionThread was disconnected, will try again
java.net.SocketException: Socket Closed

Any help would be greatly appreciated.

Eric take a look a few posts up to Fed 25th, put omnilink:generateItems=false in your openhab config to disable the auto generate code.