espressif / esp-rainmaker-android

ESP RainMaker Android app sources
https://rainmaker.espressif.com/
Apache License 2.0
95 stars 55 forks source link

Device state change initiated from hardware does not reflect instantaneously on app, needs app refresh most of the time. #8

Closed noobGB closed 2 years ago

noobGB commented 3 years ago

Hi Team,

Hardware initiated state change does not reflect instantaneously on app over cloud or local connection, needs manual app refresh to check the changes. This is a big issue from non technical customer point of view, they will question the hardware and app sync property of the device. Before ESP rainmaker, I was using BLYNK IOT platform for product design, their sync mechanism is almost real time without any app page refresh. Please let me know If I should make some configuration changes to sort this issue.

Another scenario : I have logged in two mobiles phones from same user account, if I make state change from one mobile app then I need to refresh other mobile app page to get latest device states.

shahpiyushv commented 3 years ago

@noobGB , on the home page of the phone app, you would indeed need a manual refresh. Currently, we do not have any notification mechanism from cloud side and auto refresh on this page will keep fetching lots of data from the cloud for each node unnecessarily. On the device details page, an auto-refresh happens every 5 seconds, which we believe is a decent enough time. We can increase this frequency to say once every 3 seconds if device is on local network. Going ahead, once we have a notification mechanism in place, the updates could happen faster as the phone would not have to keep querying, but will instead get the updates asynchronously.

noobGB commented 3 years ago

@shahpiyushv , Thank you for the clarification, indeed notification mechanism from cloud would make app device state update smoother and faster. Refresh frequency change to 3 seconds for local network seems to be a good idea for the time being.

kebiromar commented 3 years ago

hello, @shahpiyushv i think the most simple solution is to create an mqtt topic per app user that is used by the devices to inform the phone app that one of the user nodes is updated and then the app can refresh her data using the rest-api. auto-refresh every 5 seconds is is data consuming solution and not efficient.

KhushbuShah25 commented 2 years ago

Hi @noobGB , notification feature is added now. Please take update.

sahal-bit commented 1 year ago

please how can add bottom switch to esp rainmaker? like to open my gate and close it.

shahpiyushv commented 1 year ago

@sahal-bit , the requirement is not clear here, but more importantly, this does not seem relevant under this specific issue. Please file a new issue with appropriate details.