![]() ![]() One such policy is the service policy, which provides sufficient permissions for a service to read and write the IoT hub's endpoints. IoT hubs are created with several default access policies. Get a service connection string for your IoT hub Note down the name you choose, you need it later in this tutorial. Run the following command to add a consumer group to the built-in endpoint of your IoT hub: az iot hub consumer-group create -hub-name YOUR_IOT_HUB_NAME -name YOUR_CONSUMER_GROUP_NAME In this section, you add a consumer group to your IoT hub's built-in endpoint that the web app uses to read data. To upgrade to the latest version, run az upgrade.Ĭonsumer groups provide independent views into the event stream that enable apps and Azure services to independently consume data from the same Event Hubs endpoint. Run az version to find the version and dependent libraries that are installed. For more information about extensions, see Use extensions with the Azure CLI. When you're prompted, install the Azure CLI extension on first use. For other sign-in options, see Sign in with the Azure CLI. To finish the authentication process, follow the steps displayed in your terminal. If you're using a local installation, sign in to the Azure CLI by using the az login command. For more information, see How to run the Azure CLI in a Docker container. If you're running on Windows or macOS, consider running Azure CLI in a Docker container. If you prefer to run CLI reference commands locally, install the Azure CLI. For more information, see Quickstart for Bash in Azure Cloud Shell. Use the Bash environment in Azure Cloud Shell. To check your node version run node -version. Use the Raspberry Pi online simulator to get a simulated device that sends temperature data to IoT Hub. If you haven't registered a device yet, register one in the Azure portal.Ī simulated device that sends telemetry messages to your IoT hub. If you don't have a hub yet, you can follow the steps to create an IoT hub using the CLI or the Azure portal.Ī device registered in your IoT hub. If you don't have an Azure subscription, create a free account before you begin.Īn IoT hub in your Azure subscription. The steps in this article assume a Windows development machine however, you can also perform these steps on a Linux system in your preferred shell.Īn Azure subscription. The web application sample for this tutorial is written in Node.js. After running the web app locally, you can host the web app in Azure App Service. ![]() In this article, you learn how to visualize real-time sensor data that your IoT hub receives with a Node.js web app running on your local computer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |