This is a simple Kotlin / Spring Boot application that uses Xesar-Connect to listen for battery empty events from the electric lock system Xesar from EVVA.
This application is intended as demonstration of how to use the Xesar-Connect library to listen for events from the Xesar system. It contains two event listeners:
LoggingListenerBatteryEmptyListener
The LoggingListener will log the topics of all events received from the Xesar system.
The BatteryEmptyListener will listen for battery empty events and log the information about the installation point
where the event occurred.
- JDK 21
- Xesar 3.0 or higher
- Xesar installation:
To run this application, you need to have a Xesar installation and access to create users in the Xesar system. We recommend to create a new user in the Xesar installation with minimal permissions and download the user's configuration.
- Clone the repository:
git clone [email protected]:open200/xesar-battery-warning-listener.git
cd xesar-battery-warning-listener- Update the application.yml file:
For simply testing you could adjust the application.yml file with the path to the previously downloaded ZIP file.
xesarconnect:
credentials-zip-path: /path/to/your/credentials.zipHowever, we don't recommend checking in the ZIP file to the repository. Instead, you can use a relative path to the ZIP file or provide the path as an environment variable:
export XESARCONNECT_CREDENTIALSZIPPATH=/path/to/your/credentials.zip- Build the application:
./gradlew build- Run the application:
./gradlew bootRunFor more information about this application, please refer to the blog post (german) Schritt für Schritt: Xesar Event Listener mit Kotlin und Spring Boot.
This project is licensed under the MIT License - see the LICENSE file for details.
This project is sponsored by open200.