Wetbulb Temperature User Defined Plugin Weatherstation
Moderator: Mattk
Wetbulb Temperature User Defined Plugin Weatherstation
I've worked up a Meteobridge compatible "AWK script" version of my wetbulb temperature calculation plugin weather station. I've made the code pubiically available on github at:
https://github.com/TrimbleSoftware/mbwbpi
See the github README.md file for more information on how it works and how to install it.
For those of you that are interested in snow forecasting or snow making this can be an interesting addition to your weather station data.
Feel free to give it a try and see how it works for you.
https://github.com/TrimbleSoftware/mbwbpi
See the github README.md file for more information on how it works and how to install it.
For those of you that are interested in snow forecasting or snow making this can be an interesting addition to your weather station data.
Feel free to give it a try and see how it works for you.
Davis VP2 with IIS and Leaf/Soil + numerous user defined plugin weather stations
Re: Wetbulb Temperature User Defined Plugin Weatherstation
Interesting! Thanks for sharing!
Re: Wetbulb Temperature User Defined Plugin Weatherstation
Just commited an update to github. Added an optional snowmaking rank output on data1 sensor. This will be of interest to Meteobridge users that are interested in snowmaking. 

Davis VP2 with IIS and Leaf/Soil + numerous user defined plugin weather stations
Re: Wetbulb Temperature User Defined Plugin Weatherstation
I've installed it on my station and it doesn''t seem to work.
This is all I get in the log:
logger (02.02.2021 10:33:53): connect station 2 (User-defined via Plug-in).
logger (02.02.2021 10:33:53): station 2 (User-defined), unexpected 0 bytes.
logger (02.02.2021 10:33:53): disconnect station 2 (User-defined): response without data
This is all I get in the log:
logger (02.02.2021 10:33:53): connect station 2 (User-defined via Plug-in).
logger (02.02.2021 10:33:53): station 2 (User-defined), unexpected 0 bytes.
logger (02.02.2021 10:33:53): disconnect station 2 (User-defined): response without data
Re: Wetbulb Temperature User Defined Plugin Weatherstation
Are you using a Meteobridge deice with a "scripts" folder?azchrisf wrote: ↑Tue Feb 02, 2021 7:34 pm I've installed it on my station and it doesn''t seem to work.
This is all I get in the log:
logger (02.02.2021 10:33:53): connect station 2 (User-defined via Plug-in).
logger (02.02.2021 10:33:53): station 2 (User-defined), unexpected 0 bytes.
logger (02.02.2021 10:33:53): disconnect station 2 (User-defined): response without data
The files mbwbpi.plugin (the awk script) and mbwbpi (config file) both have to go into the scripts folder. When setting up the user defined plugin weather station after selecting script:mbwbp from the Select Plugin dropdown list, be sure to click the "Reload Plugin" button before clicking Save.
MB outputs a superflous error, but it still works on my MB:
Code: Select all
Error (Station #1): Download of plugin script failed: No such file or directory
Code: Select all
awk -f /tmp/mnt/data/scripts/mbwbpi.plugin
Code: Select all
mbwbpi (02.02.2021 12:52:22): wetbulb temp plugin weather station (version 1.1b) started.
mbwbpi (02.02.2021 12:52:22): polling interval 60 seconds.
mbwbpi (02.02.2021 12:52:22): mb logger command line: wget -q -O - http://localhost/public/template.cgi?template=[th0temp-act]%09[th0hum-act]%09[thb0press-act]&contenttype=text/plain;charset=iso-8859-1
mbwbpi (02.02.2021 12:52:22): inital sleep 38 seconds.
Code: Select all
t0 85
data0 0
data1 0
t0 65
data0 0
data1 0
Davis VP2 with IIS and Leaf/Soil + numerous user defined plugin weather stations
Re: Wetbulb Temperature User Defined Plugin Weatherstation
Yes I have a Pro Red.
Here is the output from the ssh console:
awk: /tmp/mnt/data/scripts/mbwbpi.plugin:83: Unexpected token
Thank you for posting that, once it output the line number I looked and it looks like you did not close your if-else statement with braces. Fixed that and testing now. Seems to work good at this point once that was fixed, may want to update your github code.
I congratulate you on a very useful plugin! Unfortunanetly, it serves no use for me because I'm in Phoenix. But one thing I would implore you to do - that is write more plugins. You have a talent sir!
Here is the output from the ssh console:
awk: /tmp/mnt/data/scripts/mbwbpi.plugin:83: Unexpected token
Thank you for posting that, once it output the line number I looked and it looks like you did not close your if-else statement with braces. Fixed that and testing now. Seems to work good at this point once that was fixed, may want to update your github code.
I congratulate you on a very useful plugin! Unfortunanetly, it serves no use for me because I'm in Phoenix. But one thing I would implore you to do - that is write more plugins. You have a talent sir!
Re: Wetbulb Temperature User Defined Plugin Weatherstation
The single line following an if condition shouldn't have to be grouped with braces: http://www.math.utah.edu/docs/info/gawk_10.html#SEC99azchrisf wrote: ↑Wed Feb 03, 2021 3:56 am Yes I have a Pro Red.
Here is the output from the ssh console:
awk: /tmp/mnt/data/scripts/mbwbpi.plugin:83: Unexpected token
Thank you for posting that, once it output the line number I looked and it looks like you did not close your if-else statement with braces. Fixed that and testing now. Seems to work good at this point once that was fixed, may want to update your github code.
...
I wonder if the problem was caused by CRLF vs LF in the awk script file? Did you copy (or edit) it from Windows to the MB Pro Red Samba share? I don't know how the BusyBox awk treats CRLF instead of LF in awk code read in from a file. I edit files on Linux and use scp to copy files back and forth so extra CRLFs aren't added.
I'm using the same exact code as in the git-hub repository and of course I don't see the parsing problem you saw.
Can you paste a code snippet of what you added to get it working? I'll see if it should be added to the git-hub repository.
I see that it snowed last week in the Tuson area so maybe snow forecasting may end up being usful in Phoenix someday...


I've been in software development for over 40 years. Writing plugin weather station code is a fun and entertaining exercise. There has to be a need to fulfill in writing plugin code. If there is a need, a solution can be found. Necessity is the mother of invention when it comes to plugins!

Davis VP2 with IIS and Leaf/Soil + numerous user defined plugin weather stations
Re: Wetbulb Temperature User Defined Plugin Weatherstation
I copied the files directly out of the archive to the MB, and I use Ultraedit which preserves whichever line ending format that is used.
You did not enclose your if with the { and }, it may have to do with it branching to an "else" that caused the problem? Dunno.
You did not enclose your if with the { and }, it may have to do with it branching to an "else" that caused the problem? Dunno.
I added it/changed it to this:if(Ediff == 0.0)
break
else
{
if(Ediff < 0.0)
{
Not sure why it runs fine on yours and not mine...Hope this helps.if(Ediff == 0.0) {
break
} else {
if(Ediff < 0.0)
{
-
- Junior Boarder
- Posts: 27
- Joined: Mon Jun 06, 2022 6:55 pm
Re: Wetbulb Temperature User Defined Plugin Weatherstation
Hi thx
I've got an output as the following:
3 Outdoor T 40 sec 18.5°C 65.3°F
3 Data 40 sec 0.00 0.00
3 Data #1 40 sec 0.00 0.00
plugin is my station 3,
I guess the wet bulb is 18.5C, I want to http these values to my website T3 is being the wetbulb.
what's the code ?
T3=[Outdoor T!-lastval.2:---] does not work?
thank you
I've got an output as the following:
3 Outdoor T 40 sec 18.5°C 65.3°F
3 Data 40 sec 0.00 0.00
3 Data #1 40 sec 0.00 0.00
plugin is my station 3,
I guess the wet bulb is 18.5C, I want to http these values to my website T3 is being the wetbulb.
what's the code ?
T3=[Outdoor T!-lastval.2:---] does not work?
thank you