Smart Home – openHAB Osram Lightify Reset
In this post I will show you how to automatically to reset your Osram Lightify products. This post will give you an overview of the Osram Lightify devices and single rules to reset those products. You can imagine the sheer magnitude of work this can be with several plugs and lamps. After working through this post, you will no longer need to tediously reset each of the Osram Lightify products manually. Simply copy the relevant code and it Lightify Plug and openHAB will do the magic.
openHAB Osram Lightify Reset – Preconditions
I still recommend Hue Bridge to integrate Zigbee. Because the integration is straight forward and the Osram Gateway did not get good reviews.
You need openHAB 2 and have to integrate Hue Bridge via binding. You will find an easy how-to in the post openHAB 2 Hue Binding Installation.
Furthermore, you need a switchable plug. I’m using a Z-Wave plug, but since I assume you will go solely for Zigbee, I recommend the Osram Lightify plug.
openHAB Osram Lightify Reset – Osram Lightify Plug Manually 🙁
Of course you have to reset your plug first. To reset the Osram Lightify Plug, press the button on the plug until you hear a clicking sound. After that, integrate the Osram Lightify Plug in openHAB 2.
Create an item for the plug.
Switch osram_steckdose "Osram Steckdose" {channel="<osramPlug_Kanal>"}
openHAB Osram Lightify Reset – Osram Lightify Products automatically :-(=)
Now let’s get started with the automatic reset. First we need an item switch, which we use to activate a rule. You can simply copy the switches into your items file.
Reset Osram Lightify Lamps – Items
Now copy the following items into your items file.
Switch osram_reset_lamp "Osram Reset Lampen, Gartenspots, Downlights, Flex-Strip" Switch osram_reset_lamp_a60 "Osram Reset A60" Switch osram_reset_lamp_surface "Osram Reset Surface Light W23, W38 , W28 , TW" Switch osram_steckdose "Osram Steckdose" {channel="<osramPlug_Kanal>"}
Reset Osram Lightify Lamps – Sitemap
Now create the following sitemap or simply copy the frame “Osram Reset” into your own sitemap.
sitemap sitemaps label="Osram Reset" { Frame label="Osram Reset" { Switch item=osram_reset_lamp Switch item=osram_reset_lamp_a60 Switch item=osram_reset_lamp_surface Switch item=osram_steckdose } }
Reset Osram Lightify Lamps – Item and Rule
This rule applies to the Osram Lightify products Lamps, Gartenspots, Downlights, Flex-Strip (CLB 40 , PAR16 , GU10)
You have to switch on 5 times and switch off 5 times. Inbetween, you need a pause of 5 seconds. So you switch on, wait 5 seconds, switch off, wait 5 seconds …
rule "Osram Reset Lampen, Gartenspots, Downlights, Flex-Strip" when Item osram_reset_lamp received update ON then osram_steckdose.sendCommand(ON) osram_steckdose.postUpdate(ON) Thread::sleep(4500) osram_steckdose.sendCommand(OFF) osram_steckdose.postUpdate(OFF) Thread::sleep(4500) osram_steckdose.sendCommand(ON) osram_steckdose.postUpdate(ON) Thread::sleep(4500) osram_steckdose.sendCommand(OFF) osram_steckdose.postUpdate(OFF) Thread::sleep(4500) osram_steckdose.sendCommand(ON) osram_steckdose.postUpdate(ON) Thread::sleep(4500) osram_steckdose.sendCommand(OFF) osram_steckdose.postUpdate(OFF) Thread::sleep(4500) osram_steckdose.sendCommand(ON) osram_steckdose.postUpdate(ON) Thread::sleep(4500) osram_steckdose.sendCommand(OFF) osram_steckdose.postUpdate(OFF) Thread::sleep(4500) osram_steckdose.sendCommand(ON) osram_steckdose.postUpdate(ON) Thread::sleep(4500) osram_steckdose.sendCommand(OFF) osram_steckdose.postUpdate(OFF) Thread::sleep(1500) osram_steckdose.sendCommand(ON) osram_steckdose.postUpdate(ON) osram_reset_lamp.sendCommand(OFF) osram_reset_lamp.postUpdate(OFF) end
This rule applies to the Osram Lightify product Classic A60.
You have to switch on 5 times and switch off 5 times. Here, you leave it on for 3 seconds and leave it off for 5 seconds. So you switch on, wait 3 seconds, switch off, wait 5 seconds …
rule "Osram Reset A60" when Item osram_reset_lamp_a60 received update ON then osram_steckdose.sendCommand(ON) osram_steckdose.postUpdate(ON) Thread::sleep(2500) osram_steckdose.sendCommand(OFF) osram_steckdose.postUpdate(OFF) Thread::sleep(4500) osram_steckdose.sendCommand(ON) osram_steckdose.postUpdate(ON) Thread::sleep(2500) osram_steckdose.sendCommand(OFF) osram_steckdose.postUpdate(OFF) Thread::sleep(4500) osram_steckdose.sendCommand(ON) osram_steckdose.postUpdate(ON) Thread::sleep(2500) osram_steckdose.sendCommand(OFF) osram_steckdose.postUpdate(OFF) Thread::sleep(4500) osram_steckdose.sendCommand(ON) osram_steckdose.postUpdate(ON) Thread::sleep(2500) osram_steckdose.sendCommand(OFF) osram_steckdose.postUpdate(OFF) Thread::sleep(4500) osram_steckdose.sendCommand(ON) osram_steckdose.postUpdate(ON) Thread::sleep(2500) osram_steckdose.sendCommand(OFF) osram_steckdose.postUpdate(OFF) Thread::sleep(1500) osram_steckdose.sendCommand(ON) osram_steckdose.postUpdate(ON) osram_reset_lamp_a60.sendCommand(OFF) osram_reset_lamp_a60.postUpdate(OFF) end
Reset Osram Lightify Surface Light – Item and Rule
This rule applies to the Osram Lightify Surface Light products W23, W38 , W28 , TW.
You have to switch on 5 times and switch off 5 times. This time, you leave it on for 2 seconds and leave it off for 5 seconds. So you switch on, wait 2 seconds, switch off, wait 5 seconds …
rule "Osram Reset Surface Light W23, W38 , W28 , TW" when Item osram_reset_lamp_surface received update ON then osram_steckdose.sendCommand(ON) osram_steckdose.postUpdate(ON) Thread::sleep(1500) osram_steckdose.sendCommand(OFF) osram_steckdose.postUpdate(OFF) Thread::sleep(4500) osram_steckdose.sendCommand(ON) osram_steckdose.postUpdate(ON) Thread::sleep(1500) osram_steckdose.sendCommand(OFF) osram_steckdose.postUpdate(OFF) Thread::sleep(4500) osram_steckdose.sendCommand(ON) osram_steckdose.postUpdate(ON) Thread::sleep(1500) osram_steckdose.sendCommand(OFF) osram_steckdose.postUpdate(OFF) Thread::sleep(4500) osram_steckdose.sendCommand(ON) osram_steckdose.postUpdate(ON) Thread::sleep(1500) osram_steckdose.sendCommand(OFF) osram_steckdose.postUpdate(OFF) Thread::sleep(4500) osram_steckdose.sendCommand(ON) osram_steckdose.postUpdate(ON) Thread::sleep(1500) osram_steckdose.sendCommand(OFF) osram_steckdose.postUpdate(OFF) Thread::sleep(1500) osram_steckdose.sendCommand(ON) osram_steckdose.postUpdate(ON) osram_reset_lamp_surface.sendCommand(OFF) osram_reset_lamp_surface.postUpdate(OFF) end
After all this waiting and switching, you will be delighted to see your automatic reset running!