|
1 |
| -// MyMQTT Gateway 0.1b |
2 |
| -// |
3 |
| -// Created by Daniel Wiegert <[email protected]> |
4 |
| -// Based on Mysensors Ethernet Gateway by Henrik Ekblad <[email protected]> |
5 |
| -// http://www.mysensors.org |
6 |
| -// |
7 |
| -// Requires MySensors lib 1.4b |
8 |
| -// |
9 |
| -// Don't forget to look at the definitions in MyMQTT.h! |
10 |
| -// Don't forget to configure Radio pins, IP and MAC-address! |
11 |
| -// |
12 |
| -// Address-layout is : [MQTT_BROKER_PREFIX]/[NodeID]/[SensorID]/Light |
13 |
| -// NodeID and SensorID is Decimal number. |
14 |
| -// Last segment is translation of the sensor type, look inside MyMQTT.cpp for |
15 |
| -// the definitions. User can change this to their needs. |
16 |
| -// |
17 |
| -// Features: |
18 |
| -// Supports automatic nodeID delegation |
19 |
| -// Recieve sketchname and version Example: (openhab item) |
20 |
| -//String sketch20 "Node 20 Sketch name [%s]" (sketch,name,a) {mqtt="<[mysensor:MyMQTT/20/255/Sketch_name:state:default]"} |
21 |
| -//String sketch21 "Node 21 Sketch name [%s]" (sketch,name,a) {mqtt="<[mysensor:MyMQTT/21/255/Sketch_name:state:default]"} |
22 |
| -// ... |
23 |
| -// |
24 |
| -// Todo: |
25 |
| -// DOCUMENTATION... |
26 |
| -// Special commands : clear or set EEPROM Values |
27 |
| -// Special commands : Reboot |
28 |
| -// ... |
29 |
| -/* |
| 1 | +/* MyMQTT Gateway 0.1b |
| 2 | +
|
| 3 | + Created by Daniel Wiegert <[email protected]> |
| 4 | + Based on Mysensors Ethernet Gateway by Henrik Ekblad <[email protected]> |
| 5 | + Requires MySensors lib 1.4b |
| 6 | + http://www.mysensors.org |
| 7 | +
|
| 8 | + * Don't forget to look at the definitions in MyMQTT.h! |
| 9 | + * Don't forget to configure Radio pins, IP and MAC-address! |
| 10 | +
|
| 11 | + * Address-layout is : [MQTT_BROKER_PREFIX]/[NodeID]/[SensorID]/Light |
| 12 | + NodeID and SensorID is number (0-255). |
| 13 | + Last segment is translation of the sensor type, look inside MyMQTT.cpp for |
| 14 | + the definitions. User can change this to their needs. |
| 15 | +
|
| 16 | +Example openhab setup: http://www.openhab.org/ |
| 17 | +
|
| 18 | +* openhab.cfg |
| 19 | +--- |
| 20 | +mqtt:mysensor.url=tcp://192.168.0.234:1883 |
| 21 | +mqtt:mysensor.clientId=MQTT |
| 22 | +--- |
| 23 | +
|
| 24 | +* items/test.items |
| 25 | +--- |
| 26 | +Group test |
| 27 | +Number Temp_test "Temp [%.1f °C]" (test) {mqtt="<[mysensor:MyMQTT/20/#/Temperature:state:default]"} |
| 28 | +Number Hum_test "Hum [%.1f %%]" (test) {mqtt="<[mysensor:MyMQTT/20/#/Humidity:state:default]"} |
| 29 | +Number test_test "test [%s]" (test) {mqtt="<[mysensor:MyMQTT/20/3/#:state:default]"} |
| 30 | +Switch sw1 "sw 1" (test) {<[mysensor:MyMQTT/21/1/Light:command:MAP(1.map)]"} |
| 31 | +--- (Note; # = Wildcard character) |
| 32 | +
|
| 33 | +* sitemap/test.site |
| 34 | +--- |
| 35 | +sitemap demo label="Menu" |
| 36 | +Frame label="Openhab" { |
| 37 | + Group item=test label="Test group" |
| 38 | +} |
| 39 | +--- |
| 40 | +
|
| 41 | +* transform/1.map |
| 42 | +--- |
| 43 | +1=ON |
| 44 | +0=OFF |
| 45 | +--- |
| 46 | +
|
| 47 | +* Features: |
| 48 | + - Supports automatic nodeID delegation |
| 49 | + - Recieve sketchname and version Example: (openhab item) |
| 50 | +String sketch20 "Node 20 Sketch name [%s]" (sketch,name,a) {mqtt="<[mysensor:MyMQTT/20/255/Sketch_name:state:default]"} |
| 51 | +String sketch21 "Node 21 Sketch name [%s]" (sketch,name,a) {mqtt="<[mysensor:MyMQTT/21/255/Sketch_name:state:default]"} |
| 52 | +[...] |
| 53 | +
|
| 54 | +* Todo: |
| 55 | + - DOCUMENTATION... |
| 56 | + - Special commands |
| 57 | + Read and set EEPROM Values |
| 58 | + Send Reboot, And reboot gateway itself. |
| 59 | +... |
| 60 | +
|
30 | 61 | Sketch uses 23,666 bytes (77%) of program storage space. Maximum is 30,720 bytes.
|
31 | 62 | Global variables use 766 bytes (37%) of dynamic memory, leaving 1,282 bytes for local variables. Maximum is 2,048 bytes.
|
32 | 63 | */
|
|
0 commit comments