Created
January 3, 2021 10:54
-
-
Save gieljnssns/77a039bfd81fe49f6753784bd570312a to your computer and use it in GitHub Desktop.
Fermentrack -> Node-Red -> Home-Assistant
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": "ebe92c67.447448", | |
"type": "tab", | |
"label": "Flow 1", | |
"disabled": false, | |
"info": "" | |
}, | |
{ | |
"id": "10e15f88.0c7d5", | |
"type": "http in", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"url": "fermentrack", | |
"method": "post", | |
"upload": false, | |
"swaggerDoc": "", | |
"x": 90, | |
"y": 840, | |
"wires": [ | |
[ | |
"d5e59765.885f98", | |
"9070c87c.fc41c8" | |
] | |
] | |
}, | |
{ | |
"id": "d5e59765.885f98", | |
"type": "json", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"property": "payload", | |
"action": "", | |
"pretty": false, | |
"x": 130, | |
"y": 760, | |
"wires": [ | |
[ | |
"c953075b.2c44e8", | |
"3d1795a4.2c6faa", | |
"d3454b3c.e88638", | |
"99bf0db8.dfd0f", | |
"f6476325.0fc24", | |
"d1e0037.4735a", | |
"7e5c562b.bbf7d8", | |
"a113d906.70fcc8" | |
] | |
] | |
}, | |
{ | |
"id": "9070c87c.fc41c8", | |
"type": "http response", | |
"z": "ebe92c67.447448", | |
"name": "http (200)", | |
"statusCode": "200", | |
"headers": {}, | |
"x": 140, | |
"y": 940, | |
"wires": [] | |
}, | |
{ | |
"id": "30e4432c.f4a38c", | |
"type": "mqtt out", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"topic": "BrewPi/fermentrack/temperatuur_fermenteerkast", | |
"qos": "", | |
"retain": "", | |
"broker": "ac24ccdd.432f", | |
"x": 1010, | |
"y": 600, | |
"wires": [] | |
}, | |
{ | |
"id": "4b53c6db.fb3948", | |
"type": "inject", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"repeat": "60", | |
"crontab": "", | |
"once": false, | |
"onceDelay": 0.1, | |
"topic": "", | |
"payload": "online", | |
"payloadType": "str", | |
"x": 230, | |
"y": 60, | |
"wires": [ | |
[ | |
"ba4456a7.550518" | |
] | |
] | |
}, | |
{ | |
"id": "ba4456a7.550518", | |
"type": "mqtt out", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"topic": "BrewPi/status", | |
"qos": "", | |
"retain": "", | |
"broker": "ac24ccdd.432f", | |
"x": 760, | |
"y": 60, | |
"wires": [] | |
}, | |
{ | |
"id": "25d1697e.d81fe6", | |
"type": "mqtt out", | |
"z": "ebe92c67.447448", | |
"name": "Send Messages", | |
"topic": "", | |
"qos": "2", | |
"retain": "true", | |
"broker": "ac24ccdd.432f", | |
"x": 960, | |
"y": 300, | |
"wires": [] | |
}, | |
{ | |
"id": "2082ddac.7b7672", | |
"type": "function", | |
"z": "ebe92c67.447448", | |
"name": "Format config messages binary sensors", | |
"func": "var ident = \"brewpi\";\nvar name = \"BrewPi\";\nvar model = \"3B+\";\nvar manufact = \"DIY\";\n\nvar t = \"BrewPi/\";\nvar av_t = \"BrewPi/status\";\n\n// var name1 = \"Beweging badkamer pir groot\";\n// var id1 = (name1.toLowerCase()).split(' ').join('_');\n// var config1 = {\n// payload: {\n// name: name1,\n// uniq_id: id1,\n// stat_t: t+\"input/pir_groot\",\n// avty_t: av_t,\n// dev_cla: \"motion\",\n// pl_off: 0,\n// pl_on: 1,\n// dev: {\n// identifiers: [ident],\n// name: name, \n// model: model, \n// manufacturer: manufact\n \n// }\n// },\n// topic: \"homeassistant/binary_sensor/\"+ident+\"/\"+id1+\"/config\"\n// };\n// var name2 = \"Beweging badkamer pir klein\";\n// var id2 = (name2.toLowerCase()).split(' ').join('_');\n// var config2 = {\n// payload: {\n// name: name2,\n// uniq_id: id2,\n// stat_t: t+\"input/pir_klein\",\n// avty_t: av_t,\n// dev_cla: \"motion\",\n// pl_off: 0,\n// pl_on: 1,\n// dev: {\n// identifiers: [ident],\n// name: name, \n// model: model, \n// manufacturer: manufact\n \n// }\n// },\n// topic: \"homeassistant/binary_sensor/\"+ident+\"/\"+id2+\"/config\"\n// };\n// var name3 = \"Beweging Keuken Camera\";\n// var id3 = (name3.toLowerCase()).split(' ').join('_');\n// var config3 = {\n// payload: {\n// name: name3,\n// uniq_id: id3,\n// stat_t: t+\"motion\",\n// avty_t: av_t,\n// dev_cla: \"motion\",\n// pl_off: \"FALSE\",\n// pl_on: \"TRUE\",\n// dev: {\n// identifiers: [ident],\n// name: name, \n// model: model, \n// manufacturer: manufact\n \n// }\n// },\n// topic: \"homeassistant/binary_sensor/\"+ident+\"/\"+id3+\"/config\"\n// };\nvar name4 = \"BrewPi throttle\";\nvar id4 = (name4.toLowerCase()).split(' ').join('_');\nvar config4 = {\n payload: {\n name: name4,\n uniq_id: id4,\n stat_t: t+\"system/throttle\",\n avty_t: av_t,\n dev_cla: \"problem\",\n pl_off: \"false\",\n pl_on: \"true\",\n dev: {\n identifiers: [ident],\n name: name, \n model: model, \n manufacturer: manufact\n \n }\n },\n topic: \"homeassistant/binary_sensor/\"+ident+\"/\"+id4+\"/config\"\n};\nvar name5 = \"BrewPi undervoltage\";\nvar id5 = (name5.toLowerCase()).split(' ').join('_');\nvar config5 = {\n payload: {\n name: name5,\n uniq_id: id5,\n stat_t: t+\"system/undervoltage\",\n avty_t: av_t,\n dev_cla: \"problem\",\n pl_off: \"false\",\n pl_on: \"true\",\n dev: {\n identifiers: [ident],\n name: name, \n model: model, \n manufacturer: manufact\n \n }\n },\n topic: \"homeassistant/binary_sensor/\"+ident+\"/\"+id5+\"/config\"\n};\nvar name6 = \"BrewPi online\";\nvar id6 = (name6.toLowerCase()).split(' ').join('_');\nvar config6 = {\n payload: {\n name: name6,\n uniq_id: id6,\n stat_t: t+\"status\",\n avty_t: av_t,\n dev_cla: \"connectivity\",\n pl_off: \"offline\",\n pl_on: \"online\",\n off_dly: 75,\n dev: {\n identifiers: [ident],\n name: name, \n model: model, \n manufacturer: manufact\n \n }\n },\n topic: \"homeassistant/binary_sensor/\"+ident+\"/\"+id6+\"/config\"\n};\n\nreturn [config4, config5, config6];\n\n", | |
"outputs": 3, | |
"noerr": 0, | |
"initialize": "", | |
"finalize": "", | |
"x": 468, | |
"y": 193, | |
"wires": [ | |
[ | |
"25d1697e.d81fe6" | |
], | |
[ | |
"25d1697e.d81fe6" | |
], | |
[ | |
"25d1697e.d81fe6" | |
] | |
] | |
}, | |
{ | |
"id": "1ec1471a.f824e9", | |
"type": "inject", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"repeat": "", | |
"crontab": "", | |
"once": true, | |
"topic": "", | |
"payload": "Started!", | |
"payloadType": "str", | |
"x": 140, | |
"y": 300, | |
"wires": [ | |
[ | |
"2082ddac.7b7672", | |
"5fdbf959.910bb8" | |
] | |
] | |
}, | |
{ | |
"id": "5fdbf959.910bb8", | |
"type": "function", | |
"z": "ebe92c67.447448", | |
"name": "Format config messages sensors", | |
"func": "var ident = \"brewpi\";\nvar name = \"BrewPi\";\nvar model = \"3B+\";\nvar manufact = \"DIY\";\n\nvar t = \"BrewPi/\";\nvar av_t = \"BrewPi/status\";\n\nvar name1 = \"Temperatuur bier\";\nvar id1 = (name1.toLowerCase()).split(' ').join('_');\nvar config1 = {\n payload: {\n name: name1,\n uniq_id: id1,\n stat_t: t+\"fermentrack/temperatuur_bier\",\n avty_t: av_t,\n dev_cla: \"temperature\",\n unit_of_meas: \"°C\",\n ic: \"mdi:glass-mug-variant\",\n dev: {\n identifiers: [ident],\n name: name, \n model: model, \n manufacturer: manufact\n \n }\n },\n topic: \"homeassistant/sensor/\"+ident+\"/\"+id1+\"/config\"\n};\nvar name2 = \"Temperatuur fermenteerkast\";\nvar id2 = (name2.toLowerCase()).split(' ').join('_');\nvar config2 = {\n payload: {\n name: name2,\n uniq_id: id2,\n stat_t: t+\"fermentrack/temperatuur_fermenteerkast\",\n avty_t: av_t,\n dev_cla: \"temperature\",\n unit_of_meas: \"°C\",\n ic: \"mdi:fridge-industrial-outline\",\n dev: {\n identifiers: [ident],\n name: name, \n model: model, \n manufacturer: manufact\n \n }\n },\n topic: \"homeassistant/sensor/\"+ident+\"/\"+id2+\"/config\"\n};\nvar name3 = \"Temperatuur cpu BrewPi\";\nvar id3 = (name3.toLowerCase()).split(' ').join('_');\nvar config3 = {\n payload: {\n name: name3,\n uniq_id: id3,\n stat_t: t+\"system/temp\",\n avty_t: av_t,\n dev_cla: \"temperature\",\n unit_of_meas: \"°C\",\n dev: {\n identifiers: [ident],\n name: name, \n model: model, \n manufacturer: manufact\n \n }\n },\n topic: \"homeassistant/sensor/\"+ident+\"/\"+id3+\"/config\"\n};\nvar name4 = \"Cpu BrewPi\";\nvar id4 = (name4.toLowerCase()).split(' ').join('_');\nvar config4 = {\n payload: {\n name: name4,\n uniq_id: id4,\n stat_t: t+\"system/cpu\",\n avty_t: av_t,\n unit_of_meas: \"%\",\n ic: \"mdi:cpu-32-bit\",\n dev: {\n identifiers: [ident],\n name: name, \n model: model, \n manufacturer: manufact\n \n }\n },\n topic: \"homeassistant/sensor/\"+ident+\"/\"+id4+\"/config\"\n};\nvar name5 = \"Ram BrewPi\";\nvar id5 = (name5.toLowerCase()).split(' ').join('_');\nvar config5 = {\n payload: {\n name: name5,\n uniq_id: id5,\n stat_t: t+\"system/mem\",\n avty_t: av_t,\n unit_of_meas: \"%\",\n ic: \"mdi:memory\",\n dev: {\n identifiers: [ident],\n name: name, \n model: model, \n manufacturer: manufact\n \n }\n },\n topic: \"homeassistant/sensor/\"+ident+\"/\"+id5+\"/config\"\n};\nvar name6 = \"Swap BrewPi\";\nvar id6 = (name6.toLowerCase()).split(' ').join('_');\nvar config6 = {\n payload: {\n name: name6,\n uniq_id: id6,\n stat_t: t+\"system/swap\",\n avty_t: av_t,\n unit_of_meas: \"%\",\n ic: \"mdi:memory\",\n dev: {\n identifiers: [ident],\n name: name, \n model: model, \n manufacturer: manufact\n \n }\n },\n topic: \"homeassistant/sensor/\"+ident+\"/\"+id6+\"/config\"\n};\nvar name7 = \"Uptime BrewPi\";\nvar id7 = (name7.toLowerCase()).split(' ').join('_');\nvar config7 = {\n payload: {\n name: name7,\n uniq_id: id7,\n stat_t: t+\"system/uptime\",\n avty_t: av_t,\n ic: \"mdi:av-timer\",\n dev: {\n identifiers: [ident],\n name: name, \n model: model, \n manufacturer: manufact\n \n }\n },\n topic: \"homeassistant/sensor/\"+ident+\"/\"+id7+\"/config\"\n};\nvar name9 = \"Temperatuur garage\";\nvar id9 = (name9.toLowerCase()).split(' ').join('_');\nvar config9 = {\n payload: {\n name: name9,\n uniq_id: id9,\n stat_t: t+\"fermentrack/temperatuur_garage\",\n avty_t: av_t,\n dev_cla: \"temperature\",\n unit_of_meas: \"°C\",\n dev: {\n identifiers: [ident],\n name: name, \n model: model, \n manufacturer: manufact\n \n }\n },\n topic: \"homeassistant/sensor/\"+ident+\"/\"+id9+\"/config\"\n};\nvar name10 = \"Fermenteer modus\";\nvar id10 = (name10.toLowerCase()).split(' ').join('_');\nvar config10 = {\n payload: {\n name: name10,\n uniq_id: id10,\n stat_t: t+\"fermentrack/control_mode\",\n avty_t: av_t,\n ic: \"mdi:glass-mug-variant\",\n dev: {\n identifiers: [ident],\n name: name, \n model: model, \n manufacturer: manufact\n \n }\n },\n topic: \"homeassistant/sensor/\"+ident+\"/\"+id10+\"/config\"\n};\nvar name11 = \"Setpunt fermenteerkast\";\nvar id11 = (name11.toLowerCase()).split(' ').join('_');\nvar config11 = {\n payload: {\n name: name11,\n uniq_id: id11,\n stat_t: t+\"fermentrack/setpunt_fermenteerkast\",\n avty_t: av_t,\n dev_cla: \"temperature\",\n ic: \"mdi:fridge-industrial-outline\",\n unit_of_meas: \"°C\",\n dev: {\n identifiers: [ident],\n name: name, \n model: model, \n manufacturer: manufact\n \n }\n },\n topic: \"homeassistant/sensor/\"+ident+\"/\"+id11+\"/config\"\n};\nvar name12 = \"Setpunt bier\";\nvar id12 = (name12.toLowerCase()).split(' ').join('_');\nvar config12 = {\n payload: {\n name: name12,\n uniq_id: id12,\n stat_t: t+\"fermentrack/setpunt_bier\",\n avty_t: av_t,\n dev_cla: \"temperature\",\n ic: \"mdi:glass-mug-variant\",\n unit_of_meas: \"°C\",\n dev: {\n identifiers: [ident],\n name: name, \n model: model, \n manufacturer: manufact\n \n }\n },\n topic: \"homeassistant/sensor/\"+ident+\"/\"+id12+\"/config\"\n};\nvar name13 = \"Controller status\";\nvar id13 = (name13.toLowerCase()).split(' ').join('_');\nvar config13 = {\n payload: {\n name: name13,\n uniq_id: id13,\n stat_t: t+\"fermentrack/controller_state\",\n avty_t: av_t,\n dev: {\n identifiers: [ident],\n name: name, \n model: model, \n manufacturer: manufact\n \n }\n },\n topic: \"homeassistant/sensor/\"+ident+\"/\"+id13+\"/config\"\n};\n\nreturn [config1, config2, config3, config4, config5, config6, config7, config9, config10, config11, config12, config13];\n", | |
"outputs": 12, | |
"noerr": 0, | |
"initialize": "", | |
"finalize": "", | |
"x": 475, | |
"y": 376, | |
"wires": [ | |
[ | |
"25d1697e.d81fe6" | |
], | |
[ | |
"25d1697e.d81fe6" | |
], | |
[ | |
"25d1697e.d81fe6" | |
], | |
[ | |
"25d1697e.d81fe6" | |
], | |
[ | |
"25d1697e.d81fe6" | |
], | |
[ | |
"25d1697e.d81fe6" | |
], | |
[ | |
"25d1697e.d81fe6" | |
], | |
[ | |
"25d1697e.d81fe6" | |
], | |
[ | |
"25d1697e.d81fe6" | |
], | |
[ | |
"25d1697e.d81fe6" | |
], | |
[ | |
"25d1697e.d81fe6" | |
], | |
[ | |
"25d1697e.d81fe6" | |
] | |
] | |
}, | |
{ | |
"id": "34c34c4c.c29544", | |
"type": "inject", | |
"z": "ebe92c67.447448", | |
"name": "Elke minuut", | |
"repeat": "60", | |
"crontab": "", | |
"once": false, | |
"onceDelay": 0.1, | |
"topic": "", | |
"payload": "", | |
"payloadType": "date", | |
"x": 110, | |
"y": 1300, | |
"wires": [ | |
[ | |
"e8fabbd3.c17008", | |
"fe700a68.6cd988", | |
"e2e38ba0.1e06b8", | |
"2390fe43.589f52" | |
] | |
] | |
}, | |
{ | |
"id": "366dab7d.6c4714", | |
"type": "inject", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"repeat": "10", | |
"crontab": "", | |
"once": false, | |
"onceDelay": "", | |
"topic": "", | |
"payload": "", | |
"payloadType": "date", | |
"x": 250, | |
"y": 1640, | |
"wires": [ | |
[ | |
"22bf706f.619fd" | |
] | |
] | |
}, | |
{ | |
"id": "264f1a62.64f226", | |
"type": "function", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"func": "msg.payload = msg.payload.memusage;\nreturn msg;", | |
"outputs": 1, | |
"noerr": 0, | |
"x": 673, | |
"y": 1420, | |
"wires": [ | |
[ | |
"460ad57f.14da0c" | |
] | |
] | |
}, | |
{ | |
"id": "beeadccd.ec56c", | |
"type": "function", | |
"z": "ebe92c67.447448", | |
"name": "Undervoltage", | |
"func": "msg.payload = msg.payload.underVoltage;\nreturn msg;", | |
"outputs": 1, | |
"noerr": 0, | |
"x": 684, | |
"y": 1203, | |
"wires": [ | |
[ | |
"af830d2e.87403" | |
] | |
] | |
}, | |
{ | |
"id": "2e5de56e.c2818a", | |
"type": "function", | |
"z": "ebe92c67.447448", | |
"name": "Throttle", | |
"func": "msg.payload = msg.payload.throttled;\nreturn msg;", | |
"outputs": 1, | |
"noerr": 0, | |
"x": 680, | |
"y": 1260, | |
"wires": [ | |
[ | |
"6768711e.5c52d" | |
] | |
] | |
}, | |
{ | |
"id": "87b57e2e.7c6a3", | |
"type": "mqtt out", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"topic": "BrewPi/system/temp", | |
"qos": "", | |
"retain": "", | |
"broker": "ac24ccdd.432f", | |
"x": 934, | |
"y": 1358, | |
"wires": [] | |
}, | |
{ | |
"id": "7e92a5af.7641cc", | |
"type": "mqtt out", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"topic": "BrewPi/system/cpu", | |
"qos": "", | |
"retain": "", | |
"broker": "ac24ccdd.432f", | |
"x": 916.5, | |
"y": 1650.75, | |
"wires": [] | |
}, | |
{ | |
"id": "460ad57f.14da0c", | |
"type": "mqtt out", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"topic": "BrewPi/system/mem", | |
"qos": "", | |
"retain": "", | |
"broker": "ac24ccdd.432f", | |
"x": 934, | |
"y": 1420, | |
"wires": [] | |
}, | |
{ | |
"id": "af830d2e.87403", | |
"type": "mqtt out", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"topic": "BrewPi/system/undervoltage", | |
"qos": "", | |
"retain": "", | |
"broker": "ac24ccdd.432f", | |
"x": 937, | |
"y": 1200, | |
"wires": [] | |
}, | |
{ | |
"id": "6768711e.5c52d", | |
"type": "mqtt out", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"topic": "BrewPi/system/throttle", | |
"qos": "", | |
"retain": "", | |
"broker": "ac24ccdd.432f", | |
"x": 902, | |
"y": 1265, | |
"wires": [] | |
}, | |
{ | |
"id": "e2e38ba0.1e06b8", | |
"type": "exec", | |
"z": "ebe92c67.447448", | |
"command": "free -m | grep Swap | awk '{printf \"%.2f\\n\", $3/$2 * 100}'", | |
"addpay": false, | |
"append": "", | |
"useSpawn": "false", | |
"timer": "", | |
"oldrc": false, | |
"name": "Swap %", | |
"x": 524.5, | |
"y": 1564.25, | |
"wires": [ | |
[ | |
"473d6176.ddc92" | |
], | |
[], | |
[] | |
] | |
}, | |
{ | |
"id": "473d6176.ddc92", | |
"type": "mqtt out", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"topic": "BrewPi/system/swap", | |
"qos": "", | |
"retain": "", | |
"broker": "ac24ccdd.432f", | |
"x": 934.5, | |
"y": 1564.25, | |
"wires": [] | |
}, | |
{ | |
"id": "7804747d.f22acc", | |
"type": "inject", | |
"z": "ebe92c67.447448", | |
"name": "update", | |
"repeat": "3600", | |
"crontab": "", | |
"once": true, | |
"onceDelay": "", | |
"topic": "", | |
"payload": "", | |
"payloadType": "date", | |
"x": 298, | |
"y": 1720, | |
"wires": [ | |
[ | |
"15434a72.60d606" | |
] | |
] | |
}, | |
{ | |
"id": "c6e7b157.7a8c1", | |
"type": "function", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"func": "function timeConversion(millisec) {\n\n var hours = (millisec / (1000 * 60 * 60)).toFixed(1);\n\n return hours ;\n\n}\n\nmsg.payload = timeConversion(msg.payload.uptime * 1000);\nreturn msg;", | |
"outputs": 1, | |
"noerr": 0, | |
"x": 640, | |
"y": 1720, | |
"wires": [ | |
[ | |
"f7ecd892.269918" | |
] | |
] | |
}, | |
{ | |
"id": "f7ecd892.269918", | |
"type": "mqtt out", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"topic": "BrewPi/system/uptime", | |
"qos": "", | |
"retain": "", | |
"broker": "ac24ccdd.432f", | |
"x": 902, | |
"y": 1723, | |
"wires": [] | |
}, | |
{ | |
"id": "15434a72.60d606", | |
"type": "Uptime", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"x": 480, | |
"y": 1720, | |
"wires": [ | |
[ | |
"c6e7b157.7a8c1" | |
] | |
] | |
}, | |
{ | |
"id": "fe700a68.6cd988", | |
"type": "Memory", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"x": 500, | |
"y": 1420, | |
"wires": [ | |
[ | |
"264f1a62.64f226" | |
] | |
] | |
}, | |
{ | |
"id": "2390fe43.589f52", | |
"type": "vcgencmd", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"command": "get_throttled", | |
"codec": "H264", | |
"clock": "core", | |
"voltage": "core", | |
"memory": "arm", | |
"videoOutput": "0", | |
"separateMsg": false, | |
"x": 480, | |
"y": 1200, | |
"wires": [ | |
[ | |
"beeadccd.ec56c", | |
"2e5de56e.c2818a" | |
] | |
] | |
}, | |
{ | |
"id": "e8fabbd3.c17008", | |
"type": "vcgencmd", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"command": "measure_temp", | |
"codec": "H264", | |
"clock": "core", | |
"voltage": "core", | |
"memory": "arm", | |
"videoOutput": "0", | |
"separateMsg": false, | |
"x": 520, | |
"y": 1360, | |
"wires": [ | |
[ | |
"87b57e2e.7c6a3" | |
] | |
] | |
}, | |
{ | |
"id": "22bf706f.619fd", | |
"type": "cpu", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"msgCore": false, | |
"msgOverall": true, | |
"msgArray": false, | |
"msgTemp": false, | |
"x": 508.5, | |
"y": 1645.75, | |
"wires": [ | |
[ | |
"7e92a5af.7641cc" | |
] | |
] | |
}, | |
{ | |
"id": "623b0113.380c1", | |
"type": "mqtt out", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"topic": "BrewPi/fermentrack/temperatuur_garage", | |
"qos": "", | |
"retain": "", | |
"broker": "ac24ccdd.432f", | |
"x": 980, | |
"y": 660, | |
"wires": [] | |
}, | |
{ | |
"id": "3a247422.7f990c", | |
"type": "mqtt out", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"topic": "BrewPi/fermentrack/temperatuur_bier", | |
"qos": "", | |
"retain": "", | |
"broker": "ac24ccdd.432f", | |
"x": 970, | |
"y": 780, | |
"wires": [] | |
}, | |
{ | |
"id": "fb7a2113.402b8", | |
"type": "mqtt out", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"topic": "BrewPi/fermentrack/control_mode", | |
"qos": "", | |
"retain": "", | |
"broker": "ac24ccdd.432f", | |
"x": 960, | |
"y": 840, | |
"wires": [] | |
}, | |
{ | |
"id": "f0bbbec5.55a7d", | |
"type": "debug", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"active": false, | |
"tosidebar": true, | |
"console": false, | |
"tostatus": false, | |
"complete": "false", | |
"statusVal": "", | |
"statusType": "auto", | |
"x": 1250, | |
"y": 500, | |
"wires": [] | |
}, | |
{ | |
"id": "630150b3.63c46", | |
"type": "debug", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"active": false, | |
"tosidebar": true, | |
"console": false, | |
"tostatus": false, | |
"complete": "false", | |
"statusVal": "", | |
"statusType": "auto", | |
"x": 1250, | |
"y": 560, | |
"wires": [] | |
}, | |
{ | |
"id": "c953075b.2c44e8", | |
"type": "change", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"rules": [ | |
{ | |
"t": "set", | |
"p": "payload", | |
"pt": "msg", | |
"to": "payload.brewpi_devices[0].fridge_setting", | |
"tot": "jsonata" | |
} | |
], | |
"action": "", | |
"property": "", | |
"from": "", | |
"to": "", | |
"reg": false, | |
"x": 500, | |
"y": 520, | |
"wires": [ | |
[ | |
"f0bbbec5.55a7d", | |
"de9d3c93.5c8b5" | |
] | |
] | |
}, | |
{ | |
"id": "3d1795a4.2c6faa", | |
"type": "change", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"rules": [ | |
{ | |
"t": "set", | |
"p": "payload", | |
"pt": "msg", | |
"to": "payload.brewpi_devices[0].fridge_temp", | |
"tot": "jsonata" | |
} | |
], | |
"action": "", | |
"property": "", | |
"from": "", | |
"to": "", | |
"reg": false, | |
"x": 500, | |
"y": 580, | |
"wires": [ | |
[ | |
"630150b3.63c46", | |
"30e4432c.f4a38c" | |
] | |
] | |
}, | |
{ | |
"id": "d3454b3c.e88638", | |
"type": "change", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"rules": [ | |
{ | |
"t": "set", | |
"p": "payload", | |
"pt": "msg", | |
"to": "payload.brewpi_devices[0].room_temp", | |
"tot": "jsonata" | |
} | |
], | |
"action": "", | |
"property": "", | |
"from": "", | |
"to": "", | |
"reg": false, | |
"x": 500, | |
"y": 640, | |
"wires": [ | |
[ | |
"ba8d1ab2.f58a28", | |
"623b0113.380c1" | |
] | |
] | |
}, | |
{ | |
"id": "99bf0db8.dfd0f", | |
"type": "change", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"rules": [ | |
{ | |
"t": "set", | |
"p": "payload", | |
"pt": "msg", | |
"to": "payload.brewpi_devices[0].beer_setting", | |
"tot": "jsonata" | |
} | |
], | |
"action": "", | |
"property": "", | |
"from": "", | |
"to": "", | |
"reg": false, | |
"x": 500, | |
"y": 700, | |
"wires": [ | |
[ | |
"b0aff747.bc3888", | |
"900f5af3.e19918" | |
] | |
] | |
}, | |
{ | |
"id": "f6476325.0fc24", | |
"type": "change", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"rules": [ | |
{ | |
"t": "set", | |
"p": "payload", | |
"pt": "msg", | |
"to": "payload.brewpi_devices[0]. beer_temp", | |
"tot": "jsonata" | |
} | |
], | |
"action": "", | |
"property": "", | |
"from": "", | |
"to": "", | |
"reg": false, | |
"x": 500, | |
"y": 760, | |
"wires": [ | |
[ | |
"fabc5be1.42a9f8", | |
"3a247422.7f990c" | |
] | |
] | |
}, | |
{ | |
"id": "d1e0037.4735a", | |
"type": "change", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"rules": [ | |
{ | |
"t": "set", | |
"p": "payload", | |
"pt": "msg", | |
"to": "payload.brewpi_devices[0].control_mode", | |
"tot": "jsonata" | |
} | |
], | |
"action": "", | |
"property": "", | |
"from": "", | |
"to": "", | |
"reg": false, | |
"x": 500, | |
"y": 820, | |
"wires": [ | |
[ | |
"cf8e200e.d607a" | |
] | |
] | |
}, | |
{ | |
"id": "7e5c562b.bbf7d8", | |
"type": "change", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"rules": [ | |
{ | |
"t": "set", | |
"p": "payload", | |
"pt": "msg", | |
"to": "payload.brewpi_devices[0].controller_state", | |
"tot": "jsonata" | |
} | |
], | |
"action": "", | |
"property": "", | |
"from": "", | |
"to": "", | |
"reg": false, | |
"x": 500, | |
"y": 940, | |
"wires": [ | |
[ | |
"77c78e0d.52384", | |
"a113d906.70fcc8" | |
] | |
] | |
}, | |
{ | |
"id": "539c6363.e79a2c", | |
"type": "mqtt out", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"topic": "BrewPi/fermentrack/setpunt_fermenteerkast", | |
"qos": "", | |
"retain": "", | |
"broker": "ac24ccdd.432f", | |
"x": 990, | |
"y": 540, | |
"wires": [] | |
}, | |
{ | |
"id": "876caa36.adee58", | |
"type": "mqtt out", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"topic": "BrewPi/fermentrack/setpunt_bier", | |
"qos": "", | |
"retain": "", | |
"broker": "ac24ccdd.432f", | |
"x": 960, | |
"y": 720, | |
"wires": [] | |
}, | |
{ | |
"id": "4b802006.c188f", | |
"type": "mqtt out", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"topic": "BrewPi/fermentrack/controller_state", | |
"qos": "", | |
"retain": "", | |
"broker": "ac24ccdd.432f", | |
"x": 970, | |
"y": 960, | |
"wires": [] | |
}, | |
{ | |
"id": "ba8d1ab2.f58a28", | |
"type": "debug", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"active": false, | |
"tosidebar": true, | |
"console": false, | |
"tostatus": false, | |
"complete": "false", | |
"statusVal": "", | |
"statusType": "auto", | |
"x": 1250, | |
"y": 620, | |
"wires": [] | |
}, | |
{ | |
"id": "b0aff747.bc3888", | |
"type": "debug", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"active": false, | |
"tosidebar": true, | |
"console": false, | |
"tostatus": false, | |
"complete": "false", | |
"statusVal": "", | |
"statusType": "auto", | |
"x": 1250, | |
"y": 680, | |
"wires": [] | |
}, | |
{ | |
"id": "fabc5be1.42a9f8", | |
"type": "debug", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"active": false, | |
"tosidebar": true, | |
"console": false, | |
"tostatus": false, | |
"complete": "false", | |
"statusVal": "", | |
"statusType": "auto", | |
"x": 1250, | |
"y": 740, | |
"wires": [] | |
}, | |
{ | |
"id": "8d1621b1.c04cb", | |
"type": "debug", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"active": false, | |
"tosidebar": true, | |
"console": false, | |
"tostatus": false, | |
"complete": "false", | |
"statusVal": "", | |
"statusType": "auto", | |
"x": 1250, | |
"y": 800, | |
"wires": [] | |
}, | |
{ | |
"id": "a113d906.70fcc8", | |
"type": "debug", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"active": false, | |
"tosidebar": true, | |
"console": false, | |
"tostatus": false, | |
"complete": "false", | |
"statusVal": "", | |
"statusType": "auto", | |
"x": 1110, | |
"y": 1080, | |
"wires": [] | |
}, | |
{ | |
"id": "cf8e200e.d607a", | |
"type": "function", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"func": "var newMsg = {}\nif (msg.payload === \"f\"){\n newMsg.payload = \"Ijskast constant\"\n} else if (msg.payload === \"b\"){\n newMsg.payload = \"Bier constant\"\n} else if (msg.payload === \"o\"){\n newMsg.payload = \"Uit\"\n} else if (msg.payload === \"p\"){\n newMsg.payload = \"Bier profiel\"\n}\nreturn newMsg", | |
"outputs": 1, | |
"noerr": 0, | |
"initialize": "", | |
"finalize": "", | |
"x": 680, | |
"y": 820, | |
"wires": [ | |
[ | |
"8d1621b1.c04cb", | |
"fb7a2113.402b8" | |
] | |
] | |
}, | |
{ | |
"id": "77c78e0d.52384", | |
"type": "function", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"func": "var newMsg = {}\nif (msg.payload === 0){\n newMsg.payload = \"Inactief\"\n} else if (msg.payload === 1){\n newMsg.payload = \"Uit\"\n} else if (msg.payload === 2){\n newMsg.payload = \"Deur open\"\n} else if (msg.payload === 3){\n newMsg.payload = \"Verwarmen\"\n} else if (msg.payload === 4){\n newMsg.payload = \"Koelen\"\n} else if (msg.payload === 5){\n newMsg.payload = \"Wachten op koelen\"\n} else if (msg.payload === 6){\n newMsg.payload = \"Wachten op verwarmen\"\n} else if (msg.payload === 7){\n newMsg.payload = \"Wachten op piek detectie\"\n} else if (msg.payload === 8){\n newMsg.payload = \"Minumum koeltijd\"\n} else if (msg.payload === 9){\n newMsg.payload = \"Minumum verwarmtijd\"\n} else if (msg.payload === undefined){\n newMsg.payload = \"Uit\"\n// } else if (msg.payload === \"WAITING_FOR_PEAK_DETECT\"){\n// newMsg.payload = \"Bier profiel\"\n// } else if (msg.payload === \"COOLING_MIN_TIME\"){\n// newMsg.payload = \"Bier constant\"\n// } else if (msg.payload === \"HEATING_MIN_TIME\"){\n// newMsg.payload = \"Uit\"\n// } else if (msg.payload === \"NUM_STATES\"){\n// newMsg.payload = \"Bier profiel\"\n}\nreturn newMsg", | |
"outputs": 1, | |
"noerr": 0, | |
"initialize": "", | |
"finalize": "", | |
"x": 680, | |
"y": 940, | |
"wires": [ | |
[ | |
"a113d906.70fcc8", | |
"4b802006.c188f" | |
] | |
] | |
}, | |
{ | |
"id": "900f5af3.e19918", | |
"type": "function", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"func": "var newMsg = {}\nif (msg.payload === undefined){\n newMsg.payload = 0\n} else {\n newMsg.payload = msg.payload\n} \nreturn newMsg\n// return msg;", | |
"outputs": 1, | |
"noerr": 0, | |
"initialize": "", | |
"finalize": "", | |
"x": 710, | |
"y": 720, | |
"wires": [ | |
[ | |
"876caa36.adee58", | |
"b0aff747.bc3888" | |
] | |
] | |
}, | |
{ | |
"id": "de9d3c93.5c8b5", | |
"type": "function", | |
"z": "ebe92c67.447448", | |
"name": "", | |
"func": "var newMsg = {}\nif (msg.payload === undefined){\n newMsg.payload = 0\n} else {\n newMsg.payload = msg.payload\n} \nreturn newMsg", | |
"outputs": 1, | |
"noerr": 0, | |
"initialize": "", | |
"finalize": "", | |
"x": 710, | |
"y": 540, | |
"wires": [ | |
[ | |
"539c6363.e79a2c", | |
"f0bbbec5.55a7d" | |
] | |
] | |
}, | |
{ | |
"id": "ac24ccdd.432f", | |
"type": "mqtt-broker", | |
"name": "Home-Assistant broker", | |
"broker": "192.168.xx.xx", | |
"port": "1883", | |
"clientid": "", | |
"usetls": false, | |
"compatmode": false, | |
"keepalive": "60", | |
"cleansession": true, | |
"birthTopic": "BrewPi/status", | |
"birthQos": "0", | |
"birthRetain": "true", | |
"birthPayload": "online", | |
"closeTopic": "BrewPi/status", | |
"closeQos": "0", | |
"closeRetain": "true", | |
"closePayload": "offline", | |
"willTopic": "BrewPi/status", | |
"willQos": "0", | |
"willRetain": "false", | |
"willPayload": "offline" | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment