OMNILINK Binding - Connection Refused

Strange. I haven’t touched my OH 1 setup for several months, but now I can connect to my OPII with several different jar files, including the latest 1.9 snapshot.

I ordered a chip with the latest firmware, and I hope that solves the flakiness of establishing a connection.

I am having trouble connecting on OH 2 using jar by @craigh, but I’ll wait to see if the new firmware helps that.

I have just ran into a connection issue. Everything has been working for about a year and all of a sudden I can’t connect to the Omni-Pro II panel. I actually connects, gets the clock data, a couple of switch status, then it errors and tries to reconnect and does the same thing.
Any ideas? Thanks for the help.

Launching the openHAB runtime…
osgi> 2016-11-16 19:24:30.117 [INFO ] [.o.core.internal.CoreActivator] - openHAB runtime has been started (v1.7.1).
2016-11-16 19:24:35.654 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - mDNS service has been started
2016-11-16 19:24:35.880 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - Service Discovery initialization completed.
2016-11-16 19:24:43.906 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'valvano.sitemap’
2016-11-16 19:24:44.982 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'valvano.items’
2016-11-16 19:24:46.598 [INFO ] [penhab.io.rest.RESTApplication] - Started REST API at /rest
2016-11-16 19:24:52.130 [INFO ] [.o.u.w.i.servlet.WebAppServlet] - Started Classic UI at /openhab.app
2016-11-16 19:24:55.672 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'MyVoice.rules’
2016-11-16 19:24:57.123 [INFO ] [.service.AbstractActiveService] - NTP Refresh Service has been started
2016-11-16 19:24:57.408 [INFO ] [.service.AbstractActiveService] - HTTP Refresh Service has been started

2016-11-16 19:24:57.871 [INFO ] [o.b.o.internal.OmniLinkBinding] - System: SystemStatus ( timeDateValid = true year = 16 month = 11 day = 16 dayOfWeek = 3 hour = 19 minute = 25 second = 28 daylightSavings = false sunriseHour = 6 sunriseMinute = 38 sunsetHour = 17 sunsetMinute = 30 batteryReading = 220 alarms = {} )
2016-11-16 19:24:58.988 [INFO ] [runtime.busevents ] - Lights_MasterBath_Fan_Switch state updated to 0
2016-11-16 19:24:59.403 [INFO ] [runtime.busevents ] - Lights_Kitchen_DiningChand_Switch state updated to 0
2016-11-16 19:24:59.475 [INFO ] [runtime.busevents ] - Lights_Patio_Pergola_Switch state updated to 0
2016-11-16 19:24:59.795 [INFO ] [runtime.busevents ] - Lights_Kitchen_UtilityRoom_Switch state updated to 0

2016-11-16 19:24:59.846 [ERROR] [o.b.o.internal.OmniLinkBinding] - Could not connect to system
java.lang.NullPointerException: null
at org.openhab.binding.omnilink.internal.model.Unit.updateItem(Unit.java:64) ~[na:na]
at org.openhab.binding.omnilink.internal.OmniLinkBinding$OmniConnectionThread.updateRefreshItems(OmniLinkBinding.java:494) ~[na:na]
at org.openhab.binding.omnilink.internal.OmniLinkBinding$OmniConnectionThread.run(OmniLinkBinding.java:427) ~[na:na]
2016-11-16 19:24:59.855 [ERROR] [o.b.o.internal.OmniLinkBinding] - OmniConnectionThread was disconnected, will try again
java.net.SocketException: Socket closed

at java.net.SocketInputStream.read(SocketInputStream.java:183) ~[na:1.8.0]
at java.net.SocketInputStream.read(SocketInputStream.java:121) ~[na:1.8.0]
at java.net.SocketInputStream.read(SocketInputStream.java:203) ~[na:1.8.0]
at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:337) ~[na:1.8.0]
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]
2016-11-16 19:25:00.196 [INFO ] [o.b.o.internal.OmniLinkBinding] - System: SystemStatus ( timeDateValid = true year = 16 month = 11 day = 16 dayOfWeek = 3 hour = 19 minute = 25 second = 31 daylightSavings = false sunriseHour = 6 sunriseMinute = 38 sunsetHour = 17 sunsetMinute = 30 batteryReading = 220

So I tried a DEBUG log, but didn’t see anything that would cause the connection to be lost.
I’m considering rebuilding the system on a new SD card since I’ve heard of cards going bad after a while.

Mike, do you have any other apps connected to your Omnipro to confirm you don’t have a network issue?

I know when I first updated mine to firmwarve v3.16 my network connectivity went haywire due to some programs that version of the firmware suddenly didn’t like.

I only connect with PC Access, an OmniTouch 7 touch panel, and SnapLink. All appear to be working normally.

I was on firmware v3.13 when the issue started.
One of the things I tried to resolve the OmniLink Binding issue was to upgrade the firmware to v3.16.

Problem Solved!

When I ran a backup copy of openHAB runtime v1.7.1 from my computer, it had the same problem.
Since I was running from a Raspberry PI when the problem started, it must be a problem with the OmniPro panel.

I reloaded everything from PC Access to the OmniPro and it solved the reconnecting issue.

I did recently update the OmniPro program and only uploaded the program.
I tried re-uploading the program, but the problem persisted.
Once I re-uploaded all configuration items to the OmniPro, the problem resolved.

@mikeyv what version of OH and the binding are you using? I went to look at the source to see where that null pointer was happening ( Unit.java:64) and it seems like whats in master is not what is running on your system?

The OH runtime is v1.7.1.
I also tried 1.8.3 with the same result.

Now it is not working again.
I may have more than 1 issue here…

I had a similar connection issue when I first upgraded to OH2 using the 1.8.x version of the omnilink bindng. The problem went away when I upgraded to the 1.9.0 version.

Since you are on OH1 and nothing with the binding has changed in quite a while i would assume your issue is related to the firmware update on your omnipro.

One thing you could try is resetting the system RAM on you omni. This is a process using the keypad and the installer menu for your system (refer to page 53 of the installation manual).

When I was first having my connectivity issues related to the v3.16 firmware I could reset the RAM and the problem would go away for anywhere from an hour to a full day before I would lose connectivity again. I eventually found some programming related to my key fobs to be the culprit. I “fixed” the program and the system has been stable ever since. Note, the program worked fine with the prior firmware. I have no idea what 3.16 didn’t like specifically (although it was kind of a clugy way it was programmed before).

Thanks for the info.

I’m still having connection problems.
It has something to do with an upload from PC Access when it changes the configuration of the “Names”.

I can upload only “Names” from a previous PC Access file and OH connects properly.
If I upload only “Names” from my current PC Access file, OH keeps reconnecting.

I wish I knew what “name” was causing the issue…

The RAM reset is relatively harmless and may be worth a try. It doesn’t affect any programming it simply clears the system memory and will “reboot” the omnipro. You should then try to connect with PC Access and see if you can upload.

Another troubleshooting option, if you have a backup of your last known good PC Access file, is to create a new one and delete all the programs and upload a program free version to your board. You may need to reset the RAM to get this option to work but it may stabilize your board until you figure out where the problem is.

I found it!
It was an issue with the files uploaded to the OmniPro.

Unit #16 was named “Great Fan” since I had a fan on UPB-16.
Recently I removed the name on Unit #16, so it went to the default “UNIT 16”.

If I delete the name on Unit #16, then upload only names, OH can’t connect.
If I put something back in the name for Unit #16, then upload only names, OH can connect.
I tried this many times to prove it out.