-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsenseguardvalues.json
1 lines (1 loc) · 3.63 KB
/
senseguardvalues.json
1
[{"id":"7b7b19e2fc862a9f","type":"debug","z":"3a763adab0a2a52d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":670,"y":520,"wires":[]},{"id":"23de08cd8cb6a97b","type":"grohe sense","z":"3a763adab0a2a52d","location":"dd73ac27fcefb839","room":"Wasserkeller","appliance":"SenseGuard","devicetype":"103","description":"","x":470,"y":580,"wires":[["7b7b19e2fc862a9f","bd24c47420703f63"]]},{"id":"14b6ad38fdd5d0ba","type":"function","z":"3a763adab0a2a52d","name":"data","func":"let end = new Date();\nlet start = new Date();\nstart.setDate(end.getDate() - 1); // last 7 days.\n\nmsg.payload = {\n data : {\n from : start,\n to : end\n }\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":310,"y":580,"wires":[["23de08cd8cb6a97b"]]},{"id":"68a9366d77195f99","type":"inject","z":"3a763adab0a2a52d","name":"get data","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":580,"wires":[["14b6ad38fdd5d0ba"]]},{"id":"c0a9dfee3e704da4","type":"ui_gauge","z":"3a763adab0a2a52d","name":"Pressure","group":"69e015f0.4b91cc","order":1,"width":0,"height":0,"gtype":"gage","title":"Pressure","label":"bar","format":"{{value | number:1}}","min":0,"max":"10","colors":["#b30000","#3de600","#cb3a3a"],"seg1":"2","seg2":"8","className":"","x":900,"y":600,"wires":[]},{"id":"d2538cdd239df062","type":"ui_text","z":"3a763adab0a2a52d","group":"69e015f0.4b91cc","order":4,"width":0,"height":0,"name":"","label":"Timestamp","format":"{{msg.payload}}","layout":"row-spread","className":"","x":910,"y":520,"wires":[]},{"id":"1cc844b74a67b602","type":"ui_gauge","z":"3a763adab0a2a52d","name":"Temperature","group":"69e015f0.4b91cc","order":1,"width":0,"height":0,"gtype":"gage","title":"Temperature","label":"C","format":"{{value | number:1}}","min":0,"max":"30","colors":["#000cb3","#3de600","#cb3a3a"],"seg1":"10","seg2":"20","className":"","x":910,"y":640,"wires":[]},{"id":"bd24c47420703f63","type":"function","z":"3a763adab0a2a52d","name":"last values","func":"if (msg.payload.data){\n const culture = 'de-DE';\n let measurement = msg.payload.data.measurement;\n // let measurementCount = measurement.length;\n\n let lastMeasurement = measurement[0];\n\n let timestamp = new Date(lastMeasurement.date);\n\n let msg1 = { \n payload: timestamp.toLocaleDateString(culture) + ' ' + timestamp.toLocaleTimeString(culture)\n };\n let msg2 = {\n payload: lastMeasurement.flowrate\n };\n let msg3 = {\n payload: lastMeasurement.pressure\n };\n let msg4 = {\n payload: lastMeasurement.temperature_guard\n };\n\n let msgs = [msg1, msg2, msg3, msg4];\n return msgs;\n}\n","outputs":4,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":670,"y":580,"wires":[["d2538cdd239df062"],["52ff3d121ccac48f"],["c0a9dfee3e704da4"],["1cc844b74a67b602"]]},{"id":"52ff3d121ccac48f","type":"ui_gauge","z":"3a763adab0a2a52d","name":"Flowrate","group":"69e015f0.4b91cc","order":1,"width":0,"height":0,"gtype":"gage","title":"Flowrate","label":"l","format":"{{value | number:1}}","min":0,"max":"1000","colors":["#00ff00","#ff8000","#cb3a3a"],"seg1":"10","seg2":"200","className":"","x":900,"y":560,"wires":[]},{"id":"dd73ac27fcefb839","type":"grohe location","location":"Haus"},{"id":"69e015f0.4b91cc","type":"ui_group","name":"SenseGuard","tab":"933900f0656633c1","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"933900f0656633c1","type":"ui_tab","name":"Grohe","icon":"fa-tint","disabled":false,"hidden":false}]