1 Reply Latest reply on Mar 21, 2016 10:16 PM by vikr

    How to add more desired states on AWS IOT thing shadow, using WICED functions

    pihlung

      I am using Avnets BCM4343W IOT starterkit, and want to add an extra desired state to the startup example "shadow".

      Broadcom/WICED provide header files to libray functions like

      mqtt_connection_event_cb

      parse_json_shadow_status

      wiced_JSON_parser_register_callback

      Wiced_mqtt_connect

      wiced_mqtt_publish

       

      but no source code unfortunately, and not enough documentation or examples for me to add an extra desired state( a local threshold variable), that I can control from

      AWS iot shadow update(delta state).

      How can I publish so it will register as a desired state in AWS, and how can I parse the jason document and extract the value of a specific state "threshold"?

      Can I use "parse_json_shadow_status" or is it custom made for the shadow example program?

      What would it take to expand the BCM4343W board to collect data from 4 sensors, send data to AWS and be able to change "threshold" to each of them?

      Can BCM4343W handle 4 concurrent treads, one for each sensor?

       

      Thanks in advance.

       

        • 1. Re: How to add more desired states on AWS IOT thing shadow, using WICED functions
          vikr

          AWS has provided one example of desired and reported as a scenario, its upto your design to have how many ever states.

           

          Since its in json format, you can have multiple key value pairs in your json and have that parsed using the json parser library that we provide.

            { state :

                     { desired : on ,

                       desired 2: off

                     }

              

                    { reported : on ,

                       reported 2: off

                     }

              }

           

          and have this parsed in AWS dashboard as per your design requirement. Let us know if have specific example that you need help with

           

          hth

          vik86