we have updated Generation power and energy to PVoutput with a Wi-Fi energy meter.
code in github: https://github.com/lewei50/iammeter
The Bi-directional wifi energy meter have a promotion recently. 100 US dollars, including two WEM3162(bi-directional ,one phase wifi energy meter) and freight fee to Australia(Not in remote areas) https://www.alibaba.com/product-detail/Promotion-Package-WiFi-Energy-Meter-x_62325471050.html
The wifi energy meter provide some local api,such as below.
API url: ip/monitorjson
method: http get
response: {“status”:“succeed”,“data”:[235.00,1.214,189,1265.17,0.00]}
data description: voltage,current,power,import Energy,export Energy.
Code Example:
import wem
import PVOutput
import json
meter=wem.wem3162(‘http://192.168.1.8’)
‘’’
one phase(wem3162 wem3080) meter response
{“status”:“succeed”,“data”:[235.00,1.214,189,1265.17,0.00]}
‘’’print (meter.monitorjson())
(vol,cur,power,importE,exportE)=meter.json2parameter()
print (“vol:%dV\r\ncur:%fA\r\npower:%dw\r\nimportEnergy:%fKWH\r\nexportEnergy:%fKWH\r\n”%(vol,cur,power,importE,exportE))
pv=PVOutput.PVOutputApi(‘siteNumber’,‘api-key’)‘’’
#pvo = PVOutput.PVOutputApi(“deviceId”, “apiKey”)
#pvo.add_status(
energy_generation,
power_generation,
energy_consumption,
power_consumption,
temperature,
voltage,
cumulative_flag,
net_flag)
#pvo.add_status(100,200,None,None,None,None,None,None)
‘’’pv.add_status(importE,power,None,None,None,vol,1,None)
I once want to update generation and grid (import/export ) energy simultaneously. But the API(add status) has not support it yet.
I hope addstatus can be upgraded later to include export/import energy as well.