-
Notifications
You must be signed in to change notification settings - Fork 3
/
flows.json
1 lines (1 loc) · 39.8 KB
/
flows.json
1
[{"id":"fc2fff08.33d84","type":"tab","label":"eQ-3","disabled":false,"info":""},{"id":"efdf709c.359c8","type":"tab","label":"eQ-3 functional status","disabled":false,"info":"# Description\nThis flow \n - returns the **_functional status_** of the eQ-3 thermostat interface.\n - calculates the **_availability_** of the eQ-3 thermostat interface.\n - provides a simple dashboard group showing the **_functional status_** and the **_availability_**\n\nThe following **_functional statuses_** are possible:\n * `initializing` - no response has been received in the first 5 minutes after startup.\n * `working` - a valid response has been received in the last 5 minutes\n * `no response` - indicates that no response has been received in the last 5 minutes.\n * `can't connect` - an empty response has been received in the last 5 minutes\n\nThe **_availability_** is the percentage of time the eQ-3 is properly working\n(**_functional status_** is `working`) since the deployment of this flow.\n\n# Implementation\n\nThis flow requests the (technical) status of the eq3 node every 5 minutes and will update the\n**_functional status_** based on the responses received."},{"id":"cd9dd837.6d1d28","type":"tab","label":"hcitool","disabled":false,"info":""},{"id":"e21f1119.cfe1e","type":"ui_group","z":"","name":"last Technical Status","tab":"1760ac7e.5c92a4","order":4,"disp":true,"width":"4","collapse":false},{"id":"d8417a91.b14b58","type":"ui_group","z":"","name":"targetTemp & valvePosition Chart","tab":"1760ac7e.5c92a4","order":5,"disp":true,"width":"8","collapse":false},{"id":"1760ac7e.5c92a4","type":"ui_tab","z":"","name":"Eqiva - eQ-3","icon":"dashboard","disabled":false,"hidden":false},{"id":"ac5506b6.70a348","type":"ui_base","theme":{"name":"theme-light","lightTheme":{"default":"#0094CE","baseColor":"#0094CE","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"darkTheme":{"default":"#097479","baseColor":"#097479","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":false},"customTheme":{"name":"Untitled Theme 1","default":"#4B7930","baseColor":"#4B7930","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"},"themeState":{"base-color":{"default":"#0094CE","value":"#0094CE","edited":false},"page-titlebar-backgroundColor":{"value":"#0094CE","edited":false},"page-backgroundColor":{"value":"#fafafa","edited":false},"page-sidebar-backgroundColor":{"value":"#ffffff","edited":false},"group-textColor":{"value":"#1bbfff","edited":false},"group-borderColor":{"value":"#ffffff","edited":false},"group-backgroundColor":{"value":"#ffffff","edited":false},"widget-textColor":{"value":"#111111","edited":false},"widget-backgroundColor":{"value":"#0094ce","edited":false},"widget-borderColor":{"value":"#ffffff","edited":false},"base-font":{"value":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"}},"angularTheme":{"primary":"indigo","accents":"blue","warn":"red","background":"grey"}},"site":{"name":"Node-RED Dashboard","hideToolbar":"false","allowSwipe":"false","lockMenu":"false","allowTempTheme":"true","dateFormat":"DD/MM/YYYY","sizes":{"sx":48,"sy":48,"gx":6,"gy":6,"cx":6,"cy":6,"px":0,"py":0}}},{"id":"e669ceef.80f89","type":"mqtt-broker","z":"","name":"mqtt","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"bf009d64.b71d3","type":"ui_group","z":"","name":"Connectivity","tab":"1760ac7e.5c92a4","order":2,"disp":true,"width":"4","collapse":false},{"id":"f32880df.808d3","type":"ui_group","z":"","name":"Commands","tab":"1760ac7e.5c92a4","order":1,"disp":true,"width":"4","collapse":false},{"id":"902ba6a4.77dd88","type":"ui_group","z":"","name":"Functional Status","tab":"1760ac7e.5c92a4","order":3,"disp":true,"width":"4","collapse":false},{"id":"97efcbb8.cb09f8","type":"eq3-bluetooth","z":"fc2fff08.33d84","eq3device":"${EQ3_BTADDR}","x":790,"y":120,"wires":[["f1083ca3.c3865","f5e67b03.527608"]]},{"id":"f1083ca3.c3865","type":"debug","z":"fc2fff08.33d84","name":"eq3 node output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1080,"y":120,"wires":[]},{"id":"ef33e6d0.dca578","type":"inject","z":"fc2fff08.33d84","name":"{\"setTemperature\":\"4\"}","topic":"","payload":"4","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":140,"y":1200,"wires":[["839fbc04.9e249"]]},{"id":"54dd053.4138efc","type":"inject","z":"fc2fff08.33d84","name":"setState off (=4.5°)","topic":"","payload":"off","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":1140,"wires":[["32510107.c0139e"]]},{"id":"788b4c86.4dcd84","type":"inject","z":"fc2fff08.33d84","name":"setState manual","topic":"","payload":"manual","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":1020,"wires":[["32510107.c0139e"]]},{"id":"5c0da247.ce733c","type":"inject","z":"fc2fff08.33d84","name":"setState auto","topic":"","payload":"auto","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":1060,"wires":[["32510107.c0139e"]]},{"id":"784d31af.dcb4c","type":"inject","z":"fc2fff08.33d84","name":"{\"setTemperature\":\"20\"}","topic":"","payload":"20","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":140,"y":1320,"wires":[["839fbc04.9e249"]]},{"id":"c582b03d.ec5c4","type":"inject","z":"fc2fff08.33d84","name":"{\"setTemperature\":\"30\"}","topic":"","payload":"30","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":140,"y":1360,"wires":[["839fbc04.9e249"]]},{"id":"bbafdf1.344012","type":"inject","z":"fc2fff08.33d84","name":"{\"setTemperature\":\"15.6\"}","topic":"","payload":"15.6","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":150,"y":1240,"wires":[["839fbc04.9e249"]]},{"id":"3384610b.b4028e","type":"inject","z":"fc2fff08.33d84","name":"{\"setTemperature\":\"18\"}","topic":"","payload":"18","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":140,"y":1280,"wires":[["839fbc04.9e249"]]},{"id":"39a7c183.7b9bde","type":"ui_text","z":"fc2fff08.33d84","group":"e21f1119.cfe1e","order":5,"width":0,"height":0,"name":"","label":"manual","format":"{{payload.manual}}","layout":"row-spread","x":980,"y":720,"wires":[]},{"id":"4fd7aba2.82e294","type":"ui_text","z":"fc2fff08.33d84","group":"e21f1119.cfe1e","order":6,"width":0,"height":0,"name":"","label":"holiday","format":"{{payload.holiday}}","layout":"row-spread","x":980,"y":760,"wires":[]},{"id":"cee09e2a.2a1ce","type":"ui_text","z":"fc2fff08.33d84","group":"e21f1119.cfe1e","order":7,"width":0,"height":0,"name":"","label":"boost","format":"{{payload.boost}}","layout":"row-spread","x":970,"y":800,"wires":[]},{"id":"a97396e3.d252a8","type":"ui_text","z":"fc2fff08.33d84","group":"e21f1119.cfe1e","order":8,"width":0,"height":0,"name":"","label":"lock","format":"{{payload.lock}}","layout":"row-spread","x":970,"y":840,"wires":[]},{"id":"46d95e43.4df17","type":"ui_text","z":"fc2fff08.33d84","group":"e21f1119.cfe1e","order":9,"width":0,"height":0,"name":"","label":"dst","format":"{{payload.dst}}","layout":"row-spread","x":970,"y":880,"wires":[]},{"id":"3f36cba1.f9b2b4","type":"ui_text","z":"fc2fff08.33d84","group":"e21f1119.cfe1e","order":10,"width":0,"height":0,"name":"","label":"openWindow","format":"{{payload.openWindow}}","layout":"row-spread","x":990,"y":920,"wires":[]},{"id":"ef71672d.4e2af8","type":"ui_text","z":"fc2fff08.33d84","group":"e21f1119.cfe1e","order":11,"width":0,"height":0,"name":"","label":"lowBattery","format":"{{payload.lowBattery}}","layout":"row-spread","x":990,"y":960,"wires":[]},{"id":"35e9dba.ad6a224","type":"ui_chart","z":"fc2fff08.33d84","name":"targetTemp & valvePosition chart","group":"d8417a91.b14b58","order":1,"width":"8","height":"5","label":"","chartType":"line","legend":"true","xformat":"HH:mm","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"6","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#ff0000","#008000","#ff7f0e","#00ffff","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":1060,"y":1060,"wires":[[]]},{"id":"86f1b7e4.6e8358","type":"change","z":"fc2fff08.33d84","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.targetTemperature","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"targetTemperature","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":800,"y":1040,"wires":[["35e9dba.ad6a224"]]},{"id":"eae4eee7.a6e0a","type":"change","z":"fc2fff08.33d84","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.valvePosition","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"valvePosition","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":800,"y":1080,"wires":[["35e9dba.ad6a224"]]},{"id":"2ea3c174.827fee","type":"status","z":"fc2fff08.33d84","name":"status eQ3 node","scope":["97efcbb8.cb09f8"],"x":840,"y":60,"wires":[["b092fb2b.9f3e38","b93c705c.6881b"]]},{"id":"b092fb2b.9f3e38","type":"debug","z":"fc2fff08.33d84","name":"status eq3 node","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1040,"y":40,"wires":[]},{"id":"b93c705c.6881b","type":"ui_text","z":"fc2fff08.33d84","group":"bf009d64.b71d3","order":2,"width":0,"height":0,"name":"eQ3 node status","label":"eQ-3 status","format":"{{status.text}}","layout":"row-spread","x":1040,"y":80,"wires":[]},{"id":"a19b0eba.a28ce","type":"debug","z":"fc2fff08.33d84","name":"eq3 status","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1230,"y":340,"wires":[]},{"id":"de3f8796.167d88","type":"mqtt out","z":"fc2fff08.33d84","name":"","topic":"eq3/status","qos":"","retain":"","broker":"e669ceef.80f89","x":1170,"y":280,"wires":[]},{"id":"7ae049a1.44b5c8","type":"comment","z":"fc2fff08.33d84","name":"\"Commands\" group","info":"","x":430,"y":500,"wires":[]},{"id":"f1d6829d.3f523","type":"mqtt in","z":"fc2fff08.33d84","name":"","topic":"eq3/cmd/setState","qos":"2","datatype":"auto","broker":"e669ceef.80f89","x":100,"y":200,"wires":[["5ff6a721.d458e8"]]},{"id":"cd748c72.5dc22","type":"mqtt in","z":"fc2fff08.33d84","name":"","topic":"eq3/cmd/setTemperature","qos":"2","datatype":"auto","broker":"e669ceef.80f89","x":130,"y":400,"wires":[["700880ac.1c367"]]},{"id":"ab469ec6.3f43a","type":"mqtt in","z":"fc2fff08.33d84","name":"","topic":"eq3/cmd/boost","qos":"2","datatype":"auto","broker":"e669ceef.80f89","x":100,"y":300,"wires":[["ed2c5c18.d3023"]]},{"id":"5ff6a721.d458e8","type":"switch","z":"fc2fff08.33d84","name":"validate payload","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"},{"t":"eq","v":"manual","vt":"str"},{"t":"eq","v":"auto","vt":"str"},{"t":"else"}],"checkall":"false","repair":false,"outputs":5,"x":295,"y":220,"wires":[["10ed407c.d7df5"],["10ed407c.d7df5"],["10ed407c.d7df5"],["10ed407c.d7df5"],["af726383.87b0d"]]},{"id":"10ed407c.d7df5","type":"change","z":"fc2fff08.33d84","name":"{\"setState\": payload}","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"setState\": payload}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":535,"y":200,"wires":[["97efcbb8.cb09f8"]]},{"id":"5a8aa4d7.695c3c","type":"mqtt in","z":"fc2fff08.33d84","name":"","topic":"eq3/cmd/getState","qos":"2","datatype":"auto","broker":"e669ceef.80f89","x":120,"y":80,"wires":[["658c80f4.7e535"]]},{"id":"b093017f.3e414","type":"change","z":"fc2fff08.33d84","name":"payload = payload.status","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.status","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":970,"y":340,"wires":[["de3f8796.167d88","2ca60444.2bd50c","a19b0eba.a28ce"]]},{"id":"658c80f4.7e535","type":"change","z":"fc2fff08.33d84","name":"set payload=\"any_string\"","rules":[{"t":"set","p":"payload","pt":"msg","to":"any_string","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":430,"y":100,"wires":[["97efcbb8.cb09f8"]]},{"id":"32510107.c0139e","type":"mqtt out","z":"fc2fff08.33d84","name":"","topic":"eq3/cmd/setState","qos":"","retain":"","broker":"e669ceef.80f89","x":430,"y":1080,"wires":[]},{"id":"af726383.87b0d","type":"debug","z":"fc2fff08.33d84","name":"Error invalid eq3/cmd/setState (MQTT)","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","x":595,"y":240,"wires":[]},{"id":"ed2c5c18.d3023","type":"switch","z":"fc2fff08.33d84","name":"validate payload","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"num"},{"t":"else"}],"checkall":"false","repair":false,"outputs":3,"x":295,"y":320,"wires":[["939b1eba.fb90e"],["939b1eba.fb90e"],["b60a936f.fb7c8"]]},{"id":"939b1eba.fb90e","type":"change","z":"fc2fff08.33d84","name":"{\"boost\": payload}","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"boost\": $string(payload)}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":525,"y":300,"wires":[["97efcbb8.cb09f8"]]},{"id":"b60a936f.fb7c8","type":"debug","z":"fc2fff08.33d84","name":"Error invalid eq3/cmd/boost (MQTT)","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","x":585,"y":340,"wires":[]},{"id":"d617f1a9.bbb02","type":"inject","z":"fc2fff08.33d84","name":"getState","topic":"","payload":"xx","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":880,"wires":[["1ccafbff.d2f1a4"]]},{"id":"1ccafbff.d2f1a4","type":"mqtt out","z":"fc2fff08.33d84","name":"","topic":"eq3/cmd/getState","qos":"","retain":"","broker":"e669ceef.80f89","x":430,"y":880,"wires":[]},{"id":"eb0a87e4.ff5698","type":"change","z":"fc2fff08.33d84","name":"{\"setTemperature\": payload}","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"setTemperature\": $string(payload)}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":600,"y":380,"wires":[["97efcbb8.cb09f8"]]},{"id":"700880ac.1c367","type":"switch","z":"fc2fff08.33d84","name":"validate payload","property":"payload","propertyType":"msg","rules":[{"t":"btwn","v":"4","vt":"num","v2":"30","v2t":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":335,"y":420,"wires":[["eb0a87e4.ff5698"],["2c3b8d4b.73a1a2"]]},{"id":"2c3b8d4b.73a1a2","type":"debug","z":"fc2fff08.33d84","name":"Error invalid eq3/cmd/setTemperature (MQTT)","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","x":635,"y":440,"wires":[]},{"id":"839fbc04.9e249","type":"mqtt out","z":"fc2fff08.33d84","name":"","topic":"eq3/cmd/setTemperature","qos":"","retain":"","broker":"e669ceef.80f89","x":450,"y":1320,"wires":[]},{"id":"ab96e647.d019b8","type":"inject","z":"fc2fff08.33d84","name":"{\"setTemperature\":\"3\"}","topic":"","payload":"3","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":140,"y":1440,"wires":[["839fbc04.9e249"]]},{"id":"538b1c42.857204","type":"status","z":"fc2fff08.33d84","name":"eq3/status (mqtt out)","scope":["de3f8796.167d88"],"x":1150,"y":240,"wires":[["cb6b5403.11e8c8","9d65c369.f86a7"]]},{"id":"355517a0.c7ad68","type":"ui_text","z":"fc2fff08.33d84","group":"bf009d64.b71d3","order":1,"width":0,"height":0,"name":"MQTT status","label":"MQTT status","format":"{{payload}}","layout":"row-spread","x":1410,"y":300,"wires":[]},{"id":"cb6b5403.11e8c8","type":"debug","z":"fc2fff08.33d84","name":"MQTT status","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1330,"y":220,"wires":[]},{"id":"9d65c369.f86a7","type":"change","z":"fc2fff08.33d84","name":"reduce status.text","rules":[{"t":"set","p":"payload","pt":"msg","to":"$substringAfter(status.text,\"node-red:common.status.\")","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1350,"y":260,"wires":[["355517a0.c7ad68"]]},{"id":"cf94a345.a511c","type":"exec","z":"cd9dd837.6d1d28","command":"hcitool con","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":350,"y":80,"wires":[["c4055792.dd5b88","c1e25988.e29c18"],["b471de83.82633"],["be35119c.c50c2"]]},{"id":"51ff2be.6f448d4","type":"inject","z":"cd9dd837.6d1d28","name":"trigger cmd","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":80,"wires":[["cf94a345.a511c"]]},{"id":"c4055792.dd5b88","type":"debug","z":"cd9dd837.6d1d28","name":"hcitool con stdout","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":590,"y":20,"wires":[]},{"id":"b471de83.82633","type":"debug","z":"cd9dd837.6d1d28","name":"hcitool con stderr","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":590,"y":100,"wires":[]},{"id":"be35119c.c50c2","type":"debug","z":"cd9dd837.6d1d28","name":"hcitool con return code","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":600,"y":140,"wires":[]},{"id":"46946d72.e9d3d4","type":"exec","z":"cd9dd837.6d1d28","command":"hcitool ledc 64","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":340,"y":260,"wires":[["351a44f7.9be90c"],["899d2b69.3a5fc8"],["e11694bb.4233e8"]]},{"id":"8e68f13.36fee1","type":"inject","z":"cd9dd837.6d1d28","name":"trigger cmd","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":260,"wires":[["46946d72.e9d3d4"]]},{"id":"351a44f7.9be90c","type":"debug","z":"cd9dd837.6d1d28","name":"hcitool ledc ... stdout","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":640,"y":220,"wires":[]},{"id":"899d2b69.3a5fc8","type":"debug","z":"cd9dd837.6d1d28","name":"hcitool ledc ... stderr","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":640,"y":260,"wires":[]},{"id":"e11694bb.4233e8","type":"debug","z":"cd9dd837.6d1d28","name":"hcitool ledc ... return code","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":650,"y":300,"wires":[]},{"id":"1d1678f4.f66fe7","type":"exec","z":"cd9dd837.6d1d28","command":"hcitool lescan","addpay":false,"append":"","useSpawn":"false","timer":"60","oldrc":false,"name":"","x":360,"y":500,"wires":[["2c4fbac4.a354f6"],["acd861a0.a6cf1"],["841a9609.95ff78"]]},{"id":"50be36ab.002218","type":"inject","z":"cd9dd837.6d1d28","name":"trigger cmd","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":500,"wires":[["1d1678f4.f66fe7"]]},{"id":"2c4fbac4.a354f6","type":"debug","z":"cd9dd837.6d1d28","name":"hcitool lescan stdout","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":660,"y":460,"wires":[]},{"id":"acd861a0.a6cf1","type":"debug","z":"cd9dd837.6d1d28","name":"hcitool lescan stderr","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":660,"y":500,"wires":[]},{"id":"841a9609.95ff78","type":"debug","z":"cd9dd837.6d1d28","name":"hcitool lescan return code","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":670,"y":540,"wires":[]},{"id":"2889d730.7d91d8","type":"ui_button","z":"fc2fff08.33d84","name":"Refresh (= getState)","group":"e21f1119.cfe1e","order":1,"width":0,"height":0,"passthru":false,"label":"refresh","tooltip":"requests the current status of the eQ-3 device","color":"","bgcolor":"","icon":"refresh","payload":"XX","payloadType":"str","topic":"","x":1000,"y":560,"wires":[["4a90a7dd.437628"]]},{"id":"7b71faa7.1c8654","type":"ui_slider","z":"fc2fff08.33d84","name":"","label":"setTemp","tooltip":"","group":"f32880df.808d3","order":5,"width":0,"height":0,"passthru":false,"outs":"end","topic":"","min":"4","max":"30","step":"0.5","x":420,"y":740,"wires":[["4e62e610.7d8718"]]},{"id":"8d5618ac.abed48","type":"ui_text","z":"fc2fff08.33d84","group":"e21f1119.cfe1e","order":4,"width":0,"height":0,"name":"","label":"update tms","format":"{{msg.payload}}","layout":"row-spread","x":990,"y":600,"wires":[]},{"id":"b59c2cd.cc0a4d","type":"change","z":"fc2fff08.33d84","name":"get cur time","rules":[{"t":"set","p":"payload","pt":"msg","to":"$substringBefore($substringAfter($now(), \"T\"),\".\")","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":810,"y":600,"wires":[["8d5618ac.abed48"]]},{"id":"c57c16f.d5e69e8","type":"ui_switch","z":"fc2fff08.33d84","name":"","label":"boost","tooltip":"","group":"f32880df.808d3","order":2,"width":0,"height":0,"passthru":false,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":430,"y":600,"wires":[["1a3369a5.9d3396"]]},{"id":"e5dda2d5.598e3","type":"change","z":"fc2fff08.33d84","name":"get boost state","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.boost?1:0","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":240,"y":600,"wires":[["c57c16f.d5e69e8"]]},{"id":"6daf6954.0a0158","type":"ui_switch","z":"fc2fff08.33d84","name":"","label":"manual","tooltip":"","group":"f32880df.808d3","order":1,"width":0,"height":0,"passthru":false,"decouple":"false","topic":"","style":"","onvalue":"manual","onvalueType":"str","onicon":"","oncolor":"","offvalue":"auto","offvalueType":"str","officon":"","offcolor":"","x":440,"y":540,"wires":[["840cd5bf.f2b6b8"]]},{"id":"2980201c.fbf2f","type":"change","z":"fc2fff08.33d84","name":"get manual state","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.manual?\"manual\":\"auto\"","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":250,"y":540,"wires":[["6daf6954.0a0158"]]},{"id":"a0b9278.57895d8","type":"ui_button","z":"fc2fff08.33d84","name":"","group":"f32880df.808d3","order":4,"width":"2","height":"1","passthru":false,"label":"on (= 30°)","tooltip":"","color":"","bgcolor":"","icon":"","payload":"on","payloadType":"str","topic":"","x":420,"y":700,"wires":[["cd4060e7.8e85"]]},{"id":"f83edf32.e188f","type":"ui_button","z":"fc2fff08.33d84","name":"","group":"f32880df.808d3","order":3,"width":"2","height":"1","passthru":false,"label":"off (= 4.5°)","tooltip":"","color":"","bgcolor":"","icon":"","payload":"off","payloadType":"str","topic":"","x":430,"y":660,"wires":[["cd4060e7.8e85"]]},{"id":"9a7321ec.45da8","type":"inject","z":"fc2fff08.33d84","name":"setState on (=30°)","topic":"","payload":"on","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":1100,"wires":[["32510107.c0139e"]]},{"id":"f5e67b03.527608","type":"switch","z":"fc2fff08.33d84","name":"empty payload ?","property":"payload.status","propertyType":"msg","rules":[{"t":"null"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":960,"y":180,"wires":[["45665b9c.508614","6e8983f1.247ebc"],["b093017f.3e414"]]},{"id":"45665b9c.508614","type":"debug","z":"fc2fff08.33d84","name":"Error eq3: empty payload","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"\"empty payload\"","targetType":"jsonata","x":1275,"y":180,"wires":[]},{"id":"832585e1.35f088","type":"link in","z":"fc2fff08.33d84","name":"eq3 setState","links":["cd4060e7.8e85","840cd5bf.f2b6b8"],"x":150,"y":240,"wires":[["5ff6a721.d458e8"]]},{"id":"968fd786.3f1088","type":"link in","z":"fc2fff08.33d84","name":"eq3 getState","links":["4a90a7dd.437628","3c27754.305ab8a"],"x":175,"y":120,"wires":[["658c80f4.7e535"]],"info":"Gets the state of the eq3 node."},{"id":"b880a5a8.09c368","type":"link in","z":"fc2fff08.33d84","name":"eq3 boost","links":["1a3369a5.9d3396"],"x":155,"y":340,"wires":[["ed2c5c18.d3023"]]},{"id":"7362b5c.8b6664c","type":"link in","z":"fc2fff08.33d84","name":"eq3 setTemperature","links":["4e62e610.7d8718"],"x":155,"y":440,"wires":[["700880ac.1c367"]]},{"id":"2ca60444.2bd50c","type":"link out","z":"fc2fff08.33d84","name":"eq3 status","links":["ae24b5bf.0d5f08","b850ee02.07cfd","bb3fb20a.225b1"],"x":1175,"y":380,"wires":[]},{"id":"b850ee02.07cfd","type":"link in","z":"fc2fff08.33d84","name":"","links":["2ca60444.2bd50c"],"x":675,"y":660,"wires":[["86f1b7e4.6e8358","eae4eee7.a6e0a","b59c2cd.cc0a4d","39a7c183.7b9bde","4fd7aba2.82e294","cee09e2a.2a1ce","a97396e3.d252a8","46d95e43.4df17","3f36cba1.f9b2b4","ef71672d.4e2af8","80292a39.514ca8","ad174387.f8005"]]},{"id":"4a90a7dd.437628","type":"link out","z":"fc2fff08.33d84","name":"","links":["968fd786.3f1088"],"x":1155,"y":560,"wires":[]},{"id":"cd4060e7.8e85","type":"link out","z":"fc2fff08.33d84","name":"","links":["832585e1.35f088"],"x":575,"y":680,"wires":[]},{"id":"840cd5bf.f2b6b8","type":"link out","z":"fc2fff08.33d84","name":"","links":["832585e1.35f088"],"x":540,"y":540,"wires":[]},{"id":"1a3369a5.9d3396","type":"link out","z":"fc2fff08.33d84","name":"","links":["b880a5a8.09c368"],"x":535,"y":600,"wires":[]},{"id":"4e62e610.7d8718","type":"link out","z":"fc2fff08.33d84","name":"","links":["7362b5c.8b6664c"],"x":575,"y":740,"wires":[]},{"id":"ae24b5bf.0d5f08","type":"link in","z":"fc2fff08.33d84","name":"","links":["2ca60444.2bd50c"],"x":95,"y":560,"wires":[["2980201c.fbf2f","e5dda2d5.598e3","c5486fe0.34ca9"]]},{"id":"927a3da2.8db01","type":"comment","z":"fc2fff08.33d84","name":"Inject nodes to Test interface via MQTT","info":"","x":170,"y":820,"wires":[]},{"id":"8364ae2a.558f5","type":"comment","z":"fc2fff08.33d84","name":"\"eQ-3 Status\" group","info":"","x":1010,"y":520,"wires":[]},{"id":"ab52ad85.2ae4b","type":"comment","z":"fc2fff08.33d84","name":"Chart","info":"","x":1010,"y":1020,"wires":[]},{"id":"e849a3ef.a08f8","type":"inject","z":"fc2fff08.33d84","name":"boost","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":90,"y":920,"wires":[["38aba601.03658a"]]},{"id":"d0fc111f.66876","type":"inject","z":"fc2fff08.33d84","name":"cancel boost","topic":"","payload":"0","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":960,"wires":[["38aba601.03658a"]]},{"id":"38aba601.03658a","type":"mqtt out","z":"fc2fff08.33d84","name":"","topic":"eq3/cmd/boost","qos":"","retain":"","broker":"e669ceef.80f89","x":420,"y":940,"wires":[]},{"id":"abb3dcbd.dff02","type":"comment","z":"fc2fff08.33d84","name":"check setting invalid temp","info":"","x":150,"y":1400,"wires":[]},{"id":"6e8983f1.247ebc","type":"link out","z":"fc2fff08.33d84","name":"eq3 empty response","links":["4b2cba83.653cb4"],"x":1255,"y":140,"wires":[]},{"id":"eb15a67c.275998","type":"inject","z":"efdf709c.359c8","name":"every 5 minutes request status","topic":"","payload":"getInfo","payloadType":"str","repeat":"300","crontab":"","once":true,"onceDelay":"10","x":170,"y":100,"wires":[["3c27754.305ab8a","ebe7f53.8efba08"]]},{"id":"3c27754.305ab8a","type":"link out","z":"efdf709c.359c8","name":"","links":["968fd786.3f1088"],"x":395,"y":100,"wires":[]},{"id":"bb3fb20a.225b1","type":"link in","z":"efdf709c.359c8","name":"link","links":["2ca60444.2bd50c"],"x":155,"y":320,"wires":[["d6b89320.a1162"]]},{"id":"4b2cba83.653cb4","type":"link in","z":"efdf709c.359c8","name":"","links":["6e8983f1.247ebc"],"x":155,"y":440,"wires":[["6a5eb857.80b408"]]},{"id":"6a5eb857.80b408","type":"change","z":"efdf709c.359c8","name":"set flow next status \"can't connect\"","rules":[{"t":"set","p":"next_status","pt":"flow","to":"can't connect","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":560,"y":420,"wires":[["95c585b6.f1a0a8"]]},{"id":"937d5fe3.377b3","type":"link out","z":"efdf709c.359c8","name":"eq3 functional status","links":["877d8843.fe81a8","b030f1a1.10af1"],"x":1195,"y":100,"wires":[]},{"id":"877d8843.fe81a8","type":"link in","z":"efdf709c.359c8","name":"","links":["937d5fe3.377b3"],"x":1115,"y":180,"wires":[["31e86db4.12c6d2"]]},{"id":"31e86db4.12c6d2","type":"ui_text","z":"efdf709c.359c8","group":"902ba6a4.77dd88","order":2,"width":0,"height":0,"name":"eq3 functional status","label":"funct. status","format":"{{msg.payload}}","layout":"row-spread","x":1260,"y":180,"wires":[]},{"id":"d6b89320.a1162","type":"change","z":"efdf709c.359c8","name":"set flow next status \"working\"","rules":[{"t":"set","p":"next_status","pt":"flow","to":"working","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":560,"y":340,"wires":[["95c585b6.f1a0a8"]]},{"id":"acf2126.6dffdf","type":"change","z":"efdf709c.359c8","name":"set payload to flow status","rules":[{"t":"set","p":"payload","pt":"msg","to":"status","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":1050,"y":100,"wires":[["937d5fe3.377b3"]]},{"id":"ebe7f53.8efba08","type":"change","z":"efdf709c.359c8","name":"set flow status to next_status","rules":[{"t":"set","p":"status","pt":"flow","to":"next_status","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":260,"y":160,"wires":[["4f724e7c.dc91e","264086f0.619f7a"]]},{"id":"4f724e7c.dc91e","type":"change","z":"efdf709c.359c8","name":"set flow next_status = \"no response\"","rules":[{"t":"set","p":"next_status","pt":"flow","to":"no response","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":570,"y":160,"wires":[["acf2126.6dffdf"]]},{"id":"cb87ccec.c66f9","type":"inject","z":"efdf709c.359c8","name":"simulate empty response","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":150,"y":400,"wires":[["6a5eb857.80b408"]]},{"id":"3b84310e.75939e","type":"inject","z":"efdf709c.359c8","name":"simulate (normal) get state event","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":170,"y":360,"wires":[["d6b89320.a1162"]]},{"id":"95c585b6.f1a0a8","type":"change","z":"efdf709c.359c8","name":"set flow status = flow next status","rules":[{"t":"set","p":"status","pt":"flow","to":"next_status","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":930,"y":360,"wires":[["acf2126.6dffdf"]]},{"id":"2cb9793b.7368b6","type":"inject","z":"efdf709c.359c8","name":"initialize","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":100,"y":60,"wires":[["2e991fc3.70c6"]]},{"id":"2e991fc3.70c6","type":"change","z":"efdf709c.359c8","name":"set flow status and flow next status = \"initializing\"","rules":[{"t":"set","p":"next_status","pt":"flow","to":"initializing","tot":"str"},{"t":"set","p":"status","pt":"flow","to":"initializing","tot":"str"},{"t":"set","p":"timer_count","pt":"flow","to":"0","tot":"num"},{"t":"set","p":"working_count","pt":"flow","to":"0","tot":"num"},{"t":"set","p":"up_down","pt":"flow","to":"down","tot":"str"},{"t":"set","p":"start_up_down_tms","pt":"flow","to":"","tot":"date"},{"t":"set","p":"deploy_tms","pt":"flow","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":60,"wires":[["acf2126.6dffdf"]]},{"id":"1613f383.dc2eac","type":"change","z":"efdf709c.359c8","name":"increment flow timer_count","rules":[{"t":"set","p":"timer_count","pt":"flow","to":"1+$flowContext(\"timer_count\")","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":240,"wires":[["bd1dbef3.33fc8","b93e0abd.f15c18"]]},{"id":"b93e0abd.f15c18","type":"switch","z":"efdf709c.359c8","name":"flow status = \"working\" ?","property":"status","propertyType":"flow","rules":[{"t":"eq","v":"working","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":370,"y":280,"wires":[["ac1d2028.ff932"]]},{"id":"ac1d2028.ff932","type":"change","z":"efdf709c.359c8","name":"increment flow working_count","rules":[{"t":"set","p":"working_count","pt":"flow","to":"1+$flowContext(\"working_count\")","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":280,"wires":[["bd1dbef3.33fc8"]]},{"id":"73481679.f85198","type":"ui_text","z":"efdf709c.359c8","group":"902ba6a4.77dd88","order":3,"width":0,"height":0,"name":"availability","label":"availability","format":"{{msg.payload | number:0 }}%","layout":"row-spread","x":1250,"y":240,"wires":[]},{"id":"bd1dbef3.33fc8","type":"change","z":"efdf709c.359c8","name":"calculate availability","rules":[{"t":"set","p":"payload","pt":"msg","to":"$flowContext(\"working_count\")*100/$flowContext(\"timer_count\")","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":880,"y":240,"wires":[["73481679.f85198"]]},{"id":"c1e25988.e29c18","type":"switch","z":"cd9dd837.6d1d28","name":"payload contains \"handle\"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"handle","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":610,"y":60,"wires":[["a1bb8838.2a54a8"]]},{"id":"a1bb8838.2a54a8","type":"change","z":"cd9dd837.6d1d28","name":"extract bluetooth address & device handle","rules":[{"t":"set","p":"payload","pt":"msg","to":"{ \t \"hcitool_stdout\" : payload ,\t \"hcitool_rc\" : rc.code ,\t \"bdaddr\" : $substringBefore($substringAfter(payload,\"Unknown \"),\" handle\"),\t \"handle\" : $number($substringBefore($substringAfter(payload,\"handle \"),\" state\"))\t}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":920,"y":60,"wires":[["c30999dd.ca9ce8"]]},{"id":"c30999dd.ca9ce8","type":"debug","z":"cd9dd837.6d1d28","name":"hcitool con output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1030,"y":100,"wires":[]},{"id":"264086f0.619f7a","type":"switch","z":"efdf709c.359c8","name":"flow status is not initializing","property":"status","propertyType":"flow","rules":[{"t":"neq","v":"initializing","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":360,"y":200,"wires":[["1613f383.dc2eac"]]},{"id":"b030f1a1.10af1","type":"link in","z":"efdf709c.359c8","name":"","links":["937d5fe3.377b3"],"x":75,"y":560,"wires":[["61006288.47347c"]]},{"id":"4d500f46.af522","type":"comment","z":"efdf709c.359c8","name":"Calculate Up time","info":"","x":110,"y":500,"wires":[]},{"id":"61006288.47347c","type":"switch","z":"efdf709c.359c8","name":"flow status is \"working\" ?","property":"status","propertyType":"flow","rules":[{"t":"eq","v":"working","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":230,"y":560,"wires":[["5f49e017.b4c0c"],["57a5257d.bde4fc"]]},{"id":"5f49e017.b4c0c","type":"switch","z":"efdf709c.359c8","name":"flow up_down is down ?","property":"up_down","propertyType":"flow","rules":[{"t":"eq","v":"down","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":470,"y":520,"wires":[["67e6d97.be01b28"],["36a39657.d35aca"]]},{"id":"67e6d97.be01b28","type":"change","z":"efdf709c.359c8","name":"set flow up_down to up","rules":[{"t":"set","p":"up_down","pt":"flow","to":"up","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":500,"wires":[["1098a326.5eb24d"]]},{"id":"e1c34c89.7fa1e","type":"ui_text","z":"efdf709c.359c8","group":"902ba6a4.77dd88","order":5,"width":0,"height":0,"name":"","label":"Up/Down since","format":"{{msg.payload}}","layout":"row-spread","x":1080,"y":800,"wires":[]},{"id":"57a5257d.bde4fc","type":"switch","z":"efdf709c.359c8","name":"flow up_down is up ?","property":"up_down","propertyType":"flow","rules":[{"t":"eq","v":"up","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":460,"y":600,"wires":[["1cbc424.d05efbe"],["36a39657.d35aca"]]},{"id":"1cbc424.d05efbe","type":"change","z":"efdf709c.359c8","name":"set flow up_down to down","rules":[{"t":"set","p":"up_down","pt":"flow","to":"down","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":730,"y":580,"wires":[["1098a326.5eb24d"]]},{"id":"1098a326.5eb24d","type":"change","z":"efdf709c.359c8","name":"set flow start_up_down_tms to now","rules":[{"t":"set","p":"start_up_down_tms","pt":"flow","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":1000,"y":540,"wires":[["36a39657.d35aca"]]},{"id":"a0334235.6278f","type":"change","z":"efdf709c.359c8","name":"set payload = flow start_up_down_tms formatted","rules":[{"t":"set","p":"payload","pt":"msg","to":"$substringBefore(\t $substringAfter(\t $fromMillis($flowContext(\"start_up_down_tms\")),\t \"T\" ),\t \".\")","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":800,"y":800,"wires":[["e1c34c89.7fa1e"]]},{"id":"7ed61652.006808","type":"change","z":"efdf709c.359c8","name":"set payload = flow up_down","rules":[{"t":"set","p":"payload","pt":"msg","to":"up_down","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":740,"y":760,"wires":[["95ea08ec.d23438"]]},{"id":"b1580906.ca2628","type":"change","z":"efdf709c.359c8","name":"calculate up/down time","rules":[{"t":"set","p":"payload","pt":"msg","to":"(\t $delta_ms := $toMillis($now())-$flowContext(\"start_up_down_tms\");\t $days := $round($delta_ms/(24*60*60*1000),0) ;\t $time_fraction := $substringBefore($substringAfter($fromMillis($delta_ms),\"T\"),\".\") ;\t $day_fraction := ( $days ? $days & \" Days \" : \"\" );\t $day_fraction & $time_fraction\t)\t","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":840,"wires":[["13d4589a.ecc357","98255eb8.905bc"]]},{"id":"13d4589a.ecc357","type":"ui_text","z":"efdf709c.359c8","group":"902ba6a4.77dd88","order":6,"width":0,"height":0,"name":"","label":"Up/Down Time","format":"{{msg.payload}}","layout":"row-spread","x":1080,"y":840,"wires":[]},{"id":"98255eb8.905bc","type":"debug","z":"efdf709c.359c8","name":"calculated up/down time","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1070,"y":880,"wires":[]},{"id":"36a39657.d35aca","type":"function","z":"efdf709c.359c8","name":"join flows","func":"\nreturn msg;","outputs":1,"noerr":0,"x":480,"y":780,"wires":[["b1580906.ca2628","a0334235.6278f","7ed61652.006808","d2c48248.aeae7"]]},{"id":"95ea08ec.d23438","type":"ui_text","z":"efdf709c.359c8","group":"902ba6a4.77dd88","order":4,"width":0,"height":0,"name":"Up/Down Status","label":"Up/Down Status","format":"{{msg.payload}}","layout":"row-spread","x":1080,"y":760,"wires":[]},{"id":"f1c38548.e45828","type":"ui_text","z":"efdf709c.359c8","group":"902ba6a4.77dd88","order":1,"width":0,"height":0,"name":"Uptime","label":"Uptime","format":"{{msg.payload}}","layout":"row-spread","x":1060,"y":720,"wires":[]},{"id":"d2c48248.aeae7","type":"change","z":"efdf709c.359c8","name":"calculate uptime","rules":[{"t":"set","p":"payload","pt":"msg","to":"(\t $delta_ms := $toMillis($now())-$flowContext(\"deploy_tms\");\t $days := $round($delta_ms/(24*60*60*1000),0) ;\t $time_fraction := $substringBefore(\t $substringAfter($fromMillis($delta_ms),\"T\"),\t \".\"\t ) ;\t $day_fraction := (\t $days ? $days & \" Days \" : \"\" \t );\t $day_fraction & $time_fraction\t\t)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":720,"wires":[["f1c38548.e45828"]]},{"id":"c5486fe0.34ca9","type":"change","z":"fc2fff08.33d84","name":"get targetTemperature","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.targetTemperature","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":200,"y":740,"wires":[["7b71faa7.1c8654"]]},{"id":"80292a39.514ca8","type":"ui_gauge","z":"fc2fff08.33d84","name":"","group":"e21f1119.cfe1e","order":3,"width":0,"height":0,"gtype":"gage","title":"valve Position","label":"%","format":"{{payload.valvePosition}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":1000,"y":680,"wires":[]},{"id":"ad174387.f8005","type":"ui_gauge","z":"fc2fff08.33d84","name":"","group":"e21f1119.cfe1e","order":2,"width":0,"height":0,"gtype":"gage","title":"target Temperature","label":"°C","format":"{{payload.targetTemperature}}","min":"4","max":"30","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":1010,"y":640,"wires":[]}]