Experimenting with Sensor Strings

This section covers the Meteobridge PRO, PRO2, NANO SD, Raspberry Pi and VM platforms exclusively

Moderator: Mattk

Post Reply
G4MHJ
Expert Boarder
Expert Boarder
Posts: 111
Joined: Fri Aug 24, 2018 9:40 pm

Experimenting with Sensor Strings

Post by G4MHJ »

I am trying to understand the way to format sensor strings to produce meaningful outputs such as used in Twitter Feeds.
With Twitter being somewhat erratic of late is there anyway of adding a string somewhere else to show an immediate result.

With the help from another member I already have this string.

[hh]:[mm] Baro [thb0press-act] hPa | Temp [th0temp-act=C.1:--] °C | Hum [th0hum-act=.0:--]﹪| Wind [wind0dir-act=nldir:--] [wind0wind-act=bft.0:--] Bft | Rain Today [rain0total-daysum] mm. | Wind Gust [wind0dir-act=nldir:--] [wind0wind-max60=kmh.1] kmh. | Wind Chill [wind0chill-act]°C |

Although I use metric units I prefer to have Wind data in mph so that is one area I am trying to understand.
Image
Mattk
Platinum Boarder
Platinum Boarder
Posts: 1387
Joined: Mon Sep 22, 2014 3:24 am

Re: Experimenting with Sensor Strings

Post by Mattk »

Check out this page https://www.meteobridge.com/wiki/index.php/Templates and note the general format is sensor-selector=converter.decimals:replacement see the Convertor section down the page a bit

With say the wind then the following will display/convert wind speed (max60, max over last 60 minutes) to Km per hour [wind0wind-max60=kmh.1] kmh, if you change it to [wind0wind-max60=mph.1] Mph then you will get max wind speed in miles per hour
G4MHJ
Expert Boarder
Expert Boarder
Posts: 111
Joined: Fri Aug 24, 2018 9:40 pm

Re: Experimenting with Sensor Strings

Post by G4MHJ »

I have now moved on to creating and editing a mydata.http file as per the Wiki.

I have this experimental template as

[DD].[MM].[YYYY] [HH]:[mm][APM]
Temp [th0temp-act]°C ([th0temp-dmin]°C/[th0temp-dmax]°C)
Hum [th0hum-act]%

This is producing
Screenshot 2018-10-28 at 10.00.38.png
Screenshot 2018-10-28 at 10.00.38.png (17.65 KiB) Viewed 3424 times
Not sure why I am seeing strange characters though.

I am using a MacBook Pro, editing the my data.http direct through the network with either TextEdit or TextWrangler (same result).

Is there a way of avoiding this (A^) thing?
Image
Mattk
Platinum Boarder
Platinum Boarder
Posts: 1387
Joined: Mon Sep 22, 2014 3:24 am

Re: Experimenting with Sensor Strings

Post by Mattk »

Some templates based on character sets will handle characters such as the ° symbol others will not and there appears quite a few different variables with this and in some respects can be affected by browser versions, email versions and the like.

In your example and being HTTP format then I would leave out the decimal symbol as it is rather erratic, if this was an email template then it would work fine.
G4MHJ
Expert Boarder
Expert Boarder
Posts: 111
Joined: Fri Aug 24, 2018 9:40 pm

Re: Experimenting with Sensor Strings

Post by G4MHJ »

I sorted the strange character thing - thanks.

Can I ask some more questions please.

In my Mydata.http I have an output of

Weather Data from the Erith Weather Station
29.10.2018 11:03AM
Temp 8.5C (High 8.4C/Low 2.6C)
Temp 8.5C (High 8.4C @ 20181029105754/Low 2.6C @ 20181029064524)
Dew Point 3.9C
Hum 73.0%
Wind 0.0 mph NE
Wind Chill 8.5C
Rain Today 0.0 mm/0.0 mm/hour
Baro 1002.4 hPa
Baro at Sea Level 1008.1 hPa
Solar Radiation 397.0 W/m2
Solar maximum possible 343 W/m2
UV Index 1.2
Sunrise 06:48
Sunset 16:39

Last Data 6
Last Good Data 11
(D)ay (N)ight Flag D

At this stage some of these lines are just experimental to see what is possible.
On the 2nd Temp line I would like to see @ 10:29AM rather than the full date & time string - is that possible?
The Solar Max statement is obviously wrong somewhere but I am not too worried about that at present.

I attach my screenshot of the template
Screenshot 2018-10-29 at 11.05.02.png
Screenshot 2018-10-29 at 11.05.02.png (116.65 KiB) Viewed 3406 times
Image
Mattk
Platinum Boarder
Platinum Boarder
Posts: 1387
Joined: Mon Sep 22, 2014 3:24 am

Re: Experimenting with Sensor Strings

Post by Mattk »

Yes see the "Decimals" section near bottom of following link re formatting Date/Time etc
https://www.meteobridge.com/wiki/index.php/Templates

Re max possible solar for the day, do you have valid Latitude/Longitude set as well as pressure data available?
G4MHJ
Expert Boarder
Expert Boarder
Posts: 111
Joined: Fri Aug 24, 2018 9:40 pm

Re: Experimenting with Sensor Strings

Post by G4MHJ »

Thanks for the Decimal hint.

Temp [th0temp-act]C (High [th0temp-dmax]C @ [th0temp-dmaxtime.ij:--=utc]:[th0temp-dmaxtime.kl:--=utc]/Low [th0temp-dmin]C @ [th0temp-dmintime.ij:--=utc]:[th0temp-dmintime.kl:--=utc])

This gives me

Temp 8.2C (High 8.3C @ 11:31/Low 4.6C @ 00:35).

Getting the idea a bit more now.

I have Lat/long set up and I checked via the url link on system tab. I might still have a baro error. My Console is giving 993.00mb (with no correction) and MBPro is showing 988.4mb. I guess the idea is to apply an offset to MB Pro due to internal heat.
Image
Mattk
Platinum Boarder
Platinum Boarder
Posts: 1387
Joined: Mon Sep 22, 2014 3:24 am

Re: Experimenting with Sensor Strings

Post by Mattk »

Check your station Altitude on the Station tab>Local Settings before changing any corrections
Post Reply