Author Topic: Weathersite: an HTML Console for Davis WLL  (Read 9913 times)

0 Members and 1 Guest are viewing this topic.

Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Re: HTML Console for Davis WLL
« Reply #50 on: November 22, 2020, 06:12:58 PM »
I've decided to use the climacell weather api for weathersite forecast data.  Pretty cool service.  Dev keys are free and their model appears to be globally relevant.  I'll use them to activate the current conditions tile.  Tapping the tile will cycle through current conditions, 24hr Forecast, and 48hr Forecast.  Something to keep me busy over the Thanksgiving holidays...

Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Re: HTML Console for Davis WLL
« Reply #51 on: November 24, 2020, 06:59:03 PM »
The Weather tile has been activated!  I'm using ClimaCell to add 24, 48 and 72hr forecast tiles.  Tap on the Weather tile to cycle through them.  The tile will automatically revert to Current Weather in 5 seconds.  Code has been pushed to the repo and is live on the demo site.

You'll need a (free) developer ClimaCell api key to activate this feature.  Instructions are in the "Settings that you need to change" section of app.js.

« Last Edit: November 25, 2020, 08:30:03 AM by Sleuth255 »

Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Re: HTML Console for Davis WLL
« Reply #52 on: November 26, 2020, 10:45:38 AM »
So I decided to take advantage of the AWS outage to dig into the local reporting resiliency of my WLL.  What I uncovered was a bit disappointing.  Everything reported just fine and remained active locally during the outage until I physically powered off my WLL (pulled the plug and disconnected the batteries).  At that point, its local hum/temp sensors along with almost everything else available on the local query API returned NULL values until the Davis ingestion servers hosted on AWS came back online.  The UDP broadcast that gives wind and rainfall continued to function well however.

Theory here is that the WLL needs to validate its local LSIDs with the central servers when it comes back up.  I get that, but Davis should make more data available on the UDP API to correct this deficiency I think.

ITMT: make sure you put batteries in your WLL!  I also run mine on a small UPS (Amazon link here) to insure that the network connection is maintained during a power outage (or when the cats step on the on/off switch for my powerbar lol).

Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Re: HTML Console for Davis WLL
« Reply #53 on: December 03, 2020, 06:53:49 PM »
New version pushed to the repo and live on the demo site fixes the "flicker" issue on apple devices and improves the forecast tile accuracy by analyzing climacell hourly forecast data.  I've also added the installation guide to the repo.  Still working on a way to get ppl up and running who aren't code geeks...
« Last Edit: December 03, 2020, 07:00:18 PM by Sleuth255 »

Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Re: HTML Console for Davis WLL
« Reply #54 on: December 06, 2020, 03:05:00 PM »
More updates to the codebase:
  • Added Lunar details to activate the Moon Phase tile
  • Added more accuracy to the metric barometer units setting

I'm reaching the end of UI enhancements here.  Settings and wind direction historical charts are really all that's left.  Next are improvements to installation experience.  I'm envisioning a Pi 4b with a display hat here (US Links: Pi 4b, Display Hat.  Still looking for a suitable case).  Purchase both for ~50 USD then install the custom image and plug the Pi's ethernet connection into your router.  Weathersite will find your WLL and set up the base configuration.  When complete, the display hat will show the URL that you would use to locally access the site.

Thanks to helpful posts from several ppl here, I was able to load up the free Raspberry Pi cumulusMX build and play around with its headless install.  It has a good auto WLL discover feature that actually digs into the API response to find the LSIDs of the various sensors.  This is something I'm working on currently as well.  There's a full featured UI too that makes my meteorologist wife very happy.  WAF is good lol.  It also uses a novel netbios based method to allow windows machines to automatically resolve the name "cumulusmx.local" which saves the user from having to dig into the intricates of DHCP leases etc to get started.  This method doesn't work on I-devices or linux variants such as a chromebooks, so I'm thinking that the display hat is still the way to go for headless installations.

Since I'm now populating WU from cumulus MX, I also was able to disconnect my WLL from its AWS servers to begin a real test on this platform's ability to run autonomously.  Looking forward to the results.  For our household at least, the goal of an HTML based Davis console replacement for the WLL that can be displayed on any 8" tablet is pretty close to complete. We have a couple of these scattered around the house currently:



« Last Edit: December 06, 2020, 03:17:11 PM by Sleuth255 »

Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Re: HTML Console for Davis WLL
« Reply #55 on: December 08, 2020, 05:48:31 PM »
Charts now show wind direction:


Offline Atlantic21

  • Senior Member
  • **
  • Posts: 53
    • Ilfracombe Weather
Re: HTML Console for Davis WLL
« Reply #56 on: December 12, 2020, 04:04:22 PM »
Hi have downloaded the image from 1 drive i have the following problems
1: etcher is unable to flash from the zip image gives errors
2: if i unzip image i can flash to card but etcher says there is a problem with image after checking
3: i can put card with image in to pi and it will load up
4: desktop seems limited in use when using mouse to navigate folders or shut down
4: unable to save any changes to app.js
5: i have a full raspberry pi image loaded on sd card and working but again if i try to save changes to app.js it wont let me
i am new to Raspberry pi so am limited in my knowledge

hope this all makes sense
Richard

Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Re: HTML Console for Davis WLL
« Reply #57 on: December 13, 2020, 11:46:26 AM »
yup, it does.  before you edit app.js do this command: "sudo su".  Your terminal prompt should change from something ending in a "$" to something ending in a "#" which means you will now have write access to files that you edit.  Make sure that you have followed the instructions under the red "Very Important" heading: "git pull origin master" before you edit app.js.  This will make sure that you have the latest bits.


Also, I'm going to start in on a better way to do an install over the Christmas holidays.  Currently waiting for a Pi 4B to use for this.  Settings page coming up first.
« Last Edit: December 13, 2020, 11:56:40 AM by Sleuth255 »

Offline Atlantic21

  • Senior Member
  • **
  • Posts: 53
    • Ilfracombe Weather
Re: HTML Console for Davis WLL
« Reply #58 on: December 13, 2020, 02:45:44 PM »
Sleuth255 thanks for the reply will give it another go

Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Re: HTML Console for Davis WLL
« Reply #59 on: December 14, 2020, 03:29:57 PM »
My display hat arrived today so I was able to make good progress on the headless setup.  Once this is all finished, to get Weathersite up and running, you purchase a Pi 4b (or use any Pi that you might have) along with the stupidly inexpensive adafruit PiOLED hat.  Then download the new weathersite image that I'm working on and burn to SD using the raspberry pi imager.  Stick the SD card into the PI's SD slot, cable its ethernet port to your router, and plug in power.  Weathersite will boot and display how to reach the site once its initialized in about a minute.  If you have a display then you don't even need the hat; weathersite also displays its information on the console when it automatically starts. 

Finally browse to the site and enter your settings.  Here's a narrated video showing this:

[youtube]https://youtu.be/da0LscK5AxQ[/youtube]
« Last Edit: December 14, 2020, 05:51:10 PM by Sleuth255 »

Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Re: HTML Console for Davis WLL
« Reply #60 on: December 15, 2020, 05:23:22 PM »
Doing behind the scenes work now: In the latest build  (v1.4) weathersite will locate your WLL on first startup if you don't enter its IP in app.js.  I've also expanded the new customized Raspberry Pi image that I'm building:  weathersite is a service now.  you can start, stop, and restart it with the service command just as you would any other linux service.  I've also added a script "updateweathersite" to update the codebase.  It takes advantage of this capability.  Just ssh into the weathersite server and execute the script. It stops weathersite, pulls the new bits from the repo, then starts weathersite again.

I'll be releasing this new image with updated installation instructions ITNF.  Its much more simplified than the current installation process.
« Last Edit: December 15, 2020, 05:36:52 PM by Sleuth255 »

Offline GHammer

  • Senior Contributor
  • ****
  • Posts: 210
    • Woodmar Weather
Re: HTML Console for Davis WLL
« Reply #61 on: December 19, 2020, 08:40:21 PM »
Questions for you.
I have a Fire HD8 that I have gotten chrome installed on.
I open your demo site on this and it displays improperly. The 3 tiles on the right impinge on the text, the direction of the barometer is cutoff (Ri instead of rising, the direction of the wind has only 1 partial letter. Instead of WNW I get part of the first W.
So, I'm looking to shrink the wind rose to say, the top quarter of the screen.

Is that possible without redesigning (editing positions of everything else)?

I run a WeeWX installation here and use a driver that captures data from the WLL It uses the API. I'm unsure if the WLL is able to handle multiple API calls. Any idea if it will?

My main reason for not using Fully Kiosk is due to the permissions it requires. I'm just not comfortable granting an app admin rights to any device on my LAN. Thus, the install of Chrome instead of Amazon's Silk browser.

Thanks for the project, it's come a LONG way in a short time. Congratulations!
Wireless Vantage Pro2 Plus with 24hr FARS, WLL

Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Re: HTML Console for Davis WLL
« Reply #62 on: December 22, 2020, 09:52:42 AM »
Hello, the compass rose is difficult to resize.  You are correct in that a re-design is necessary.  There is a /testpattern endpoint that can be used for this purpose.  It displays the compass rose with all pointers.  The object is to resize the background image and pointers and display the endpoint.  You can now use Chrome's inspect mode to nudge the pointers into their new locations.  Record the x/top values and change the corresponding values in getCompassVector().  Not an easy task.

A better thought for chrome may be this: reduce the zoom level until it all fits properly.  Typically that's at about 85% for an 8" screen.  Chrome should remember this setting and use it every time the website is accessed.

Don't worry about multiple sources accessing the api.  I have 2 weathersite installations and a cumulusMX application accessing mine currently.
« Last Edit: December 22, 2020, 09:57:10 AM by Sleuth255 »

Offline GHammer

  • Senior Contributor
  • ****
  • Posts: 210
    • Woodmar Weather
Re: HTML Console for Davis WLL
« Reply #63 on: December 22, 2020, 09:58:05 AM »
Hello, the compass rose is difficult to resize.  You are correct in that a re-design is necessary.  There is a /testpattern endpoint that can be used for this purpose.  It displays the compass rose with all pointers.  The object is to resize the background image and pointers and display the endpoint.  You can now use Chrome's inspect mode to nudge the pointers into their new locations.  Record the x/top values and change the corresponding values in getCompassVector().  Not an easy task.

A better thought for chrome may be this: reduce the zoom level until it all fits properly.  Typically that's at about 85% for an 8" screen.  Chrome should remember this setting and use it every time the website is accessed.

Thanks, I give the Chrome resize a shot before tweaking the code and resizing the images.
Wireless Vantage Pro2 Plus with 24hr FARS, WLL

Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Re: HTML Console for Davis WLL
« Reply #64 on: December 23, 2020, 09:26:41 AM »
Don't dig into the code just yet.  There's a major release coming today or tomorrow.  Large portions of v1.5 have already been pushed to the repo.  I'm adding a settings page and will also release the new Pi based image process.  This should make implementing as well as ongoing updates to this app a whole lot easier.



« Last Edit: December 23, 2020, 11:29:26 AM by Sleuth255 »

Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Re: HTML Console for Davis WLL
« Reply #65 on: December 23, 2020, 02:53:33 PM »
Merry Christmas!  Weathersite v1.5 is released.  A new weathersite construction topic featuring step by step DIY instructions can be found over in the Station Software Development forum.

Offline Atlantic21

  • Senior Member
  • **
  • Posts: 53
    • Ilfracombe Weather
Re: HTML Console for Davis WLL
« Reply #66 on: December 23, 2020, 04:15:52 PM »
HI Sleuth255 have just installed using you're new  Weathersite v1.5 and following the new instructions am unable to get the correct sun/rise and set times also had to put WLL ip address in manually, after saving changes page is not updating any ideas what i have done wrong 
Lat is 51.203 
Long is -4.119
Ilfracombe North Devon UK

Thanks Atlantic21

Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Re: HTML Console for Davis WLL
« Reply #67 on: December 23, 2020, 04:57:36 PM »
The timezone on your Pi is probably not correct.  Forgot about that.  I'll need to adjust the assembly thread.  When you tap the sunrise/sunset tile, does the time look correct?  If not, (and I suspect its gonna be 6 hours fast) SSH in to your pi and fire up raspi-config then go to localization options and set your timezone. 

"page is not updating" is a bit troublesome.  Weathersite chooses default lsids for the various sensors but also needs to capture the UDP broadcast for your WLL.  If it couldn't find the WLL then that means its probably on a different subnet which would also explain why you don't get realtime data.  Can you PM me a screenshot of your settings page and the conditions page?  do you know the Ip for your Pi and your WLL?  PM me those too. 
« Last Edit: December 23, 2020, 05:08:04 PM by Sleuth255 »

Offline Atlantic21

  • Senior Member
  • **
  • Posts: 53
    • Ilfracombe Weather
Re: HTML Console for Davis WLL
« Reply #68 on: December 23, 2020, 05:21:43 PM »
Have sent PM should be 2 off them

Offline Atlantic21

  • Senior Member
  • **
  • Posts: 53
    • Ilfracombe Weather
Re: HTML Console for Davis WLL
« Reply #69 on: December 23, 2020, 05:25:12 PM »
Have fixed time zone

Offline Atlantic21

  • Senior Member
  • **
  • Posts: 53
    • Ilfracombe Weather
Re: HTML Console for Davis WLL
« Reply #70 on: December 23, 2020, 05:39:08 PM »
Have just put all settings back in and all is now working

Many Thanks

Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Re: HTML Console for Davis WLL
« Reply #71 on: December 30, 2020, 02:42:07 PM »
I've fixed a charts bug that can crop up when weathersite doesn't get a reply back from the WLL during one of its 5 minute update cycles.  To install the fix, stop your weathersite node application, switch to your weathersite directory and do "git pull origin master" (no quotes).  When it completes, start node back up again.  If you are using my Pi 4b image from the DIY topic, just ssh into your server and type in "updateweathersite" (no quotes).

Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Re: Weathersite: an HTML Console for Davis WLL
« Reply #72 on: January 05, 2021, 01:37:35 PM »
Update pushed to the repo: improved climacell data analysis yields a more meaningful forecast tile.  I'm now checking hourly conditions between 6AM and 8PM local time, then populating the forecast tile for that time period based on the most frequent condition encountered.  Extra weight given to rain, snow, and T-Storm conditions so that "Overcast" doesn't always win.

Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Re: Weathersite: an HTML Console for Davis WLL
« Reply #73 on: February 06, 2021, 10:17:44 AM »
Update pushed to the repo corrects a bug on the history page: the x-axis ticks incorrectly followed zero degrees on the y-axis.  Sorry about that but I didn't see it until today which is the first real time temps got below zero F here in WI...

« Last Edit: February 06, 2021, 10:28:38 AM by Sleuth255 »

Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Re: Weathersite: an HTML Console for Davis WLL
« Reply #74 on: March 06, 2021, 02:56:07 PM »
ClimaCell has updated their API to v4.0 which contains significant improvements and changes.  Because of this, I've pushed weathersite v1.7 with API v4.0 support to the repo.  ClimaCell will de-implement the legacy API that weathersite v1.6 uses by the end of summer.  In order to use the new API, you will need to re-register for a free developer v4.0 API key at https://climacell.co/weather-api then update your Climacell API key in weathersite settings.
« Last Edit: March 06, 2021, 02:59:25 PM by Sleuth255 »

 

anything