UV Index wording

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

UV Index wording

Post by G4MHJ »

Having a member of my family with sensitive skin it is important to be aware of the UV levels when going outside.

Is it possible to see wording next to an index, for example, if the level is 3, 4 or 5 then the word "Moderate" could appear next to it. "Low" and "High" would also be needed if this feature is at all possible.

The output could then be added to my regular Twitter feed and maybe an email alert.

Maybe this isn't possible and apologies if this has been asked before.

I assume it would be a complicated statement along the lines of #if#{*[uv0index-act.0:-9999]!=-9999*}#then# UV Index [uv0index-act.1:]#else##fi#

Any assistance and guidance would be appreciated.
Image
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7854
Joined: Mon Oct 01, 2007 10:51 pm

Re: UV Index wording

Post by admin »

Normally it needs a few iterations until all syntax errors are removed, but I would start with

Code: Select all

UV exposure is 
#if#{*[uv0index-act.0:0] < 3*}#then#LOW#else##fi#
#if#{*([uv0index-act.0:0] >= 3) && ([uv0index-act.0:0] <= 5)*}#then#MODERATE#else##fi#
#if#{*[uv0index-act.0:0] > 5*}#then#HIGH#else##fi#
You should put it in one line, I splitted it for better readability only.
G4MHJ
Expert Boarder
Expert Boarder
Posts: 111
Joined: Fri Aug 24, 2018 9:40 pm

Re: UV Index wording

Post by G4MHJ »

Thank you

These expressions are now making a lot more sense to me now.

Just one more thing. How can these expressions be tested or do I have to wait until the sun shines? :)
Image
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7854
Joined: Mon Oct 01, 2007 10:51 pm

Re: UV Index wording

Post by admin »

There is no direct way to test. You could change sensors to "win0wind" which should provide a lot of different data in a short period of time.
G4MHJ
Expert Boarder
Expert Boarder
Posts: 111
Joined: Fri Aug 24, 2018 9:40 pm

Re: UV Index wording

Post by G4MHJ »

I assume you meant "wind0wind" or is "win0wind" a different type of sensor?
yes, just a typo :lol:
Image
Post Reply