Owl Intuition SolarPV - multicast reader
Using a Raspberry Pi, Node Red, Influx & Grafana, and Owl Intuition PV
This flow currently reads a string from the multicast sent from an Owl Intuition SolarPV broadcast. (I'm also about to add the electricity and weather packets from the Owl broadcast).
It selects the data packet for the solar panel, and creates global variables for 6 items: 1/ SolarPV id, 2/ timestamp, 3/ the watts currently being generated by the panel, 4/ the watts currently being exported to the national electricity grid, 5/ the daily wattage generated and finally 6/ the daily wattage exported to the national electricity grid.
The six global variables are combined and sent as one payload to an influx database called OwlSolarPV.
Using grafana to graph the output, but there is also the opportunity to graph/chart the outputs to the node red dashboard.
[{"id":"a457620e.f65ab","type":"udp in","z":"92a1db89.afc3c","name":"Owl Solar PV","iface":"","port":"22600","ipv":"udp6","multicast":"true","group":"224.192.32.19","datatype":"utf8","x":90,"y":160,"wires":[["f7bdc329.33e96","911d8b6b.142ec"]]},{"id":"f7bdc329.33e96","type":"debug","z":"92a1db89.afc3c","name":"Owl Solar PV","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":120,"wires":[]},{"id":"2b6535a8.70624a","type":"comment","z":"92a1db89.afc3c","name":"SOLAR DATA PACKET","info":"SOLAR DATA PACKET\nEXAMPLE PACKET\n<solar id='00A0C914C851'>\n<current><generating units='w'>0.00</generating><exporting units='w'>0.00</exporting></current> <day><generated units='wh'>0.00</generated><exported units='wh'>0.00</exported></day>\n</solar>\nPARAMETERS\nThe main <solar> tag contains sections for the current solar readings (<current>) and the totals for the day (<day>). Both sections have <generated> and <exported> tags that contain the values for power generated by the PV system and power exported to the electricity grid.\n \nTag Attribute Description\n \n \n Solar Id The MAC Address of the Network OWL\n \n \nCurr/Day units Units for the value in the xml tag.\nwh = Watt Hours, divide by 1000 to get kWh\nw = watts","x":120,"y":60,"wires":[]},{"id":"61020896.a85b9","type":"function","z":"92a1db89.afc3c","name":"setup global variable solarPvId","func":"global.set(\"solarPvId\",msg.payload);","outputs":1,"noerr":0,"x":970,"y":160,"wires":[[]]},{"id":"e89ee7a7.c2547","type":"function","z":"92a1db89.afc3c","name":"setup global variable currentGeneratingUnitsW","func":"global.set(\"currentGeneratingUnitsW\",msg.payload);","outputs":1,"noerr":0,"x":1020,"y":320,"wires":[[]]},{"id":"3a8f2163.0372ee","type":"function","z":"92a1db89.afc3c","name":"setup global variable exportingUnitsW","func":"global.set(\"exportingUnintsW\",msg.payload);","outputs":1,"noerr":0,"x":990,"y":400,"wires":[[]]},{"id":"a76b4c59.edded8","type":"function","z":"92a1db89.afc3c","name":"setup global variable currentDayGeneratedW","func":"global.set(\"currentDayGeneratedW\",msg.payload);","outputs":1,"noerr":0,"x":1010,"y":480,"wires":[[]]},{"id":"8d1ca736.41c668","type":"function","z":"92a1db89.afc3c","name":"setup global variable currentDayExportedW","func":"global.set(\"currentDayExportedW\",msg.payload);","outputs":1,"noerr":0,"x":1010,"y":560,"wires":[[]]},{"id":"95e77e78.d73ee8","type":"ui_gauge","z":"92a1db89.afc3c","name":"Currently generating","group":"1c8bae75.1a8cc2","order":1,"width":0,"height":0,"gtype":"gage","title":"Currently generating","label":"watts","format":"{{value}}","min":0,"max":"4000","colors":["#fff86b","#e4ef65","#77bb40"],"seg1":"500","seg2":"1000","x":1380,"y":320,"wires":[]},{"id":"47888bc7.49628c","type":"string","z":"92a1db89.afc3c","name":"Currently exporting","methods":[{"name":"between","params":[{"type":"str","value":"<exporting units='w'>"},{"type":"str","value":"</exporting>"}]},{"name":"toFloat","params":[{"type":"num","value":"1"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":650,"y":400,"wires":[["1dfe9485.77303b","3a8f2163.0372ee","2dbd9789.07b2e8"]]},{"id":"f44fa393.091f88","type":"string","z":"92a1db89.afc3c","name":"Current Generated Today","methods":[{"name":"between","params":[{"type":"str","value":"</current><day><generated units='wh'>"},{"type":"str","value":"</generated>"}]},{"name":"toFloat","params":[{"type":"num","value":"1"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":670,"y":480,"wires":[["eeaa251.4743158","a76b4c59.edded8","a4033c78.2e002"]]},{"id":"70690e94.be7ae8","type":"string","z":"92a1db89.afc3c","name":"Current Exported Today","methods":[{"name":"between","params":[{"type":"str","value":"</generated><exported units='wh'>"},{"type":"str","value":"</exported></day>"}]},{"name":"toFloat","params":[{"type":"num","value":"1"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":670,"y":560,"wires":[["dbd8a396.0e275","8d1ca736.41c668","571bd31d.ee846c"]]},{"id":"1dfe9485.77303b","type":"ui_gauge","z":"92a1db89.afc3c","name":"Currently Exporting","group":"1c8bae75.1a8cc2","order":2,"width":0,"height":0,"gtype":"gage","title":"Currently Exporting","label":"watts","format":"{{value}}","min":0,"max":"4000","colors":["#e0eed4","#77bb40","#253d0e"],"seg1":"","seg2":"","x":1370,"y":400,"wires":[]},{"id":"eeaa251.4743158","type":"ui_chart","z":"92a1db89.afc3c","name":"Current Generated today","group":"1c8bae75.1a8cc2","order":3,"width":0,"height":0,"label":"Current Generated Today","chartType":"line","legend":"true","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"20000","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"86400","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":1390,"y":480,"wires":[[]]},{"id":"dbd8a396.0e275","type":"ui_chart","z":"92a1db89.afc3c","name":"Curent Exported Today","group":"1c8bae75.1a8cc2","order":4,"width":0,"height":0,"label":"Curent Exported Today","chartType":"line","legend":"true","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"20000","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"86400","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":1380,"y":560,"wires":[[]]},{"id":"e9df09e8.66e178","type":"function","z":"92a1db89.afc3c","name":"setup global variable solarPvTimestamp","func":"global.set(\"solarPvTimestamp\",msg.payload);","outputs":1,"noerr":0,"x":1000,"y":240,"wires":[[]]},{"id":"6f1fcfc5.d41cb8","type":"debug","z":"92a1db89.afc3c","name":"currently generating","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":930,"y":280,"wires":[]},{"id":"2dbd9789.07b2e8","type":"debug","z":"92a1db89.afc3c","name":"currently exporting","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":930,"y":360,"wires":[]},{"id":"2ef9e1a.a61b91e","type":"debug","z":"92a1db89.afc3c","name":"solarPvId","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":900,"y":120,"wires":[]},{"id":"c9963bf6.5f93b8","type":"debug","z":"92a1db89.afc3c","name":"solarPvTimesatmp","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":930,"y":200,"wires":[]},{"id":"571bd31d.ee846c","type":"debug","z":"92a1db89.afc3c","name":"exported today","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":920,"y":520,"wires":[]},{"id":"a4033c78.2e002","type":"debug","z":"92a1db89.afc3c","name":"generated today","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":920,"y":440,"wires":[]},{"id":"b2261e35.756fd","type":"function","z":"92a1db89.afc3c","name":"Combine 6 global variables into one payload","func":"msg.payload = \n\n{\n\"solarPvId\" : global.get(\"solarPvId\"),\n\"solarPvTimestamp\" : global.get(\"solarPvTimestamp\"),\n\"currentGeneratingUnitsW\" : global.get(\"currentGeneratingUnitsW\"),\n\"exportingUnintsW\" : global.get(\"exportingUnintsW\"),\n\"currentDayGeneratedW\" : global.get(\"currentDayGeneratedW\"),\n\"currentDayExportedW\" : global.get(\"currentDayExportedW\")\n\n}\nreturn msg;\n\n","outputs":1,"noerr":0,"x":1010,"y":680,"wires":[["c0767150.926098","af8667d0.b85ea8"]]},{"id":"260df5be.3d8a7a","type":"inject","z":"92a1db89.afc3c","name":"","topic":"","payload":"","payloadType":"date","repeat":"10","crontab":"","once":true,"onceDelay":0.1,"x":550,"y":680,"wires":[["b2261e35.756fd"]]},{"id":"911d8b6b.142ec","type":"switch","z":"92a1db89.afc3c","name":"Take only from SOLAR bundle","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"<solar id=","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":350,"y":160,"wires":[["457fd844.5a8eb8","c220840c.46ed38","70119ac4.d203b4","47888bc7.49628c","f44fa393.091f88","70690e94.be7ae8"]]},{"id":"c0767150.926098","type":"debug","z":"92a1db89.afc3c","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1350,"y":640,"wires":[]},{"id":"457fd844.5a8eb8","type":"string","z":"92a1db89.afc3c","name":"solarPvId","methods":[{"name":"between","params":[{"type":"str","value":"<solar id='"},{"type":"str","value":"'>"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":620,"y":160,"wires":[["61020896.a85b9","2ef9e1a.a61b91e"]]},{"id":"c220840c.46ed38","type":"string","z":"92a1db89.afc3c","name":"timestamp","methods":[{"name":"between","params":[{"type":"str","value":"<timestamp>"},{"type":"str","value":"</timestamp>"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":630,"y":240,"wires":[["e9df09e8.66e178","c9963bf6.5f93b8"]]},{"id":"70119ac4.d203b4","type":"string","z":"92a1db89.afc3c","name":"Currently Generating Units","methods":[{"name":"between","params":[{"type":"str","value":"<current><generating units='w'>"},{"type":"str","value":"</generating>"}]},{"name":"toFloat","params":[{"type":"num","value":"1"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":680,"y":320,"wires":[["6f1fcfc5.d41cb8","e89ee7a7.c2547","95e77e78.d73ee8"]]},{"id":"af8667d0.b85ea8","type":"influxdb out","z":"92a1db89.afc3c","influxdb":"242678f7.d4b1","name":"OwlSolarPV","measurement":"stations","precision":"","retentionPolicy":"","x":1350,"y":680,"wires":[]},{"id":"a8d2b461.5fe31","type":"comment","z":"92a1db89.afc3c","name":"This Flow takes Owl multicast output and divides it to be an influx database","info":"","x":300,"y":620,"wires":[]},{"id":"26f5863e.514102","type":"comment","z":"92a1db89.afc3c","name":"Owl appears to pump out electricty parameteres as well as solar so the witch only goes to the solar package","info":"","x":850,"y":60,"wires":[]},{"id":"1c8bae75.1a8cc2","type":"ui_group","z":"","name":"SolarPV","tab":"2f11a8c0.5a5aa","disp":true,"width":"6","collapse":false},{"id":"242678f7.d4b1","type":"influxdb","z":"","hostname":"192.168.199.109","port":"8086","protocol":"http","database":"OwlSolarPV","name":"OwlSolarPV","usetls":false,"tls":""},{"id":"2f11a8c0.5a5aa","type":"ui_tab","z":"","name":"MK14 7PH","icon":"dashboard","disabled":false,"hidden":false}]