Personal Spring Boot pet project written in Kotlin for controlling roller shutters via Shelly 2.5 devices based on the sun position, temperature and cloudiness.
It accesses both the Shelly Devices API and the Weather API.
Contains configurations for AWS or Linux systemd deployment.
The application runs on a Raspberry PI at my home.
A number of additional properties not contained in the source code must be provided to run the application. For example a src/main/resources/application-myhome.properties
can be created with those properties and activated by specifying the Spring Boot profile home
.
shutters.zone-id
: Local time zoneshutters.latitude
: local positionshutters.longitude
: local positionshutters.api-webclients.shelly-api.server
: Shelly Devices API servershutters.api-webclients.shelly-api.authorization-key
: Shelly Devices API authorization keyshutters.api-webclients.weather-api.key
: Weather API key
shutters.rules.sunset.offsetInMin
: Closing how many minutes after local sunsetshutters.rules.sunset.deviceIds
: comma separated list of device ids to close around sunset
Properties for controlling roller positions based on sun positions. Multiple spring beans can be configured:
shutters.rules.sunShades[0].deviceIds
: Devices this rule applies toshutters.rules.sunShades[0].targetShadePosition
: target position for the roller shutter to provide shadeshutters.rules.sunShades[0].minAzimuth
: sun azimuth to set the shade position for the roller shuttershutters.rules.sunShades[0].maxAzimuth
: sun azimuth to put the roller shutter back upshutters.rules.sunShades[0].minAltitude
: min altitude to keep the roller shutter in shade positionshutters.rules.sunShades[0].minTempInC
: min temperature to put the roller shutter into shade positionshutters.rules.sunShades[0].maxCloudiness
: max cloudiness to put the roller shutter into shade position
More sun shade rules can be configured with shutters.rules.sunShades[1].deviceIds
etc.