Upload to pvoutput.org - WILL PAY FOR CODE

Hi all, 

I'm not a coder, just a tinkerer and I'm afraid what I want to achieve is outside my current abilities. I would like to update my favourite solar monitoring site pvoutput.org as well as emoncms.org.

This is my current system that is being monitored via the serial port on the inverter which is connected to an old windows pc and some scripts are run in conjunction with the manufacturers software. This is the windows pc only use and I would like to turn it off.

http://www.pvoutput.org/intraday.jsp?id=12278&sid=10211

This is my current emcms dashboard

http://emoncms.org/Nigel

In addition to the solar monitoring I would like to include my import/export power values. PVoutput has a comprehensive api with documentation here

http://www.pvoutput.org/help.html

So to break it down I would like to monitor the following to PVoutput as often as the API allows while still maintaining the emoncms monitoring.

  1. Add power generation
  2. Add power consumption
  3. Add Temperature
  4. Add Voltage

As stated, I am happy to pay for these additions if somebody would like to give me an estimate on costs.

I have attached my current sketch for my OKG.

Avontech's picture

Re: Upload to pvoutput.org - WILL PAY FOR CODE

Nerdy, if you are not in a hurry I'll get round to it later this year, - I've got three inverters on a 14kWp system on a single phase here :)  so will look further.

It may be possible to send it via pachube / cosm, though I haven't fully investigated it yet...

 

stuart's picture

Re: Upload to pvoutput.org - WILL PAY FOR CODE

What PV inverter is it ?

Avontech's picture

Re: Upload to pvoutput.org - WILL PAY FOR CODE

Mine are 2 x SMA SB5000TL and I x SolarEdge  SE4000-16

 

nerdy's picture

Re: Upload to pvoutput.org - WILL PAY FOR CODE

Mine is a Clenergy SPH30

Edit: I'm not wanting to communicate directly with the inverter though. I just want to upload figures from the CT's connected to the EmonTX. So the numbers are there, they just need to be formatted to comply with the pvoutput requirements. One of the things that got me stumped was you have to send a date/time stamp with each update. 

nerdy's picture

Re: Upload to pvoutput.org - WILL PAY FOR CODE

No hurry but definitely keen to get it done. 

I did look at some of the sample code to get it into Cosm but once again it's above my head. Let me know if/when you start and I may be able to assist in some meaningful way.

nothing clever's picture

Re: Upload to pvoutput.org - WILL PAY FOR CODE

I have something running exporting to pvoutput.org. It makes some assumptions.

1) that emonTX is running   emonTx_CT123_Voltage i.e. a payload of four 16 bit numbers, CT1, CT2, CT3 (unused) and voltage

2) that emontx is node 10 (it is by default)

3) you're running the php gateway code on a raspberry pi

There are two files in the tarball. unzip into your root to produce

/var/www/emoncms/Modules/raspberrypi/raspberrypi_run.php

and /bin/pvoutput

You'll need to edit /bin/pvoutput to add your API key and system ID

/var/www/emoncms/Modules/raspberrypi/raspberrypi_run.php has a few extra lines of code. to call /bin/pvoutput.

At the moment pvoutput is updated every 5 minutes when the solar panels are generating. You can tweak the frequency by editting raspberrypi_run.php - look for variables starting $pv...

The numbers saved to pvoutput.org are instantaneous values, they are not averaged over the time period.

Sample output can be seen here http://www.pvoutput.org/intraday.jsp?id=20428&sid=18363

 

Avontech's picture

Re: Upload to pvoutput.org - WILL PAY FOR CODE

Many thanks nothing clever, when I can get my emonbase (OKG) ruNning smoothly I'll give it a go. if you update it (e.g. 5 minute average :)  please let us know.

ngbod's picture

Re: Upload to pvoutput.org - WILL PAY FOR CODE

nothing clever, I downloaded your file and followed your instructions re unpacking and inserted my api and systemid but I can't get this to do anything. There is no log outputs.  Is there something else we need to do to initialise this process. Also where do we state the pvoutput.org web address, with the system id? 

ngbod's picture

Re: Upload to pvoutput.org - WILL PAY FOR CODE

I finally got this working and it works well. I missed the obvious fact that I needed to put 'bin/pvoutput' in the etc/rc.local file to set the script running at startup.

I use solar analyzer widget on my android phone which gets its data from pvoutput.org and it looks fine using the 5 min emontx spot data.

I've spent the last few hours searching how to send my daily pv kwh feed to pvoutput to update the pvoutput V1field but haven't figured it out yet. This would increase the accuracy of the pvoutput daily pv figure rather than it being calculated from 5 minute spot figures.

Bill Thomson's picture

Re: Upload to pvoutput.org - WILL PAY FOR CODE

NC,

This was just what I was looking for. Works like a champ.  THANKS!

 

modenet's picture

Re: Upload to pvoutput.org - WILL PAY FOR CODE

Hi, I use your script but I obtain strange values:

my pvoutput.calls

PVOUTPUT= 33202822804-12700
PVOUTPUT= 34302822617-12700
PVOUTPUT= 39302922935-12700

my pvtout.csv

20131106,18:05:06,,33202810104,0,.
20131106,18:10:04,,34302809917,0,.
20131106,18:15:02,,39302910235,0,.

 

I have one emontx with sketch emonTx_CT123_Voltage modified to support a temperature sensor and one emonglcd.

thanks

modenet's picture

Re: Upload to pvoutput.org - WILL PAY FOR CODE

I resolved: I didn't merge all commands of rasperry_run.php

sorry

ngbod's picture

Re: Upload to pvoutput.org - WILL PAY FOR CODE

For those using nothing clever's scripts, attached is a version of raspberrypi_run.php which I've modified to work with the new V7 emoncms with redis and HDD.

Bill Thomson's picture

Re: Upload to pvoutput.org - WILL PAY FOR CODE

THANK YOU!

 

Bill

 

tonto's picture

Re: Upload to pvoutput.org - WILL PAY FOR CODE

Im not too sure what i'm doing wrong other than get api and system id is there any thing else i need to do on pv output. I have had arduino running for past 2 years no issues other than arduino lock up.

i have used raspberry pi + hard drive + emoncms image and set up so that its loging locally then copied ngbobs raspberrypi.run.php v7 to correct folder on hd plus the pvoutput file edited with api and id for pvoutput in correct folder on hd

have vi into rc.local and added line in for /bin/pvoutput as below and thinking this may be where the issue is..

Any help much appreciated

tonto
 

ngbod's picture

Re: Upload to pvoutput.org - WILL PAY FOR CODE

tonto, turns out I didn't need to modify rc.local. Don't know why I needed to do that initially.

Try the mods again without anything added to rc.local and maybe reboot the system before trying.

Nerdy has posted a different method for uploading to pvoutput, below ,which may be easier to setup.

http://openenergymonitor.org/emon/node/3675

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.