I did this with the folowing LUA function: The first step is to convert decimal to a binary. So you can check if the alarm is set for today. You have to convert this bitmask to weekday’s. The Hue bridge saves the recurring day’s as a bitmask. RECURRING DAY’S ARE SAVED AS A BITMASK IN THE HUE BRIDGEĮvery day of the week given by bbb at given time Please login or register to see this code. In the LUA scene I find these schedules with the code: Like Wake-up weekday’s and Wake-up weekends. To know which schedules are used for wake-up I set all those schedules with the Wake keyword in it. TAG YOUR HUE SCHEDULE WITH A WAKE-UP STRING IN IT! I only describe snippets of my code to make you understand what it does and show the challenges I ran into. You can download the full LUA scenes at the bottom of this post. If it detects motion it checks if the global variable WakeUpReady is set to 1 and runs the wake-up routine. Scene 2 runs when motion detected by a Fibaro Motion Sensor.Every minute it checks if there is a wake-up planned by reading the same global variable and if so it sets the WakeUpReady global variable to 1. If a wake-up is scheduled for today write the wake-up times to a global variable. Scene 1 runs every minute and polls the Hue bridge schedules at 04:00.Therefore I wrote a LUA scene to read the Hue schedules from the Hue bridge and run the wake-up routine at the schedules wake-up time. Reading Hue schedules from the bridge cannot be done with the Fibaro Hue plug-in. If schedule is set for today and motion is detected at the hallway after the scheduled time (scene 2), run wake-up routine. Home Center LUA scene 1 reads schedules at 04:00 with the keyword Wake in it. Set recurring wake-up schedule in the Philips Hue app. As we use the Hue app to set our wake-up alarm I use this app to trigger the Home Center to run a wake-up routine for the rest of the house. It beautifully fakes a sunrise in our whole room. In our bedroom we integrated a Philips Hue lightstrip in the ceiling and use this with the Philips Hue app as a wake-up light. Turn on the lights only when it’s dark (read lux). Start the morning routine when walking downstairs (check motion). Use 1 app to schedule the whole home wake-up routine. Use my Philips Hue led strips as a wake-up light. I just post my LUA code to share knowlegde and inspire you to create awesome things!Īdvanced home wake-up routine with Philips Hue and HC2Īpplies to: Fibaro Home Center 2 and Philips HUE bridge. I have no time to make the LUA scenes generic like other great members do on this forum. It may help you with designing your own automation routines.ĭisclaimer: I am not a professional programmer and I post the scenes as is. My goal is not flipping a light scene with a phone but for 90% autonome home automation.īesides posting LUA code I give you more insight why I came to this routine. It's much more pleasant to be awoken this way rather than the blare of a piercing alarm! Since I'm not a morning person, this works well for me.This is my first topic in a series of post I'm going to write about the advanced LUA scenes I wrote for my home automation project. With the Hue Go set in this mode, I can be awoken with light that increasingly get brighter over a set period of time. With the app, I can use the light as a modern alarm clock. Since I already have the Hue Bridge installed it was a snap to set up. It also can be programmed and controlled via the Hue app on my phone. What I like about this light is it can be used without having to be connected to wi-fi and the portability feature. This smart light functions as a plug in or on a rechargable battery with a run time of three hours. The next Hue product I got was the Hue Go. They are set to come on and off automatically at night. I put those smart bulbs into lamps in my living room and bedroom. I was so pleased with the first set of Hue smart lights, installed above my kitchen cabinets, that I immediately asked Steph to get additional smart bulbs for me. We have previously posted on how we installed smart lights at my house.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |