I’m kinda new to smartthings, and I’ve searched around, but I probably haven’t put in the right keywords to find answers.
I’m looking at undercabinet light options. I bought some of the sylvania smart+ lights, but I thought they’d be brighter. I like that they can be locally controlled for on/off, but i wish you could also locally control the other settings (dimming, color, etc).
I’m considering getting some sk6812 rgbw strips off amazon and making my own controller. I’m hoping they will be much brighter, and I like they are individually addressable, so I can make them dance with music, shimmer, etc. I’ll probably also put some outside for next christmas if it works well.
I’ve seen some good articles on how to control them with the particle proton board. I was wondering if the is any way to do local control with an added zigbee or z wave module. That would allow me to put some pattern on the lights when the alarm goes off, and still have it work if the internet is out. I know you can’t put custom code and have it run locally, but I was wondering if I could make my device look like 5 (or however many) switches to smartthings and have it run locally.
Maybe options for spoofed switches would be:
Normal white lights (nice to have local)
Team colors for game day
Dance with music
Alarm (nice to have local)
Basically it would be like a scene, but the actual execution of the scene would be done on the mcu for the lights, and smartthings would just think it is flipping a switch.
I don’t know of any Zigbee or Zwave device that supports individually addressable (or digital) LEDs. All of the zigbee or zwave devices I have seen only support analog RGB or RGBW swtrip (the all one color type). There is a project called McLighting which uses the ESP266 dev board to control digital LEDs. It has a built in http rest api which can respond to commands. So, depending on how much local control you want, you might be able to use that. There is also the diyHue project. You can use many different methods to control LEDs that simulate a Hue LED strip. You can find that by searching DiyHue on here. Some other search terms you might want to try are Neopixel or Addressable.
I’ve found good info on using neopixel with the particle photon to control an addressable led strip.
What I’m really interested in is how to make the control local such that it would work even if the internet is out. I’ve seen some people use a zigbee or zwave switch with a relay. I could use 5 of those connected to inputs on the mcu and then have 31 options for seeing lighting modes ( more than I need but just an example), but that seems rather clunky. I was thinking maybe someone had an idea on using an mcu with xbee or something to have it look like 5 local zigbee switches to smartthings. It would basically be replicating the zigbee switch object, but using it for lighting modes instead of actual switches.
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy)
Can the Cree bulb still be hacked? Or any compatible local bulb / dimmer.
It would output 0 to 100 (perhaps only in analog form?) based on setLevel; but that would be a powerful controller… Maybe.
Anything that spoofs anything will be custom code and won’t run locally unless it just runs out of the box with the other DTH, in which case you won’t have the other options for it when the cloud is available.
Also, you probably already saw this, and it doesn’t address the local operation issue, but just in case not, The following shows how one community member got the particle board working with smartthings very nicely. Not local, but I thought it might be of interest.
I don’t think I’m doing a good job explaining. So here’s an example.
I have a smartplug that smartthings sees as a zigbee switch. It runs locally. I could connect that smartplug to a relay that goes to an arduino board such that when the zigbee switch turns on the arduino executes some code.
I could do that same thing multiple times (maybe 5 plugs and relays), connecting each relay to the arduino. That would give 5 bits of information that the arduino could use. (I could have 32 different programs executed on my arduino based on the state of my 5 switches). Each of these programs wouldn’t need the cloud to get started, as each switch is used by smartthings locally.
Thus, I was wondering, could I replace one of the plugs/relays with a zigbee receiver attached to the arduino board that communicates to smartthings the same way a zigbee switch does. Smartthings would have no idea it isn’t a switch, and thus it could run locally. (Is there a good example of this? Or is there some reason this can’t be done (that I haven’t found the right keywords for).)
Further, I was wondering, could I replace all 5 of the zigbee plugs/relays with one zigbee receiver that responds as 5 separate zigbee devices. Again, smartthings would have no idea it isn’t 5 separate switches, and everything would locally. (Is there a good example of this?)
I wouldn’t make any custom smart app for this, as that would make it back to cloud execution for the hub. As an example, when a motion detector is tripped, switches 1-4 turn on and switch 5 turns off, that would in turn set the lights to a certain mode.
I am about 99% sure you can choose to use a Device Handler that runs locally for a Cree bulb. I am running most things on Hubitat these days, so I have 100% local processing for all of my devices and automations. This includes using ST_Anything on an Arduino or ESP8266 board.
But, back to the Cree Zigbee module… It is fairly easy to remove, and the bulbs are inexpensive, so not much lost if you destroy one. The Cree Zigbee module has two digital outputs, one for “On/Off” and the other for “Dim Level”. The Dim Level output is a PWM signal. If you only need 5-10 “values” for your lighting project, that is trivial. Just let the Arduino measure the PWM signal and then you can “bucket” each range into a set of 5 to 10 values. Once you know which “value” is being called for, you can run the corresponding lighting effect.
Getting all 100 dim levels reliably is a bit of a challenge. I used this little project as a learning opportunity to play with Arduino Interrupts. This was the only way to get the precision needed to ascertain all 100 levels from the PWM signal. There may be better solution or designs, especially with the current, more powerful micro-controllers on the market. The reason I point this out is because NeoPixels require very accurate and precise timing signals to work properly. I wouldn’t be surprised to learn that the Neopixel libraries use the same interrupts to achieve this.
Hopefully this makes sense. If not, feel free to keep asking questions. I have been hoping for years that someone would use my old project for something cool!
If you’re going to have an MCU, which not just connect that directly to ST? There are a few options available if you wanted to use a digital LED strip with an ESP8266 board for example that would integrate with ST but allows for direct control of the board locally.
I think the big clarification we have to make is when the OP is saying “local control” are you saying local control of the device on the ST hub or local control of the device physically by a human being that is not dependant of the ST cloud?