Confirm Shadow updates being received

Hey,

I have problems confirming that my shadow delta updates are being received by AWS.
As the QOS is 1, i thought that posting to mgos_shadow_updatef() would be enough.
But I encounter logs like this:

mgos_aws_shadow_ev Update: {“state”: {“reported”: {(…)}, “clientToken”: “e58432fb”}
mgos_aws_shadow_ev Version: 0 -> 2177251 (5)
mgos_aws_shadow_ev Update: {“state”: {“reported”: {(…)},}, “clientToken”: “e58432fb”}
mgos_aws_shadow_ev Update: {“state”: {“reported”: {(…)},}, “clientToken”: “e58432fb”}
mgos_aws_shadow_ev Version: 0 -> 2177253 (5)

Note that I do not get an update accepted for message 2, but the version counter is still increased.
I cannot find this message inside AWS.

My ideas to solve this would be:

  • handle shadow versioning myself… for that i would need to be able to read the initial version and the current version when there is a missmatch. while for shadow update accepted it is printed in the log from mgos_aws_shadow.c it is not transmitted within the MGOS_SHADOW_UPDATE_ACCEPTED event
  • check for the clientid… it is also completely handled inside mgos_aws_shadow.c as far as i see. can i listen only on shadow update accepted messages that match my client id?

with both i would need to alter the mgos_aws_shadow.c. is there an approach where i do not need to do that?
Thanks

never mind, i just noticed that MGOS_SHADOW_UPDATE_ACCEPTED already filters for messages with my client id.
As I do not send out multiple messages simultaneously, I just listen to the update accepted to confirm that my message has been received.

unfortunately it does not seem to work like intended. at some times, the reply channel seams to be stalled sometimes as I am waiting more then 10 seconds for my ack.
i need to implement a solution where i manage the shadow version myself. How can I retrieve the initial shadow version?