How robert-ai-development/plant-watering-shelly-smt50 works
This repository implements local, scheduled plant irrigation on a Shelly Plus Uni: periodic sensing creates a watering job, and scheduled pump runs measure again, water in portions, and update learned pump effectiveness. Installation configures schedules and starting values; hardware checks and calibration support setup and tuning. The README documents these runtime capabilities, while sampled source mainly covers supporting tools and the mock, so links for core script behavior follow the documented workflow rather than inspected script internals.
Main entry points: hwtest.js Hardware Test Driver · bw_install.js Installer · bw_pump.js Portioning Pump · bw_main.js Periodic Monitor
Components 19
Shelly Runtime
- Installer
scripts/bw_install.js - Periodic Monitor
scripts/bw_main.js - Portioning Pump
scripts/bw_pump.js - Device KVS
- Schedules
- Pump Switch
Device Operations
- Hardware Check
scripts/bw_hwtest.js - Pump Check
scripts/bw_hwpump.js - Time-lapse
scripts/bw_zeitraffer.js - Hardware Test Driver
tools/hwtest.js - Calibration Analysis
tools/lib/kal.js
Debug Support
- Shelly Mock
tools/mock/shelly-mock.js - Hardware Demo
tools/mock/hwdemo.js - Script Runner
tools/run-script.js
Other components
- Grower
- Sensors
- Plant and Water
- Shelly Plus Uni
- Operator
Connections 23
- Grower → Installer: configures
- Installer → Schedules: creates schedules
- Installer → Device KVS: sets start values
- Installer → Pump Switch: sets auto-off
- Schedules → Periodic Monitor: starts periodically
- Periodic Monitor → Sensors: reads every 15 min
- Periodic Monitor → Device KVS: writes watering job
- Schedules → Portioning Pump: starts twice daily
- Portioning Pump → Sensors: fresh measurements
- Portioning Pump → Device KVS: reads job; stores learning
- Portioning Pump → Pump Switch: waters in portions
- Pump Switch → Plant and Water: delivers water
- Sensors → Plant and Water: measure moisture
- Operator → Hardware Test Driver: runs checks
- Hardware Test Driver → Hardware Check: controls remotely
- Hardware Test Driver → Pump Check: controls remotely
- Hardware Test Driver → Time-lapse: starts remotely
- Hardware Test Driver → Calibration Analysis: requests write plan
- Calibration Analysis → Device KVS: proposes updated values
- Script Runner → Shelly Mock: runs scripts in
- Script Runner → Hardware Demo: enables hardware demo
- Hardware Demo → Shelly Mock: drives simulated device
- Shelly Mock → Shelly Plus Uni: simulates device RPC