April 10, 2019 at 1:48 am #1550
With the recent reset need in v1.1.0, I am curious if offloading more of the UI to CDN (so to speak) would benefit the project at all?
I ask because it kinda looks all of the UI could be reproduced using web components that could be hosted on github or otherwise, with a single HTML file (as the UI could easily be an SPA as well) that just imports the needed component and instantiates it? Looking at the existing HTML files, it appears to be about 32K of files…
If it’s not a concern, I understand, but since I was wanting to poke around with a possible UI tweak, I thought I’d ask!
Thanks for the amazing project and again, sorry about not reading the release notes! Lesson learned!April 10, 2019 at 11:54 pm #1551
Sure, that’s certainly possible. In fact, that’s what we do with our OpenSprinkler product — there the UI files add up to several MB so can’t be stored locally on the controller, and hence are hosted on opensprinkler server. In comparison, the OG UI files are much smaller. Generally we prefer to host them locally on the controller, because this way the system is self-contained, and even if you lose Internet you can still access the UI.
In the case of OpenSprinkler, we have customers who use it in a remote location with no Internet at all, so they will have to either use the OpenSprinkler mobile app (which has UI files built-in), or host the UI on a local server on their network. In any case, it just feels the system is not self-contained and relies on the existence of Internet. For that reason, when I designed OG, I chose to host files on the controller.April 11, 2019 at 12:33 am #1552
Makes total sense, i figured, its an internet connected controller, it’s generally expected to be there. I was actually hoping it could be done as a PWA which via offline support would solve those problems too, but that requires an SSL cert which is beyond the resources of an ESP board.
My main reason for the curiosity was the size issue that came up in 1.1.0 (and the fact that I do UI dev for a living maybe played a role in the curiosity), if its not a major concern, I’ll leave that thought behind for now, unless I get an itch to design a new UI to play around with 😛
Thanks again for all the work on this!April 11, 2019 at 1:53 pm #1555
I strongly support keeping the device as independent as possible with all resources hosted locally. I have my device completely walled off from the internet with only access from my local network. It is even on its own VLAN. For remote access, I have my phone connected 24/7 via the WireGuard VPN to my home network and I can do the same on demand for my MacBook. For automation, I run an MQTT server on an SBC linux box (on which I run many services) so an MQTT client on my phone is always available to get updates thru the VPN. The only packets allowed to leave my device are responses to local requests, NTP, and MQTT only to the MQTT server. This gives me ultimate security. I do not want to be loading resources from the internet as a security hole.April 11, 2019 at 9:58 pm #1557
And this was in no way a suggestion or recommendation to do so, it was quite literally, a question of curiosity since the recent release had to have a special note due to space concerns.
- You must be logged in to reply to this topic.