AWS FreeRtos Shadow

I am using AWS FreeRtos shadow and what to use multiple names shadows

I have rewritten the code so I can set the delta callbacks for 2 or more different topic names and that bits working

As the original AWS code stands it was not possible to do this as it checks to see if that exists before trying to create a new one

The issue I have is with the subscriptions once I have created the first set for shadow 1

_AWSIotShaddow_Findsubscritions is the procedure in question which creates subscriptions for shadow 1 but when it come to repeating this for shadow 2 it says they already exist.

This is because I believe the shadow name of the subscription I am trying to create has not yet been changed (this happens after this produce and I don’t seems to have found a way of doing this.

If you are able to assist, it may not be your area or can direct it to someone that does I would be grateful it, I am such someone else has come up again this before (hopefully)

Just to make sure that I understand your problem correctly, you are saying that _AwsIotShadow_FindSubscription function complains about existing subscription when you try to subscribe for second shadow of the same thing.

If that’s correct, it is because it only uses thing name to match the subscription in the _shadowSubscription_match function: https://github.com/aws/amazon-freertos/blob/master/libraries/c_sdk/aws/shadow/src/aws_iot_shadow_subscription.c#L105

You need to update the above matcher to also use the shadow name. That would mostly require signature change of _AwsIotShadow_FindSubscription to also pass shadow name.

Thanks.