I have an android app running a MQTT client that is subscribed to my ignition MQTT broker. How do I ensure that when the android device(s) come back online, they get up to date tags that they have missed? I ask because I have some tags that do not change that often but are critical to be updated on the android device(s).
Here is a simple diagram of how data flows
If this is standard MQTT and not Sparkplug then you would need to publish those messages with the retain flag set.
Is this question theoretical or are you actually not getting current values when you reconnect in the android app?
BTW I'm using MQTT Transmission to publish the data to the broker
I am not getting updated values when the android client comes back on
On the Android side are you using some kind of Sparkplug library?
Is the application acting as primary host application or secondary/non-primary?
I am using the HiveMQ Java MQTT Client, to receive the messages and I am using the protobuf library to encode/decode the payload.
The android devices are used for none frequent user interactions. I could just move it all over to perspective but my thought is we are using MQTT an open protocol for device communication and we should not have the mentality of locking ourselves into a commercial platform like perspective for everything and we should be able to write an application for any device we want that supports MQTT and Sparkplug B and ignition adopt that device without issue.
I think this is the last hurdle I need to get over before I see nothing holding us back from this vision. I already have fully communication between the android device(s) and ignition.
I have also reach out to cirrus link for support on this too.
My guess is that you are not primary application, and that means you need to publish the Node Control/Rebirth
metric to each Edge Node upon reconnecting.