serializer/samples/devicetwin_simplesample is one good example how to use device twin (WITH_DESIRED_PROPERTY) and device method (WITH_METHOD).
But unfortunately, it currently does not work with ESP8266 (Sparkfun Thing Dev). I am not proficient in C but when I drill down I found that parson.c use sscanf but ESP8266 does not support sscanf (issue).
I really hope the device twin sample can work because it enables ESP8266 to be invoked with device method.
We suggest changing parson source code to use some of the functions we wrote in order to work around the sscanf problem. We have no time to make this change ourselves for the foreseeable future.
If you manage to get it running, we'd take a pull request on that. Thank you.
Best Regards,
Andrei Porumb
Waiting for my pull request at parson to be accepted.
@anporumb Although device twin is still not working on ESP8266 (lack of Lock/Unlock/Lock_init), the latest parson@96150ba remove dependency to sscanf. Bringing one closer step.
Twin support for Arduino is near the front of my task queue. I'll post here when it's complete.
Any update @JetstreamRoySprowl ? Is it still far away?
Thanks!
@jantielens Real Soon Now. I've gotten it running, and just need to get it into the next release.
The 1.0.44 versions of the Azure IoT libraries now have twin support. Running this version will require the latest library and devices files. Here is the sample for Huzzah, but it also fits in Thing Dev: https://github.com/Azure-Samples/iot-hub-c-huzzah-getstartedkit
Most helpful comment
@jantielens Real Soon Now. I've gotten it running, and just need to get it into the next release.