Closed MehranMazhar closed 6 years ago
@MehranMazhar : this question was a bit too big for a quick answer, so we're looking at the possibility of adding device twin support to the Arduino libraries; I'll keep you posted.
@MehranMazhar : unfortunately, figuring this one out would require much of the work of actually adding device twin support for Arduino, and that is beyond what I'm able to do for now. I've put it in front of our PM, who seemed excited about adding the device twin support, so this picture may change at some point.
@MehranMazhar : I think John answered this one here, which seems to be a duplicate. If you're covered, will you please close this issue?
@JetstreamRoySprowl I still could not do it with John's method. So should we wait for support device twin on ardunio with mqtt ?
@MehranMazhar : I'm afraid I don't have any useful info for you at this point. I don't have a timeline for device twin support, nor do I know if such a timeline will ever exist.
@JetstreamRoySprowl Can I Ask you where is this feature supported? I saw on this issue you said that it will be released soon
@MehranMazhar When the (edit 1.0.44) Arduino release comes out (I'm working on it now) it will work with this sample
@MehranMazhar The 1.0.44 Azure IoT Arduino libraries are out including twin support. You'll need the 2.4.0 ESP8266 Arduino package as well.
i need to use device twin in azure-iot-ardunio simplesample_mqtt example .but when i use this line of codes : (devicetwin_simplesample in azure-iot-c-sdk )
DECLARE_STRUCT(Maker, ascii_char_ptr, makerName, /Fabrikam, Contoso ... / ascii_char_ptr, style, /sedan, minivan .../ int, year );
DECLARE_STRUCT(Geo, double, longitude, double, latitude );
DECLARE_MODEL(CarState, WITH_REPORTED_PROPERTY(int32_t, softwareVersion), WITH_REPORTED_PROPERTY(uint8_t, reported_maxSpeed), WITH_REPORTED_PROPERTY(ascii_char_ptr, vanityPlate) );
DECLARE_MODEL(CarSettings, WITH_DESIRED_PROPERTY(uint8_t, desired_maxSpeed, onDesiredMaxSpeed), WITH_DESIRED_PROPERTY(Geo, location) );
DECLARE_DEVICETWIN_MODEL(Car, WITH_REPORTED_PROPERTY(ascii_char_ptr, lastOilChangeDate), /this is a simple reported property/ WITH_DESIRED_PROPERTY(ascii_char_ptr, changeOilReminder),
);
Arduino: 1.8.3 (Windows 10), Board: "NodeMCU 0.9 (ESP-12 Module), 80 MHz, 115200, 4M (3M SPIFFS)" Build options changed, rebuilding all In file included from C:\Users\mehran-pc\Documents\Arduino\libraries\AzureIoTHub\src/AzureIoTHub.h:9:0, from sketch\simplesample_mqtt.c:15: C:\Users\mehran-pc\Documents\Arduino\libraries\AzureIoTHub\src/sdk/serializer.h:226:67: error: expected ')' before '(' token
define WITH_REPORTED_PROPERTY(type, name) MODEL_REPORTED_PROPERTY(type, name)
sketch\simplesample_mqtt.c:63:5: note: in expansion of macro 'WITH_REPORTED_PROPERTY'
WITH_REPORTED_PROPERTY(ascii_char_ptr, lastOilChangeDate), /this is a simple reported property/
exit status 1 Error compiling for board NodeMCU 0.9 (ESP-12 Module).
This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.