Hi All,
First post and I think this possibly spans between the Meteohub / PHP/AJAX scripting sections of the forum so firstly apologies if it's in the wrong section. I'm trying to setup the steel series gauges on my weather website using the Saratoga Templates and a Raspberry Pi running meteohub. I'm 99% complete but can't find the solution to the last problem and hoping somebody has the answer, I'm pretty sure it's straight forward as searching through the forum dosen't seem to flag up similar issues, so I'm pretty sure I've missed something.
I've got the gauges working following the meteobridge setup on saratoga-weather.org but editing the gauges.js script to create settings for the meteohub rather than the meteobridge so that it uploads the data in a file called MHrealtime.txt and allows the gauges to display graphs produced by the meteohub.
Changes I've made to gauges.js are:
weatherProgram : 7, //Set 0=Cumulus, 1=Weather Display, 2=VWS, 3=WeatherCat, 4=Meteobridge, 5=WView, 6=WeeWX, 7=Meteohub
realTimeUrlMH : 'MHrealtimegauges.txt', //*** Meteohub Users: Change to the location of the JSON file
programLink = ['<a href="http://sandaysoft.com/products/cumulus" target="_blank">Cumulus</a>',
'<a href="http://www.weather-display.com/" target="_blank">Weather Display</a>',
'<a href="http://www.ambientweather.com/virtualstation.html" target="_blank">Virtual Weather Station</a>',
'<a href="http://trixology.com/weathercat/" target="_blank">WeatherCat</a>',
'<a href="http://www.meteobridge.com/" target="_blank">Meteobridge</a>',
'<a href="http://www.wviewweather.com/" target="_blank">Wview</a>',
'<a href="http://www.weewx.com/" target="_blank">weewx</a>',
'<a href="http://wiki.meteohub.de//" target="_blank">Meteohub</a>'],
case 7:
// Meteohub
realtimeVer = 10; //minimum version of the realtime JSON file required
config.realTimeURL = config.longPoll ? config.realTimeUrlLongPoll : config.realTimeUrlMH;
config.showPopupGraphs = true; // config.tipImgs - no Meteobridge images available
config.showRoseGauge = false; // no windrose data from MB
config.showCloudGauge = true;
config.tipImgs = [ // config.tipImgs for Weather Display users with wxgraph
['dayinouttemp.png', 'dayinouttemp.png'], // Temperature: outdoor, indoor
// Temperature: dewpnt, apparent, windChill, HeatIndx, humidex
['dayouttemphum.png', 'dayouttemphum.png', 'dayouttemphum.png', 'dayouttemphum.png', 'dayouttemphum.png'],
'dayrain.png', // Rainfall
'dayrainrate.png', // Rainfall rate
['dayinouthum.png', 'dayinouthum.png'], // Humidity: outdoor, indoor
'daybarometer.png', // Pressure
'daywind.png', // Wind speed
'daywinddir.png', // Wind direction
(config.showUvGauge ? 'dayuv.png' : null), // UV graph if UV sensor is present | =null if no UV sensor
(config.showSolarGauge ? 'dayradiation.png' : null), // Solar rad graph if Solar sensor is present | Solar =null if no Solar sensor
(config.showRoseGauge ? 'daywindvec.png' : null), // Wind direction if Rose is enabled | =null if Rose is disabled
(config.showCloudGauge ? null : null) // Pressure for cloud height | =null if Cloud Height is disabled
];
config.showWindVariation = false; // no wind variation data from MB
break;
This part all works great however the issue I've got is the pop graphs that include the time stamps for the max/min weather events all display the same format as the data in the uploaded data i.e. YYYYmmddhhmmss e.g. 20170415001300 rather than a human readable format of dd-mm-yy hh:mm or similar.
I've tried changing the format within the uploaded data using information from the meteobridge site but that doesn't seem to apply to the meteohub e.g. ([Data_Field_time=apm.gh]-[Data_Field_time=apm.ef]-[Data_Field_time=apm.abcd]etc) as well as trying changing formats withing the settings of the saratoga templates etc without any success.
I've also attached the data that's uploaded to the website to display on the gauges.
Any thoughts / advice would be greatly appreciated.
Regards
Simon