0

I have been googling how to connect raspberry pi 4(with and without buster) to Azure IoT using the python SDK and found somethings but they are not clear as they should be for a beginner like me who has no idea how to use Azure. Some of them are 2-3 years old may be outdated.

Here are some links I found:

https://docs.microsoft.com/en-us/azure/iot-hub/quickstart-send-telemetry-python

https://github.com/Azure-Samples/iot-edge-python-raspberrypi-connect-transparent-gateway

https://github.com/Azure-Samples/iot-hub-python-raspberrypi-client-app

https://github.com/Azure/azure-iot-sdk-python

https://github.com/Azure-Samples/iot-hub-python-get-started

So please guide me or share links or any doc if you have on this and how to achieve this. I am thinking of starting simple from DHT11 sensor data and storing and Analyising it on IoT hub.

1 Answer 1

0

You are correct in your observation that the articles become outdated (for many reasons but the key one being that the Azure portal gets showered with new eye candy). The most practical approach for Azure IoT work is to leverage Visual Studio Code which can be a challenge for Raspberry Pi boards. Fortunately, VS Code has many extensions that are kept current for Azure IoT work and the links in the documentation will guide you to the current steps for sending DHT11 readings to Azure Hub using Python.

If there is a specific part in your code that is not working for you please provide the reference and I'll gladly dive in to help you out.

Kind regards.

7
  • Thank you so much for your response. But I am having issues getting started. I know this is not a school but if I have found the start I would have gladly finished it. This github.com/Azure/azure-iot-sdk-python link doesn't state how to use this from raspberry pi. The telemetry one is for Windows PCs by the looks of docs and the rest of them are archived for more than 2 years so...I just thought if somebody here has any experience regarding this can guide me.
    – Lucifer
    Nov 29, 2019 at 5:33
  • Understood. Let me look into it assuming that your environment is Raspbian and not Windows IoT Core. Rgds. Nov 30, 2019 at 15:58
  • @Lucifer, I completed a basic write-up for you using a simulated device. I will send you the link after I upload the document unless you want it via email. Using DHT11 with Python on RPi with the starter code will be an easy extension for you. Rgds. Dec 1, 2019 at 23:56
  • Here is the link to the DRAFT article: tinyurl.com/uses98y Comments, criticisms & other feedback welcome. Rgds. Dec 2, 2019 at 1:50
  • Sorry for the late response. I will try these steps right away and will post if any updates if needed. I just want to ask these steps only regarding the sending of data on to the Azure IoT cloud right? Not to get or see data back at any other device. Thank you Thank you so much for these steps.
    – Lucifer
    Dec 4, 2019 at 7:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.