Replies: 3 comments
-
This has always been a challenge because of the amount of data that would have to be stored into a json for dynamic queries like this. The best option would be to have the site have direct access to the database (which was the original method for belchertown), but that was removed due to the many different weewx/public html variations. So currently, no, nothing new here. I'm open to PR's though. The idea would be to basically dump their entire database to a json file, then have highstock/highcharts process that. The downside is that the file would be very large, and skin processing time may be longer than the archive interval. |
Beta Was this translation helpful? Give feedback.
-
In order to do this, with out loading the whole of the database into json file, there would need to be another process that has an active connection to the database to query it directly. JavaScript running on the browser would then need to make a connection to this process (via a web call) to get the data, to load it info highcharts. The way weewx and the web server are setup do not currently allow for this. Also, a word of caution, if this new process does not do any sanity checking of inputs, it could open you up to SQL-injection type attacks (Lil Bobby DROP TABLES). |
Beta Was this translation helpful? Give feedback.
-
Thanks guys, I appreciate the responses. |
Beta Was this translation helpful? Give feedback.
-
Has anyone figured out a way to query the database from within Belchertown to display the data for a particular day? I know we have a similar capability by clicking on "View more here", but I am envisioning a page where we could put in a start date and end date and a set of graphs would be generated for that query, i.e. show me the data from January 2023. I think that might be more useful than the yesterday, week, month, year links.
Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions