1. Introduction

PVOutput is a free service for sharing and comparing live solar panel output and energy consumption data. By installing our WiFi energy meter in your solar system, you can easily integrate your PV data to PVOutput through the meter's open API.

2. Key Features of WiFi Energy Meter

3. Code Examples

3.1 API Description

api url: ip/monitorjson

method: http get

3.2 Python Code Example

Python Code on Github

import requests
 
url = "http://ip/monitorjson" 
 
headers={'Authorization':'Basic YWRtaW46YWRtaW4='}
 
response = requests.request("get", url, headers=headers)
 
print(response.text)

{"status":"succeed","data":[234.00,6.235,1423,1222.67,0.00]}

voltage:234 V

current:6.25 A

active power:1433 W

import energy:1222.67 Kwh

export energy:0 Kwh

4. Integrate the Data to PVOutput

PVOutput:https://www.pvoutput.org Github Link: https://github.com/lewei50/iammeter/

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)

QuickStart document of single phase WiFi Energy Meter (WEM3080): WEM3080 Quickstart

QuickStart document of three phase WiFi Energy Meter (WEM3080T): WEM3080T Quickstart

How to appy the WiFi Energy Meter in a Solar System:Apply in Solar System

Contact

Leave a comment
Contact me





App Download