Code: Select all
[
{
"id": "8eea3e72.a634d",
"type": "tab",
"label": "Flow 6",
"disabled": false,
"info": ""
},
{
"id": "43362c6c.ae8434",
"type": "mqtt in",
"z": "8eea3e72.a634d",
"name": "",
"topic": "domoticz/out",
"qos": "2",
"datatype": "auto",
"broker": "9748a36f.44bdd",
"x": 350,
"y": 260,
"wires": [
[
"c2775a1f.93e698"
]
]
},
{
"id": "c2775a1f.93e698",
"type": "json",
"z": "8eea3e72.a634d",
"name": "",
"property": "payload",
"action": "",
"pretty": false,
"x": 510,
"y": 260,
"wires": [
[
"999344f2.06deb8"
]
]
},
{
"id": "999344f2.06deb8",
"type": "switch",
"z": "8eea3e72.a634d",
"name": "",
"property": "payload.idx",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "30",
"vt": "str"
},
{
"t": "eq",
"v": "93",
"vt": "str"
},
{
"t": "eq",
"v": "96",
"vt": "str"
},
{
"t": "eq",
"v": "98",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 4,
"x": 650,
"y": 260,
"wires": [
[
"90eadebf.aa81d"
],
[
"30467635.48e29a"
],
[
"ff317967.d3f8a8"
],
[
"d54b8ee0.0434a"
]
]
},
{
"id": "d54b8ee0.0434a",
"type": "function",
"z": "8eea3e72.a634d",
"name": "Prepare event",
"func": "temp = msg.payload;\nmsg.topic = \"cmnd/espeasy/test4\"\nmsg.payload = parseFloat(temp.svalue1);\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 840,
"y": 320,
"wires": [
[
"7db1ffba.bc5c8"
]
]
},
{
"id": "ff317967.d3f8a8",
"type": "function",
"z": "8eea3e72.a634d",
"name": "Prepare event",
"func": "temp = msg.payload;\nmsg.topic = \"cmnd/espeasy/test3\"\nmsg.payload = parseFloat(temp.svalue1);\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 840,
"y": 280,
"wires": [
[
"7db1ffba.bc5c8"
]
]
},
{
"id": "30467635.48e29a",
"type": "function",
"z": "8eea3e72.a634d",
"name": "Prepare event",
"func": "temp = msg.payload;\nmsg.topic = \"cmnd/espeasy/test2\"\nmsg.payload = parseFloat(temp.svalue1);\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 840,
"y": 240,
"wires": [
[
"7db1ffba.bc5c8"
]
]
},
{
"id": "90eadebf.aa81d",
"type": "function",
"z": "8eea3e72.a634d",
"name": "Prepare event",
"func": "temp = msg.payload;\nmsg.topic = \"cmnd/espeasy/test\"\nmsg.payload = parseFloat(temp.svalue1);\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 840,
"y": 180,
"wires": [
[
"7db1ffba.bc5c8"
]
]
},
{
"id": "7db1ffba.bc5c8",
"type": "mqtt out",
"z": "8eea3e72.a634d",
"name": "",
"topic": "",
"qos": "2",
"retain": "",
"broker": "9748a36f.44bdd",
"x": 1070,
"y": 280,
"wires": []
},
{
"id": "9748a36f.44bdd",
"type": "mqtt-broker",
"z": "",
"broker": "localhost",
"port": "1883",
"clientid": "",
"usetls": false,
"compatmode": true,
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"willTopic": "",
"willQos": "0",
"willPayload": ""
}
]