Meteobridge RPI and saving/displaying RPI stats

Post Reply
User avatar
Daali
Advisor
Advisor
Posts: 56
Joined: Mon Jul 26, 2021 8:06 pm
Location: Georgia, US
Station model: Ecowitt GW1002
Software: Meteobridge, FOSHKplugin
Contact:

Meteobridge RPI and saving/displaying RPI stats

Post by Daali » Thu Aug 19, 2021 11:36 am

Hi all,

I was curious how many use Meteobridge with a Raspberry. I've used a D-Link DIR-505 for the last 5 years and just switched. I see there are 4 new sensors to report on:
data10num: cpu load in percent
data15num: number of processes
data16num: age of data (all sensors) in seconds
t9temp: cpu temperature

Last night hacked up davidefa's lightning and code-enhanced api/apiSetup/saveAPISettings to store the data. I modified stationStatus to display the data, but I am not happy with it yet. The variables I used may not fit the recognized nomenclature (RPITEMP, RPILOAD, RPIPROC, RPIDAGE).
Image

Is there any thought of adding a generic way to add ad-hoc sensors to the api?
https://www.jeffersonweather.com
GW1000 gateway
WS68 Anemometer
WH40 Rain Gauge
WH32 Temp/Hum
WH57 Lightning
WH41 PM2.5 Air Quality
WH45 PM2.5/10/Co2 Air Quality
WN34S Soil temperature
WH31SM Soil Moisture

davidefa
Expert
Expert
Posts: 862
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: Meteobridge RPI and saving/displaying RPI stats

Post by davidefa » Thu Aug 19, 2021 8:13 pm

Daali wrote: Thu Aug 19, 2021 11:36 am The variables I used may not fit the recognized nomenclature (RPITEMP, RPILOAD, RPIPROC, RPIDAGE).
Image

Is there any thought of adding a generic way to add ad-hoc sensors to the api?
Sorry I don't understand the 'The variables I used may not fit the recognized nomenclature (RPITEMP, RPILOAD, RPIPROC, RPIDAGE)'

Regarding your second question ( adding a new sensor to the database ) I think this is a useful feature for the next version of meteotemplate.
Every sensor could be defined ( database field, sensor name, unit of measure... ) in a database table or simply in a json file.
So that adding a new sensor should be adding a new record in the database or a new line in a file.
For now, adding a new sensor ( to the database ) means modifying apiSetup and saveAPISettings ( as you already did )
Image

User avatar
Daali
Advisor
Advisor
Posts: 56
Joined: Mon Jul 26, 2021 8:06 pm
Location: Georgia, US
Station model: Ecowitt GW1002
Software: Meteobridge, FOSHKplugin
Contact:

Re: Meteobridge RPI and saving/displaying RPI stats

Post by Daali » Thu Aug 19, 2021 9:50 pm

What I was trying to convey was I didn't think my new db/api variables (RPITEMP, RPILOAD, RPIPROC, RPIDAGE) fit the current naming convention. To be transparent all I did was mimic your lightning additions, so in essence, you did it =)

I've added it to the lightning event to send the data:
/api?&U=[epoch]&RPITEMP=[t9temp-act]&RPILOAD=[data10num-act]&RPIPROC=[data15num-act]&RPIDAGE=[data16num-act]&L=[lgt0total-dmax.0:]&LD=[lgt0dist-lastval.0:]&LT=[lgt0dist-lasttime=epoch]

if anyone wants to look or use they can grab it here: https://github.com/Daali/meteotemplate_mods
https://www.jeffersonweather.com
GW1000 gateway
WS68 Anemometer
WH40 Rain Gauge
WH32 Temp/Hum
WH57 Lightning
WH41 PM2.5 Air Quality
WH45 PM2.5/10/Co2 Air Quality
WN34S Soil temperature
WH31SM Soil Moisture

Post Reply