MQTT Client service to control the Device Twins Parameters RRS feed

  • Question

  • Hi Team,

    I have successfully completed the basic demo with IoT Hub , reference from demo
    And i have below questions,

    Q1) How do i can change the Device Twin parameters , 

    Example: "userLedBlue": false,
    from MQTT service (from android or Python or java)
    ANy example code is available to change the status of "userLedBlue"
    to true/false ?

    Q2)How do i can read the telemetry data without using Time Series Insights?

    Q3) IoT hub examples works only in debug mode (Visual Studio) after stop,
    changing the Device Twin (led) value not updating on kit


    Ashok r

    Monday, October 7, 2019 5:58 PM

All replies

  • Hi Ashok,

    The demo link you provided is not working. Can you please let us know the correct link?

    Also as a reference:



    Wednesday, October 9, 2019 2:58 PM
  • Dear Antonio/Team!

    The link was not pointing to the blog properly , but still any one can find the right link by checking the url string.

    Link not working is excuse. There are lot of documents/blogs i cannot read all those. As a end user you shoud provide simple working example along with your azure dashboard. Microsoft failed , if you take any services twillo or others they documented well with clear code snippets.

    Now forget my previous question about twins.

    I have created IoT Central Appication which is working fine with my Azure Sphere kit. When i press the Switch on Dashboard nothing will happen, its expected behavior

    I should click update to reflect on my device side. What is stopping for your developer to make this simple

    implementation? skipping the "Update"  ok leave it.

    So everything works for me from dashboard, the next level i want to integrate this API's on my android app. What is the support or documents we have?? i did not find anything. Lot of unwanted things you people are blogged and did not have simple way to change the button status via URL or REST API's. Its not 2010 , 2020.

    I Dono what you people wil do, want my solution on my plate. Just to tun on simple LED i had to write this much??

    I worried n writing this on forum. I will chill down after getting solution.


    Ashok r

    Saturday, October 12, 2019 8:39 AM
  • Hi @asokfair,

    - you should read and understand recommended document about the Device Twins and also an additional reference material about the MQTT protocol support (that's your device protocol). Based on that, you will not ask to change a device twin reported property by REST API such as a connection less oriented protocol.

    Anyway, if your device is using the MQTT protocol directly, than follow this example (using Paho MQTT client).



    Saturday, October 12, 2019 11:20 PM
  • Hello asokfair,

    Thank you for your feedback. Like mentioned by Roman, please follow the official documentation which lives under docs.microsoft.com/azure . We understand that many examples are out there on different places though we focus first on the official documentation and our suggestion is that you ask the questions on the specific sample\demo you are trying to follow. For any samples\features you would like to have I would suggest that you add a new entry here

    PS: element14 Community is very active and I am sure you will receive good advisory there to.


    Monday, October 14, 2019 2:48 PM
  • Thanks Antonio & Roman, I referred the same link above and created X.509 CA and verified successfully on iothub.

    the next step is to authenticate using MQTT which im  not finding. Also i seen the windows console example project

    where humidity and temperature values are changed. This example is not at all required , already i am getting real time values from azure sphere board. Still im not getting into right documents. please help. The MQTT example code to change the twin parameters (Led's) and Read the Temperature/Humidity values.

    Tuesday, October 15, 2019 3:11 AM
  • Hello Ashok,

    Specifically for Azure Sphere you can find the list of official samples here: https://github.com/Azure/azure-sphere-samples

    If you can't find the sample you need please add a new feature request here and share the link here so others can upvote. 

    Thank you!

    Friday, October 18, 2019 2:58 PM