This is an old revision of the document!
Table of Contents
SpejsIoT
Warsaw Hackerspace IoT something. <s>Because NIH.</s> Based on ESP8266. It all goes through central MQTT broker now.
Turns out someone did it kind of better - https://github.com/marvinroger/homie. It seems to have more-or-less the same ideas, but extended further a little bit. We'll just most probably rewrite it in Sming, as Arduino for esp8266 (for which official implementation of homie is implemented) sucks.
MQTT/HTTP documentation below stays here mostly for historical purposes.
Devices
- Working
- Vacuum cleaner (10.8.0.140)
- Exhaust (10.8.0.22)
- Planned
- Valves
- Lights
Queue topics
Topic | Description |
---|---|
iot/ DEVICE_ID /control | read: device control; restart - reboot device; ota - start OTA |
iot/ DEVICE_ID /state | write: online or offline , offline is set in last will |
iot/ DEVICE_ID /type | write: device type, eg. exhaust , vacuum |
iot/ DEVICE_ID /ota | write: OTA status, started , finished , failed |
iot/ DEVICE_ID / ENDPOINT | value to set, or state change report, eg. iot/123456/relay = 1 |
HTTP API
Spejsiot devices publish simple REST-like HTTP API:
Address | Description |
---|---|
/metadata.json | Simple device status and endpoints list |
/api/1/ ENDPOINT / VALUE | Set value to endpoint |
Endpoints
Right now only used endpoint is relay
, which takes 0
, 1
or toggle
values.
mDNS / Zeroconf / Avahi
Spejsiot devices advertise using Avahi/Zeroconf/mDNS/Bonjour on local network as services of type _spejsiot._tcp
.