Hey everyone, I wanted to share my recent project of setting up a smart wake-up light using OpenHab and a Philips Living Colors Iris light. It’s been a fantastic way to start the day more naturally!
The Goal:
I’ve always struggled with harsh alarms in the morning, so I decided to create a system that gradually wakes me up with increasing light. The setup should also sync with my phone’s alarm clock and automatically turn off after a set time.
What I Achieved:
- Gradual Wake-Up: The light starts at 1% brightness and slowly increases every 30 seconds. The color transitions from red to yellow, mimicking sunrise.
- Integration with Phone Alarm: Using the OpenHab Android app, the system detects when my phone’s alarm goes off and ensures the light shuts off afterward.
- Manual Override: If I turn off the light manually, it stops the wake-up cycle entirely.
- Automatic Shut-Off: The light turns off 30 minutes after the alarm, ensuring I don’t forget.
Challenges and Solutions:
- Zigbee Reliability: The initial setup had some issues with Zigbee connections, but retrying the script solved it.
- Cron Job Frequency: The script runs every 30 seconds, which I found a bit aggressive. I’m planning to adjust this in the future.
The Setup:- ** Philips Living Colors Iris Light**: Controlled via OpenHab.
- OpenHab Android App: To receive the alarm timestamp from my phone.
- Custom Script: Written in OpenHab to handle the wake-up logic.
Rules File:markdownimport org.eclipse.smarthome.model.script.ScriptServiceUtilrule “WakeupLightRule” when Time cron “0/30 * * ? * * *” then // Logic to check alarm time and adjust lightendrule “turnOn WakeupLight” when Item vWakeUpOngoing changed to ON then // Logic to start the light ramp-upendLessons Learned:- Script Logging: Initially, the script generated too many log entries. I plan to reduce this once everything is stable.- Alarm Time Adjustments: If the alarm time is changed to less than the ramp-up time, the system still handles it gracefully, though it’s something to be mindful of.
**Looking Forward:**I’d love to expand this to support multiple lights and alarms for my partner. If anyone has similar setups or suggestions, I’d love to hear about them!
This project has really enhanced my mornings, and I hope it inspires others to try something similar. Happy automating! ![]()