Second part of the flow
[
{
"id": "ab3d9378cba2a69c",
"type": "tab",
"label": "Flow 4",
"disabled": false,
"info": "",
"env": []
},
{
"id": "058e3fb12774f792",
"type": "sensor-ds18b20",
"z": "ab3d9378cba2a69c",
"name": "Temp2",
"topic": "",
"sensorid": "28-030997790878",
"timer": "3",
"repeat": false,
"x": 290,
"y": 180,
"wires": [
[
"00879db046f76ce5",
"944efa2e5fab7809",
"0880415b2616e7b2"
]
]
},
{
"id": "00879db046f76ce5",
"type": "ui_gauge",
"z": "ab3d9378cba2a69c",
"name": "",
"group": "ba9be29e7ac01f9d",
"order": 0,
"width": 0,
"height": 0,
"gtype": "gage",
"title": "Temp2",
"label": "C",
"format": "{{value}}",
"min": 0,
"max": "40",
"colors": [
"#00b500",
"#e6e600",
"#ca3838"
],
"seg1": "",
"seg2": "",
"className": "",
"x": 470,
"y": 280,
"wires": []
},
{
"id": "944efa2e5fab7809",
"type": "ui_chart",
"z": "ab3d9378cba2a69c",
"name": "",
"group": "ba9be29e7ac01f9d",
"order": 1,
"width": 0,
"height": 0,
"label": "Temp2",
"chartType": "line",
"legend": "false",
"xformat": "HH:mm:ss",
"interpolate": "linear",
"nodata": "",
"dot": false,
"ymin": "",
"ymax": "",
"removeOlder": 1,
"removeOlderPoints": "",
"removeOlderUnit": "3600",
"cutout": 0,
"useOneColor": false,
"useUTC": false,
"colors": [
"#1f77b4",
"#aec7e8",
"#ff7f0e",
"#2ca02c",
"#98df8a",
"#d62728",
"#ff9896",
"#9467bd",
"#c5b0d5"
],
"outputs": 1,
"useDifferentColor": false,
"className": "",
"x": 470,
"y": 320,
"wires": [
[]
]
},
{
"id": "cef813c19f3b2b94",
"type": "serial in",
"z": "ab3d9378cba2a69c",
"name": "Serial-In",
"serial": "93485f7d.0073f",
"x": 2220,
"y": 660,
"wires": [
[
"b797db790e9a41ac"
]
]
},
{
"id": "b797db790e9a41ac",
"type": "debug",
"z": "ab3d9378cba2a69c",
"name": "",
"active": false,
"console": "false",
"complete": "false",
"x": 2390,
"y": 660,
"wires": []
},
{
"id": "a18fd8dcfd6e2fd2",
"type": "inject",
"z": "ab3d9378cba2a69c",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "5",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "",
"payloadType": "date",
"x": 110,
"y": 180,
"wires": [
[
"058e3fb12774f792"
]
]
},
{
"id": "0880415b2616e7b2",
"type": "switch",
"z": "ab3d9378cba2a69c",
"name": "Skift",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "gt",
"v": "24",
"vt": "num"
},
{
"t": "lte",
"v": "24",
"vt": "num"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 470,
"y": 180,
"wires": [
[
"8a0d379a440dc794"
],
[
"1cb03c72e7d9e7ca"
]
]
},
{
"id": "1cb03c72e7d9e7ca",
"type": "change",
"z": "ab3d9378cba2a69c",
"name": "ON",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "1",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 730,
"y": 220,
"wires": [
[
"3fb5baad1fbccae1",
"84832452f6a2f648"
]
]
},
{
"id": "8a0d379a440dc794",
"type": "change",
"z": "ab3d9378cba2a69c",
"name": "OFF",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "0",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 730,
"y": 180,
"wires": [
[
"3fb5baad1fbccae1",
"84832452f6a2f648"
]
]
},
{
"id": "bf56e432530b0a88",
"type": "function",
"z": "ab3d9378cba2a69c",
"name": "Send to +45xxxxxxxx",
"func": "var num = \"+45xxxxxxxx\";\nvar at_cmd = \"AT+CMGS=\\\"\"+num+\"\\\"\"; \n\nmsg.payload=at_cmd+\"\\r\";\n//msg.payload.msg =msg.payload.message;\n\nreturn msg;",
"outputs": "1",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1300,
"y": 180,
"wires": [
[
"aa88b39a2c0408bb",
"07e5f1ccb3ac737f"
]
]
},
{
"id": "b90d60c466ae5f6a",
"type": "function",
"z": "ab3d9378cba2a69c",
"name": "Message - Temp2 low",
"func": "var sms_msg = \"Temp2 low\";\n\nmsg.payload=sms_msg+\"\\x1A\";\n//msg.payload.msg =msg.payload.message;\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1940,
"y": 240,
"wires": [
[
"281c130f6d424f13",
"07e5f1ccb3ac737f"
]
]
},
{
"id": "aa88b39a2c0408bb",
"type": "delay",
"z": "ab3d9378cba2a69c",
"name": "6 sec. delay",
"pauseType": "delay",
"timeout": "6",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 1670,
"y": 240,
"wires": [
[
"b90d60c466ae5f6a"
]
]
},
{
"id": "6aa1a4e756d0a0e8",
"type": "function",
"z": "ab3d9378cba2a69c",
"name": "Send to +45yyyyyyyy",
"func": "var num = \"+45yyyyyyyy\";\nvar at_cmd = \"AT+CMGS=\\\"\"+num+\"\\\"\"; \n\nmsg.payload=at_cmd+\"\\r\";\n//msg.payload.msg =msg.payload.message;\n\nreturn msg;",
"outputs": "1",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1940,
"y": 300,
"wires": [
[
"5e8c57fbe6778fdd",
"07e5f1ccb3ac737f"
]
]
},
{
"id": "fa634561f9e48bce",
"type": "function",
"z": "ab3d9378cba2a69c",
"name": "Message Temp2 low",
"func": "var sms_msg = \"Temp2 Low\";\n\nmsg.payload=sms_msg+\"\\x1A\";\n//msg.payload.msg =msg.payload.message;\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1940,
"y": 360,
"wires": [
[
"07e5f1ccb3ac737f"
]
]
},
{
"id": "3fb5baad1fbccae1",
"type": "trigger",
"z": "ab3d9378cba2a69c",
"name": "Trigger on low",
"op1": "1",
"op2": "0",
"op1type": "str",
"op2type": "str",
"duration": "0",
"extend": false,
"overrideDelay": false,
"units": "ms",
"reset": "0",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 1020,
"y": 180,
"wires": [
[
"bf56e432530b0a88"
]
]
},
{
"id": "05d0e91c59b6de09",
"type": "function",
"z": "ab3d9378cba2a69c",
"name": "Send to +45xxxxxxxx",
"func": "var num = \"+45xxxxxxxx\";\nvar at_cmd = \"AT+CMGS=\\\"\"+num+\"\\\"\"; \n\nmsg.payload=at_cmd+\"\\r\";\n//msg.payload.msg =msg.payload.message;\n\nreturn msg;",
"outputs": "1",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1340,
"y": 440,
"wires": [
[
"d100461d08710984",
"964e64c7e23327fb"
]
]
},
{
"id": "11fc35ce1893d4dc",
"type": "serial out",
"z": "ab3d9378cba2a69c",
"name": "Serail-Out",
"serial": "93485f7d.0073f",
"x": 2240,
"y": 540,
"wires": []
},
{
"id": "7b630b778a3e6fe2",
"type": "function",
"z": "ab3d9378cba2a69c",
"name": "Message - Temp2 Normal",
"func": "var sms_msg = \"Temp2 Normal\";\n\nmsg.payload=sms_msg+\"\\x1A\";\n//msg.payload.msg =msg.payload.message;\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1910,
"y": 480,
"wires": [
[
"944faccbb2a2d20f",
"964e64c7e23327fb"
]
]
},
{
"id": "94d68a51ab63167c",
"type": "function",
"z": "ab3d9378cba2a69c",
"name": "Send to +45yyyyyyyy",
"func": "var num = \"+45yyyyyyyy\";\nvar at_cmd = \"AT+CMGS=\\\"\"+num+\"\\\"\"; \n\nmsg.payload=at_cmd+\"\\r\";\n//msg.payload.msg =msg.payload.message;\n\nreturn msg;",
"outputs": "1",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1900,
"y": 540,
"wires": [
[
"8acc4828f5888dc4",
"964e64c7e23327fb"
]
]
},
{
"id": "d4a52b2bd6b2212b",
"type": "function",
"z": "ab3d9378cba2a69c",
"name": "Message - Temp2 Normal",
"func": "var sms_msg = \"Temp2 Normal\";\n\nmsg.payload=sms_msg+\"\\x1A\";\n//msg.payload.msg =msg.payload.message;\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1910,
"y": 600,
"wires": [
[
"964e64c7e23327fb"
]
]
},
{
"id": "84832452f6a2f648",
"type": "trigger",
"z": "ab3d9378cba2a69c",
"name": "Trigger on normal",
"op1": "0",
"op2": "0",
"op1type": "str",
"op2type": "str",
"duration": "0",
"extend": false,
"overrideDelay": false,
"units": "ms",
"reset": "1",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 1030,
"y": 240,
"wires": [
[
"05d0e91c59b6de09"
]
]
},
{
"id": "281c130f6d424f13",
"type": "delay",
"z": "ab3d9378cba2a69c",
"name": "3 sec. delay",
"pauseType": "delay",
"timeout": "3",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 1670,
"y": 300,
"wires": [
[
"6aa1a4e756d0a0e8"
]
]
},
{
"id": "5e8c57fbe6778fdd",
"type": "delay",
"z": "ab3d9378cba2a69c",
"name": "3 sec. delay",
"pauseType": "delay",
"timeout": "3",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 1670,
"y": 360,
"wires": [
[
"fa634561f9e48bce"
]
]
},
{
"id": "d100461d08710984",
"type": "delay",
"z": "ab3d9378cba2a69c",
"name": "2 sek forsinkelse",
"pauseType": "delay",
"timeout": "2",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 1650,
"y": 480,
"wires": [
[
"7b630b778a3e6fe2"
]
]
},
{
"id": "944faccbb2a2d20f",
"type": "delay",
"z": "ab3d9378cba2a69c",
"name": "2 sek forsinkelse",
"pauseType": "delay",
"timeout": "2",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 1650,
"y": 540,
"wires": [
[
"94d68a51ab63167c"
]
]
},
{
"id": "8acc4828f5888dc4",
"type": "delay",
"z": "ab3d9378cba2a69c",
"name": "2 sek forsinkelse",
"pauseType": "delay",
"timeout": "2",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 1650,
"y": 600,
"wires": [
[
"d4a52b2bd6b2212b"
]
]
},
{
"id": "9da459aec61619a0",
"type": "serial out",
"z": "ab3d9378cba2a69c",
"name": "Serail-Out",
"serial": "93485f7d.0073f",
"x": 2260,
"y": 280,
"wires": []
},
{
"id": "07e5f1ccb3ac737f",
"type": "function",
"z": "ab3d9378cba2a69c",
"name": "Do nothing",
"func": "\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 2270,
"y": 180,
"wires": [
[
"9da459aec61619a0",
"3a127e0eaf9415bb"
]
]
},
{
"id": "964e64c7e23327fb",
"type": "function",
"z": "ab3d9378cba2a69c",
"name": "Do nothing",
"func": "\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 2230,
"y": 440,
"wires": [
[
"11fc35ce1893d4dc",
"832a8afac877e7c6"
]
]
},
{
"id": "3a127e0eaf9415bb",
"type": "debug",
"z": "ab3d9378cba2a69c",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 2510,
"y": 180,
"wires": []
},
{
"id": "832a8afac877e7c6",
"type": "debug",
"z": "ab3d9378cba2a69c",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 2510,
"y": 440,
"wires": []
},
{
"id": "ba9be29e7ac01f9d",
"type": "ui_group",
"name": "Temp2",
"tab": "dbc3af9fe5f50809",
"order": 2,
"disp": false,
"width": "6",
"collapse": false,
"className": ""
},
{
"id": "93485f7d.0073f",
"type": "serial-port",
"serialport": "/dev/ttyUSB3",
"serialbaud": "9600",
"databits": "8",
"parity": "none",
"stopbits": "1",
"waitfor": "",
"newline": "\\n\\r",
"bin": "false",
"out": "char",
"addchar": "false",
"responsetimeout": ""
},
{
"id": "dbc3af9fe5f50809",
"type": "ui_tab",
"name": "Floes",
"icon": "dashboard",
"disabled": false,
"hidden": false
}
]