Weather34 Aurora Version(english supported only)

All about the standard Meteobridge devices based on mobile routers from TP-Link, D-Link, ASUS

Moderator: Mattk

Locked
User avatar
prestwickwx
Platinum Boarder
Platinum Boarder
Posts: 510
Joined: Sat Aug 23, 2014 3:28 pm
Location: Myrtle Beach, SC USA
Contact:

Re: Weather34 Aurora Version(english supported only)

Post by prestwickwx »

HI Brian,

The new Direction Compass really Pops :D

Thanks,

Chuck
Image
https://myrtleweather.com/
Myrtle Beach WX @ Prestwick
weatherist34
Platinum Boarder
Platinum Boarder
Posts: 1693
Joined: Tue Mar 28, 2017 6:57 am

Re: Weather34 Aurora Version(english supported only)

Post by weatherist34 »

thanks something i wanted todo long ago was to add more cardinals now the languages are not required less code easier to accomplish. this is just pure css no images svg etc just a simple css circle with layered borders on top of each other with some transparency or in css known as opacity..anyway that was my stay at home 72 hour project . i just pushed another GIT basically cleans up code you kind of accumulate when putting something together.

your solution for metrics if it works for you then go for it . have a great weekend whats left of it ..
Simple Update February 2023 for Weather34 Aurora MKII
https://www.mediafire.com/file/jk4lj3mq ... 2.zip/file

Weather34 Master Download Aurora MKII
https://download.meteobridge.com/files/Weather34.zip
weatherist34
Platinum Boarder
Platinum Boarder
Posts: 1693
Joined: Tue Mar 28, 2017 6:57 am

Re: Weather34 Aurora Version(english supported only)

Post by weatherist34 »

for those curious chuck if referring to this
compa.jpg
compa.jpg (153.35 KiB) Viewed 3719 times
Simple Update February 2023 for Weather34 Aurora MKII
https://www.mediafire.com/file/jk4lj3mq ... 2.zip/file

Weather34 Master Download Aurora MKII
https://download.meteobridge.com/files/Weather34.zip
gand
Senior Boarder
Senior Boarder
Posts: 46
Joined: Thu Apr 23, 2015 5:40 pm

Re: Weather34 Aurora Version(english supported only)

Post by gand »

Hi

In the gustmod.php module it seems the Wind Run Today is displayed in Miles. In the setup I have chosen KM. Do you know where I can change that.

Thanks
Gert
Attachments
Wind.jpg
Wind.jpg (33.47 KiB) Viewed 3671 times
xray77
Gold Boarder
Gold Boarder
Posts: 182
Joined: Sat Mar 07, 2020 11:54 pm
Location: Buedelsdorf, SH Germany
Contact:

Re: Weather34 Aurora Version(english supported only)

Post by xray77 »

Hello Gand,
you can test following code (replace the existing code at line 113:

<?php //windrun
if ($weather["wind_units"]=='kts'){echo"<div class=tempmodulehome0-5c>". "&nbsp;".(number_format($weather["windrun34"]*1.852,1)).''.'<smalltempunit2>&nbsp;';};
if ($weather["wind_units"]=='km/h'){echo"<div class=tempmodulehome0-5c>". "&nbsp;".(number_format($weather["windrun34"],1)).''.'<smalltempunit2>&nbsp;';};
if ($weather["wind_units"]=='mph'){echo"<div class=tempmodulehome0-5c>". "&nbsp;".(number_format($weather["windrun34"],1)).''.'<smalltempunit2>&nbsp;';};

if ($weather["wind_units"]=='km/h'){echo 'km';};
if ($weather["wind_units"]=='mph'){echo 'mi';};
if ($weather["wind_units"]=='kts'){echo 'km';};?></div></div></div>

it runs for me, have select kt's (Knots) as prior unit, it should also run with the other units.
Bildschirmfoto 2020-12-17 um 09.46.24.png
Bildschirmfoto 2020-12-17 um 09.46.24.png (79.5 KiB) Viewed 3666 times
don't forget to make a backup of the file before.. The little differences in the screenshots are due to different times of creating it.
Attachments
Bildschirmfoto 2020-12-17 um 09.53.28.png
Bildschirmfoto 2020-12-17 um 09.53.28.png (65.64 KiB) Viewed 3666 times
Bildschirmfoto 2020-12-17 um 09.53.16.png
Bildschirmfoto 2020-12-17 um 09.53.16.png (69.86 KiB) Viewed 3666 times
gand
Senior Boarder
Senior Boarder
Posts: 46
Joined: Thu Apr 23, 2015 5:40 pm

Re: Weather34 Aurora Version(english supported only)

Post by gand »

Hi xray77

Thanks a lot, test later today?

Gert
weatherist34
Platinum Boarder
Platinum Boarder
Posts: 1693
Joined: Tue Mar 28, 2017 6:57 am

Re: Weather34 Aurora Version(english supported only)

Post by weatherist34 »

above script doesnt take into account the screenshot you provided using m/s also if the user is wanting kts and for example in uk then there forced into a kmh output. uk users 90% w want mph. this forces
if ($weather["wind_units"]=='kts'){echo 'km';};?></div></div></div>

so wait a day or so ill add in a universal script for all scenarios so each simple update doesnt break the hardcoded method each time.im all for ideas , solutions but these solutions have to be universal otherwise if everyone starts sharing code and we end up with all different code then each update will cause inconvenience. that said dont misread by all means adapt,modify for your own liking but please dont complain the updates break your personal modifications.I just try to establish a universal way for all so we are on the same boat and can apply fixes and updates with ease.

as always raise issues and ill fix them one way or the other especially if i can replicate those . personal modifications can not be replicated locally and experience tells me ill be chasing something locally for hours that dont exist.

been a long time since i looked at windrun its an original piece of code from 2016 !!!

@xrayy77 please don’t misunderstand its much appreciated and gives me an idea what to look for without having to refresh my brain.

take a trip back in time https://weather34.com/homeweatherstatio ... eline.html
Simple Update February 2023 for Weather34 Aurora MKII
https://www.mediafire.com/file/jk4lj3mq ... 2.zip/file

Weather34 Master Download Aurora MKII
https://download.meteobridge.com/files/Weather34.zip
xray77
Gold Boarder
Gold Boarder
Posts: 182
Joined: Sat Mar 07, 2020 11:54 pm
Location: Buedelsdorf, SH Germany
Contact:

Re: Weather34 Aurora Version(english supported only)

Post by xray77 »

Brian,
I fully understand your reasoning, which is why I declared my proposal to be a test. In German-speaking countries, most people don't know what to do with miles; here, km are much more common.

I thought, the internal meteobridge-output for the API is m/s, isn't it?
Yes, you are right, the code forces km if the user select kt's as output-unit.., this is an requirement fo me and probably not recommended for the most.., but it puzzles me that users who prefer mph would then take knots as the output unit and mph as the windrun, but of course it should be possible.

I had also considered posting this at all, but then decided to do so. If you want, I can remove the post.
It works fine for me, even for the other units. Of course, it's best if you adapt the code universally as you explained.
Best regards
Mike
weatherist34
Platinum Boarder
Platinum Boarder
Posts: 1693
Joined: Tue Mar 28, 2017 6:57 am

Re: Weather34 Aurora Version(english supported only)

Post by weatherist34 »

its no problem no need to remove just have to look at the wider audience to see if that messes up there preference. its not easy catering for various metrics i.e kmh,kts,ms,mph,bft and so on just have to find the right combination so it works out of the box.

I was always dubious of that wind run script perhaps I should just rewrite the whole thing from the ground up or find something to replace it .
is it of much use relevance to anyone ??
Simple Update February 2023 for Weather34 Aurora MKII
https://www.mediafire.com/file/jk4lj3mq ... 2.zip/file

Weather34 Master Download Aurora MKII
https://download.meteobridge.com/files/Weather34.zip
xray77
Gold Boarder
Gold Boarder
Posts: 182
Joined: Sat Mar 07, 2020 11:54 pm
Location: Buedelsdorf, SH Germany
Contact:

Re: Weather34 Aurora Version(english supported only)

Post by xray77 »

Brian,
it would not necessary for me and some others, but some wind-power-recipients would find this information helpful I think so.. :wink:
I didn't really understand how it works, the script obviously doesn't add up the sum of the wind path up to the current time but estimates the wind path based on the current wind? :?: Because the result of the script can also decrease during the course of the day, I came up with this...

Stay healthy and wish you relaxing and happy holidays,
Mike
weatherist34
Platinum Boarder
Platinum Boarder
Posts: 1693
Joined: Tue Mar 28, 2017 6:57 am

Re: Weather34 Aurora Version(english supported only)

Post by weatherist34 »

ok lets just simplify FOR EVERYONE so it delivers something of value for 99% of scenarios without getting screwed up in metrics vs mph,ms,kts,bft,kmh

so I simply removed existing formula then simplified it into two lines
used the default api position meteobridge(158) m/s rolling day average
used miles as the default formula driver then simply converted one extra output to km
so we simply have both displayed without getting lost in options and it doesn't break or change appearance of modules .

so what do you think ? screenshot below it requires no change in options, setup, css etc would just apply via the simple update
im sure some awkward git :-) gonna ask for it in meters :-)
Screenshot at Dec 17 19-00-38.png
Screenshot at Dec 17 19-00-38.png (63.07 KiB) Viewed 3629 times
Simple Update February 2023 for Weather34 Aurora MKII
https://www.mediafire.com/file/jk4lj3mq ... 2.zip/file

Weather34 Master Download Aurora MKII
https://download.meteobridge.com/files/Weather34.zip
User avatar
prestwickwx
Platinum Boarder
Platinum Boarder
Posts: 510
Joined: Sat Aug 23, 2014 3:28 pm
Location: Myrtle Beach, SC USA
Contact:

Re: Weather34 Aurora Version(english supported only)

Post by prestwickwx »

Hi Brian,

Looks good to me :D

Chuck
Image
https://myrtleweather.com/
Myrtle Beach WX @ Prestwick
weatherist34
Platinum Boarder
Platinum Boarder
Posts: 1693
Joined: Tue Mar 28, 2017 6:57 am

Re: Weather34 Aurora Version(english supported only)

Post by weatherist34 »

i think its a safer option for 99% as it doesnt really matter wether your using kmh,mph,ms,kts etc it simply uses the meteobridge default ms output in the formula the output is always the same .just adds a single multiplier to convert from miles to kilometers .

for the hardcore enthusiast if you want meters just simply convert(multiply) miles to meters ... 1 mile = 1609.34 meters.
Simple Update February 2023 for Weather34 Aurora MKII
https://www.mediafire.com/file/jk4lj3mq ... 2.zip/file

Weather34 Master Download Aurora MKII
https://download.meteobridge.com/files/Weather34.zip
xray77
Gold Boarder
Gold Boarder
Posts: 182
Joined: Sat Mar 07, 2020 11:54 pm
Location: Buedelsdorf, SH Germany
Contact:

Re: Weather34 Aurora Version(english supported only)

Post by xray77 »

Brian,
you''ve found the best solution as you do in most of cases. :)
it seem's looks good for all!
Mike
alexeysailman
Senior Boarder
Senior Boarder
Posts: 78
Joined: Sun Mar 03, 2019 8:12 pm
Contact:

Re: Weather34 Aurora Version(english supported only)

Post by alexeysailman »

Hi Brian! After the last update, something strange happened with the temperature forecast. I have selected the item in the settings "important set units for Weather Underground API" - Scandinavia.
Attachments
pic2.JPG
pic2.JPG (249.4 KiB) Viewed 3595 times
pic.JPG
pic.JPG (254.88 KiB) Viewed 3595 times
Locked