SmartThings Community

Split a device with 4 outputs into 4 seperate devices?


(Allan) #1

So I am using a RGBgenie RGBW Z-wave controller. By default it will work with the stock Aeon RGBW Bulb DTH but since its a controller, not a bulb, there s no color temperature for white. I.e. white channel is just a 0 - 100% so I wrote a custom DTH a la the Fibaro DTH that removes the color temp capability and replaces the color temp slider with a white channel slider.

All this works great, I can command colors through Alexa and I even added working device health to it. But now I would like to use a second RGBW controller as a simple 4 channel LED controller. For example channel 1 will power a white led strip under my kitchen cabinets and channel 2 will do a white strip above them. Simple enough, I modified the DTH to have a master on/off then 4 separate slider controls, one for each channel. It works as expected but now it seems there is no way to command it through Alexa.

Is there a simple way to accomplish this that will work for both the classic app and the newer connect? What I’d like to have is 4 devices listed so I can name them and be able to command each one independently. Or even one device and a way to set each channel through Alexa?


(Tony Fleisher) #2

I don’t know if simple is the right word, but you could probably program a controller dth to create 4 children devices (one per channel) that each implement the switch and switch level capabilities.


(Allan) #3

That’s kind of what I’m worried about, never have attempted a parent and child dth and I was hoping there was a easier way. I’ve played with ST_Anything enough… hopefully I can read through it and use it as a example for a composite parent/child device. only other option would be some type of smart app witchwood spawn the child apps but I’ve never created a smart up and I’m really looking for something simpler.


(Simon) #4

Maybe look at an existing DTH such as the Fibaro Universal sensor for a template. This has the ability to create separate child devices for the temperature sensors and contacts.


(Dave Gutheinz) #5

Options:

  • Learn how to create child devices within the main device handler code. You could then create 4 child devices, one per channel, as dimmable lights. May be most succinct since you have control of the device handler code.

  • Develop a Smart App where you select your controller device. Then it creates four child devices, each with a single channel. Smart App would subscribe to the state of the controller device. When a command is received from a child, it would update the control word for the controller and send it to the controller device. Would work in the case where you can not modify the DH code.

In either case, you would publish the child devices to Amazon and not publish the controller device.

I am thinking of a similar implementation on my Hubitat code (I am assisting a blebox user in developing code for that series; including the blebox wLightBox RGBW controller (that can be configured three ways (RGBW, RGB + 1 W, 4 W). The complexity is I want to be able to support any scenario.

Dave


(Tony Fleisher) #6

another approach would be to create routines in Alexa with your trigger phrases, have them turn on or off virtual switches, and then use webcore to control your lights based on those switches changing


(Allan) #7

So I made a new DTH that instead of supporting the color capability with a color selector has 4 separate channel sliders. After lots of playing it turns out that, because its a RGBW device at heart, there is only a single master on/off. So if you set channel one (red) to 80% then channel two (green) to 40% that works fine. But you couldn’t have individual devices and turn only one channel on without a) the other channels turning on also or b) having to set the other channels to 0% before turning on (and losing your “preset”) or c) keeping track of the on/off status and then doing b only if initially off.

So long story short there isn’t a easy way to do this. But on the plus side, again because it is a RGBW controller, the master on/off along with a master dimmer control both work great. And now I have two DTH’s that I can switch on the fly depending on weather I want RGBW or 4 channel independent control.

As for webcore/routines I want this as simple as possible. Independent devices would work the best for Alexa/Google integration but again based on the issues above it might be simpler to just leave it at a 4 channel DTH.