OSRAM Lightify Openhab2 Binding

Thanks noctarius. I’ve been trying to work on my problem as well. It may be related to what you’re experiencing, but on a more immediate time-span. I’ll have it working for a while, and then it becomes slower and slower, and then non-responsive. Last weekend, I thought it was running fine with 2 RGBW recessed lights, and decided to add 2 TW and then it stopped working. I’ve since removed the two TW lights and can’t get it to behave again.

Anyways, I’ve been silently working away at it, but haven’t been able to devote more than 30 minutes here and there to tracking down the problem. Once I discover any clues, I’ll post them.

1 Like

Great, I just pushed the current status of my code to github, feel free to build your own version (I’ll also update the dropbox download).

The current version does not do the updates but seems responsive / stable for the last few days. It is a PITA to test since, as you said, it takes a while to make it completely unresponsive. I’d be happy to get some more feedback :slight_smile:

Tried again with own build from your Github repo and it is partly working. Seems that I have a special situation since I switch on/off mains power of the bulb. There, the status change is not recognized in the binding while in the Lightify app it takes around 10s for detecting that mains power / bulb is switched on. So: Is there a way to adjust the status refresh rate in the binding to get my situation covered?

When drop in the latest vesion from dropbox I get following error:

2017-07-01 17:20:29.591 [ERROR] [org.apache.felix.fileinstall        ] - Failed to install artifact: /usr/share/openhab2/addons/org.openhab.binding.lightify-2.1.0-SNAPSHOT.jar
org.osgi.framework.BundleException: A bundle is already installed with the name "org.openhab.binding.lightify" and version "2.1.0.201706181942" at location: file:/usr/share/openhab2/addons/org.openhab.binding.lightify-2.1.0-SNAPSHOT.jar
	at org.eclipse.osgi.storage.Storage.install(Storage.java:496)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.internal.framework.BundleContextImpl.installBundle(BundleContextImpl.java:146)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.installOrUpdateBundle(DirectoryWatcher.java:1036)[4:org.apache.felix.fileinstall:3.5.6]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:952)[4:org.apache.felix.fileinstall:3.5.6]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:871)[4:org.apache.felix.fileinstall:3.5.6]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:485)[4:org.apache.felix.fileinstall:3.5.6]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:361)[4:org.apache.felix.fileinstall:3.5.6]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:312)[4:org.apache.felix.fileinstall:3.5.6]

I have latest snapshot build

For some reason it seems not to override the old file. Shutdown openhab, remove the old JAR first, start openhab, wait until it all booted and copy the new file to the position.

1 Like

Thank, works now

1 Like

Sometimes the integration seems to have lost connection to the gateway and it takes a while to reconnect, does anyone else have this issue? In that case I’d go and reduce the timeout for connection disconnects.

I installed the binding, everything was discovered fine. (Surface light TW + Some lightify plugs )
I use the things from PaperUI with the items defined in an *.items file. (I also tested with an item generated from PaperUI, same behaviour)

Switch ljPro "Arbeitszimmer LJ pro" <printer>  {channel="lightify:powersocket:017ba969:598FA300AA3EB07C:ps#power"}

But only the Surface Light is switchable. Whenever i try to switch one of the plugs via openhab, i get the following messages:

2017-07-27 10:49:59.157 [INFO ] [nding.lightify.handler.DeviceHandler] - Command: OFF, lightify:powersocket:017ba969:EF610B0000261884:ps#power
2017-07-27 10:49:59.160 [DEBUG] [nding.lightify.handler.DeviceHandler] - Retrieving zone: EF610B0000261884=null
2017-07-27 10:49:59.162 [INFO ] [nding.lightify.handler.DeviceHandler] - Switch state: null
2017-07-27 10:49:59.164 [INFO ] [nding.lightify.handler.DeviceHandler] - Command-Type: class org.eclipse.smarthome.core.library.types.OnOffType
2017-07-27 10:53:02.353 [INFO ] [nding.lightify.handler.DeviceHandler] - Command: ON, lightify:powersocket:017ba969:598FA300AA3EB07C:ps#power
2017-07-27 10:53:02.356 [DEBUG] [nding.lightify.handler.DeviceHandler] - Retrieving zone: 598FA300AA3EB07C=null
2017-07-27 10:53:02.357 [INFO ] [nding.lightify.handler.DeviceHandler] - Switch state: null
2017-07-27 10:53:02.359 [INFO ] [nding.lightify.handler.DeviceHandler] - Command-Type: class org.eclipse.smarthome.core.library.types.OnOffType

Switching via the lightify app works.

The reason i switched from using the hue bridge (for these stuff) was a strange behaviour of the Surface light with the normal switch (doesn’t want to turn on, need to switch on/off several times). And off course the state being offline in hue bridge.

Am i missing something? Are the plugs not supported? If not, can i help?

Thanks for any help.

Is anybody using Lightify Plugs successfully with the lightify binding or am i the single user?

I have a plug connected and it works, however (I’m honest) I use as part of a group. Have you tried the other binding? I’m currently in India so I don’t have the chance to test it, but in general I’m happy to merge the efforts.

Thanks for the info.

No, i didn’t try the other binding yet.

Downloading the eclipse installer right now.

Edit: Dit try to setup the ide for quite some time, but was unable to get it running to build an jar to deploy and test. Now i remember the stuff i disliked while developing with eclipse/java about 8 years ago. :frowning:
(I really enjoyed it when the ide was up & running, but until then …)

Is any VM image available with a properly configured ide for openhab plugin development?

Hi,

Great binding so far! Working perfectly with 2x A60 RGBW Osram bulbs. I however don’t seem to be able to get the power sockets to work. Not as stand-alone devices but also not through groups. Is there anything I can do to help?

I wonder why it won’t work for you guys as mine is working great. Anyhow I’d recommend to try the other binding, since based on time issues due to work, I won’t have time to work too much on it and I’d like to join forces on just one binding, instead of two different ones.

Hi,

Any idea if the binding works with Lightify Pro gateway?

Cheers

Probably not. I’ve never seen a Pro gateway but as far as I am aware it doesn’t have the same binary API the domestic gateway has but is only controllable via a REST API (but it is at least local rather than being in the cloud).

Can anyone point me towards the latest binding here to test? Is it the one posted back on post #66 from April? It looks like the dropbox link is no longer valid. Is there an existing Jar file to try out?

I have lightify strip I was going to try it out with.

EDIT. I found what I think is the latest 2.2 binding referenced here. I was able to add it the binding, and it found my hub and lightstrip. But in PaperUI, attempts to control do not seem to work.

And this is what I saw in the log. I’m going to update OH2 and reboot, and see if makes any difference.

2017-10-24 19:36:17.425 [INFO ] [sages.LightifyGatewayFirmwareMessage] - osramlightify:gateway:027ca5b4: firmware version = 1.1.3.41
2017-10-24 19:36:20.923 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'osramlightify:rgbw:84-18-26-00-00-04-EA-17' to inbox.
2017-10-24 19:36:29.329 [ERROR] [mlightify.internal.LightifyConnector] - Connector died: 
java.lang.NullPointerException
	at org.openhab.binding.osramlightify.internal.LightifyDeviceState.received(LightifyDeviceState.java:78)[215:org.openhab.binding.osramlightify:2.2.0.201710152309]
	at org.openhab.binding.osramlightify.internal.messages.LightifyListPairedDevicesMessage.handleResponse(LightifyListPairedDevicesMessage.java:128)[215:org.openhab.binding.osramlightify:2.2.0.201710152309]
	at org.openhab.binding.osramlightify.internal.LightifyConnector.run(LightifyConnector.java:318)[215:org.openhab.binding.osramlightify:2.2.0.201710152309]

Hm. i just installed the Marketplace binding on my 2.1 instance it it simply works. No exception at all.

After some Ubuntu Headaches, I’ve got OH back and running and the Lightify 2.1 binding installed and controlling my lightstrip good as well.

But… maybe coincidence, but after installing the binding, the Lightify App sporadically shows my Gateway being offline. Its seems I have to exit and restart the App for it to work sometimes on my (android) phone.

Hey guys,
got a short question. why is motion sensor currently disabled in source code?

How can i get it to work?

Kind Regards.

It isn’t disabled. It simply isn’t supported because I don’t have one. Judging by the instructions for setting up switches and motion detectors it may only be possible to configure behavior on the gateway and have openHAB respond to changes to the lights controlled by them. You could start by turning logging up to trace and trying to provoke some messages by moving around / pressing buttons. I would expect them to show up in the LIST_PAIRED response at least since the Lightify app needs to know they are there. Alternatively, or as well, you could just send me one and I’ll see what can be done.