GithubHelp home page GithubHelp logo

vbguyny / ws4kp Goto Github PK

View Code? Open in Web Editor NEW
383.0 21.0 104.0 97.67 MB

WeatherStar 4000+

Home Page: https://battaglia.ddns.net/twc

License: MIT License

JavaScript 96.93% CSS 0.78% HTML 1.71% C# 0.59%
weather noaa radar travel weather-station

ws4kp's Introduction

WeatherStar 4000+

About

Welcome to the WeatherStar 4000+ project page!

This project was originally created by Mike Battaglia in the Fall of 2016 because of the desire to create his own weather site which displayed the information in a way that was done by the Weather Channel in the mid to late 90's. Eventually he watched enough videos and YouTube and read enough articles on how to get and parse data directly from the National Weather Service (NWS) which allowed him to create his own version of the WeatherStar 4000. After three interations, he now considers the site feature complete and you can view the live version here: https://battaglia.ddns.net/twc

Segments

  • Current Conditions
  • Latest Observations
  • Travel Forecast
  • Regional Forecast
  • Regional Observations
  • Local Forecast
  • Almanac
  • Local Radar
  • Hazardous Weather

Features

  • Support for all 50 US states.
  • Utilitize mobile GPS.
  • Fullscreen mode.
  • Plays background music.
  • Uses narration to read the information on the screen (does not work in iOS).
  • Displays station, radar, and zone IDs for the current location.
  • 10 minute auto refresh setting.
  • Convert between English and Metric units.
  • Choose between three built-in themes.
  • Supply custom text to scroll at the bottom of the screen.
  • Supply RSS feed to scroll at the bottom of the screen.

Setup

It is recommended that you download all of the source code to a folder and use Internet Information Services (IIS) 10 or later with ASP .NET 8 or later to create a virtual directory which points to this folder.

Please refer to the instructions here: https://github.com/vbguyny/ws4kp/blob/master/HowToInstall.txt

If you plan on exposing this site publicly, you will need to update the code in Middleware/CorsMiddleware.cs to have your public IP address and domain name:

        switch (hostName)
        {
            case "localhost":
            case "192.168.2.98":
            case "24.187.197.234":
            case "battaglia.ddns.net":
		    case "[Your domain here]":
			    OkToProcessRequest = true;
			    break;
	}

Then use a browser to access the site by navigating to the index.html page.

NOTE: The GPS function will not work in Chrome 50 or later if the site is not using an SSL certificate.

CORS

The design of this site was to have as little back end logic on the server side as possible. However weather.gov has too many issues with cross-origin resource sharing (CORS). In order to work around CORS prevention in most browsers the AJAX calls go through a server first acting as a middle man which sends the request to weather.gov and the response back to the end user.

In order to setup CORS on your server you will need IIS 10 or later which is able to support ASP .NET 8 or later.

The live site uses itself as the CORS server however there are a few free third-party CORS servers that can be used if you are not able/willing to set one up yourself.

If you want to use them you will need to update the code in the routine $.ajaxCORS in the file twc3.js.

Disclaimer

This web site should NOT be used in life threatening weather situations, or be relied on to inform the public of such situations. The Internet is an unreliable network subject to server and network outages and by nature is not suitable for such mission critical use. If you require such access to NWS data, please consider one of their subscription services. The authors of this web site shall not be held liable in the event of injury, death or property damage that occur as a result of disregarding this warning.

The WeatherSTAR 4000 unit and technology is owned by The Weather Channel. This web site is a free, non-profit work by fans. All of the back ground graphics of this web site were created from scratch. The icons were created by Charles Abel and Nick Smith (http://twcclassics.com/downloads/icons.html) as well as by Malek Masoud. The fonts were originally created by Nick Smith (http://twcclassics.com/downloads/fonts.html). The music is copyrighted by the respective artists and/or label companies. The voices used by the narration is owned by the creators of the web browser that is used to access the web site.

ws4kp's People

Contributors

netbymatt avatar nivex avatar polarmanne avatar ryanaarongreen avatar vbguyny avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ws4kp's Issues

Almanac is no longer working

For the past few days the Almanac now reads as "No Data". Upon closer examination it appears that the site that we currently get the data (wunderground.com) has updated their website to prevent "scrapping" of data. This also appears to prevent the marine and monthly perception fields from populating.

Regional forecast does not show my city.

I honestly can't remember if this is normal (unsure how these are chosen), but the regional forecast map does not show my city, which is Tucson and is substantially larger than a few of the cities on this map.

https://i.imgur.com/sDb0Uh6.png

Also, one of the nearby locations in Tucson International Airport, which is a mouthful and spans off of the edge of the map like so:

https://i.imgur.com/Jgmk5TH.png

Unsure how that was handled initially by TWC but it feels like it should scroll or something.

If this is normal/expected, just close. I love what you've done here by the way. This is a trip.

Naming Problem.

First pic is from Anchorage, particularly at a time when Soldotna was unavailable. Second pic, and the worst case in my eyes, is of Minneapolis.

error
errro

As you can tell, there are obvious repeats of the same city multiple times on the Latest Observations page. This makes it awfully confusing to others since they won't know which one is different. Please, rename them to reflect the district/airport they represent. Thank you.

With love,
Tom

Weather.gov is updating its website.

It has been brought to my attention that weather.gov will be performing major updates to their site on March 7, 2017 which directly affect the Weather Star 4000+. It is still unclear at this time to measure the full scope of how these changes will affect my site but at this point I am freezing any and all changes until the new weather.gov site has been implemented.

More intimation about the changes here: http://www.weather.gov/cae/pointnclickchange

GetClosestCurrentWeather runs forever if no valid data found

During testing of a new CORS proxy I discovered that GetClosestCurrentWeather (twc3.js:341) will continue to run forever, increasing distance and trying a request again immediately. In the ~40 seconds before I reloaded (I was working on a fix in the background) it had made over 1500 requests. I suggest adding an escape function if the distance exceeds a certain threshold (100 miles?) and/or waiting some amount of time before increasing the distance and trying again.

Regional Maps icons

Here I come with more possible new icons for the regional conditions/forecast maps!

Partly Cloudy and Windy
Partly Cloudy and Windy Day
Partly Cloudy and Windy Night

Mostly Cloudy and Windy
Mostly Cloudy and Windy Day
Mostly Cloudy and Windy Night

Cold
Cold

Haze
Haze

Hot
Hot

Smoke
Smoke

Hawaiian Cities

So, I noticed this a while ago, but never mentioned it til now...there are barely any cities on the Hawaiian map. The only 3 are Honolulu, Bradshaw AAF, and Kamuela/Waimea, and the last one only shows up if the location is Lihue. My suggestion is to get rid of Kamuela/Waimea, then add the new cities on the map.

hawaii problem 1

That would make the Hawaiian Regional Map a lot more informational.

Restrict CORS endpoint to certain domains

When looking at the requests made from my browser, there were a lot of /twc/cors?u=. Accessing that URL, but replacing the u query parameter with e.g. https://google.com results in the Google homepage being relayed. It seems an attacker could potentially use this endpoint to DoS a server.

It may be worth restricting this endpoint to known-good endpoints, e.g. iastate.edu, airnowapi.org, forecast.weather.gov.

Severe Warnings

Is there a way to include severe weather crawls on the bottom area like the original? It would be helpful when there is severe thunderstorms, tornadoes, ect. I have seen the bulletins in the top area as the original, but never any severe on lower crawl.

Images folder?

There seems to be a lot going on in the images folder that isn't directly related to displaying weather graphics. Can you provide some explanations of the extra folders, -1, -2 and other files that seem to either be obsolete or work-in-progress?

Weather.gov is starting to phase out old weather API.

For years, the site was able to get weather data in XML by hitting the forecast.weather.gov/MapClick.php page with the FcstType=dwml and the lat,lon as query arguments. However, recently it appears that weather.og is phasing that out by simply having the site redirect the user to the page using a look up by zoneid.

For example:

Url: https://forecast.weather.gov/MapClick.php?FcstType=dwml&lat=33.749&lon=-84.388
Redirects to: https://forecast.weather.gov/MapClick.php?zoneid=GAZ033&zflg=1

However, the following URL currently works:

https://forecast.weather.gov/MapClick.php?FcstType=dwml&lat=40.81564&lon=-73.001

The new API is available, however, it isn't 100% working. According to their FAQ (https://weather-gov.github.io/api/general-faqs), they say that they still support the XML format but I would need to do testing to confirm this.

Local Forecast not converting "X BELOW" into Metric correctly

When the local forecast reads "wind chill values as low as X below" it converts it the value as it is above 0'F. For example, if the sentience reads "wind chill values as low as 8 below" it converts it as "wind chill values as low as -13" however the number should be -22.

System Hanging on Radar Imagery

Hello,

I've been running WeatherStar 4000+ on my Raspberry Pi 3B+ with the latest installation of Raspbian Stretch. I have an industrial cooling fan keeping my set up chilly.

When I let the 4000+ run in Chromium, it can usually complete a few loops before eventually freezing on radar imagery. The system itself will hang and become unresponsive. I haven't noted any abnormally high CPU usage, but I have not checked the RAM just yet.

Any thoughts would be helpful.

Image and Full Screen Problem.

I wonder if there'll be a feature in the future where you can put your own image on the corner to replace the WeatherStar 4000+ logo.

I say that because I think that businesses and even apartment complexes can benefit from this service just by having their own logo seen on the service as well as offering their own scrolling text at the bottom, which by the way, is a very helpful thing too.

Plus, when I put it in full screen, the screen gets smaller, while still in full screen, after a little while. Will that be fixed too?

Alternative CORS services not working

crossorigin.me and anyorigin.com are gone.

whateverorigin.org passes data, but ironically does not respond with the necessary Access-Control-Allow-Origin: * header.

You may want to clear those out of readme and twc3.js.

Nighttime Forecast

Instead of only showing Today or Tomorrow's Forecast only, use the nighttime forecast as well.

EXAMPLE:
If Today's forecast is available, show Tonight's forecast 2nd.
If Tomorrow's forecast is available, show Tonight's forecast 1st.

Browser memory consumption approaches 1GB physical

I am trying to use the Chromium Browser on Raspbian on a Raspberry Pi 3 to display a WeatherStar 4000+ screen 24/7 but after less than an hour, it soaks up so much resident RAM that it crushes the machine (swap is full, load goes over 12...) The typical RAM footprint for the browser process is 600MB-800MB resident (well over 1GB virtual).

Every time it freezes the Pi, it happens to be displaying the weather radar screen. I am not certain if it's something on that screen or something it's preparing for the next screen, but it's at least a consistent behavior.

It runs fine on a laptop with 8GB or more.

Option to toggle "Dark Mode"

As a user, I would like to not get blinded by the white background when I hit the site in the middle of the night.

Display RSS feed for Scroll Text?

Hi vbguyny,

Love your WeatherStation 4000 simulator!! Great work!

Is there any way currently, or a feature that can be added in the future, that will allow an RSS feed to be displayed as the Scroll Text?

Thanks!
Andrew

hard-coded call to local CORS service

index.js:1070 sets a URL with a direct reference to the local CORS service which is then fed to LoadTwcData, bypassing the ajaxCORS function in twc3.js.

Ability to disable the bottom bar and use the mouse buttons as navigations.

Hi, I don't know how many other people have done this but I've hooked up a Raspberry Pi to my old CRT TV and I am currently displaying this site to it. It works well and looks very nice on this TV, but unless I'm missing something, this is mostly operated by the mouse pointer. It seems a keyboard would work too but I don't have a spare keyboard to hook up at all times to this Pi, so I've been mostly using the mouse. This is an unfortunate downside because when I put the site into full screen, the bottom navigation bar is always there, making it not appear on the screen and having this black bar. My current solution is zooming out to have said bar be small, but then I can't zoom back in with only the mouse, so when I want to display other things on the TV it's very cumbersome to have to click the fullscreen button (which I can't see as this CRT is slightly curved) and get out.

I think it would be nice, therefore, to have a mouse buttons only mode; exit full screen with the middle mouse button, activate or go back with the left mouse button, and go forward with the right mouse button. I don't see a need for the mute button to be assigned to anything because I just have the site on full volume, and use the TV's internal volume control. The refresh button also isn't useful but if it needs to be assigned to anything, it could be done by pressing the left and right mouse buttons at the same time. Alternatively, the pause button could be mapped to that.

I understand this is a very specific scenario; if this isn't accepted, I will likely create a fork and attempt to add these myself. But I'm suggesting it here first, because A: I'm curious if anyone else happens to want this, and B: I'm not great with Javascript.

API Change suggestion

Well, now, it's been a long time since I've been here, huh? Brings back some good memories, indeed...now, what I'm thinking here is that the data for the 4000+ should come from the NWS API, rather than the Weather Underground API. This would most likely fix the Almanac and Marine Forecast problems, considering that it's coming from the API of the source of the forecasts, rather than an API relaying that source's forecasts. I don't know whether or not the Wunderground API is the only one, but, it seems to be that it is the main one or, at least, a major one.

forecast.weather.gov appears to allow CORS

I'm seeing an Access-Control-Allow-Origin: * coming back from forecast.weather.gov. Looks like those calls might not have to go through the CORS relay anymore.

$ curl -I 'https://forecast.weather.gov/MapClick.php?FcstType=dwml&lat=34.2257&lon=-77.9447'
HTTP/2 200 
server: Apache
x-nids-serverid: www3.md
x-ua-compatible: IE=Edge
access-control-allow-origin: *
content-type: text/xml
expires: Sat, 18 Apr 2020 21:42:09 GMT
cache-control: max-age=0, no-cache, no-store
pragma: no-cache
date: Sat, 18 Apr 2020 21:42:09 GMT
content-length: 0
strict-transport-security: max-age=31536000 ; includeSubDomains ; preload

Roku Channel

Any chance in turning this into a Roku channel? I'd love to have easy access to this on my TV.

Thanks for considering. Great work!

Chrome on some Android devices shows soft navigation buttons.

On some Android devices, such as Pixel and Moto phones, when you enter full screen mode from Chrome the soft buttons appear on the right side of the page. This is a recent behavior in Chrome as it didn't start doing this until a few weeks ago.
According to Google, this is a new feature in Chrome. The good news is that it can be disabled by adding a parameter to the method that puts the page into full screen. https://bugs.chromium.org/p/chromium/issues/detail?id=933436

Daypart Forecast

This is a concept I've wanted for quite a time: the Daypart Forecast.

Now here's the source I've gotten for this feature. If it doesn't work, I'll try to find another source, unless you want to do it.
http://forecast.weather.gov/MapClick.php?lat=42.8326&lon=-106.329&lg=english&&FcstType=digital

The Daypart Forecast, also known as the Daily Planner on the Intellistar, is one page that displays an hourly forecast for the area in a bar graph for it's temperature, with the forecast above, at a set level. The hours used for it in the WSXL and IS are Midnight, 6 am, Noon, 3 pm, 5 pm, and 8 pm. However, the hours I want to be used is Midnight, 3 am, 6 am, 9 am, Noon, 3 pm, 6 pm, and 9 pm, to make it more useful.

I hope this will be implemented, in order to make the WS4K+ more useful for people.

Ability to Change Flavors

I have a suggestion to allow the end user to select either a default flavor like used on the original 4000, or to allow the end user to pick and choose which frames to view. Personally I have no use for the Travel Cities Forecast, and especially if I were to run this on a loop as a continuous display of weather information, I'd like to be able to adjust which screens to show and which to skip.

Other than that, it's a fascinating take on the original. Half fantasy, half simulation. Great work.

Site does not render properly when there is a large Hazardous Weather

I noticed this issue happen last week ago. I think something was changed in the latest version of Chrome related to the height of canvases. However, I wasn't able to figure out how the duplicate the issue until now. Basically, if there are more than 365 lines of text in the Hazardous Weather screen, the site breaks.

Newer icons

I propose that the WS4000+ site should use the regional icons from Spring 1994 onward. A problem I have with the use of the 1992 icons is that most, if not all of them, get compressed when displayed, the biggest offender of said problem the Mostly Cloudy icon and the Scattered Precipitation icons. While I do understand that it's a problem that is inherit to 4000+, I believe using the newer ones will at least result in less compression in those biggest offenders.
I do realize, too, that @malekmasoud created some of the icons (namely, the night-time variants of the Scattered Precipitation icons). I was thinking about addressing this by creating versions of his originals that fit with the design of their re-designed counterparts if, and only if, Malek does not want to create new ones and he allows me to make these redesigns.
I'll send them via this topic if that is the case. Hope to get back to you soon.

Freezing when auto-refreshing

I'm having a recurring issue where the "loading" screen will hang up. Sometimes the screen will indicate that it's loading the pages but the blue status bar isn't moving and all pages say LOADING; other times the bar is moving; and other times one or more pages says FAILED. This happens maybe every 12 hours or so...sometimes more often or less often.

I'm using WS4000 for a local cable TV channel and the software is wonderful, but it's embarrassing when this happens. Thankfully I use Chrome Remote Desktop to monitor the PC it's running on and refresh it when needed. The program is running on WIN 7 using Opera.

Manually refreshing the page usually solves the issue. But is there a way for the software to auto-refresh to reduce this freezing issue? I've tried browser plug-ins that auto-refresh pages, but it doesn't put WS4000 into full-screen mode.

Thanks!

Mike
Beavercreek Ohio
https://cityofbeavercreekohio.viebit.com/

LAMP Hosting

Hi,
Can the app be installed on shared LAMP web server. I would really appreciate any kind of help on this.

Regards,
Chan

Local forecast stopped loading

The issue was related to the fact that the site that held the marine forecast information changed their SSL certificate to TLS 1.2

Marine Forecast no longer works

It appears that NOAA has updated the format for the marine forecast. They do not have the documentation for the new requests posted yet. I believe that they are waiting to roll out the new set of APIs. Once this is done I should be able to fix this.

Recommend removal of music track with voice

The track "Trammell Starks - All That Jazz" has some of the original TWC narration in it. It starts by saying "Currently the temperature is 38 degrees with light snow". This is a bit jarring when it's 65 degrees and sunny outside :)

Support for Australian weather

Is it possible to add an option to see Australian weather? Could be taken from the National Bureau of Meteorology, and would make a great addition!

Improved LDL

I was thinking about a WeatherStar XL-style LDL. Here's a concept:
noname

Local Forecast no longer working - 404

Looks like Weather Underground changed their API as the Local Forecast lookup is now pulling a 404
I'll look for the new version myself on my own time as well.

Time no longer reflects the time zone of the inquiring city

This used to work but I just noticed it today it wasn't working. I don't know how long this has been broken but it must have been sometime between the beginning of March and today. I know that this logic uses wunderground as part of the Almanac code so perhaps something changed on their site.

Radar basemap

Question, how did you obtain/create the radar basemap?

the one that is being used is heavily pixilated/compressed and was wondering if you had the master files for that. In case your curious, i am working on a project getting the original machine running again using custom software and I have a distinct lack of graphics.

thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.