sircuri / GoodWeUSBLogger

Python based logger for GoodWe inverters using USB.
GNU General Public License v3.0
10 stars 7 forks source link

upload output to pvoutput.org #5

Open kkplein opened 6 years ago

kkplein commented 6 years ago

Hi, with your help from two weeks ago, we were able to setup everything, and it's working quite nicely, thank you! :-)

Now we are looking for a way to get the mosquitto output data into something like pvoutput.org

Anyone here with some tips or trics for us?

R0yk3 commented 4 years ago

With nodeRed you can use node

[{"id":"c82b19e0.36d088","type":"tab","label":"PV output","disabled":false,"info":""},{"id":"d74be1f6.ce32c","type":"delay","z":"c82b19e0.36d088","name":"Upload every 5 minutes","pauseType":"rate","timeout":"300","timeoutUnits":"seconds","rate":"1","nbRateUnits":"300","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":470,"y":160,"wires":[["b97222a.e413de"]]},{"id":"b97222a.e413de","type":"function","z":"c82b19e0.36d088","name":"Watt&Voltage+URL","func":"msg.d = msg.payload.runningInfo.timestamp.substr(0, 8),\nmsg.h = msg.payload.runningInfo.timestamp.substr(8, 2),\nmsg.m = msg.payload.runningInfo.timestamp.substr(10, 2),\nmsg.v2 = msg.payload.runningInfo.pac,\nmsg.v6 = msg.payload.runningInfo.vac1,\nmsg.url=\"https://pvoutput.org/service/r2/addstatus.jsp?key=API&sid=SID&d=\"+msg.d+\"&t=\"+msg.h+\":\"+msg.m+\"&v2=\"+msg.v2+\"&v6=\"+msg.v6\n\nreturn msg","outputs":1,"noerr":0,"x":710,"y":160,"wires":[["fe3e958b.388ca8"]]},{"id":"3032cfda.ac92","type":"debug","z":"c82b19e0.36d088","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1110,"y":160,"wires":[]},{"id":"fe3e958b.388ca8","type":"http request","z":"c82b19e0.36d088","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"","tls":"","persist":false,"proxy":"","authType":"","x":910,"y":160,"wires":[["3032cfda.ac92"]]},{"id":"ab8b32cb.62941","type":"mqtt in","z":"c82b19e0.36d088","name":"","topic":"goodwe/96000DTU187W0031/data","qos":"2","datatype":"json","broker":"b008ef44.96838","x":180,"y":160,"wires":[["d74be1f6.ce32c"]]},{"id":"b008ef44.96838","type":"mqtt-broker","z":"","name":"localhost","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":""}]

Change API and SID with your code.