Plantio is a complete industrial IoT data pipeline that simulates sensor data and publishes it to MQTT brokers. The system is now fully operational with both local and Kubernetes deployments working.
[Plantio Feeder] β [MQTT Broker] β [Data Consumers]
- Feeder Service: Rust-based service generating realistic industrial sensor data
- MQTT Broker: Mosquitto broker for data distribution
- Data Consumers: Python subscribers, dashboards, analytics
# 1. Start MQTT broker (local)
docker run -d -p 1883:1883 eclipse-mosquitto:2.0.15
# 2. Run feeder
cd services/feeder
export RUST_LOG=debug
cargo run
# 3. Test data flow
python test-mqtt-subscriber.py
# 1. Deploy MQTT broker
kubectl apply -f deployments/mqtt/mosquitto-deployment.yaml
# 2. Deploy feeder
kubectl apply -f deployments/feeder/feeder-deployment.yaml
# 3. Port forward for local access
kubectl port-forward -n mosquitto svc/mosquitto-service 1884:1883
# 4. Test data flow
cd services/feeder
python test-k8s-subscriber.py
plantio/
βββ services/
β βββ feeder/ # Rust feeder service
β βββ src/main.rs # Main application
β βββ Dockerfile # Container build
β βββ README.md # Service documentation
β βββ test-*.py # Test scripts
βββ deployments/
β βββ mqtt/ # MQTT broker deployment
β β βββ mosquitto-deployment.yaml
β β βββ README.md
β βββ feeder/ # Feeder deployment
β βββ feeder-deployment.yaml
β βββ README.md
βββ docs/ # Documentation
βββ scripts/ # Deployment scripts
βββ SIMPLIFIED_PROJECT_GUIDE.md # Quick reference
MQTT_BROKER=localhost # MQTT broker hostname
MQTT_PORT=1883 # MQTT broker port
MQTT_TOPIC=plantio-iot-sensors-raw # MQTT topic
PUBLISH_INTERVAL=5 # Seconds between publishes
RUST_LOG=info # Log level
- MQTT Broker:
mosquitto-service.mosquitto.svc.cluster.local:1883
- Feeder Service:
plantio-feeder-service.plantio-feeder.svc.cluster.local
- Namespaces:
mosquitto
,plantio-feeder
The feeder publishes JSON data with this structure:
{
"device": {
"device_id": "MOTOR001",
"name": "Industrial Motor",
"type": "industrial_asset",
"location": "Plant A",
"asset_type": "motor"
},
"sensor_data": {
"measurements": {
"temperature": 45.2,
"vibration": 2.36,
"current": 14.89,
"voltage": 511.17,
"power": 7.35,
"speed": 1611.53,
"efficiency": 86.96,
"status": 1.0,
"uptime_hours": 3426.27
}
},
"timestamp": "2025-08-06T15:26:50.380771500Z"
}
- Industrial Motor - Temperature, vibration, current, voltage, power, speed
- Gas Turbine - Temperature, pressure, fuel flow, exhaust temp, power output
- Forced Draft Fan - Temperature, pressure, air flow, vibration, power
- Induced Draft Fan - Temperature, pressure, air flow, vibration, power
- Condensate Pump - Temperature, pressure, flow rate, vibration, power
test-mqtt-subscriber.py
- Basic MQTT subscribertest-k8s-subscriber.py
- Kubernetes-specific subscribertest-mqtt-broker-working.sh
- MQTT broker connectivity testtest-local-feeder-k8s-mqtt-python.sh
- Local feeder + K8s MQTT test
# Test MQTT broker
./test-mqtt-broker-working.sh
# Test local feeder + K8s MQTT
./test-local-feeder-k8s-mqtt-python.sh
# Monitor K8s feeder logs
kubectl logs -f deployment/plantio-feeder -n plantio-feeder
cd services/feeder
./push-image.sh
# Deploy everything
kubectl apply -f deployments/mqtt/mosquitto-deployment.yaml
kubectl apply -f deployments/feeder/feeder-deployment.yaml
# Check status
kubectl get pods -n mosquitto
kubectl get pods -n plantio-feeder
# Check pod status
kubectl get pods -n mosquitto -n plantio-feeder
# View logs
kubectl logs -f deployment/mosquitto -n mosquitto
kubectl logs -f deployment/plantio-feeder -n plantio-feeder
# Check services
kubectl get svc -n mosquitto -n plantio-feeder
- MQTT Messages: Monitor topic
plantio-iot-sensors-raw
- Publish Rate: Every 5-10 seconds per asset
- Data Volume: ~5 assets Γ 9 sensors = 45 measurements per cycle
- MQTT: Anonymous access (development)
- Kubernetes: Default security contexts
- Network: Internal cluster networking
- Enable MQTT authentication
- Add TLS encryption
- Implement network policies
- Use secrets for sensitive data
cd services/feeder
cargo run
# Debug build
cargo build
# Release build
cargo build --release
# Docker build
docker build -t plantio-feeder .
- Service Guide:
services/feeder/README.md
- Deployment Guide:
deployments/feeder/README.md
- MQTT Guide:
deployments/mqtt/README.md
- Quick Reference:
SIMPLIFIED_PROJECT_GUIDE.md
- Add Authentication - MQTT username/password
- Enable TLS - Secure MQTT connections
- Add Monitoring - Prometheus metrics, Grafana dashboards
- Scale Deployment - Horizontal Pod Autoscaler
- Add Consumers - Data processing pipelines, analytics
This project is part of the Plantio industrial IoT platform.
Status: β Production Ready | Last Updated: August 2025