Weather34 TEMPLATE

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

Moderator: Mattk

dc.kraft
Junior Boarder
Junior Boarder
Posts: 21
Joined: Mon Nov 03, 2014 7:13 pm
Contact:

Re: Weather34 TEMPLATE

Post by dc.kraft »

dc.kraft wrote:
Tue Oct 27, 2020 12:01 pm
Hello again me,
i have a final question about the date my wind scale looks like this ....
but your display looks completely different if I do something wrong while updating the template ???
Hello,
Found ..... well if you change something you should also save it that makes it easier :lol: :lol: :lol:

User avatar
weatherist34
Platinum Boarder
Platinum Boarder
Posts: 1053
Joined: Tue Mar 28, 2017 6:57 am
Contact:

Re: Weather34 TEMPLATE

Post by weatherist34 »

please read earlier post .. i dont use languages or multiple metric options my setup is 50% smaller and easier to maintain has less options to configure than the public download simply i dont need all those multiple options....you selected beaufort module i selected windmod module thats why there different. two different modules to cater for those that want a bft dedicated module again a request from many living in a coastal area where bft is of regular day use perhaps for fishing, watersports etc .. next !!

User avatar
jasonmfarrow
Expert Boarder
Expert Boarder
Posts: 140
Joined: Mon May 25, 2020 4:21 pm
Contact:

Re: Weather34 TEMPLATE

Post by jasonmfarrow »

Brian, thought I'd provide this to see if you wanted it for a future update.
I've updated the AQI chart display to colour each data point in the chart according to the AQI
Screenshot 2020-10-27 at 27 October 2020 20.06.41 pm.png
Screenshot 2020-10-27 at 27 October 2020 20.06.41 pm.png (177.96 KiB) Viewed 1122 times
I added a chunk of function code to todayairqualitychart.php to assign (my UK) AQI colours to each datapoint based on the AQI value.

Code: Select all

        function ColorPM25(a) {
                if (a>=0 && a<=50) {ColorCalc='#80f000';}
                else if (a>50 && a<=100) {ColorCalc='#b0d000';}
                else if (a>100 && a<=150) {ColorCalc='#d0d000';}
                else if (a>150 && a<=200) {ColorCalc='#ffa000';}
                else if (a>200 && a<=300) {ColorCalc='#ff7000';}
                else if (a>300 && a<=400) {ColorCalc='#ff3000';}
                else if (a>400 && a<=500) {ColorCalc='#703232';}
                else {ColorCalc='#444444';}
                return ColorCalc;
        }
then modified the datapoints1.push and datapoints2.push statements to add the colour to each datapoint:

Code: Select all

dataPoints1.push({label: rowData[1],y:parseFloat(rowData[18]),color:ColorPM25(parseFloat(rowData[18]))});
I then remove the color:'<?php echo $tempcolor?>', statement from the data: section.

Call it an atonement for bugging you about AQI.
Ps. Ignore the fact that I convert the data to use PM2.5 values rather than AQI for my table. The code will work with the original AQI plotting.
Regards
Jason
https://jmfweather.uk | @jasonmfarrow

User avatar
weatherist34
Platinum Boarder
Platinum Boarder
Posts: 1053
Joined: Tue Mar 28, 2017 6:57 am
Contact:

Re: Weather34 TEMPLATE

Post by weatherist34 »

really good Jason im using this

function AQINDEXCOLOR(aq) {
if (aq>=0 && aq<=50) {AQIlevel=' hsl(75, 62%, 43%)';}
else if (aq>50 && aq<=100) {AQIlevel='hsl(35, 77%, 58%)';}
else if (aq>100 && aq<=150) {AQIlevel='hsl(19, 66%, 55%)';}
else if (aq>150 && aq<=200) {AQIlevel='hsl(7, 60%, 57%)';}
else if (aq>200 && aq<=300) {AQIlevel='hsl(0, 38%, 32%)';}
else if (aq>300) {AQIlevel='hsl(246, 31%, 62%)';}
else {AQIlevel='hsla(206, 12%, 27%, .4)';}
return AQIlevel;


something similar and slowly implementing that into other charts based on temperature and wind speed but got so bogged down with other stuff it never made it . so if it works for you then go for it...

Im not doing any more for a while and next release version 10 made the tough call it will be English only I no longer have the will or enthusiasm for creating a multiple language supported template it just really restricts or add so much time to implement an idea and your solution is a prime example of a great idea amongst others I got via email in recent weeks but too much time bogged sown with other issues etc...

good job..Brian
Screenshot at Oct 28 00-02-24.png
Screenshot at Oct 28 00-02-24.png (78.88 KiB) Viewed 1118 times

woolfg
Expert Boarder
Expert Boarder
Posts: 89
Joined: Wed Mar 20, 2019 4:01 pm

Re: Weather34 TEMPLATE

Post by woolfg »

Hi Jason

I have tried your code but I cant get it to work

I notice your dataPoints Push indexes are different

Original

dataPoints1.push({label: rowData[1],y:parseFloat(rowData[2])});

Yours

dataPoints1.push({label: rowData[1],y:parseFloat(rowData[18]),color:ColorPM25(parseFloat(rowData[18]))});

Why has the index changed from [2] to [18]

Regards

Graham

User avatar
weatherist34
Platinum Boarder
Platinum Boarder
Posts: 1053
Joined: Tue Mar 28, 2017 6:57 am
Contact:

Re: Weather34 TEMPLATE

Post by weatherist34 »

unfortunately its not giving you all the info to actually make it work properly .
however Graham wait till next week as per email .. you will have colored charts in all charts in Version 10(EN) pre release which basically is fully working at present just need to complete the setup screen options.

just hang in there all will come good this version is so slim and versatile you just may enjoy some of the other features ...caution ENGLISH only supported in version 10. caution requires the primary station to be Davis Hardware not compatible with other brands /primary sensors must be Davis ..

screenshots
colorcharts.jpg
colorcharts.jpg (178.16 KiB) Viewed 1081 times
colorcharts1.jpg
colorcharts1.jpg (198.19 KiB) Viewed 1081 times

woolfg
Expert Boarder
Expert Boarder
Posts: 89
Joined: Wed Mar 20, 2019 4:01 pm

Re: Weather34 TEMPLATE

Post by woolfg »

Hi

Disregard last post

Its working

Regards

Graham

woolfg
Expert Boarder
Expert Boarder
Posts: 89
Joined: Wed Mar 20, 2019 4:01 pm

Re: Weather34 TEMPLATE

Post by woolfg »

Hi Brian

Just seen your post so wont mess around any more

Kind Regards

Graham

User avatar
weatherist34
Platinum Boarder
Platinum Boarder
Posts: 1053
Joined: Tue Mar 28, 2017 6:57 am
Contact:

Re: Weather34 TEMPLATE

Post by weatherist34 »

hey its your site if you worked it out then carry on perhaps share with others , im sure others would benefit..

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

Re: Weather34 TEMPLATE

Post by prestwickwx »

weatherist34 wrote:
Wed Oct 28, 2020 1:43 pm
unfortunately its not giving you all the info to actually make it work properly .
however Graham wait till next week as per email .. you will have colored charts in all charts in Version 10(EN) pre release which basically is fully working at present just need to complete the setup screen options.

just hang in there all will come good this version is so slim and versatile you just may enjoy some of the other features ...caution ENGLISH only supported in version 10. caution requires the primary station to be Davis Hardware not compatible with other brands /primary sensors must be Davis ..

screenshots

colorcharts.jpg

colorcharts1.jpg
Hi Brian,

Look forward to Version 10. :D

Best wishes,

Chuck
Image
https://myrtleweather.com/
Myrtle Beach WX @ Prestwick

ToTo
Expert Boarder
Expert Boarder
Posts: 147
Joined: Wed Apr 03, 2019 9:24 am
Location: Magdeburg, Germany

Re: Weather34 TEMPLATE

Post by ToTo »

weatherist34 wrote:
Wed Oct 28, 2020 1:43 pm
...caution ENGLISH only supported in version 10. caution requires the primary station to be Davis Hardware not compatible with other brands /primary sensors must be Davis ..
Just when we have such a good level of language support, don't you want to support it anymore? I think I have to cope with that, can I do something to change your mind? ;-)
Of course I understand your developer's point of view, you always have to keep in mind that it has to fit for all languages.

All the best
Torsten

User avatar
weatherist34
Platinum Boarder
Platinum Boarder
Posts: 1053
Joined: Tue Mar 28, 2017 6:57 am
Contact:

Re: Weather34 TEMPLATE

Post by weatherist34 »

hello

sadly it has been on the cards for a long time , design is the forefront issue but then we have language updates that lag way behind and often once the language file gets updated by a native speaker suddenly there are numerous alignment issues .
whilst i reduced the amount of languages it supported , it originally supported 27 different languages !!! .. but as time went bye many of those never got updated people move on , people lose enthusiasm people find something better to their liking and your left with a pretty messed up outcome..

like yourself who knows what tomorrow brings ,sudden change in life circumstances for whatever reasons good or bad these things happen.

version 9.34 is job done it works and will work for as long as meteobridge remains a part of it so not all is lost .

@chuck next week wednesday ish... version 10 as its called for now but i have a rather slick name for it..ill upload to github so those with collaborator privileges will see it as above just a few options to remove and add new ones in....

User avatar
weatherist34
Platinum Boarder
Platinum Boarder
Posts: 1053
Joined: Tue Mar 28, 2017 6:57 am
Contact:

Re: Weather34 TEMPLATE

Post by weatherist34 »

@chuck :-) :D :D :D

aurora.png
aurora.png (67.08 KiB) Viewed 1191 times

dc.kraft
Junior Boarder
Junior Boarder
Posts: 21
Joined: Mon Nov 03, 2014 7:13 pm
Contact:

Re: Weather34 TEMPLATE

Post by dc.kraft »

Ohhhh a new version ????
How or where can I get in touch to participate in the test or the release ??
Weather34 Aurora sounds exciting and promising.....

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

Re: Weather34 TEMPLATE

Post by prestwickwx »

weatherist34 wrote:
Thu Oct 29, 2020 8:31 am
@chuck :-) :D :D :D


aurora.png
Brian,

Ha. Dawn - a new day! :D

Chuck
Image
https://myrtleweather.com/
Myrtle Beach WX @ Prestwick

Post Reply