What’s the solution you’ve developed to control LIFX lights without the app?
These are mine:
- Amazon Dash Wand
- Amazon Echo Dots
- Flic Buttons
The Dash Wand isn’t just a barcode scanner, it’s also a portable Alexa. It’s great when I have guests over and shouting over everyone to command Alexa is futile. Since it’s only the cost of tax, it was a pretty cheap buy, and I can carry it around the house with me.
Flic buttons are amazing. You can stick them anywhere so they don’t just have to go on the wall next to your light switches. I have some stuck underneath countertops so I don’t have to walk to the wall everytime I wanna turn on the lights and a couple on my computer desk. Since the sticky stuff is strong but not permanent, I can move them to another location without damaging my walls and furniture.
I have them paired with Raspberry Pis around the house which gives me full control over their actions without a phone. The Node.js controller software I wrote allows me to:
- Control LIFX, WeMo, NodeMCU microcontrollers, and anything else by sending out HTTP requests based on the type of button press.
- Turn off a scene or multiple groups at once (not supported in the Flic software or even Alexa).
- Shorten the debounce time so they’re more responsive.
- Add more press types such as double-press-and-hold, triple-press, etc. This reduces the amount of buttons I have to have on each wall.
More on the Flic button code here:
What about you guys?
I have written a PHP client library https://github.com/ben-gibson/lifx-client though that is as far as I have gotten. I like the idea of the Flic buttons and I have an original Raspberry Pi lying around somewhere so I might go down that route though I also like the idea of having a control panel on my computer.
You could try https://remote.lighting/home if you wanna control the lights from your computer. It’s not a native app, but it does the job.
OpenFrameworks + Custom from-da-house Lifx Addon
Works pretty well, you can see a simple test here : https://youtu.be/M22dPxR8DL8
Nice post!! I definitely will look into those flic buttons.
I have about 30 LIFX lights now (including a Z strip) and using a Raspberry Pi with LIGHTSD (Lightsd: a daemon with a JSON-RPC API to control your bulbs)
I have a ruby script that changes lights (on/off and HSBK) hourly, based on this study: https://www.lifx.com/blogs/the-latest/19034143-the-lighter-side-of-circadian-rhythms
I have a zwave daughter board on my RPi, and worked a bit with using zwave controllers, but not had great luck due to the lack of capabilities on the API side of things…more devices to have a more consistent mesh network might have solved that, but didn’t want to put any more $ into that solution.
I use netgear poppers here and there, which work well, although would prefer to have something that utilizes the RPI/LIGHTSD interface for better consistency and reaction time.
Actually, the automatic lights cycle works really well most of the time, and pulling out the smartphone couple times a month isn’t so bad although would like better usability for folks that dont live in our home or perhaps easier/more intuitive interfaces for simple things like, “I need the lights on to read a book”.
One huge request is that I would love to integrate NEST thermostat motion sensor information to help control the lights…might not need any manual switches at all if I had that, although last I checked this is not available in the API?!
I use SmartThings, but my wife and I almost never use physical switches or the echo. I have over 120 sensors in my house and use them along with the time of day to determine what to do with my 48 LIFX bulbs. For example, I have a schedule that determines the color temperature and level of the lights in my kitchen. Close to sunset the lights come on @ 30% / 2750K as long as someone is home and there is activity in my kitchen. As it gets later in the evening the level drops automatically 30->25->20. The lights also turn off if there is no activity in the kitchen.
What is activity?
I have 2 motion sensors
Power meters on the stove and microwave
Contact sensor on the door coming into the house from the garage
So if there is motion in the kitchen, door gets opened, or if you are cooking food on the stove / in the microwave the lights are on. After 2 minutes of any of those no longer being true plus all others not being true the lights turn off. I have a ton of stuff like this throughout my house.
What kind of motion sensors are you using?
That’s awesome! 48 bulbs though I have 4.
Have that public anywhere?
I run a separate Node.js process for each device; although, you can always combine them and forego the HTTP part of it altogether. All projects have the same scripts to run code, but looking through the README files, I need to make some updates tonight.
In general I use the lowes iris zigbee motion sensors. they are the best I’ve tried.
I developed AutoBuddy (http://frawau.github.io/AutoBuddy/) and use it everyday. Supports Lifx, flic, RuuviTag (Temp, Humidity, pressure, accelerometer), voice (PocketSphynx) and logging to ThingsBoardIO (https://demo.thingsboard.io/dashboards/27038000-6d0e-11e7-84e9-c7f326cba909?publicId=c5792950-67ab-11e7-84e9-c7f326cba909). It also has a rule engine so you can do pretty much what you want.
I looked through the GitHub repo and wasn’t able to find any examples.
Do you have any videos or examples of how to use it located anywhere?
At this time I do not have any video showing how to use AutoBuddy. There is only a few screenshots of the Web application in the github.io page.
I could do one before the end of the week if you are interested (I have a deadline for Wed night to finish first)
The easiest way would be to use the RPi image, update the software and run the configuration script. Lifx are detected automatically but you would have to Scan (In command menu) for flic buttons.
I plan to update the RPi image to Stretch soon.
The rule engine is really powerful but the interface is a bit difficult and needs to get used too (You have a list of rules and each rule has a trigger, a list of conditions and a list of commands)
Currently I have rules to
- Create a light show at sunset
- Turn off lights at sunrise
- Turn on some lights when I get back home
- Start/Resume music with voice commands
- Warn me when the front door is opened (Pushbullets)
- Use flic buttons for lights, music
- Turn off the lights that were off after a power outage
No rush. Do what you need on your own time. I’m merely curious since I wanna learn better ways of creating apps and looking at what other people do is always helpful.
I purchased two AWS IoT buttons for ~$20 each. Clicking the button calls out to AWS Lambda, which I use to call the LIFX API’s to do whatever I want.
In my case, I have lights in my young kids’ rooms. So each button controls their individual lights. However, when they are sleeping, I set their light colors to red and I have a schedule such that the lights turn blue when they are allowed to get out of their rooms in the mornings (Otherwise I get two adorable faces waking me up at 6 AM when I’d prefer to be sleeping).
I have the button set up such that if their light is that specific sleep red color, the button does nothing. Otherwise, one click changes the color between 4-5 presets or off. Double clicking the button sets their lights to “sleep red”. This way I don’t have to fumble with the app when I put the kids to bed, and during the day they can use it to adjust the color or tun it off. Pretty easy to implement, and I can use Lambda’s free tier so I don’t host code anywhere but there.
That sounds really nifty!
What are the 4-5 presets on the single-click used for?
What would you gauge the speed of sending the button click up to Amazon, then to LIFX Cloud, then back to your house?
- A normal, daylight white color
I use the cycle function in the API to do that so I don’t have to keep state anywhere.
The downside is the lag, it’s about 5-10 seconds from click to lamp change. However, I don’t have to keep a Raspberry Pi or other computer/server up and running in my house.
I do have a Synology and at one point I went down the route of trying to use that instead of Lambda (it probably would be faster to run code there and use the LAN API actually), but Synology was being such a pain in the ass with installing Node or another server-like environment that I settled on Lambda.
I see why you made that decision. That much lag is always trouble , but if the trade-off of not having to maintain yet another machine makes sense.
/cycle for stateless sounds like a great idea! Got the code up somewhere I could see?
I created a plugin for my companies building automation control engine (www.j2inn.com) and created a ton of control logic to have lighting prompts to my alarm system, disco mode, and etc… I even use Z-Wave switches that allow me to put them into protected mode so it wont break the load but will send the button down to my control engine which sends the commands to the lifx bulbs so they still work with traditional switches. I’m running 35 bulbs and 3 Z Strips right now.