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

0 Members and 1 Guest are viewing this topic.

Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Weathersite: an HTML Console for Davis WLL
« on: October 29, 2020, 05:53:58 PM »
Quick update on my current project which is create a raspberry pi based web server that shows live weather data from my Davis WLL.  Then use any cheap android tablet running a kiosk browser app to display.  voila!  Cool programmable Davis console that you can put anywhere.  Here's the prototype in action:

https://youtu.be/Xng_P0G3g9Y

This project is powered by node.js so the Pi needs node and git components to create the server.  The code is open source too at my git repository: https://github.com/sleuth255/weathersite.  Enhancement plans call for sun/moon data and a history toggle that attaches to your weatherlink site for historical data.  Graphs will include dewpoint against temperature, barometer trend, rainfall.

More to come!

edit: The current build is live here:

http://weathersite.theparadigmgrid.com

Get yourself up and running!

The easiest way is to follow my hardware build thread that's located here.  This topic describes purchasing hardware for ~50 USD to make a raspberry pi server running my customized weathersite image.  However weathersite can run on (pretty much) any server that you can install git utilities and node.js on.

Important Prerequisite!

Weathersite cannot coexist on the same server as another app that uses the WLL.  The reason here is that only one app on a server can listen for WLL realtime updates.  If you install on a server already running another app (like CumulusMX) then either it or Weathersite will not capture realtime info.  For weathersite, this means that the compass rose will be dead.

So, given that you have a free server, Here's how to install weathersite:

You will need to install Node.js and Git utilities.  Versions can be found here:
GIT: https://git-scm.com/downloads
NodeJS: https://nodejs.org/en/download/

If your computer is already a Pi, then things are pretty easy.  On a Pi, GIT is pre-installed and all you will need to do is get nodeJS, and then download the weathersite bits.  do this with apt and git in a terminal window:

sudo su
apt-get update
apt-get install nodejs
cd /
git clone https://github.com/sleuth255/weathersite

for other servers, you need to download the weathersite bits after installing git and node.  Open a terminal window or command prompt, switch to your highest level directory and also type in the following:

git clone https://github.com/sleuth255/weathersite

The bits will be downloaded to a weathersite directory under the topmost directory.

For other computers or your Pi, you should now have everything that you need.  Launch weathersite by executing the main app program with node, for example (you are on a linux machine and weathersite is loaded in /weathersite):

"node /weathersite/app.js".

When weathersite displays that it is online, wait for it to find your WLL.  It will display this when your WLL is located.  Then, browse to http://<ip address of your server>:5000 and the initial settings screen will be displayed.  Enter your latitude and longitude in the format shown and also change your Observation Units if desired.  Weathersite will already have the WLL address filled.  However, in rare cases where weathersite can't find your WLL, you will also need to enter it. Then press the Update button.  Weathersite should now be functional! 

You can also get a free climacell Dev API key here:

https://climacell.co/pricing

Put it in the Climacell API Key if you want weather forecasts displayed in the weather tile.

ToDo for you:  Change your server so that your node command is launched automatically when your server boots.  Having problems getting Weathersite to work?  Try the troubleshooting tips page on my build thread that's located here.  While specific to my custom image, there are essential tips that can help any installation there as well.


Setting up Radar and the Current Weather tile

Go to this page in the DIY topic to find out how!
« Last Edit: August 24, 2021, 11:41:34 AM by Sleuth255 »

Offline Brientim

  • Contributor
  • ***
  • Posts: 123
Re: HTML Console for Davis WLL
« Reply #1 on: October 30, 2020, 03:18:29 AM »
Great job.

Offline hmderek

  • Senior Contributor
  • ****
  • Posts: 160
    • Meteodrenthe
Re: HTML Console for Davis WLL
« Reply #2 on: October 30, 2020, 11:26:40 AM »
Cool! This has been in my mind as a project for the coming winter too. I'm mostly unsure about which screen to use. I'd need something that can be on all the time, without emitting too much light but still being readable. What kind of considerations have you had there?
Davis VP2
Davis WeatherLink
Sensirion SHT35
PT100
NTC Thermistors
DS18B20
Apogee Instruments TS-100
Barani Meteoshield Pro
Davis 7714
MetSpec RAD14
Davis AirLink
Wemos D1 Mini micro controllers
https://blog.meteodrenthe.nl
https://meteodrenthe.nl
https://twitter.com/meteodrenthe

Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Re: HTML Console for Davis WLL
« Reply #3 on: October 30, 2020, 01:56:52 PM »
The one I'm showing in the vid is a little 8" Insignia flex android tablet ($50ish).  It has a pretty good auto brightness setting.  The server is running on a Pi 4b but I really think an original Pi 0 could run it.  I've actually got one of those kicking around to test with. 

I'm currently working on a setup screen now where you can enter your WLL IP, DID etc; everything is hardcoded currently.  Ideally I think I can figure out sensor lsid's dynamically by analyzing the currentconditions and UDP updates, but haven't tried anything out.  Once I have it, I'll post installation instructions on the repository.

11/07 edit: After testing, I've determined that a Pi 0 is not powerful enough to retrieve skyconditions and weather updates reliably without crashing. 
« Last Edit: November 07, 2020, 01:08:16 PM by Sleuth255 »

Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Re: HTML Console for Davis WLL
« Reply #4 on: October 31, 2020, 08:21:19 PM »
Good to see the repo is getting cloned!  For those of you who have clones going, "git pull origin master" is your friend :).  I'm not accepting pull requests currently because lots of changes/tweaks are going on currently.  So don't fork yet plz.  On the latest build I've added wind direction pointer trails (aka the phone app).  Also, rain info for the current storm will appear on the right side stats when storm conditions are in effect.
« Last Edit: November 02, 2020, 09:57:56 AM by Sleuth255 »

Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Re: HTML Console for Davis WLL
« Reply #5 on: November 02, 2020, 09:58:36 AM »
November 2 build status

Latest build adds sky conditions and day/night background animations.  Background switches to night scene at dusk and sunny scene at dawn.  Cloudy background occurs during a rainstorm.  I've also placed user defined variables (your WLL IP, your latitude/longitude) at the beginning of app.js to make it easier to implement.  I'm still hardcoding LSIDs however.  Assuming that sensor array with first LSID has wind/rainfall data/outside temp/humidity, second to last LSID has inside temp/humidity data and last LSID has barometer data.  This is a typical scenario.

Next up: Sunrise/sunset and moonphase tiles aka the weatherlink site.  These will float in the upper right hand of the display.  Also working on Changelog in Repo, and readme containing Pi setup instructions.

Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Re: HTML Console for Davis WLL
« Reply #6 on: November 02, 2020, 03:50:07 PM »
Tile code pushed!  Night time background shown.

« Last Edit: November 02, 2020, 10:26:02 PM by Sleuth255 »

Offline the beteljuice

  • the beteljuice
  • Forecaster
  • *****
  • Posts: 316
    • test site
Re: HTML Console for Davis WLL
« Reply #7 on: November 02, 2020, 06:06:54 PM »
Only thought - using Davis logo In toto may incur the wrath of the gods (of copyright and suggesting it's their product)
Imagine what you will KNOW tomorrow !

Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Re: HTML Console for Davis WLL
« Reply #8 on: November 02, 2020, 10:24:41 PM »
Good point that I've been contemplating.  On one hand it is their WLL and only their WLL that this works with so its actually an accurate representation of a Davis Instrument (as well as free advertising for them).  On the other hand, I'm using their logo.  I think I'm going to contact them and try to get permission.

Or how about a cool name/logo for this?  I have no artistic ability myself so I'll take any ideas.
« Last Edit: November 02, 2020, 10:42:48 PM by Sleuth255 »

Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Re: HTML Console for Davis WLL
« Reply #9 on: November 03, 2020, 10:15:43 AM »
Decision reached.  I plan on removing Davis branding.  Its a placeholder only while my graphically inclined friends design something cool...

Offline Brientim

  • Contributor
  • ***
  • Posts: 123
Re: HTML Console for Davis WLL
« Reply #10 on: November 03, 2020, 12:26:13 PM »
I know that this has moved past this point. Just in case anyone wanted to know this is Davis’ guidelines for gaining permission and usage.

https://www.davisinstruments.com/legal-policies-statements/davis-brand-permissions-and-guidelines/

Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Re: HTML Console for Davis WLL
« Reply #11 on: November 05, 2020, 10:27:46 AM »
Quick project status update.  Rebranding work is in-process.  Prototype of current best candidate shown below has also been pushed to the repo.  Also, I did get the code running on a Pi-0 (currently about $15).  Everything works fine, but the initial site load takes a while.  Live condition updates are tiny by comparison so once the site is loaded, the performance differences are unnoticeable.  I'm also customizing Pi-OS so that the site will come up automatically on boot and will turn this into an ISO that will be available in the repo.  Then, making the server will simply be: flash the ISO to SD using any number of free products, stick it in the Pi and power up.  Current bug/enhancement list:

BugList
  • (very) Intermittent site crash on HTTP socket error: need to trap error and continue

EnhancementList
  • add setup page for WLL IP, Lat/Lon,METAR site info
  • Background change for sky conditions: clear, partly cloudy, mostly cloudy. Driven by METAR decode
  • Add Forecast Tile: Rain, Snow, Clear, T-Storms (building the forecast algorithm with my wife who is a meteorologist currently)



Offline Bushman

  • Forecaster
  • *****
  • Posts: 7549
    • Eagle Bay Weather
Re: HTML Console for Davis WLL
« Reply #12 on: November 05, 2020, 12:39:47 PM »
Not sure if you have considered this, or even if it is possible, but using a webcam as the background with semi-transparent lettering would be awesome.  Sorta like what Meteobridge does, but full screen.
Need low cost IP monitoring?  http://wirelesstag.net/wta.aspx?link=NisJxz6FhUa4V67/cwCRWA or PM me for 50% off Wirelesstags!!

Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Re: HTML Console for Davis WLL
« Reply #13 on: November 05, 2020, 02:45:53 PM »
Good thought!  Easy to do too.  Essentially some process would periodically create a snapshot off the webcam and then save it in the weathersite images directory as backgroundCamImage.png.  WeatherSite would refresh the view and load the new background during its 10 minute conditions update refresh.  That might create some flicker however due to the high rate of background change.  Something to play with though.  I have a few outside cams to test with.

I was thinking about this from a static perspective actually: having the same horizon view with different images shown for the various weather conditions.  Along these lines, I have implemented a METAR based Weather Conditions tile as a precursor to the 24hr Forecast tile.  This can be directly used from US locations based on the NOAA METAR data FTP site.  Not sure about international METAR retrieval techniques.  Here's what it looks like:

« Last Edit: November 05, 2020, 03:14:39 PM by Sleuth255 »

Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Re: HTML Console for Davis WLL
« Reply #14 on: November 05, 2020, 02:47:42 PM »
My wife is really pumped about creating a forecast model based on available DAVIS sensor input btw...

Offline dhageremtp

  • Member
  • *
  • Posts: 7
Re: HTML Console for Davis WLL
« Reply #15 on: November 05, 2020, 10:38:31 PM »
Im telling you that this right here will change my mind. currently the biggest drawback to the Davis, I feel, is the outdated 1990 display. to get something like this up and running would be a game changer for me (the wife approval factor is high with this).

Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Re: HTML Console for Davis WLL
« Reply #16 on: November 06, 2020, 09:05:06 AM »
Also, with this model, you can potentially retrieve your Davis weather station's real-time conditions from anywhere on the planet where you can open a browser.  There are no local network restrictions for real-time data because the raspberry pi web server itself is on the local network and meets this requirement.  So, essentially you would publish the web server through your router's firewall.  Obviously its important to pay attention to security whenever you publish anything to the Internet, so your ISP should provide a rock solid way to accomplish this, or you should have VPN ingress access. 

In fact, I'm setting up things now so I can publish my weathersite for everybody to experience.  I'll also move it to a more powerful server that can handle increased volume.  That way people will be able to follow along as the design improves.  I'll post the URL sometime today.
« Last Edit: November 06, 2020, 09:08:06 AM by Sleuth255 »

Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Re: HTML Console for Davis WLL
« Reply #17 on: November 06, 2020, 12:29:24 PM »
Check out weathersite!  My WLL is live here:

http://weathersite.theparadigmgrid.com

Offline CNYWeather

  • Forecaster
  • *****
  • Posts: 2296
    • CNYWeather
Re: HTML Console for Davis WLL
« Reply #18 on: November 06, 2020, 01:29:08 PM »
Check out weathersite!  My WLL is live here:

http://weathersite.theparadigmgrid.com

I got this with your url

This site can’t be reached
weathersite.theparadigmgrid.com took too long to respond.
Tony




Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Re: HTML Console for Davis WLL
« Reply #19 on: November 06, 2020, 02:46:40 PM »
oops.... DNS issue.  I've corrected it but theweathersite needs to clear out of cache.  itmt you can see it on http://access2.theparadigmgrid.com

Offline Bushman

  • Forecaster
  • *****
  • Posts: 7549
    • Eagle Bay Weather
Re: HTML Console for Davis WLL
« Reply #20 on: November 06, 2020, 05:51:57 PM »
Check out weathersite!  My WLL is live here:

http://weathersite.theparadigmgrid.com

I got this with your url

This site can’t be reached
weathersite.theparadigmgrid.com took too long to respond.

Works for me.  Nice.
Need low cost IP monitoring?  http://wirelesstag.net/wta.aspx?link=NisJxz6FhUa4V67/cwCRWA or PM me for 50% off Wirelesstags!!

Offline Bushman

  • Forecaster
  • *****
  • Posts: 7549
    • Eagle Bay Weather
Re: HTML Console for Davis WLL
« Reply #21 on: November 06, 2020, 05:52:30 PM »
oops.... DNS issue.  I've corrected it but theweathersite needs to clear out of cache.  itmt you can see it on http://access2.theparadigmgrid.com

That works too!
Need low cost IP monitoring?  http://wirelesstag.net/wta.aspx?link=NisJxz6FhUa4V67/cwCRWA or PM me for 50% off Wirelesstags!!

Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Re: HTML Console for Davis WLL
« Reply #22 on: November 07, 2020, 11:48:55 AM »
So, my right brained friends have successfully guided me to a decent logo I think.  Those of you following along on the live site may have seen the changes as they evolved; many thanks for input on this!

« Last Edit: November 07, 2020, 12:53:54 PM by Sleuth255 »

Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Re: HTML Console for Davis WLL
« Reply #23 on: November 07, 2020, 01:06:15 PM »
also, I'm removing the Pi 0 from the compatibility list.  It's not fast enough to retrieve forecast and skyconditions reliably.

Offline Sleuth255

  • Senior Member
  • **
  • Posts: 98
Re: HTML Console for Davis WLL
« Reply #24 on: November 11, 2020, 05:28:08 PM »
More updates to weathersite
  • server reliability improvements.  Now works on Pi 0!
  • background tracks current conditions
  • Moon phase for quarters is displayed for the full day that the quarter falls on

I've also added live radar.  Using NOAA weather radar loops saved as gif images.  Most North American NOR sites are there.  Adjust the zoomin/zoomout variables at the top of app.js to change.  The live weathersite (see link on my first post) has this code running currently.

New button at bottom left selects live weather:



This brings up the radar page.  up/down arrows that overlay the image select zoom in/out.  "conditions" button at bottom left brings you back to the current conditions page. 


 

anything