Skip to content

Microservice to provide the Controller for our Traffic Light and Space Status

License

Notifications You must be signed in to change notification settings

netz39/Netz39AmpelController

Repository files navigation

Netz39 Ampel Controller

Microservice to provide the Controller for our Traffic Light and Space Status.

This could be done in NodeRed, but it is part of our critical infrastrukture and should run independently.

Usage

Configuration

Configuration is done using environment variables:

  • PORT: Target port when used with docker-compose (default 8080)
  • MQTT_BROKER: MQTT broker server (default mqtt)
  • MQTT_PORT: MQTT broker port (default 1883)
  • MQTT_LEVER_STATE_TOPIC: MQTT topic to listen for lever state messages (default lever)
  • MQTT_DOOR_EVENTS_TOPIC: MQTT topic to listen for door events (default door)
  • MQTT_SPACESTATUS_ISOPEN_TOPIC: MQTT topic to publish space status (default isOpen)
  • MQTT_SPACESTATUS_LASTCHANGE_TOPIC: MQTT topic to publish last change messages (default lastchange)
  • MQTT_TRAFFIC_LIGHT_TOPIC: MQTT topic to publish traffic light status (default trafficlight)

Run with Docker

docker run --rm -it \
    -p 8080:8080 \
    netz39/ampel-controller

Run with Docker-Compose (Development)

To run with docker-compose copy .env.template to .env and edit the necessary variables. Then start with:

docker-compose up --build

Please note that this compose file will rebuild the image based on the repository. This is helpful during development and not intended for production use.

When done, please don't forget to remove the deployment with

docker-compose down

Maintainers

License

MIT © 2024 Netz39 e.V. and contributors

About

Microservice to provide the Controller for our Traffic Light and Space Status

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •