[solved] AWS library modifications to allow sending "desired" and "reported" keys at will [was: (AWS) Shadow: change "desired" state]

#1
  1. My goal is:
    To synchronize a local output with a cloud shadow (AWS); that is, the output can be changed not only by the shadow but locally (button)
  2. My actions are:
    When the button is pressed, I toggle the output and call the update function as per described in the documentation: AWS.Shadow.update(0, {desired: state});
  3. The result I see is:
    a “desired” key inside the “reported” key:
[Sep  3 18:45:50.260] mgos_aws_shadow.c:475   Update: {"state": {"reported": {"desired":{"out2":false,"out1":false}}}, "clientToken": "......"}
  1. My expectation & question is:
    I expect a way to change the “desired” key of the shadow so AWS does not reply back with a delta.
    The documentation seems incorrect, since a “reported” key is inserted here inside mgos_aws_shadow_updatevf().
    Is there a way to do that ? I don’t see it but haven’t looked real deep; do I have to write my own modified mgos_aws_shadow_updatevf() and ffi it ?
1 Like
#2

OK, lib has been upgraded, next week will publish the mods and send a pull request in Github

1 Like
#4

Proposed changes have been discussed and finally merged into the aws library