Extended data with sbfspot

Hi,

Hope someone could help please? - I have done for some time uploaded my data and extended data using android and felix but having a go with a pi3 and sbfspot. I used the config tool and can get my normal data uploaded which seems to work fine but struggling with getting the extended data back up and running.

I am trying to do this as per the doc with regards to sqlite but I am clueless with sql. How do you acutally do this in sqlite?? - not sure how you are supposed to use the editor to enter the below.

Any SQL help would be appreciated.

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,
spot.Udc1 AS V7, – DC Voltage String 1
spot.Udc2 AS V8, – DC Voltage String 2
spot.Pdc1 AS V9, – DC Power String 1
spot.Pdc2 AS V10, – DC Power String 2
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;

Many thanks

It’s al in the doc, no? See “Tweaking” paragraph