Fantastic stuff here!
I recently had my Enphase system installed, and would like to install the above, but I am a python noob and not sure how to get the output of my solar system correctly working on the TWC code. Here is the IP details and the output. I want to use the net-consumption wNow. Another way is that it could take the simple output of production and consumption and do the maths within the TWC, but that requires polling the envoy twice. Any help would be great.
http://192.168.86.151/production.json?details=1&classic=1
Returns:
{"production":[{"type":"inverters","activeCount":31,"readingTime":0,"wNow":0,"whLifetime":10629163},
{"type":"eim","activeCount":1,"measurementType":"production","readingTime":1498135971,"wNow":-68.327,"whLifetime":9536841.306,"varhLeadLifetime":0.397,"varhLagLifetime":3369487.327,"vahLifetime":11422860.052,"rmsCurrent":1.604,"rmsVoltage":243.565,"reactPwr":382.788,"apprntPwr":390.483,"pwrFactor":-0.19,"whToday":22954.306,"whLastSevenDays":88648.306,"vahToday":29497.052,"varhLeadToday":0.397,"varhLagToday":10781.327,"lines":[{"wNow":-68.327,"whLifetime":9536841.306,"varhLeadLifetime":0.397,"varhLagLifetime":3369487.327,"vahLifetime":11422860.052,"rmsCurrent":1.604,"rmsVoltage":243.565,"reactPwr":382.788,"apprntPwr":390.483,"pwrFactor":-0.19,"whToday":22954.306,"whLastSevenDays":88648.306,"vahToday":29497.052,"varhLeadToday":0.397,"varhLagToday":10781.327}]}],"consumption":[{"type":"eim","activeCount":1,"measurementType":
"total-consumption" ,"readingTime":1498135971,"wNow":1736.44,"whLifetime":12996934.409,"varhLeadLifetime":7422102.743,"varhLagLifetime":3514138.249,"vahLifetime":18884866.53,"rmsCurrent":9.301,"rmsVoltage":243.653,"reactPwr":-430.998,"apprntPwr":2266.29,"pwrFactor":0.77,"whToday":28798.409,"whLastSevenDays":170913.409,"vahToday":41433.53,"varhLeadToday":19016.743,"varhLagToday":11006.249,"lines":[{"wNow":1736.44,"whLifetime":12996934.409,"varhLeadLifetime":7422102.743,"varhLagLifetime":3514138.249,"vahLifetime":18884866.53,"rmsCurrent":9.301,"rmsVoltage":243.653,"reactPwr":-430.998,"apprntPwr":2266.29,"pwrFactor":0.77,"whToday":28798.409,"whLastSevenDays":170913.409,"vahToday":41433.53,"varhLeadToday":19016.743,"varhLagToday":11006.249}]},{"type":"eim","activeCount":1,"measurementType":"net-consumption","readingTime":1498135971,"wNow":1804.767,"whLifetime":9268303.695,"varhLeadLifetime":7422102.346,"varhLagLifetime":144650.923,"vahLifetime":18884866.53,"rmsCurrent":7.697,"rmsVoltage":243.742,"reactPwr":-48.21,"apprntPwr":1875.342,"pwrFactor":0.95,"whToday":0,"whLastSevenDays":0,"vahToday":0,"varhLeadToday":0,"varhLagToday":0,"lines":[{"wNow":1804.767,"whLifetime":9268303.695,"varhLeadLifetime":7422102.346,"varhLagLifetime":144650.923,"vahLifetime":18884866.53,"rmsCurrent":7.697,"rmsVoltage":243.742,"reactPwr":-48.21,"apprntPwr":1875.342,"pwrFactor":0.95,"whToday":0,"whLastSevenDays":0,"vahToday":0,"varhLeadToday":0,"varhLagToday":0}]}],"storage":[{"type":"acb","activeCount":0,"readingTime":0,"wNow":0,"whNow":0,"state":"idle","percentFull":0}]}