sanity checks, clear session/reconnect on settings changes
[iot-control-center.git] / readme.md
Razvan Stanga 1 # IoT Control Center
Razvan Stanga 2
3 IoT JSON comunication protocol via MQTT broker.
4
5 In november 2016 I wanted to remote control and automate some tasks like watering my greenhouse, turn off/on lights/heating on a country house.
6
7 I was playing with Arduino/ESP8266/Raspberry Pi for some time now and I started thinking and researching a way to do it. After a few days I decided to use a combination of Raspberry Pi as a server with a MQTT broker and NodeMCU.
8
9 I had in mind a JSON based protocol for communication via MQTT. Then I searched the net to see it this was done before and I found IoT Manager. I tried it for a few days for night heating my two dogs.
10 I had a few problems with it and decided to build my own control center with ideas like :
11 - web compatibile. I wanted to be able to use it in a browser
12 - TODO: build for it an Electron shell
13 - TODO: iOS and Android progressive web apps
14 - use an opensource interface. I tried a few, but I decided to use AdminLTE with OnsenUI components
15 - templatable widgets
16 - TODO:anyone to be able to use external CSS/JS/templates/images for widgets
17 - all open control interfaces to show the same data/statuses without the need for refresh
18 - TODO: create `scenarios` based on IoT data. if sensor1Temp < 10 then turn on heat
19 - TODO: use NodeRed to create scenarios/notifications
Razvan Stanga 20 - BETA: subscribe to custom topics, assign template for display. To do configurator
Razvan Stanga 21 - TODO: custom subscriptions callbacks to parse the message data
Razvan Stanga 22 - TODO: OTA updates with widget configuration
Razvan Stanga 23 - TODO: /iotcc/+/+/confirm. IoT confirmation of received message
Razvan Stanga 24 - TODO: optimizations
Razvan Stanga 25
26 How it works (WIP) :
27 IoT CC subscribes to
Razvan Stanga 28 - /iotcc/+/+/config
29 - /iotcc/+/+/data
Razvan Stanga 30 - /iotcc/+/+/confirm
Razvan Stanga 31 - /iotcc/+/device
Razvan Stanga 32
33 IoT CC publishes to
Razvan Stanga 34 - /iotcc/device - {"clientId": "{clientId}"}
Razvan Stanga 35 - /iotcc/+/+/data - {"status":"{status}", "clientId": "{clientId}"}
36 - /iotcc/+/+/data - {"value":"{value}", "clientId": "{clientId}"}
Razvan Stanga 37
38 IoT devices subscribe to
Razvan Stanga 39 - /iotcc/+/+/data
40 - /iotcc/device
Razvan Stanga 41
42 IoT devices publish to :
Razvan Stanga 43 - /iotcc/+/device - {"name":"House heating 1","desc":"", "pages" : [{"pageId" : 10, "pageName" : "House heating", "icon": "ion-ios-home"}]}
44 - /iotcc/+/+/config - {"pageName": "House heating", "pageId": 10, "widget":"radios", "title":"Hollway Heater", "topic":"/iotcc/heater1/heater", "options":[{"checked":true, "label": "Off", "status":"1"}, {"label": "Confort", "status":"2"}, {"label": "Anti freeze", "status":"3"}, {"label": "Confort -2", "status":"4"}], "template": "template-3", "icon": "ion-ios-home", "bgcolor": "bg-blue", "order": 40}
Razvan Stanga 45 - /iotcc/+/+/confirm - {"status":"{status}"}
Razvan Stanga 46
47 ### Desktop interface (WIP)
Razvan Stanga 48 ![Alt text](/screenshots/dashboard-desktop.png?raw=true "Desktop interface")
Razvan Stanga 49
50 ### Mobile interface (WIP)
Razvan Stanga 51 ![Alt text](/screenshots/dashboard-mobile.png?raw=true "Mobile interface")
52
53 ### Tablet interface (WIP)
54 ![Alt text](/screenshots/dashboard-tablet.png?raw=true "Tablet interface")
55
56 ### Settings page
57 ![Alt text](/screenshots/settings-page.png?raw=true "Settings page")
58
59 ### Custom subscriptions page
60 ![Alt text](/screenshots/custom-subscriptions-page.png?raw=true "Custom subscriptions page")
61
62 ### Log page
63 ![Alt text](/screenshots/log-page.png?raw=true "Log page")
64
comments