HowTo add temperature to your PVoutput.org graphs



Adding a Wunderground weather station enables live temperature data to be combined with your live generation or consumption data.

Details

  • Create an account at http://www.wunderground.com (Free membership)
  • Edit your system in PVoutput.org (Settings/Edit)
  • In the "Automatic Uploads" section, select primary device = "Weather"
  • Select a nearby weather station
  • Copy/Paste your Weather API key from your wunderground account
  • Configure SBFspot

Example

AutoTempUpload.jpg

SBFspot configuration

By default, SBFspot uploads the inverter temperature (V5) to PVoutput. To visualize the ambient temperature, you need to modify the view used for PVoutput data upload.

Depending on the database you've chosen (SQLite or MySQL) you must first connect to your DB before making the change.

By default, the V5 and V6 columns return the system temperature and Uac1 - AC Value (from vwAvgSpotData view).
If you want to replace the V5 value by the one collected from weather service (in this case WUnderground), avoid sending the inverter temperature by setting V5 to NULL.

SQLite_logo_small.jpg
SQLite doesn't support the "ALTER" command, so delete it first:
DROP VIEW IF EXISTS vwPvoData;

Then, recreate it:
CREATE VIEW vwPvoData AS
SELECT dd.Timestamp, dd.Name, dd.Type, dd.Serial,
dd.TotalYield AS V1, dd.Power AS V2,
cons.EnergyUsed AS V3, cons.PowerUsed AS V4, 
NULL AS V5,
spot.Uac1 AS V6,
NULL AS V7, NULL AS V8, NULL AS V9,
NULL AS V10, NULL AS V11, NULL AS V12,
dd.PVoutput
FROM vwDayData AS dd
LEFT JOIN vwAvgSpotData AS spot
ON dd.Serial = spot.Serial AND dd.Timestamp = spot.Nearest5min
LEFT JOIN vwAvgConsumption AS cons
ON dd.Timestamp = cons.Nearest5min
ORDER BY dd.Timestamp DESC;


MySQL_logo_small.png
ALTER VIEW vwPvoData AS
SELECT dd.Timestamp, dd.Name, dd.Type, dd.Serial,
dd.TotalYield AS V1, dd.Power AS V2,
cons.EnergyUsed AS V3, cons.PowerUsed AS V4, 
NULL AS V5,
spot.Uac1 AS V6,
NULL AS V7, NULL AS V8, NULL AS V9,
NULL AS V10, NULL AS V11, NULL AS V12,
dd.PVoutput
FROM vwDayData AS dd
LEFT JOIN vwAvgSpotData AS spot
ON dd.Serial = spot.Serial AND dd.Timestamp = spot.Nearest5min
LEFT JOIN vwAvgConsumption AS cons
ON dd.Timestamp = cons.Nearest5min
ORDER BY dd.Timestamp DESC;


If you omit this configuration step, you can see some strange effects:
pvo_temperature_issue.png

Read also the "Tweaking" section in the Quick Reference Guide

Important

If you have more than one system defined, be sure to create an API key for each system. If you use the same key for different systems, you will exceed the 500 requests per day limit of Wunderground, especially when your systems are set up for 5 minutes interval.

Last edited Mar 9, 2016 at 9:21 PM by SBF, version 10