- Wed Jun 03, 2015 6:31 am
#19324
Not fair.
You should at least format the js.
Code: Select all[{
"id": "95df45c7.e7c0b8",
"type": "mqtt-broker",
"broker": "localhost",
"port": "1883",
"clientid": ""
}, {
"id": "41b9d518.57c974",
"type": "mongodb",
"hostname": "127.0.0.1",
"port": "27017",
"db": "esp8266",
"name": "esp8266"
}, {
"id": "2e32745c.3519ec",
"type": "mongodb out",
"mongodb": "41b9d518.57c974",
"name": "",
"collection": "humidity",
"payonly": true,
"upsert": false,
"multi": false,
"operation": "store",
"x": 521,
"y": 183,
"z": "72eac99f.7e1e3",
"wires": []
}, {
"id": "84b0d199.1b7a7",
"type": "mqtt in",
"name": "",
"topic": "events/esp8266/10641502/humidity",
"broker": "95df45c7.e7c0b8",
"x": 178,
"y": 182,
"z": "72eac99f.7e1e3",
"wires": [
["2e32745c.3519ec"]
]
}]
Now you anybody can guess with some confidence what that means.
It's reduced to an informational model which has an easy graphical form that allows to see flows.
I can explain that to my mother.
For the lua code you need some more knowledge.
Concepts like callbacks, lambdas, positional parameters that have meaning depending on the position,
syntax, indentation that does not reflect the structure of the code, mental model needed to interpret code
for yourself.
I know both.
If it lowers entry level for starters by using a graphical flow editor thats nice.
You are not programming json or timers or mqtt yourself.
You are using lua as the glue language combining lower level blocks.
Thats IMHO the best usage of such a language. But you need programming skills on text level.
Graphical flow language have a lower entry level and if both are combined that makes a good pair.
Even your example uses json to exchange data. It's just an notation form. It's the model and the model definition
that make up the important part.
Cal