This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Publish to custom topic in aws_iot

Hi,

I have built a project upon the aws_iot-example. There are three shadow-topics that the device may publish to (/update, /get and /delete). To me it seems there is no possibility to publish to any other topic in aws_iot. Or am i wrong?

How should i do if I would like to publish to a named shadow in aws? Or a custom made topic?

Is it a good idea to copy aws_iot.c/.h into my project so I get a local copy of them, adjust them to suit my purposes and skip using the version in the library? If so, how do I exclude the original files?

Best regards,
Lars

Parents Reply
  • How embarrasing... I had the answer right in front of my eyes all the time... I guess I was too focused on the enum for the built-in topics. Now I see that the switch/case just is run through when none of the three topics is used. So it's meant to use AWS_IOT_SHADOW_TOPIC_UNKNOWN as type when setting a custom topic?

    Also, I had this question up as part of another case some weeks ago. Then I got the answer that the aws_iot-example only publishes to shadow topics. And that I had to make my own implementation in some way, with the suggestion that I should look at how the mqtt_simple-example publishes to topics. By then I found another way forward, but now I'm back needing this functionality.

    Thanks!

    Best regards,
    Lars

Children
Related