Morning Automation with Smart Lighting and Alarm Clock

Good morning everyone! I wanted to share a fun project I recently completed that combines several off-the-shelf components with a bit of custom scripting to create a personalized morning alarm system. This setup not only wakes me up but also provides a visual cue of the outside temperature, helping me decide how to dress for the day.

The Components

  • Alarm Clock: A Logitech Squeezebox Radio connected to the Logitech Media Server (LMS) running on a Linux VM.
  • Custom Script: lms2mqtt listens for status changes from LMS and publishes notifications as MQTT messages.
  • Home Automation Controller: OpenHAB subscribes to MQTT messages and triggers rules when the alarm goes off.
  • Bedside Lamp: A DIY RGB LED strip controlled by a Wemos D1-Mini board with Tasmota firmware.

How It Works

  1. When the alarm goes off, the lms2mqtt script sends an MQTT message to OpenHAB.
  2. OpenHAB retrieves the current temperature from OpenWeatherMap and converts it to a color.
  3. The bedside lamp turns on and changes color based on the temperature (red for warm, blue for cold).

Setup Details

  • The lms2mqtt script is available on GitHub.
  • The OpenHAB rules and item definitions are documented here.
  • The RGB LED strips were a cost-effective alternative to off-the-shelf smart bulbs.

Why I Love This Project

This project combines my love for DIY electronics with the convenience of smart home automation. It’s a great example of how you can enhance your daily routines with a bit of creativity and open-source tools. Plus, waking up to a color-coded temperature indicator makes mornings a bit more fun!

Tips for Others

  • If you’re new to MQTT or OpenHAB, start with simple projects and gradually build up to more complex setups.
  • Don’t hesitate to modify existing scripts or rules to fit your needs. The open-source community is all about collaboration and customization.

I hope this post inspires someone to try a similar project or experiment with their existing smart home setup. Let me know if you have any questions or suggestions!

Best regards,
[Your Name]