Basic advise: smart bulb


#1

Hi there, I realise this is a pretty generic question but I’m completely at a loss here. I’m a pretty decent programmer but I’m so lost on this whole IoT thing. Here is my situation:

I want to install a smart bulb in my bedroom ceiling and make a physical dimmer switch (some slider or something). I don’t want to bother with cables so it has to be wireless. Also I’d like to be able to control it via my Android phone.

My question is, how would I start? I have a Photon and a Core, and I’d love to be able to use one of those. Which smart bulb would work? I don’t need one with different colours, but it would be nice to set the warmth of the colour (via an app or something). When the light intensity is set via the phone app, the physical slider of course doesn’t correspond to the light anymore but that’s no big deal, I’d like it to only update the light after moving the slider.

I’d appreciate suggestions that don’t break the bank. I already went and purchased some 10 USD smart bulb off e-bay that uses the Tuya Smart Life app but I couldn’t figure out how to send signals to it. Oh and I also don’t want to be locked in some Amazon or Google web service or something, I’d like it to work on my local wifi.

Thanks so much in advance!


#2

#3

Hi there thanks for your response!

The thing is, the light armature is on the ceiling and I’d like to have the dimmer more within arms length. So what I think I’m after is a wifi smart bulb that I can hang from the ceiling and control via the Particle device. Maybe something like this https://blog.christophermullins.com/2017/02/11/milight-wifi-gateway-emulator-on-an-esp8266/ but this is for an ESP8266


#4

What do you think about an relay to control your lamp-circuit?


#5

I know yeelight makes some nice RGBW bulbs that have an open (local) API you might be able to use. Haven’t tried controlling them locally just yet, but might be worthwhile playing with. If nothing else, they’re nice bulbs regardless.


#6

Hmm that means I can’t dim the light, right? And anyway I’ll need two particles then, one at the ceiling (where the bulb is) and one for the switch.

I’ll investigate that option, thanks! Does anyone here have experience with yeelight?


#7

Looks like yeelight has a pretty cool concept… lighting control using JSON command messages. The control is pretty straight forward and amounts to a bunch of message parsing. Here a link directly to the communication documentation: http://www.yeelight.com/download/Yeelight_Inter-Operation_Spec.pdf. From that documentation, there is a command to turn the light “off”. It is just a software-managed off and does not fully power down the bulb so it can still receive commands. Looks like the Philips Hue bulbs have a developer page as well: https://www.developers.meethue.com/hue-developers.

@exo Both options do not need a Photon or Core to be involved at all. You could completely control from an app on your phone. If you want to run more complex animations or coordinations without the phone involved, then yes, you could write firmware to handle either communication protocol.


#8

Yes but I want a physical switch as well. I don’t always have my phone with me, so a physical switch makes sense. I read the yeelight documentation and found this:

Currently, Yeelight WiFi LED is controlled through cloud.

… I don’t want some servers in china to know whether I’m turning my lights on or off… so the search continues.


#9

All these smart lights do come with their own infrastructure (cloud services) in place since they need to be attractive to the greater public without any knowledge of electronics, microcontrollers and network protocols.
So what you’ll get off the shelf will always primarily be controlled that way, but may be hackable.

However, if you have a hackable smart light, you will inevitably have one microcontroller in there and probably need another one to make your physical switch/dial interact with it.

Consequently

while this is true, it’s not really any different to what you originally were asking for, IMO.

BTW, I’ve “hacked” ESP8266 based ITEAD Sonoff devices to be controlled locally and there are plenty tutorials how to do it. I’m pretty sure other brands can be hacked in a similar way.

Only read on if you know what you are doing when it comes to mains power and it’s legal for you to do it where you live

If you are not explicitly looking for a smart dimmer, many electronic standard dimmers do have a “subsidiary” conntact where you can switch on/off and increase/decrease the brighness with a common breaker switch (or similar means for additional controls). These could be used in conjunction with a realay/SSR/FET/… and any Particle device too.


#10

Yes… it says cloud… but there’s a whole section on how to do local discovery and communication. You only need their proprietary app or cloud when provisioning the device to your network. After it is provisioned, you can do local discovery to control it locally. At least that is what I understood after reading that document. If you want to experiment with that local control, then a Photon or Electron will do nicely. You just have to write firmware to do that local discovery and control piece. The point of using a yeelight bulb is that it is a self-contained device and safer than home brew (should be UL certified and whatnot). By all means, you can create a bulb from scratch but to make it small, and nice looking is a challenge. To make it not burst into flames and burn down your house is another ordeal altogether.


#11

I’d like to have more details about “hacking” ESP8266 based ITEAD Sonoff devices to be controlled locally.


#12

This was meant as an example but this forum is not advising on how to hack these devices.

However, there are lots of YT videos that show how to do it - e.g. SuperHouseTV