Application for controlling sprinklers using ESP or Raspberry Pi.
- Licensed under the Apache License, Version 2.0
- Web frontend to configure schedules
- Sprinkler runtime can be reduced by amount of rain or any other sensor value
- Relay providers:
- GPIO via gpiod utils (e.g. relay boards for Raspberry Pi)
- Remote relays using Tasmota Power command over http (e.g. ESP with relay board)
- GPIO via
/sys/class/gpio
(deprecated)
- Supported sensor providers, e.g. for determining rain:
- Sensor values can be published via MQTT
- Extend by implementing interfaces to support more relays and sensors:
The following steps roughly summarize Spring Boot Application as systemd Service. For Windows take a look here.
-
Create a service user
sprinkler
-
Create a service folder
/srv/sprinkler
and ensure the service user can write into it -
Create a log folder
/var/log/sprinkler
and ensure the service user can write into it -
Download the latest JAR as
sprinkler.jar
into service folder -
Create file
sprinkler.conf
in service folder:JAVA_OPTS=-Xmx512m LOG_FOLDER=/var/log/sprinkler
-
Create file
application.properties
in service folder and replace TODOs:### Increase loglevel to analyze issues # logging.level.de.hasait.sprinkler=DEBUG ### For publishing sensor values via MQTT # sprinkler.mqtt.uri=tcp://your-mqtt-broker:1883 # sprinkler.mqtt.client_id=sprinkler # sprinkler.mqtt.username=mqtt # sprinkler.mqtt.password=secret # sprinkler.mqtt.topic=sprinkler
-
Create file
users.json
in service folder based on users.json -
Create systemd unit
/etc/systemd/system/sprinkler.service
:[Unit] Description=sprinkler service After=network.target [Service] User=sprinkler Group=sprinkler ExecStart=/srv/sprinkler/sprinkler.jar SuccessExitStatus=143 StandardOutput=file:/var/log/sprinkler/sprinkler.log StandardError=inherit [Install] WantedBy=multi-user.target
-
Start and enable service:
- Start now:
systemctl start sprinkler.service
- Check status:
systemctl status sprinkler.service
- Enable at boot:
systemctl enable sprinkler.service
- Start now:
For further reference, please consider the following sections:
- Official Apache Maven documentation
- Spring Boot Maven Plugin Reference Guide
- Create an OCI image
- Spring Configuration Processor
- Vaadin
- Spring Security
- Spring Data JPA
- Validation
- Spring Boot Actuator
The following guides illustrate how to use some features concretely:
- Creating CRUD UI with Vaadin
- Securing a Web Application
- Spring Boot and OAuth2
- Authenticating a User with LDAP
- Accessing Data with JPA
- Validation
- Building a RESTful Web Service with Spring Boot Actuator
- Graph for visualization of Sensor values