-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
sensevalues.json
1 lines (1 loc) · 3.16 KB
/
sensevalues.json
1
[{"id":"9163d544523b289f","type":"debug","z":"3a763adab0a2a52d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":670,"y":700,"wires":[]},{"id":"b1b910e3534f924a","type":"grohe sense","z":"3a763adab0a2a52d","location":"dd73ac27fcefb839","room":"Wasserkeller","appliance":"Sense3","devicetype":"101","description":"","x":460,"y":760,"wires":[["9163d544523b289f","f35f2bf742dab378"]]},{"id":"03c336778a8c2d8d","type":"function","z":"3a763adab0a2a52d","name":"data","func":"let now = Date.now();\nlet end = now;\nlet start = now - 24 * 60 * 60000;\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":760,"wires":[["b1b910e3534f924a"]]},{"id":"65dabdd68891892d","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":760,"wires":[["03c336778a8c2d8d"]]},{"id":"9c17e2ba9bce7b30","type":"ui_gauge","z":"3a763adab0a2a52d","name":"Humidity","group":"3ed382093da5193c","order":1,"width":0,"height":0,"gtype":"gage","title":"Humidity","label":"%","format":"{{value | number:1}}","min":0,"max":"100","colors":["#b30000","#3de600","#cb3a3a"],"seg1":"40","seg2":"80","className":"","x":900,"y":800,"wires":[]},{"id":"ae3b7dd5c2452035","type":"ui_text","z":"3a763adab0a2a52d","group":"3ed382093da5193c","order":4,"width":0,"height":0,"name":"","label":"Timestamp","format":"{{msg.payload}}","layout":"row-spread","className":"","x":910,"y":720,"wires":[]},{"id":"5436b44d7e4e52af","type":"ui_gauge","z":"3a763adab0a2a52d","name":"Temperature","group":"3ed382093da5193c","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":760,"wires":[]},{"id":"f35f2bf742dab378","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 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.temperature\n };\n let msg3 = {\n payload: lastMeasurement.humidity\n };\n\n let msgs = [msg1, msg2, msg3];\n return msgs;\n}\n","outputs":3,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":670,"y":760,"wires":[["ae3b7dd5c2452035"],["5436b44d7e4e52af"],["9c17e2ba9bce7b30"]]},{"id":"dd73ac27fcefb839","type":"grohe location","location":"Haus"},{"id":"3ed382093da5193c","type":"ui_group","name":"Sense","tab":"933900f0656633c1","order":2,"disp":true,"width":"6","collapse":false,"className":""},{"id":"933900f0656633c1","type":"ui_tab","name":"Grohe","icon":"fa-tint","disabled":false,"hidden":false}]