-
Notifications
You must be signed in to change notification settings - Fork 0
/
flow.json
1 lines (1 loc) · 10.7 KB
/
flow.json
1
[{"id":"6d3d7606.2e955","type":"tab","label":"Smart socket - prese intelligenti (?)","disabled":false,"info":""},{"id":"43a61171.c59e5","type":"ui_group","z":"","name":"Prese smart","tab":"40fd8baf.3d2234","disp":true,"width":"8","collapse":true},{"id":"40fd8baf.3d2234","type":"ui_tab","z":"","name":"Smart home","icon":"dashboard","order":12,"disabled":false,"hidden":false},{"id":"c1264783.4af0e8","type":"ui_base","theme":{"name":"theme-dark","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":true,"reset":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":"#097479","value":"#097479","edited":false},"page-titlebar-backgroundColor":{"value":"#097479","edited":false},"page-backgroundColor":{"value":"#111111","edited":false},"page-sidebar-backgroundColor":{"value":"#000000","edited":false},"group-textColor":{"value":"#0eb8c0","edited":false},"group-borderColor":{"value":"#555555","edited":false},"group-backgroundColor":{"value":"#333333","edited":false},"widget-textColor":{"value":"#eeeeee","edited":false},"widget-backgroundColor":{"value":"#097479","edited":false},"widget-borderColor":{"value":"#333333","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":"89748672.c7b2c8","type":"mqtt-broker","z":"","name":"","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":"9b73a22f.785e8","type":"inject","z":"6d3d7606.2e955","name":"","topic":"power","payload":"OFF","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":290,"y":620,"wires":[["1240852e.cd5433"]]},{"id":"35730b93.45b324","type":"inject","z":"6d3d7606.2e955","name":"","topic":"power","payload":"ON","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":300,"y":580,"wires":[["1240852e.cd5433"]]},{"id":"1240852e.cd5433","type":"Sonoff device","z":"6d3d7606.2e955","mode":"0","broker":"89748672.c7b2c8","device":"presab","name":"presab","onValue":"ON","offValue":"OFF","cmdPrefix":"cmnd","statPrefix":"stat","telePrefix":"tele","x":460,"y":600,"wires":[[]]},{"id":"1489f8c6.b455b7","type":"status","z":"6d3d7606.2e955","name":"","scope":["1240852e.cd5433"],"x":300,"y":680,"wires":[["8ba7e049.1dec08"]]},{"id":"8ba7e049.1dec08","type":"function","z":"6d3d7606.2e955","name":"Filtra status","func":"var msg1={};\nmsg1.payload=\"Online\";\nvar msg2={};\nmsg2.payload=msg.status.text;\nreturn [msg1,msg2];","outputs":2,"noerr":0,"x":470,"y":680,"wires":[["89849b77.8ca738"],["451b555e.040c04"]]},{"id":"1e876ecb.a2e619","type":"inject","z":"6d3d7606.2e955","name":"","topic":"power","payload":"OFF","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":290,"y":180,"wires":[["be3012f4.0b01c"]]},{"id":"37060e12.9155b2","type":"inject","z":"6d3d7606.2e955","name":"","topic":"power","payload":"ON","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":300,"y":140,"wires":[["be3012f4.0b01c"]]},{"id":"be3012f4.0b01c","type":"Sonoff device","z":"6d3d7606.2e955","mode":"0","broker":"89748672.c7b2c8","device":"presaa","name":"presaa","onValue":"ON","offValue":"OFF","cmdPrefix":"cmnd","statPrefix":"stat","telePrefix":"tele","x":460,"y":160,"wires":[[]]},{"id":"cfa6ac4b.a58d78","type":"status","z":"6d3d7606.2e955","name":"","scope":["be3012f4.0b01c"],"x":300,"y":240,"wires":[["2265c534.c528ca"]]},{"id":"95b51cfa.63a46","type":"ui_button","z":"6d3d7606.2e955","name":"","group":"43a61171.c59e5","order":4,"width":"1","height":"1","passthru":false,"label":"OFF","tooltip":"","color":"","bgcolor":"","icon":"","payload":"OFF","payloadType":"str","topic":"power","x":300,"y":100,"wires":[["be3012f4.0b01c"]]},{"id":"efd0c347.07d3a","type":"ui_button","z":"6d3d7606.2e955","name":"","group":"43a61171.c59e5","order":3,"width":"1","height":"1","passthru":false,"label":"ON","tooltip":"","color":"","bgcolor":"","icon":"","payload":"ON","payloadType":"str","topic":"power","x":300,"y":60,"wires":[["be3012f4.0b01c"]]},{"id":"bcebd290.0dafd","type":"ui_button","z":"6d3d7606.2e955","name":"","group":"43a61171.c59e5","order":9,"width":"1","height":"1","passthru":false,"label":"OFF","tooltip":"","color":"","bgcolor":"","icon":"","payload":"OFF","payloadType":"str","topic":"power","x":310,"y":540,"wires":[["1240852e.cd5433"]]},{"id":"aacd770b.e4355","type":"ui_button","z":"6d3d7606.2e955","name":"","group":"43a61171.c59e5","order":8,"width":"1","height":"1","passthru":false,"label":"ON","tooltip":"","color":"","bgcolor":"","icon":"","payload":"ON","payloadType":"str","topic":"power","x":310,"y":500,"wires":[["1240852e.cd5433"]]},{"id":"451b555e.040c04","type":"ui_switch","z":"6d3d7606.2e955","name":"Presa B status","label":"<a href=http://presab.lan target=_new>Presa B</a>","tooltip":"","group":"43a61171.c59e5","order":6,"width":"3","height":"1","passthru":true,"decouple":"false","topic":"","style":"","onvalue":"On","onvalueType":"str","onicon":"fa-lightbulb-o","oncolor":"yellow","offvalue":"Off","offvalueType":"str","officon":"fa-lightbulb-o","offcolor":"grey","x":660,"y":660,"wires":[[]]},{"id":"2c0710a.101fdf","type":"ui_switch","z":"6d3d7606.2e955","name":"Presa A status","label":"<a href=http://presaa.lan target=_new>Presa A</a>","tooltip":"","group":"43a61171.c59e5","order":1,"width":"3","height":"1","passthru":true,"decouple":"false","topic":"","style":"","onvalue":"On","onvalueType":"str","onicon":"fa-lightbulb-o","oncolor":"yellow","offvalue":"Off","offvalueType":"str","officon":"fa-lightbulb-o","offcolor":"grey","x":680,"y":220,"wires":[[]]},{"id":"aa8e425.89c5dc","type":"ui_switch","z":"6d3d7606.2e955","name":"Presa A online","label":"","tooltip":"","group":"43a61171.c59e5","order":2,"width":"1","height":"1","passthru":true,"decouple":"false","topic":"","style":"","onvalue":"Online","onvalueType":"str","onicon":"fa-wifi","oncolor":"green","offvalue":"Offline","offvalueType":"str","officon":"fa-wifi","offcolor":"red","x":680,"y":280,"wires":[[]]},{"id":"89849b77.8ca738","type":"ui_switch","z":"6d3d7606.2e955","name":"Presa B online","label":"","tooltip":"","group":"43a61171.c59e5","order":7,"width":"1","height":"1","passthru":true,"decouple":"false","topic":"","style":"","onvalue":"Online","onvalueType":"str","onicon":"fa-wifi","oncolor":"green","offvalue":"Offline","offvalueType":"str","officon":"fa-wifi","offcolor":"red","x":660,"y":720,"wires":[[]]},{"id":"901e885a.26883","type":"mqtt in","z":"6d3d7606.2e955","name":"tele/presab/SENSOR","topic":"tele/presab/SENSOR","qos":"0","datatype":"json","broker":"89748672.c7b2c8","x":260,"y":800,"wires":[["ad4aadc6.41b8b8","ea8555bb.b63a38"]]},{"id":"4a2ecc22.3cb004","type":"debug","z":"6d3d7606.2e955","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":650,"y":840,"wires":[]},{"id":"ac6f83d.2b01e8","type":"ui_gauge","z":"6d3d7606.2e955","name":"Power B","group":"43a61171.c59e5","order":10,"width":"2","height":"1","gtype":"gage","title":"","label":"W","format":"{{value}}","min":0,"max":"2200","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"1000","x":640,"y":800,"wires":[]},{"id":"ad4aadc6.41b8b8","type":"function","z":"6d3d7606.2e955","name":"","func":"var msg1={};\nmsg1.payload=\"Online\"; //If mqtt receive data the scoket is online\nvar msg2={};\nmsg2.payload=msg.payload.ENERGY.Power;\nif (!msg2.payload) {\n msg2.payload=0;\n}\nreturn [msg1,msg2];","outputs":2,"noerr":0,"x":450,"y":800,"wires":[["89849b77.8ca738"],["4a2ecc22.3cb004","ac6f83d.2b01e8"]]},{"id":"83a0c5e9.78e41","type":"mqtt in","z":"6d3d7606.2e955","name":"tele/presaa/SENSOR","topic":"tele/presaa/SENSOR","qos":"0","datatype":"json","broker":"89748672.c7b2c8","x":260,"y":360,"wires":[["7feda0f2.1cb4b"]]},{"id":"ba071afe.5166c8","type":"debug","z":"6d3d7606.2e955","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":670,"y":400,"wires":[]},{"id":"b8d14b47.8b0d3","type":"ui_gauge","z":"6d3d7606.2e955","name":"Power A","group":"43a61171.c59e5","order":5,"width":"2","height":"1","gtype":"gage","title":"","label":"W","format":"{{value}}","min":0,"max":"2200","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"1000","x":660,"y":360,"wires":[]},{"id":"7feda0f2.1cb4b","type":"function","z":"6d3d7606.2e955","name":"","func":"var msg1={};\nmsg1.payload=\"Online\"; //If mqtt receive data the scoket is online\nvar msg2={};\nmsg2.payload=msg.payload.ENERGY.Power;\nif (!msg2.payload) {\n msg2.payload=0;\n}\nreturn [msg1,msg2];","outputs":2,"noerr":0,"x":450,"y":360,"wires":[["aa8e425.89c5dc"],["b8d14b47.8b0d3","ba071afe.5166c8"]]},{"id":"2265c534.c528ca","type":"function","z":"6d3d7606.2e955","name":"Filtra status","func":"var msg1={};\nmsg1.payload=\"Online\";\nvar msg2={};\nmsg2.payload=msg.status.text;\nreturn [msg1,msg2];","outputs":2,"noerr":0,"x":470,"y":240,"wires":[["aa8e425.89c5dc"],["2c0710a.101fdf"]]},{"id":"ea8555bb.b63a38","type":"debug","z":"6d3d7606.2e955","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":490,"y":880,"wires":[]},{"id":"2d154045.9891c8","type":"mqtt in","z":"6d3d7606.2e955","name":"tele/presab/LWT ","topic":"tele/presab/LWT","qos":"0","datatype":"utf8","broker":"89748672.c7b2c8","x":240,"y":720,"wires":[["89849b77.8ca738","95deefc9.db6ec"]]},{"id":"61f192b9.666934","type":"mqtt in","z":"6d3d7606.2e955","name":"tele/presaa/LWT ","topic":"tele/presaa/LWT","qos":"0","datatype":"utf8","broker":"89748672.c7b2c8","x":280,"y":280,"wires":[["aa8e425.89c5dc","5abc8ddb.1638b4"]]},{"id":"5abc8ddb.1638b4","type":"debug","z":"6d3d7606.2e955","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":450,"y":300,"wires":[]},{"id":"95deefc9.db6ec","type":"debug","z":"6d3d7606.2e955","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":430,"y":740,"wires":[]}]