2. Purpose
The aim of the Simulator is to send testdata to a MQTT-Broker, which can be used to test the software without a physical sensor.
In the future the Simulator will persist Data in a Database. Also all rooms without a sensorbox should recieve mock values from the value simulator automatically. The IoT-in-charge can configure the system to display the values of the ValueSimulator for this room.
2.1. How to setup the Simulator for development?
Currently, the value-simulator only works local, in the IDE. We plan on deploy the project to a vm. Start Quarkus with
./mvnw clean compile quarkus:dev
Connect with the MQTT-Server. For example with MQTT-Explorer. Ask the leader for the Password.
Use a Tool like Postman to Add or Delete Rooms. Make sure that you choose POST instead of GET on the left.
then you can see the new Room displayed on the MQTT-Server. Every Room without a sensor has simulated values. The Temperature for example, changes his value just a little bit like the real temperature value would.
If you want to delete the room you created before you can use postman like in this picture again.
If you want to update the name of a room you can do the same steps like addRoom, but you must put the new parameter in your post command
localhost:8080/api/updateRoom/room1?newName=newRoom1