Written some Osram Lightify support

How odd, can you tell us what version of firmware you’re on? And also what model / revision is the gateway hardware?

I’m on latest available firmware GW Wifi 1.1.3.22 GW ZigBee 1.2.0.68
The revision of gw is not written, but if you can decrypt from serial nr.osr017b07c4-95

Well the software versions are right, awkward as it is can you factory reset the bulbs and gateway and see what the outcome is?

Hi @tchellomello, @tfriedel and @MindrustUK,

It looks like your updates haven’t been implemented in 0.32.0 yet.
I can be a tester if needed because without your changes my Lightify is useless in connection with HASS.

Hi @MindrustUK

I made factory reset, add bulbs again but no changes, no lights
After update to 0.32 the situation was the same…

but I was playing with light on mobile phone with Lightify application and restart the hass service again. I saw all my light in hass :slight_smile: when I try to restart hass witout opened application on my phone I got again no lights…It’s crazy, when you need to have opened application together with restart of hass…

Regards Vaclav

sorry for not responding earlier. I had time on the weekend and submitted a pull request for MindrustUK’s and my changes, which will hopefully be coming in one of the next releases. There’s a chance these ‘connection reset’ errors are gone. I know I had them and fixed (or at least reduced) them by increasing the timeout from three seconds to ten seconds.
If they still persist we could also try reestablishing the connection for every action instead of recycling it.

1 Like

Hello! I have an other problem initiating Lightify. I tryed the different solutions but my errormessage is always the same:

16-11-13 14:14:29 lightify: couldn't unpack light status packet.
16-11-13 14:14:29 lightify: struct.error: unpack requires a bytes object of length 50
16-11-13 14:14:29 lightify: payload: b'1884000102040c02000001640000ffffffff506c7567203031000000000000000000'

So what is to do to run Lightify here. Any ideas?

Thank you!

@superheld Are you using the latest version of the code in @tchellomello’s post above? There is handling conditions for structures over 50 bytes long. If you are and you’re seeing this I’ll see if I get the chance to have a look soon.

@vhrabe I haven’t forgotten about the behavior you’re seeing, apologies but I haven’t had the time to investigate. I’ll see if I can put some code on gist for you to test with when I get a chance but work has kept me very busy lately.

Does anyone know if the recent changes to lightify code will be included in the upcoming update 0.33.0?
At least, I couldn’t see them in the preparing list of updates.

@MindrustUK no problem :slight_smile: when you have a code ready, let me know, I will test it

Good news folks!! The PR https://github.com/home-assistant/home-assistant/pull/4256 was merged!! Thanks @tfriedel and @MindrustUK

2 Likes

How do I reference this from my configuration.yaml and from any automations? Sorry if this is a noob question, but I’m a noob. :slight_smile:

Add to you configuration.yaml:

light:
  platform: osramlightify
  host: 192.168.1.100   # ip of gateway

And then follow a tutorial like this one:

Your lights generally have names like light.livingroom (if livingroom is the name in the osram app). But you can find out which entities exist from the home assistant gui.

Hi @vhrabe,

If you download the following two gists:

https://gist.github.com/MindrustUK/96a7b737f4e2983ed8acf03a9e47ae89
https://gist.github.com/MindrustUK/8bb49b2dbeb0c37f5e9d0bd03b3052b5

Please run these as ./getstatus.py

Hopefully this will give you some useful results so we can figure out why the plugin isn’t running as expected.

Hi @MindrustUK,

I run a file as you write,
The log file is here:

Log file

can you check it?

do you need the Osram gateway?

I do have osram lights, but not their hub. Using the philips hue instead

Hey @anon35356645,

If you’re using the Hue Bridge for your lights then please test the Philips Hue component instead of the Osram one. The lights should appear as regular Philips lights. If they don’t please report back and we can test the API to see what they appear as.

Hi @vhrabe,

It looks like your lights are named: P16TW 01 etc. Is this right?

That code looks like it’s roughly working, can you replace lightify.py with https://raw.githubusercontent.com/tfriedel/python-lightify/master/lightify/init.py renaming init.py to lightify.py and re-running the test then put up the log again?

HI @MindrustUK,

Before test I rename few light which have same name P16TW 01

Here is new log after replacement of lightify.py file: log file 2

Regards vhrabe

Hi @vhrabe

Hmm all the output from the test script looks clean…

Have you tried the latest version of HASS to see if lights now appear?