"Drömsyn" Weather prediction lamp
License:
Attribution-ShareAlike (CC-BY-SA)
Created:
5 years ago
Updated:
5 years ago
Views:
145001
0 Collect
0 Comments
Share
24 Download (11.07 MB)
Make a donation to bgunnarb

Weather prediction lamp

Introduction

I saw a hack of the IKEA Drömsyn lamp here: https://hackaday.com/2019/06/12/ikea-cloud-lamp-displays-the-weather-with-esp8266/ This inspired me to build a “weather prediction lamp” based on the same IKEA lamp, that receives a weather forecast, in my case from Openweathermap and displays this forecast using a number of LEDs mounted in the Drömsyn housing.

Hardware

The hardware is based on the EasyPCB by sundberg84, using an NRF24L01+ radio. The LEDs are two arrays of 16 WS2812 LEDs each, connected in series. They are controlled from the D5 pin of the Arduino via a 330 ohm resistor.

Software

To control the LEDs I use the FastLED library found on http://fastled.io. This is a very versatile and powerful library. The library allows you to define the light patterns and store them in program memory, which saves quite a lot of memory estate.

I am using OpenHAB as my controller. OH receives a weather predictions from https://openweathermap.org every 15 minutes in the form of a 3 digit code. OH publishes these messages using MQTT to the gateway and then to the Arduino node, which then selects the appropriate light pattern and displays that on the led-array.

  The following weather forecast codes have been implemented:

  • 2XX Thunderstorm
  • 3XX Drizzle
  • 5XX Rain
  • 6XX Snow
  • 7XX Atmosphere e.g. Fog
  • 800 Clear sky
  • 801 – 804 Cloudy

For the following forecasts: Thunderstorm, Drizzle, Rain and Snow, the intensity of lightning flashes and raindrops/snowflakes varies with the forecast.

Not all forecast codes have been implemented. E.g. the Atmosphere forecasts (7XX) all display the same palette. This is because it is unlikely to see sandstorms or volcanic ash in my country.

Update!

Since the lamp tended to wake me at night, I implemented a "night-mode" that is activated by sending the code 1000 to the lamp. This palette is all black but of course you can create some soothing light pattern instead. The code is in "Weatherwiew_2.ino

enter image description here

enter image description here