And resending to the list, sorry for the double post Michael... On Sat, 1 Feb 2025 at 20:58, '[email protected]' via weewx-development < [email protected]> wrote:
> > I think the only sane way would be code on the server interrogating the > DB and providing an api. > > With another project I use this approach: the backend is running a spring > boot application on my home server, gathering all the data from my PV, > storage battery and smart meter. I wanted this application to be accessible > from the internet without having to connect to my home server. So I > implemented the REST API also in a php script that resides on a managed > webspace, the backend server is syncing the the local sqlite db to the > remote sqlite db just for the missing lines, every archive interval. The > HTML/JS part interacts with the php-REST-API, just as it does with the Java > REST-API so the only thing that has to be maintained in two time is the > very core of the REST API that is providing data for the front end. > > This could be an approach for a skin, with the limitation, that for using > the feature, there needs to be php with sqlite available (which my managed > webspace includes out-of-the-box). But with this approach you need to do a > lot of things (formatting values, unit conversions, ...) in the front end, > instead of using weewx that already solved all this stuff for you. On the > other hand this is already the case for fuzzy-archer: incoming MQTT data > needs to be converted and formatted in the front end, using configuration > from the back end transported to the front end, so all information is > already there in my particular case, you just need to do it for a bit more > of data. > > local sqlite database (rsync'd to web facing server) , php frontend? Okay... https://github.com/glennmckechnie/weewx-wxobs Working example at ... http://cgm.id.au/weewx/wxobs/index.php?datepicker=01-Feb-2025&submitDate=Show+records The conversions are handled in skin.conf, the SLE passes them to the templated php file Config time span is configurable, you can show every archive record, or be sensible and show the averages over 30 minutes. There's only a month's data on the working example. It's a trimmed copy of the main sqlite database, rsynced with the skin. Cheers Glenn Various WeeWx addons at https://github.com/glennmckechnie -- You received this message because you are subscribed to the Google Groups "weewx-development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/weewx-development/CAAraAzh7HdVBaUXEbQ7wKU6rCUUOePOCzw1tufDnNjV6wd6zUg%40mail.gmail.com.
