5,838
edits
m (→Location) |
|||
This same api can be used to get weather data into another device, although you may prefer to use MQTT instead as that is more easily customised to just share the few weather values you might want.
===Technical aside===
When reading the support forum (or articles in this Wiki), you may see mention of AJAX and WebSockets. They are both methods of exchanging information between a web page and the data source. In the Cumulus MX context, they represent two ways of updating the data shown on an admin interface page like '''now.html''' or ''todayyest.html''.
Asynchronous JavaScript and XML (AJAX) is the widely used name for what Microsoft invented as '''XMLHttpRequest''' (late 1999, Internet Explorer 5.0) now it is implemented in all browsers and no longer purely Microsoft feature. Put as simply as I can, it lets code written into JavaScript ask for updated information from the Cumulus MX engine to update the numbers on the web page. In the standard Cumulus 1 trends.htm web page, AJAX was used to load an updated graph into the web page each time the client pressed a button requesting a graph.
WebSockets is an improvement on AJAX. While AJAX needs the client to make a request before an update can be made, WebSockets adds the option that the source can generate the request and do a remote update. Thus when you open ''todayyest.html'', the MX engine gets a request from that web page to insert the various sub-tables into that web page. Subsequently, when WebSocket use is enabled, the MX engine sends updates with new figures, until you close the web page and a '''Connection Closed''' message is sent instead.
== The MQTT interface ==
|
edits