Skip to content

ILoveAndLikePizza/SunriseSiren3000

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sunrise Siren 3000

The most epic NeoPixel based alarm clock


Introduction

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.

Firmware setup

  1. Navigate to the SunriseSirenFirmware directory.
  2. Copy Authentication.h.example to Authentication.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!

  1. 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) ~/Arduino

Note that:

  • this command assumes you are in the SunriseSirenFirmware directory;
  • the location of your sketchbook may vary.

Now, you can load the sketch easier.

  1. Ensure that the ESP32 board is installed (if not, check this tutorial);
  2. Ensure that the required libraries are installed:
    • WiFiManager (by tzapu);
    • FastLED (by Daniel Garcia);
    • NTPClient (by Fabrice Weinberg);
    • SHT2x (by Rob Tillaart).
  3. Go to Tools > Board and ensure that it is set to "ESP32 Dev Module";
  4. Click the Upload button.

Congratulations, the Sunrise Siren 3000 firmware has been flashed successfully!


Sunrise Siren Studio installation

  1. Ensure that the required libraries are installed.
    With apt, those can be installed by running:
    sudo apt install gcc libgtk-3-dev libcurl4-openssl-dev libjson-c-dev
    And with dnf:
    sudo dnf install gcc gtk3-devel libcurl-devel json-c-devel
  2. Navigate to the SunriseSirenStudio directory.
  3. Minify the Glade sketch into a UI header file by running:
    ./minify-ui
  4. Compile the program by running:
    make
  5. 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.

  6. To install the program on your computer, run:
    sudo make install

Congratulations, Sunrise Siren Studio is up and running now!


Sunrise Siren Studio uninstallation

  1. Simply run:
    sudo make uninstall
  2. Optionally, you can remove all minified and compiled files from the repository:
    make clean