Page 1 of 1

Virtual Sensors: is there a plan/timeline to bring them to Meteobridge?

Posted: Mon Jun 01, 2020 3:59 am
by mikeo
Hello! I've been happily using MeteoHub (yes, Hub) for 5+ years in a marine environment with a Davis sensor array. Does anyone have any information about the possibility of virtual sensors becoming a feature of Meteobridge?

My station is on a moored boat that rotates based on the wind direction. Because of the robust nature of the Raspberry Pi I was able to install a magnetometer (compass) that writes a compass heading to a file and then a virtual sensor uses an awk statement to combine the valid wind speed data from the anemometer with the heading from the compass to give an accurate combined reading. If I just use the Davis anemometer, my wind direction is always North (or close to it) since the boat always faces in to the wind.

For those that are curious, here is my virtual sensor for "wind2"

Code: Select all

awk 'NR==FNR{b=$1;next}{print b, $4,$5,$6}' /var/local/heading -
Where /var/local/heading is numerical heading from the calibrated magnetometer on the GPIO of the Raspberry Pi.

I know I'd once again need to get creative to figure out how to get the heading data where the Meteobridge could leverage it

Re: Virtual Sensors: is there a plan/timeline to bring them to Meteobridge?

Posted: Fri Jun 12, 2020 6:43 pm
by admin
no plan to do so. Much too complicated for 99% of users.

Re: Virtual Sensors: is there a plan/timeline to bring them to Meteobridge?

Posted: Wed Jun 24, 2020 5:43 am
by mikeo
Oh well, at least I know. Thanks for the update.

I can start a new thread if needed for the next question:
Is there a way to have a "virtual sensor" read a file or execute a command just once a day? Not using a trigger that happens once a minute?

Since my boat (mentioned previously) is on a lake where the water level changes by over 100 ft in a 120 day period I'd like to set the value of a virtual sensor, data0, to the "official" lake level. I can get the data via two similar methods: shell script with a curl command or use the curl command as the conversion for the virtual sensor. Since the lake level doesn't change by more than 1 ft in a 24 hour period I don't see a reason to update the virtual sensor every minute.

I realize that reading the local data file once a minute isn't much load, but my Raspberry Pi is running "hot" with a load average of 9,9,9.

Thoughts?