sanity checks, clear session/reconnect on settings changes
[iot-control-center.git] / readme.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# IoT Control Center

IoT JSON comunication protocol via MQTT broker.

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.

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.

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.
I had a few problems with it and decided to build my own control center with ideas like :
- web compatibile. I wanted to be able to use it in a browser
- TODO: build for it an Electron shell
- TODO: iOS and Android progressive web apps
- use an opensource interface. I tried a few, but I decided to use AdminLTE with OnsenUI components
- templatable widgets
- TODO:anyone to be able to use external CSS/JS/templates/images for widgets
- all open control interfaces to show the same data/statuses without the need for refresh
- TODO: create `scenarios` based on IoT data. if sensor1Temp < 10 then turn on heat
- TODO: use NodeRed to create scenarios/notifications
- BETA: subscribe to custom topics, assign template for display. To do configurator
- TODO: custom subscriptions callbacks to parse the message data
- TODO: OTA updates with widget configuration
- TODO: /iotcc/+/+/confirm. IoT confirmation of received message
- TODO: optimizations

How it works (WIP) :
IoT CC subscribes to
- /iotcc/+/+/config
- /iotcc/+/+/data
- /iotcc/+/+/confirm
- /iotcc/+/device

IoT CC publishes to
- /iotcc/device - {"clientId": "{clientId}"}
- /iotcc/+/+/data - {"status":"{status}", "clientId": "{clientId}"}
- /iotcc/+/+/data - {"value":"{value}", "clientId": "{clientId}"}

IoT devices subscribe to
- /iotcc/+/+/data
- /iotcc/device

IoT devices publish to :
- /iotcc/+/device - {"name":"House heating 1","desc":"", "pages" : [{"pageId" : 10, "pageName" : "House heating", "icon": "ion-ios-home"}]}
- /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}
- /iotcc/+/+/confirm - {"status":"{status}"}

### Desktop interface (WIP)
![Alt text](/screenshots/dashboard-desktop.png?raw=true "Desktop interface")

### Mobile interface (WIP)
![Alt text](/screenshots/dashboard-mobile.png?raw=true "Mobile interface")

### Tablet interface (WIP)
![Alt text](/screenshots/dashboard-tablet.png?raw=true "Tablet interface")

### Settings page
![Alt text](/screenshots/settings-page.png?raw=true "Settings page")

### Custom subscriptions page
![Alt text](/screenshots/custom-subscriptions-page.png?raw=true "Custom subscriptions page")

### Log page
![Alt text](/screenshots/log-page.png?raw=true "Log page")

comments