@sedge-hq/mqtt
v0.3.3
Published
MQTT for sedge: wake it when a message arrives on a topic, from a sensor, a home hub or a device.
Readme
@sedge-hq/mqtt
MQTT for sedge, the always-on agent. One signal, mqtt: it subscribes to
topics on your broker (Mosquitto, Home Assistant's, EMQX, HiveMQ), with + and # wildcards, and
each message wakes sedge with its topic and payload.
mqtt://,mqtts://(TLS) andwss://(WebSocket) brokers; a password goes to your keychain.- A session kept on the broker: messages sent at QoS 1 or 2 while sedge was stopped arrive when it's back (QoS 0 messages aren't kept by brokers).
- Retained values, sent again on every subscribe, aren't reported.
Each message's details are its topic and payload, with JSON as values, so a condition can read
a field. In sedge, say "tell me when the basil's soil sensor on home/basil/soil reads dry, at most
once an hour": that's when: payload.moisture < 30 and throttle: 1h, so a chatty sensor doesn't
wake it for every reading.
It can publish too: the agent's act tool has a publish action on the same broker, with
the same login ("water the basil" can switch the pump), behind your permissions: it asks first
unless you allow it.
Channels and signals · MIT
