Trixology

WeatherCat => WeatherCat Web Templates => Topic started by: ELO on June 09, 2013, 11:17:53 PM

Title: True Real Time Wind Info for Steel Gauges?
Post by: ELO on June 09, 2013, 11:17:53 PM
Thank you, thank you, Mark for the coding and files needed to take advantage of the Steel Gauges. They are fantastic and make for what I think is a very nice looking weather station display. I'm also enamored with the true realtime data available through the WeatherCat Server and associated WeatherCat client software on the Mac when at home on my LAN or via the internet when elsewhere.

Which as got me wondering whether there is a way to marry the two for true realtime display of wind speed and wind direction on a web page using the steel gauges.

Obviously, one option is to see how short an interval I could get WC to ftp up the steel gauge data file and that might suffice; however, it's really only the wind related data that is almost continuously variable, so bandwidth could be saved by uploading only the wind data rather than the whole file on a "rapid fire" basis if the steel gauges.js file would access two data files - one for wind info and another for the balance of the data.

Another approach would be if the steel gauge wind gauges could access the weathercat server running inside weathercat and then display continuously variable wind data. I'm in no way proficient enough with code to know whether this is reasonably possible or not, but I would be interested to know what others think.

Rick
Title: Re: True Real Time Wind Info for Steel Gauges?
Post by: mcrossley on June 10, 2013, 09:16:59 AM
It is something I have been thinking about - really it should be a push mechanism from the server rather than the current Ajax based pull.

I have been playing around with web sockets which look ideal, but it may be 'safer' to use older technologies like long polling.

I envisage the data being pushed out from the server 'when it changes' rather than at a set interval. The problem is how to implement that, it requires either cooperation from the weather program (difficult when the gauges run across many programs) or something like a PHP script to monitor the data files and only send the specific data when it detects a change in a value - but that then requires the user to run PHP on their web server.

Maybe version 3 could make the break and add these additional requirements, and leave version 2 for those who cannot support the features on their web sites. (I'm not sure how many commercial/free hosting companies will support things like web sockets).