/revPi-azure-script

Short script for testing the revpi and azure Iot Hub sdk

Primary LanguagePython

Revolution Pi and Azure

Hardware

Libraries

Python 3.7

Project structure

  • directory Device: Code hosted on the RevPi
  • directory Service: Code hosted on Microsoft Azure

Setup

We will need first to setup several env variable. The most easy way to do it, it's to create a .env file at the root level:

export CONNECTION_STRING_DEVICE=<HostName=...;DeviceId=...;SharedAccessKey=...>
export CONNECTION_STRING_SERVICE=<HostName...net;SharedAccessKeyName=...;SharedAccessKey=....>
export IOTHUB_DEVICE_ID=<name of the device>

And then source it:

$ source .env

Install all dependencies:

$ pip3 install -r requirements.txt

Now you can execute all python script

Useful links:

Azure :

Revpi dio :