I don't want to call AJAX requests every few seconds; I want to update my values only when they change.
Can it by done?
Arduino Stack Exchange is a question and answer site for developers of open-source hardware and software that is compatible with Arduino. It only takes a minute to sign up.Sign up to join this community
If you want server-push, you can use Server Sent Events or a Websocket instead of polling with XMLHttpRequest.
I don't know if there are convenient libraries for the ESPs to do this, though.