Closed pletch closed 2 years ago
Those were my additions - and there were a few reasons I did not go with Websockets:
So, no reason not to do it, but there was just little reason to change for change's sake.
@pletch Do you have an example using websockets? I'd be curious to see it.
In an alternate project I've been playing with using the JSON-specific AsyncWebServer endpoints, and am contemplating porting that functionality over to TiltBridge.
I only have the very crude proof of concept branch that I put together to play with websockets implementation for the about page. I am happy to push up and share if interested. If you want a proper working example, I don't have anything to share at the moment.
For educational purposes, I will eventually work on more robust websocket implementation for the dual esp32 Tiltbridge design I put together last year while backporting some of the other recent changes introduced here in v1.1.1
I only have the very crude proof of concept branch that I put together to play with websockets implementation for the about page. I am happy to push up and share if interested. If you want a proper working example, I don't have anything to share at the moment.
For educational purposes, I will eventually work on more robust websocket implementation for the dual esp32 Tiltbridge design I put together last year while backporting some of the other recent changes introduced here in v1.1.1
If you don't mind pushing it to GitHub, I would absolutely be interested in taking a look and seeing if there is anything that could be adopted. Thanks!
Done! It is a branch called websockets under my fork.
@thorrak, curious if you have considered evaluating use of EspAsyncWebserver websockets push functionality to replace the AJAX polling done on the about page and index pages? While playing with master to evaluate the MQTT fixes, I noticed there are still infrequent unrequested reboots that can occur when on the 'about' page.
Over the weekend, I threw together a websockets implementation using the master branch and this qualitatively seems to work pretty well, perhaps being less resource intensive once the socket connection is established. In addition, the values can be sent to multiple clients at once (though realize use case for this here is essentially non-existent) and the update frequency on the heap and uptime metrics can be increased to a few seconds with low overhead which is nice.