[OBSOLETE] OSRAM Lightify Smart Dimmer Switch (button controller device handler and smart app)

I have been through all that, I guess that means that my code is linked to a repo.

Not sure what else to provide for someone to link that, as far as I know you just need the repo name and the namespace which I think everyone has.

@jody.albritton might know more…

So since this device is just a cover to the actual switch and the switch is three way, one should cover both physically switches right? But thinking that is true, the two devices can technically be independent of each other. I can assign the short press on both devices to do the same thing as each other, but the long pressed could do different triggers from device one from device two. Am I thinking in the right way?

If you are using my smart app with the device type then each switch you configure will have all buttons associated with the lights/switches you select. The top button would be on and bottom button would be off if you short press. When you install the app you can enter 2 different light levels for the long press, I use 60 for the long-press of top button and 30 for long-press of bottom button. Each switch you install can be configured for a different set of lights/switches or you can configure multiple switches to configure the same set.

With the recent update you can now use just the device handler I created and then use other apps such as Button Controller or Rule Machine which will allow you to assign different lights to each button event (1 or 2 and short or long press).

Honestly, I am not sure there is an issue to resolve. I think that if anyone wants to they can link their code to my GitHub repo. If anyone can confirm that this does not work then I will do further research to figure out what the issue may be. You should just need to add a new repo in your settings and use “motley74” as the namespace and “SmartThingsPublic” for the repo name. The only issue I know of is figuring out which repo to select in the drop-down when pulling an update because all the repo names are “SmartThingsPublic”. I read somewhere that they are working to fix that and put the namespace in that drop-down as well, for now you just need to know that they are listed in the same order as they are in the settings.

I should also mention that after you setup the repo in settings you will need to go to the individual smart app or device handler code settings and link that repo to it.

Just an FYI.

I was switching back some lights and switches to the Lightify hub. Got yelled at for a 5 second delay when a switch flipped (not your fault in the slightest) guess the smart things cloud wasn’t responding in a timely manner.

Anyways, I didn’t realize the Lightify gateway had a public api in beta. So I’m wondering if I could have the switches tied to their gateway and then use smart things for automations. Making sure all lights are off when I leave. Vacation modes, etc.

Link to their api for anyone interested.
https://us.lightify-api.org

Just wanted to say a huge thank you to everyone involved especially Motley. Maybe one day when I have some spare time and smart things allows more things to run locally I shall try again.

My guess is this is likely their path to allow integration with third-party systems, basically like what Phillips did with their Hue system. I personally don’t have a Lightify hub since I don’t use the Lightify bulbs so I won’t be doing any testing/development for that but sounds like that is plan and if someone wants to take a stab it it that may be a better setup since you will be able to take advantage of the over-the-air firmware updates that would work through their hub. One thing that would concern me is I suspect putting an additional hub between ST and the Lightify bulb will end up with the same delays you see now although maybe even slightly worse.

What it boils down to is the ST hub is the bottleneck here and any delays you see are the cause of that I am sure. I have seen my switches connected directly to the hub using my device type respond nearly instantaneously but I have also seen some times when there is a second or 2 delay, never seen 5 seconds though. I have seen cases where I have a switch that is setup to control 3 Cree smart bulbs and the bulbs rarely turn on at the same time and sometimes 1 of the bulbs is behind by a few seconds when turning on or off, I suspect this is delays in the hub to send the command to those devices.

But I want the best of both worlds. Fast and cloud control. Haha. Lightify is local and cloud based.

So my thought was. Bulbs will be instantaneous using the switches. And yes I agree might be a little slower via an Api tied into smart things.

And then echo integration and rules/automations might be a little slower.

FYI, I’m leaving your device profile enabled for a bunch of switches. So I can use echo where it makes sense. (Have 3 of them including 2 new dots)

And yes I agree the firmware updates will be a huge positive.

Thanks again.

2 Likes

I am hoping that ST will follow up on their statement about making the local processing available to more device types, on the last developer call they mentioned that they would like to make some kind of way for you to run community code local before it has gone through the certification process but I am sure it will be several months or more before we see any movement on that front.

I sure wish I could get my Dot. Amazon is telling me that I won’t get mine until July 16, so much for the whole 2-day shipping deal on that. I don’t really understand why some people already have theirs and I have to wait until July, I didn’t order mine the day it came out or anything but I didn’t wait that long.

As for the dots. I was luckily at home the minute they launched. I told Echo to order both of mine. A friend went home a few hours later and they are shipping his late May.

Nice device so far. Wish there were a few more keyword choices. But the mic array works as well as the big echo.

Interesting news about the local processing.

Castleos and the other local processing platforms just don’t hold a candle to smart things at this time in regards to local processing. Not that I have looked…

I’m trying to install the device handler and the app. The device handler installed just fine, but when I’m trying to install the application, IDE gives me the following error:

No signature of method: script14606587694522067174696.metadata() is
applicable for argument types:
(script14606587694522067174696$_run_closure1) values:
[script14606587694522067174696$_run_closure1@6261b594]
Possible solutions: getMetadata(), getState(),
setState(java.lang.Object), metaClass(groovy.lang.Closure)

Any ideas?

Thanks!

Sorry, my bad. It was confusing which one is which - I was actually trying to deploy handler and an app and vice versa.

Everything works, thank you!

Two issues here:

  1. No battery reporting status
  2. I am using it to control LIFX bulbs. When I dim and then turn off the light, turning it back on doesn’t bring it to 100%.

Battery reporting works for me so not sure why it is not working for you, I would maybe reset and re-pair the switch and see if that changes anything. I do not have LIFX bulbs so I cannot test with those, not sure how they are different from any other smart bulb. Have not seen any other complaints about battery status or bulbs not working but if you can help provide some information I can try to help.

Do you see any logs in the IDE for the device when pushing the buttons and do you have any output you can copy? You should see in the device logs that the top button logs a “button 1 pushed” or “button 1 held” message depending on the action and the bottom button should show “button 1 pushed” or “button 2 held” messages. If you see that then the device type is working, you should also see occasional battery messages and also you should see a battery message when you hit refresh in the ST app for the device. If all that is working then you can check the logs for your LIFX bulbs and see if they are getting the commands.

Are you using Android or iPhone? I can only test on Android at the moment.

First off, incredible work @Motley! :slight_smile:

I have a stupid question though! I skimmed through the entire thread as best I could and I know the answer is most definitely yes but my use case is to just simply use these over existing wall switches to allow the “smart” lights associated to those wall switches to be turned on/off with this OSRAM switch (using your device type).

Is that possible as I read there have been a few issues (not sure if all have been resolved) or even some defective OSRAM switches not working per say but I think those issues have been resolved?

Maybe I could possibly even have a button press trigger a routine in ST but that’s going far beyond what I simply just need right now.

The main reason I’m looking to choose this switch…

over the…

is, well…

  • The looks of the OSRAM switch, in my opinion, is farrrr better than the GoControl switch
  • The price on Amazon for the OSRAM switch is currently cheaper than the GoControl
  • The UX feels a bit more smooth with the OSRAM switch as the triggers on the switch are “depressed” to “literally” indicate a natural button press and I’m assuming it actually rocks back a little when pressed versus the “still intuitive” but not as natural press of the GoControl (for me that is)
  • Most importantly, Amazon only carries the Black color of the GoControl switch where, in my case, all my light switches have white faceplates so that won’t match. :frowning:

The short answer to all of your questions is yes, you can use this switch and my device handler for these purposes.

To answer a few more of your questions specifically. If you install my device handler you can use it with other apps such as Button Controller or Smart Lighting to control various devices using the pushed or held actions. Remember that you get 4 functions since each button has a “pushed” or “held” state so you can set each of those 4 actions to control completely separate devices if you wish.

If you install my smart app it will only allow you to use the switch with any number of switches/dimmers/smart bulbs you wish as a group but the functions of the buttons will always be ON (100% brightness) for top button push, OFF for bottom button push, and then the top button and bottom button held functions would set any dimmers to the level that you set for each button when you install the smart app.

I agree on the looks of the OSRAM switch myself so I understand you there, the one thing different from what you said about the difference is that they are both just push buttons behind the cover. Because the OSRAM switch has an angled cover on it you can think of it as a rocker type but it really isn’t as there are tactile buttons behind the cover.

One other note about the GoControl switch is that the Amazon title says they are black but in reality they are white as pictured, I plan to leave a review in the Amazon posting mentioning this. I still agree the looks and price are better for the OSRAM switch though.

2 Likes

@Motley, thanks again!

I just got the light switch in the mail, added your device type, then paired the switch flawlessly (I mean it was perfect) so fantastic work.

Already hooked it up with Smart Lighting (but needed 2 automations which is annoying so I probably shouldn’t installed your smartapp if that’s what it does haha) and the associated light turns on/off as intended.

Only piece of feedback I can mention if it’s even at all possible (although probably not) is (since this switch is labeled as a dimmer) to label the buttons “On/Off/On Hold/Off Hold” instead of “On/Two/Three/Four” but then on the flipside that breaks the generic purpose of this switch right which can actually be used for things other than lights using the button presses so nevermind haha!

Nice work! :slight_smile:

Yeah, the other reason to label the buttons as they are is for compatibility with the other apps like Smart Lighting and Rule Machine as they expect button numbers and specific values of “pushed” and “held”, I tried “pressed” for the single press at first but that broke compatibility with the other apps although it worked fine for my smart app since that is what it was looking for.

I would give my smart app a try and see if it works better than the 2 Smart Lighting automations (less rules the better for me). I intend to add the ability to hold the buttons and just have the lights dim/brighten as you hold and then stop when you release but not sure when I will get to that and may wait until ST can support more than 1 command per second and also maybe when it runs locally. I have submitted the device handler and smart app for inclusion in the stock firmware but I am sure that is a long process so not sure when or even if that will happen.

2 Likes

I just recently upgraded from the v1 hub to the v2 hub and so I had a bit of difficulty putting the dimming switch into pairing mode as the instructions only stated to hold both buttons for 3 seconds then release.

To fix it, which is very common to most other devices to re-pair, I just simply had to hold down both buttons, remove the battery, then reinsert the battery (while holding down both buttons), then release the buttons. After that, the blue light was blinking on/off which the instructions indicated is the pairing mode.

And of course, this is all assuming that you’ve already added/readded the device type from @Motley prior to doing any of the steps I mentioned otherwise the device won’t be found.

Hope that helps anyone!

For mine I don’t even have to remove and reinsert the battery, just holding down both buttons for several seconds until the light starts flashing.