The Sunrise Siren 3000 is the clock I have in front of my bed. Its job is to display time, temperature and humidity, but most importantly, wake me up whenever I have to wake up. I realize that you may not own a Sunrise Siren 3000 yourself, but I still like to make this project open-source :P
This repository consists of two relevant parts of the clock:
- the firmware of the clock, located in the
SunriseSirenFirmware
directory. It is flashed onto the ESP32 inside it by using the Arduino IDE; - the control program, Sunrise Siren Studio, located in the
SunriseSirenStudio
directory. It is made with the Gimp ToolKit (GTK) in C, making it only available to Linux (and WSL2) users. The program has to be compiled from source.
- Navigate to the
SunriseSirenFirmware
directory. - Copy
Authentication.h.example
toAuthentication.h
and change the values in that file to whatever you like. (Note that values over 32 characters are very difficult to enter into Sunrise Siren Studio.)
WARNING: Sunrise Siren 3000 passwords are NOT encrypted or hashed anywhere. DO NOT USE A PASSWORD THAT YOU ALREADY USE SOMEWHERE ELSE!
- Launch the Arduino IDE and load the
SunriseSirenFirmware.ino
sketch.
Hint: you can add the firmware sketch to your Arduino IDE sketchbook with a symlink:
ln -s $(pwd) ~/ArduinoNote that:
- this command assumes you are in the
SunriseSirenFirmware
directory;- the location of your sketchbook may vary.
Now, you can load the sketch easier.
- Ensure that the ESP32 board is installed (if not, check this tutorial);
- Ensure that the required libraries are installed:
- WiFiManager (by tzapu);
- FastLED (by Daniel Garcia);
- NTPClient (by Fabrice Weinberg);
- SHT2x (by Rob Tillaart).
- Go to Tools > Board and ensure that it is set to "ESP32 Dev Module";
- Click the Upload button.
- Ensure that the required libraries are installed.
Withapt
, those can be installed by running:And withsudo apt install gcc libgtk-3-dev libcurl4-openssl-dev libjson-c-dev
dnf
:sudo dnf install gcc gtk3-devel libcurl-devel json-c-devel
- Navigate to the
SunriseSirenStudio
directory. - Minify the Glade sketch into a UI header file by running:
./minify-ui
- Compile the program by running:
make
- If you want to install the program right away, skip to the next step. If you want to test the program first (inside the repository), it is necessary to compile the GSettings schema first, and refer to it by using the
GSETTINGS_SCHEMA_DIR
environment variable when executing the binary:make gschema GSETTINGS_SCHEMA_DIR=$(pwd)/schema build/sunrise-siren-studio
Note that these commands assume you are in the
SunriseSirenStudio
directory. - To install the program on your computer, run:
sudo make install
- Simply run:
sudo make uninstall
- Optionally, you can remove all minified and compiled files from the repository:
make clean