User Tools

Site Tools


projects:spejsiot

SpejsIoT

This is your mind on SpejsIoT: https://youtu.be/dxcZQX5f3v0?t=219

Warsaw Hackerspace IoT something network thingie. Because NIH. 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 just most rewriten it in Sming, as Arduino for esp8266 (for which official implementation of homie is implemented) sucks. The only difference now is that instead of homie/ prefix we use iot/.

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

Framework

Software framework for quick implementation of spejsiot-compatible devices on ESP8266 with Sming is available at: https://code.hackerspace.pl/informatic/spejsiot

Keep in mind this still requires some documentation and cleanup. Kick informatic in case of any problem.

OTA is working fine.

REST API

Simple stateless REST API is available at: http://spejsiot.waw.hackerspace.pl/ API documentation is available there as well.

Source: https://code.hackerspace.pl/informatic/spejsiot-api

Home Assistant (GUI)

Cute web interface for most IoT-like things in our hackerspace is available at: http://iot.waw.hackerspace.pl/

Note: help needed with implementation of device autodiscovery

WARNING: Information below is mostly deprecated

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.

Some working code

projects/spejsiot.txt · Last modified: 2017/02/12 02:15 by informatic

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki