A couple of broad SS questions:
Posted: Sat 23 Jan 2016 6:08 pm
I can't quickly find this explained anywhere: realtime.txt is obviously the Cumulus realtime file in a very specific CSV format.
But do I gather that customclientraw.txt is actually a JSON file and while eg targeted at WD users, this is effectively a generic format so that any other software that creates an equivalent file of name:value pairs will work equally well as a source of data for the SS gauges, provided of course that the standard variable names are used and the correct JSON syntax is observed?
And presumably (??) it doesn't matter if some name:value pairs are missing (if they're not being used in that particular gauge presentation) or if the order of the name:value pairs varies, provided again that correct syntax is observed? And if I'm guessing correctly then perhaps some sets of name:value pairs could be uploaded in one file (eg ccr1.txt) and others in another (ccr2.txt) subject of course to some suitable amendment of the JS that reads the files? (Maybe they don't even need to have different filenames - if the same filename was used then some variables would be updated by one upload and others by a subsequent upload?) Or am I misunderstanding how JSON works?
So the reason for this last question is wondering in general about how best to update web page presentations for different types of weather parameters. Most parameters only change measurably on a timescale of eg 1 minute, eg temperature, humidity, pressure or like solar/UV and rainfall are limited - eg in the context of a Davis station - by sensor updates to the same 1 min timescale. (It takes pretty heavy rain of >12mm/hr to score >1 0.2mm tip/minute.)
But the one parameter that does update much more frequently is wind speed/direction for which a 2.5 second granularity (Davis again) would be needed to show all the available data. But it really seems like overkill to upload the whole of realtime.txt or equivalent literally every 2.5 secs. Hence the thought about the possibility of maybe uploading only wind data every 2.5 secs and then everything else eg once per minute or even less often.
An alternative approach that might be possible with the JSON type file would be to assemble a set of eg 12 or 24 wind pairs into a JSON array and upload this as part of the whole file every 30 or 60 seconds. OK this would require some further adjustment of the SS code, but perhaps not too much, and exact synchronicity with the actual wind measurements would be lost - that wouldn't worry me too much ( after all, there's always some latency in the overall process and I'm not sure it really matters anyway), but it might concern others more.
But do I gather that customclientraw.txt is actually a JSON file and while eg targeted at WD users, this is effectively a generic format so that any other software that creates an equivalent file of name:value pairs will work equally well as a source of data for the SS gauges, provided of course that the standard variable names are used and the correct JSON syntax is observed?
And presumably (??) it doesn't matter if some name:value pairs are missing (if they're not being used in that particular gauge presentation) or if the order of the name:value pairs varies, provided again that correct syntax is observed? And if I'm guessing correctly then perhaps some sets of name:value pairs could be uploaded in one file (eg ccr1.txt) and others in another (ccr2.txt) subject of course to some suitable amendment of the JS that reads the files? (Maybe they don't even need to have different filenames - if the same filename was used then some variables would be updated by one upload and others by a subsequent upload?) Or am I misunderstanding how JSON works?
So the reason for this last question is wondering in general about how best to update web page presentations for different types of weather parameters. Most parameters only change measurably on a timescale of eg 1 minute, eg temperature, humidity, pressure or like solar/UV and rainfall are limited - eg in the context of a Davis station - by sensor updates to the same 1 min timescale. (It takes pretty heavy rain of >12mm/hr to score >1 0.2mm tip/minute.)
But the one parameter that does update much more frequently is wind speed/direction for which a 2.5 second granularity (Davis again) would be needed to show all the available data. But it really seems like overkill to upload the whole of realtime.txt or equivalent literally every 2.5 secs. Hence the thought about the possibility of maybe uploading only wind data every 2.5 secs and then everything else eg once per minute or even less often.
An alternative approach that might be possible with the JSON type file would be to assemble a set of eg 12 or 24 wind pairs into a JSON array and upload this as part of the whole file every 30 or 60 seconds. OK this would require some further adjustment of the SS code, but perhaps not too much, and exact synchronicity with the actual wind measurements would be lost - that wouldn't worry me too much ( after all, there's always some latency in the overall process and I'm not sure it really matters anyway), but it might concern others more.