MiWakeUpLight with WildFly Swarm

Recently I wanted to find out if WildFly Swarm is a real challenger for Spring Boot. Rather than creating another ‘Hello World’ application I decided to convert a project I use on an ‘almost’ daily basis to a WildFly Swarm application. This way I could compare the two frameworks. I created a clone of https://github.com/raginggoblin/MiWakeUpLight with WildFly Swarm instead of Spring Boot. You can find this project on https://github.com/raginggoblin/MiWakeUpLightSwarm. So there you can find a WildFly Swarm project that contains all technologies you want in a full stack application, i.e. a database (H2), JPA, Hibernate, datasources, CDI, logging, configuration with yaml, EJB, JaxRS and a AngularJs frontend on top.

MiWakeUpLight to make the sun rise

A couple of weeks ago I bought a programmable lamp at one of these chinese webshops. I wanted to make a wakuplight, as the one I was using started to wake me in the middle of the night. This is the lamp I bought:

Mi Light with boxIt is a 9W Dual White lamp. You can shift the color from yellow to bright white and the brightness can be set to 10 distinct levels. A 9W LED lamp at full strength will certainly wake me up, so this one would do I figured. In order to control it you need a wifi controller:

Wifi controller with boxThis controller can manage up to 4 lamps, I therefore will be able to add other lights with other functions as well as the controller is capable of sending commands to each lamp individually, or to all 4 lamps at once.

Mi Light has made a smartphone app to configure and control the lamps as well, but I found it totally unusable. I was not able to configure the controller or the lamps at all! After a little googling I found a post about a webinterface and that was the key to unlock this thing.

I made a Spring Boot application with an angularjs frontend that would do the job. Through the webinterface I can configure the wakeup schedules:

MiWakeUpLight schedule overview

Configure single schedule

For each schedule I can configure the time the lamp should shine at full strength, the duration of the sunrise (going from 10% to 100%) and how long the lamp is supposed to shine. Besides this I can configure which day the schedule is valid.

This worked quite well for the past few weeks but this week I found out that angular material does only work on the desktop and on chrome for Android. As I found this unacceptable I plan to switch to bootstrap.

You can find the project on https://github.com/raginggoblin/MiWakeUpLight

CSV2CalDav

Sometimes a spreadsheet program is ideal for creating a schedule. But I could not find a way to import this into my calendar. In order to do this I wrote a small utility to convert a CSV file to a CalDav file. This CalDav file can be imported by any kind of calendering software.
For more information see: https://digitalcarpentry.nl/wordpress/csv2caldav
For downloads see: https://gitlab.com/raginggoblin/csv2caldav