dropper & Paperscents simulators
✅ random serial generation
✅ can generate machine event reports
✅ randomly push machine delivery events (delivery request event + delivered event)
Not implemented yet
- install python@^3.10 through a virtual environment
- install dependencies with
pip3 install -r requirements.txt - install docker (optional)
- install project dependencies with
poetry install - setup the mqtt local broker with docker and docker-compose (optional)
- setup the .env file at the project's root [see .env exemple here](##environment variables)
a basic .env exemple
DROPPER_RUN: the simulator will generate droppers events when this value is set to "true"
DROPPER_SERIALS: comma separated list of specifics droppers serials, if an empty list is provided, the simulator will generate 10 serials randomly.
MQTT_HOST: the mqtt broker url, if you're running it locally through the provided docker-compose then use "localhost"
DROPPER_EVENTS_INTERVAL: controls the time delay between generated random events
MQTT_PORT: the port on which the mqtt broker runs (usualy "1883").
DROPPER_RUN="true"
DROPPER_SERIALS=""
MQTT_HOST="localhost"
MQTT_PORT="1883"- start the local broker with
docker-compose up -d(optional) - start the simulator with
poetry run dev