Replies: 4 comments 8 replies
-
Polling is wasting network data/energy, if data not changed, why we need poll it every time, |
Beta Was this translation helpful? Give feedback.
-
this html code causing polling every 2345ms
we need to switch to something like
|
Beta Was this translation helpful? Give feedback.
-
Webfrontend and http is trimed for minimal code size and is NOT intended to be used for communicating with the device (it is a fallback option). Tasmota is designed to be used with mqtt. |
Beta Was this translation helpful? Give feedback.
-
I have it working but I doubt if it lowers network load as it pushes data every 100ms..... It probably needs a better server side handler which only pushes data if anything is changed. That's a major effort as the data is volatile as being provided by many sensors and drivers. Checking for changes is almost undoable as the data is chunked too. I'm afraid we have to stick to the old polling feature. |
Beta Was this translation helpful? Give feedback.
-
DESCRIPTION
Today Tasmota uses REST API on WEB UI, ui polls every time sensors data or switch states,
The modern way to not use polling, but use websockets or the easiest is to switch to Server Side Events, it is supported almost on all browsers, js code easily can be modified to EventResource, it is kinda COMET, this guy already implemented it on ESP8266,
https://github.com/IU5HKU/ESP8266-ServerSentEvents
ADDITIONAL CONTEXT
Beta Was this translation helpful? Give feedback.
All reactions