4 Commits

Author SHA1 Message Date
arnaudne d6cde25504 fix: use serial positions 6-11 for module slug instead of last 6 chars
Serial format is PPPPPP+SSSSSS+0001 — slice(-6) was picking up the
trailing 0001 suffix. slice(6,12) gives the correct device identifier.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 01:29:24 +02:00
arnaudne 15ed8f8723 fix: publish availability as JSON to fix EasyMQTT parse error
Plain string 'online'/'offline' caused SyntaxError in EasyMQTT which
wildcard-subscribes and JSON.parses all messages. Switch to
{"state":"online"} payload with availability_template in HA discovery.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 01:25:30 +02:00
arnaudne 15ab63c3e5 fix: use environment substitution instead of env_file for Portainer git deploy
Portainer git deployments have no .env file on disk. Switch to
environment: with ${VAR} substitution — vars injected via Portainer UI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 01:11:47 +02:00
arnaudne 941abd98d5 feat: initial myprimal MQTT bridge service
Dynamic MySolem/MyIndygo IoT bridge with MQTT, Home Assistant
autodiscovery, and Homebridge EasyMQTT compatibility.

- Device discovery via MySolem API on startup (all modules/inputs/outputs)
- Configurable poll engine (fast/normal/slow buckets, per-input overrides)
- MQTT retained state publishing + HA autodiscovery payloads
- Unified manual command routing (linesControl vs sendManualModuleCommand)
- Runtime config via MQTT $config/set, persisted to config.json
- Expression override system (API-provided > hardcoded > passthrough)
- Minimal REST API: /health, /state, /control, /rediscover
- Docker deployment (Dockerfile + docker-compose.yml)
- 38 unit tests

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 01:05:24 +02:00