I am checking wifi strength only every 5min.
At midnight I am reading total energy in order to calculate daily consumption.
[{"id":"e3968abdf637a7a9","type":"ui_gauge","z":"cfc6b839afbbeb5d","name":"Computer power","group":"239c22c2.2384ce","order":3,"width":"6","height":"3","gtype":"gage","title":"","label":"Watt","format":"{{value | number:2}}","min":0,"max":"200","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":1220,"y":140,"wires":[]},{"id":"5c25436ecf31c535","type":"ui_text","z":"cfc6b839afbbeb5d","group":"239c22c2.2384ce","order":7,"width":"3","height":"1","name":"Computer-temperature","label":"","format":"{{msg.payload}} °C","layout":"row-center","className":"","x":1240,"y":340,"wires":[]},{"id":"857755d80677d047","type":"ui_text","z":"cfc6b839afbbeb5d","group":"239c22c2.2384ce","order":6,"width":"3","height":"1","name":"Computer-stat","label":"","format":"{{msg.payload}}","layout":"row-center","className":"","x":1220,"y":300,"wires":[]},{"id":"de42fd13b1caa64f","type":"ui_chart","z":"cfc6b839afbbeb5d","name":"Computer12h Verlauf","group":"239c22c2.2384ce","order":8,"width":"6","height":"6","label":"12h Verlauf","chartType":"line","legend":"false","xformat":"HH:mm","interpolate":"linear","nodata":"warte auf Daten","dot":false,"ymin":"0","ymax":"200","removeOlder":"12","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#fa9c19","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":1240,"y":180,"wires":[[]]},{"id":"a68755d0244284fa","type":"ui_text","z":"cfc6b839afbbeb5d","group":"239c22c2.2384ce","order":1,"width":"5","height":"1","name":"Computer time","label":"","format":"{{msg.payload}}","layout":"row-center","className":"","x":1220,"y":100,"wires":[]},{"id":"1fd9232bd7e0cc32","type":"ui_text","z":"cfc6b839afbbeb5d","group":"239c22c2.2384ce","order":5,"width":"6","height":"1","name":"Computer-energy-total","label":"Gesamt:","format":"{{msg.payload}} kWh","layout":"row-center","className":"","x":1240,"y":220,"wires":[]},{"id":"f56ef6f5e77e3505","type":"mqtt in","z":"cfc6b839afbbeb5d","name":"","topic":"shellies/shellyplug-s-799C45/#","qos":"0","datatype":"utf8","broker":"f5f6599b.7711a8","nl":false,"rap":false,"inputs":0,"x":200,"y":320,"wires":[["b77a0c04834ede8d","ad55c4afed5d49ae"]]},{"id":"7e2ee056cfdc59bb","type":"function","z":"cfc6b839afbbeb5d","name":"shelly plug s Computer","func":"let timestamp = date_time_string();\nnode.status({ text: timestamp });\n\nif (msg.topic === 'wifi') {\n let wifiin = msg.payload;\n let wifiout = wifi_out(wifiin);\n return [wifiout, { payload: timestamp }, null, null, null, null, null, null];\n}\n\nif (msg.topic === 'midnight') {\n context.set('midnight',msg.payload);\n return null;\n}\n\nlet power = msg.payload[\"shellies/shellyplug-s-799C45/relay/0/power\"];\nlet totalenergy = parseFloat(msg.payload[\"shellies/shellyplug-s-799C45/relay/0/energy\"]);\nlet dayenergy = (totalenergy - context.get('midnight'));\ntotalenergy = parseFloat((totalenergy/60/1000).toFixed(3));\ndayenergy = parseFloat((dayenergy/60/1000).toFixed(3));\nlet status = msg.payload[\"shellies/shellyplug-s-799C45/relay/0\"];\nstatus = status === 'off' ? '<font color=\"#000000\">off</font>' : '<font color=\"#ff0000\">on</font>'; \nlet temperature = msg.payload[\"shellies/shellyplug-s-799C45/temperature\"];\nlet overtemperature = msg.payload[\"shellies/shellyplug-s-799C45/overtemperature\"];\n\nreturn [\n null,\n {payload:timestamp}, \n {payload:power},\n {payload:totalenergy},\n {payload:dayenergy }, \n {payload:status},\n {payload:temperature},\n {payload:overtemperature}\n];\n\n//----------------------------------------------------------------\n\nfunction date_time_string() {\n const date = new Date(Date.now());\n const year = date.getFullYear();\n const month = (\"0\" + (date.getMonth() + 1)).slice(-2);\n const day = (\"0\" + date.getDate()).slice(-2);\n const hours = (\"0\" + date.getHours()).slice(-2);\n const minutes = (\"0\" + date.getMinutes()).slice(-2);\n const seconds = (\"0\" + date.getSeconds()).slice(-2);\n let datetimestring = day + \"-\" + month + \"-\" + year + \" \" + hours + ':' + minutes + ':' + seconds;\n return datetimestring;\n}\n\n//--------------------------------------------------------------------\n\nfunction wifi_out(wifiin) {\n let rssi = wifiin;\n let color;\n if (rssi < -80) {\n color = 'red';\n }\n else if (rssi < -70) {\n color = '#FFC300';\n }\n else {\n color = 'green';\n }\n rssi = rssi.toString();\n return ({ \"topic\": rssi, \"payload\": color });\n}\n\n//--------------------------------------------------------------------","outputs":8,"noerr":0,"initialize":"","finalize":"","libs":[],"x":920,"y":240,"wires":[["7a7cc8a9b2753f7a"],["a68755d0244284fa"],["de42fd13b1caa64f","e3968abdf637a7a9"],["1fd9232bd7e0cc32"],["414376b343a2bf9a"],["857755d80677d047"],["5c25436ecf31c535","080579be16d42e04"],["482ffb01d13cbeee"]]},{"id":"b77a0c04834ede8d","type":"join","z":"cfc6b839afbbeb5d","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"6","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":690,"y":320,"wires":[["7e2ee056cfdc59bb"]]},{"id":"ad55c4afed5d49ae","type":"trigger","z":"cfc6b839afbbeb5d","name":"","op1":"","op2":"0","op1type":"nul","op2type":"str","duration":"10","extend":true,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":450,"y":460,"wires":[["1620e9f0aeecd3a3"]]},{"id":"1620e9f0aeecd3a3","type":"change","z":"cfc6b839afbbeb5d","name":"watchdog Alarm","rules":[{"t":"set","p":"payload","pt":"msg","to":"shelly plug s Telefon länger als 10 min offline!","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1340,"y":460,"wires":[["401cf8ae118b6735"]]},{"id":"ae5125a3cc6d2744","type":"inject","z":"cfc6b839afbbeb5d","name":"ervery midnight","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 00 * * *","once":true,"onceDelay":"0.5","topic":"","payload":"","payloadType":"date","x":190,"y":240,"wires":[["1689e8111357776d"]]},{"id":"1689e8111357776d","type":"http request","z":"cfc6b839afbbeb5d","name":"http comp 2","method":"GET","ret":"obj","paytoqs":"ignore","url":"http://10.0.0.162/status/meter","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":370,"y":240,"wires":[["55fd05054728ae1a"]]},{"id":"6fb50f90819445b9","type":"function","z":"cfc6b839afbbeb5d","name":"midnight","func":"let midnight = parseFloat(msg.payload.meters[0].total);\nnode.status({text: midnight});\nreturn { topic: \"midnight\", payload:midnight};","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":680,"y":240,"wires":[["7e2ee056cfdc59bb"]]},{"id":"414376b343a2bf9a","type":"ui_text","z":"cfc6b839afbbeb5d","group":"239c22c2.2384ce","order":4,"width":"6","height":"1","name":"Computer-energy-tag","label":"Tag:","format":"{{msg.payload}} kWh","layout":"row-center","className":"","x":1240,"y":260,"wires":[]},{"id":"3fdbd395646f16f6","type":"inject","z":"cfc6b839afbbeb5d","name":"every 5 min","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"300","crontab":"","once":true,"onceDelay":"2","topic":"","payload":"","payloadType":"date","x":170,"y":160,"wires":[["ec506966c5da5589"]]},{"id":"ec506966c5da5589","type":"http request","z":"cfc6b839afbbeb5d","name":"http comp 1","method":"GET","ret":"obj","paytoqs":"ignore","url":"http://10.0.0.162/status","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":370,"y":160,"wires":[["cef00e47e1c14b71"]]},{"id":"3552e31531223543","type":"mqtt out","z":"cfc6b839afbbeb5d","name":"Telegram","topic":"Heizung-Telegram","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"69e1bb0a917095db","x":1600,"y":420,"wires":[]},{"id":"7a7cc8a9b2753f7a","type":"ui_template","z":"cfc6b839afbbeb5d","group":"239c22c2.2384ce","name":"Computer wifi","order":2,"width":"1","height":"1","format":"<div style=\"color:{{msg.payload}}; margin:auto;\" <i class=\"fa fa-wifi fa-1x\" aria-hidden=\"true\"> </i></div>\n<div>\n <center>\n <small><small><small>{{msg.topic}}</small></small></small>\n </center>\n</div>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","className":"","x":1220,"y":60,"wires":[[]]},{"id":"cef00e47e1c14b71","type":"switch","z":"cfc6b839afbbeb5d","name":"200","property":"statusCode","propertyType":"msg","rules":[{"t":"eq","v":"200","vt":"str"},{"t":"neq","v":"200","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":510,"y":160,"wires":[["5376df4f394b2393"],["12afc66c3fc7d39b"]]},{"id":"12afc66c3fc7d39b","type":"change","z":"cfc6b839afbbeb5d","name":"error comp http-request 1","rules":[{"t":"set","p":"payload","pt":"msg","to":"shelly plug s computer: error http-request 1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":430,"y":200,"wires":[["72d5e2d3f183a76c"]]},{"id":"55fd05054728ae1a","type":"switch","z":"cfc6b839afbbeb5d","name":"200","property":"statusCode","propertyType":"msg","rules":[{"t":"eq","v":"200","vt":"str"},{"t":"neq","v":"200","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":510,"y":240,"wires":[["6fb50f90819445b9"],["f9604ed68fddf5bd"]]},{"id":"f9604ed68fddf5bd","type":"change","z":"cfc6b839afbbeb5d","name":"error Comp http-request 2","rules":[{"t":"set","p":"payload","pt":"msg","to":"shelly plug s Computer: error http-request 2","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":430,"y":280,"wires":[["a0bb5446b129c503"]]},{"id":"72d5e2d3f183a76c","type":"link out","z":"cfc6b839afbbeb5d","name":"link out 9","mode":"link","links":["ea9a3d5f0e30902f"],"x":605,"y":200,"wires":[]},{"id":"a0bb5446b129c503","type":"link out","z":"cfc6b839afbbeb5d","name":"link out 10","mode":"link","links":["ea9a3d5f0e30902f"],"x":605,"y":280,"wires":[]},{"id":"ea9a3d5f0e30902f","type":"link in","z":"cfc6b839afbbeb5d","name":"telegram out","links":["72d5e2d3f183a76c","a0bb5446b129c503"],"x":1405,"y":340,"wires":[["401cf8ae118b6735"]]},{"id":"482ffb01d13cbeee","type":"function","z":"cfc6b839afbbeb5d","name":"overtemperature","func":"if (msg.payload != 0){\n msg.payload = \"shelly pulg s Telefon Overtemperature Alarm!\"\n return msg;\n}\nelse {\n return { reset: 0 };\n} \n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1220,"y":420,"wires":[["6f0e355597d7d848"]]},{"id":"080579be16d42e04","type":"function","z":"cfc6b839afbbeb5d","name":"temp > 60","func":"if (msg.payload > 60){\n msg.payload = \"shelly plug s Telefon über 60 Grad!\"\n return msg;\n}\nelse{\n return{reset:0};\n} \n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1200,"y":380,"wires":[["4b8e89a6ae7ecd0b"]]},{"id":"4b8e89a6ae7ecd0b","type":"rbe","z":"cfc6b839afbbeb5d","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":true,"property":"payload","topi":"topic","x":1370,"y":380,"wires":[["401cf8ae118b6735"]]},{"id":"397cf4f94d7491ee","type":"debug","z":"cfc6b839afbbeb5d","name":"debug 36","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1600,"y":380,"wires":[]},{"id":"6f0e355597d7d848","type":"rbe","z":"cfc6b839afbbeb5d","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":true,"property":"payload","topi":"topic","x":1370,"y":420,"wires":[["401cf8ae118b6735"]]},{"id":"5376df4f394b2393","type":"function","z":"cfc6b839afbbeb5d","name":"wifi","func":"node.status({ text: msg.payload.wifi_sta.rssi});\nreturn { topic: 'wifi', payload: msg.payload.wifi_sta.rssi};","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":690,"y":160,"wires":[["7e2ee056cfdc59bb"]]},{"id":"0e17ee180274f783","type":"junction","z":"cfc6b839afbbeb5d","x":1140,"y":60,"wires":[[]]},{"id":"401cf8ae118b6735","type":"junction","z":"cfc6b839afbbeb5d","x":1480,"y":400,"wires":[["397cf4f94d7491ee","3552e31531223543"]]},{"id":"239c22c2.2384ce","type":"ui_group","name":"UG Computer shelly plug s","tab":"743fd75e.f52cb8","order":13,"disp":true,"width":"6","collapse":false},{"id":"f5f6599b.7711a8","type":"mqtt-broker","broker":"10.0.0.43","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":4,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"69e1bb0a917095db","type":"mqtt-broker","broker":"10.0.0.43","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":4,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"743fd75e.f52cb8","type":"ui_tab","name":"Meßsteckdosen","icon":"dashboard","order":9,"disabled":false,"hidden":false}]