I am creating an application that need to show a sensor data in the list view and in chart. At present I am able to receive the sensor data using MQTT connector and log it on console and save it in database. The list view reads the data from database using a microflow. The charts are directly mapped to the database and refreshed constantly with respect to refresh interval. At present, charts are updated correctly but I could not be able to update the listview when the MQTT data is received.
First Question: How to update the listview automatically?
Second Question: It does not look correct to me to load the data every time from database. Or refresh the chart constantly to look for any change in the data in the database. Is there a way to do it in memory and based on messaged received event? I have looked in Mendix IoT tutorial but that uses database extensively. I want to make it event driven like act only (update chart and listview) when the MQTT message is received.
If i pass the Entity List and Entity Object to my home page, then how to access them in the MQTT received microflow. If i change the page objects values in a microflow, Are the UI controls Listview/Chart be refreshed automatically.
Note:To make it event driven, I also check the Pusher but that requires sending data to third party and it's free mode have restriction on number of messages.
Did you see this post (https://forum.mendixcloud.com/link/questions/91645) already? Similar discussion. Especially the side note at the end of Eric's reply might be relevant for determining the right approach on this.