|
@@ -1,7 +1,81 @@
|
|
|
# fischertechnik-factory-twin
|
|
|
DEVS simulator and dashboard of the fischertechnik lernfabrik (training factory) 9V
|
|
|
|
|
|
+This project provides a digital twin of the Fischertechnik Training Factory 9V, consisting of two interconnected components:
|
|
|
|
|
|
+1. **Simulator (`simulator/`)**
|
|
|
+ A DEVS-based simulation engine that models the behavior of the factory and publishes MQTT messages. It can operate standalone or in hybrid mode alongside real factory data.
|
|
|
+
|
|
|
+2. **Dashboard (`dashboard/`)**
|
|
|
+ A Flask-based web application that serves as a real-time control center. It visualizes data from the real factory, the simulator, or both. It includes WebSocket integration, an MQTT bridge, and dynamic dashboard modes (monitor, simulation, hybrid).
|
|
|
+
|
|
|
+Each sub-project has its own Python virtual environment and set of dependencies.
|
|
|
+
|
|
|
+## Getting Started
|
|
|
+
|
|
|
+### 1. Clone the Repository
|
|
|
+
|
|
|
+```bash
|
|
|
+TODO
|
|
|
+```
|
|
|
+
|
|
|
+### 2. Start the MQTT Broker (Mosquitto)
|
|
|
+
|
|
|
+Make sure a Mosquitto MQTT broker is running on your machine.
|
|
|
+The simulator expects it to be available at localhost (127.0.0.1) on the default port (1883).
|
|
|
+
|
|
|
+If you have Mosquitto installed locally, you can start it using:
|
|
|
+
|
|
|
+```bash
|
|
|
+# On most Linux systems:
|
|
|
+sudo systemctl start mosquitto
|
|
|
+
|
|
|
+# Or manually:
|
|
|
+mosquitto
|
|
|
+```
|
|
|
+
|
|
|
+> You can verify it's running by checking localhost:1883 or using an MQTT client like MQTT Explorer.
|
|
|
+
|
|
|
+
|
|
|
+### 3: Run the dashboard
|
|
|
+
|
|
|
+```bash
|
|
|
+./run_dashboard.sh
|
|
|
+```
|
|
|
+
|
|
|
+- Create a virtual environment in dashboard/venv/ if it doesn't exist
|
|
|
+
|
|
|
+- Install Flask and other required packages
|
|
|
+
|
|
|
+- Start the dashboard web server (accessible locally in your browser on https://localhost:5000)
|
|
|
+
|
|
|
+
|
|
|
+### 4. Run the simulator
|
|
|
+
|
|
|
+```bash
|
|
|
+./run_sim.sh
|
|
|
+```
|
|
|
+
|
|
|
+ This will:
|
|
|
+
|
|
|
+- Create a virtual environment in simulator/venv/ if it doesn't exist
|
|
|
+
|
|
|
+- Install dependencies from requirements.txt
|
|
|
+
|
|
|
+- Launch the DEVS simulator in realtime-mode
|
|
|
+
|
|
|
+## Project Structure
|
|
|
+
|
|
|
+```bash
|
|
|
+fischertechnik-factory-twin/
|
|
|
+├── simulator/ # DEVS simulation engine
|
|
|
+├── dashboard/ # Flask web dashboard
|
|
|
+├── run_sim.sh # Root-level launcher for the simulator
|
|
|
+├── run_dashboard.sh # Root-level launcher for the dashboard
|
|
|
+├── LICENSE
|
|
|
+├── NOTICE.txt
|
|
|
+└── README.md
|
|
|
+```
|
|
|
|
|
|
## License
|
|
|
|