{"id":1770,"date":"2019-01-22T00:00:00","date_gmt":"2019-01-22T00:00:00","guid":{"rendered":"https:\/\/azure.microsoft.com\/blog\/connecting-node-red-to-azure-iot-central"},"modified":"2025-06-11T04:00:20","modified_gmt":"2025-06-11T11:00:20","slug":"connecting-node-red-to-azure-iot-central","status":"publish","type":"post","link":"https:\/\/azure.microsoft.com\/en-us\/blog\/connecting-node-red-to-azure-iot-central\/","title":{"rendered":"Connecting Node-RED to Azure IoT Central"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Today I want to show how simple it is to connect a temperature\/humidity sensor to Azure IoT Central using a Raspberry Pi and Node-RED.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As many of you know, Raspberry Pi is a small, single-board computer. Its low cost, low power nature makes it a natural fit for IoT projects. Node-RED is a flow-based, drag and drop programming tool designed for IoT. It enables the creation of robust automation flows in a web browser, simplifying IoT project development.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For my example, I\u2019m using a Raspberry Pi 3 Model B and a simple DHT22 temperature and humidity sensor, but it should work with other models of the Pi. If you have a different kind of sensor, you should be able to adapt the guide below to use it, provided you can connect Node-RED to your sensor.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"configuring-azure-iot-central\">Configuring Azure IoT Central<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li class=\"wp-block-list-item\">Create an app.<\/li>\n\n\n\n<li class=\"wp-block-list-item\">Create a new device template.\n<ul class=\"wp-block-list\">\n<li class=\"wp-block-list-item\">Temp (temp)<\/li>\n\n\n\n<li class=\"wp-block-list-item\">Humidity (humidity)<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li class=\"wp-block-list-item\">Create a real device and get the DPS connection information.<\/li>\n\n\n\n<li class=\"wp-block-list-item\">Use <a href=\"https:\/\/github.com\/Azure\/dps-keygen\" target=\"_blank\" rel=\"noreferrer noopener\">dps-keygen<\/a> to provision the device and get a device connection string.\n<ul class=\"wp-block-list\">\n<li class=\"wp-block-list-item\">Identify the three parts of the resulting connection string and save them for later.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"connecting-the-dht22-sensor\">Connecting the DHT22 sensor<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before we can get data from our DHT22 sensor, we need to connect it to the pi. The DHT22 typically has three pins broken out, but some of them have four. If you have one with four, check the datasheet to confirm which pins are voltage (may be shown as +, VCC or VDD), data (or signal), and ground.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With the pi powered off, use jumper wires to connect your DHT22 as shown below:<\/p>\n\n\n\n<figure class=\"wp-block-image has-custom-border\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2019\/01\/a2fc8f9d-9125-42e5-9faf-905fed14a68c.webp\" alt=\"Use jumper wires to connect your DHT22\" style=\"border-radius:0px\" title=\"Use jumper wires to connect your DHT22\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">NOTE: The power jumper (red) should go to 3.3V, data jumper (yellow) should go to GPIO4 and the ground jumper (black) should go to ground. Some boards are different, so double-check your connections!<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"installing-required-software\">Installing required software<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">I started by installing Raspbian Lite using the <a href=\"https:\/\/www.raspberrypi.org\/documentation\/installation\/installing-images\/README.md\" target=\"_blank\" rel=\"noreferrer noopener\">guide<\/a>. Then, I <a href=\"https:\/\/nodered.org\/docs\/hardware\/raspberrypi\" target=\"_blank\" rel=\"noreferrer noopener\">installed Node-RED<\/a>. At this point you should be able to open a browser and visit to see the Node-RED interface. Next, <a href=\"https:\/\/flows.nodered.org\/node\/node-red-contrib-azure-iot-hub\" target=\"_blank\" rel=\"noreferrer noopener\">install the Azure IoT Hub nodes for Node-RED<\/a>. The easiest way to do this is from the Node-RED interface, using the Manage Palette command.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/flows.nodered.org\/node\/node-red-contrib-dht-sensor\" target=\"_blank\" rel=\"noreferrer noopener\">Install the DHT22<\/a> nodes. Unfortunately, since this node has some lower-level hardware requirements, it can\u2019t be installed through the Manage Palette command. Please follow the instructions using the link above.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"configuring-the-flow\">Configuring the flow<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now that you have Node-RED up and running on your pi, you\u2019re ready to create your flow. By default, Node-RED should already have a flow called \u201cFlow 1,\u201d but if you can easily create a new one by selecting the <strong>(+) <\/strong>icon above the canvas.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"starting-the-flow-with-the-inject-node\">Starting the flow with the inject node<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The first node we will add to this flow is an input node. For this example, we will use the <strong>inject<\/strong> node which simply injects an arbitrary JSON document into the flow. From the input section in the palette, drag the node from the palette on the left onto the canvas. Then, double select it to open the configuration window. Set the node properties as shown below:<\/p>\n\n\n\n<figure class=\"wp-block-image has-custom-border\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2019\/01\/d9dd2418-9879-4058-9ee2-cdeab7146e1b.webp\" alt=\"Starting the flow with the inject node\" style=\"border-radius:0px\" title=\"Starting the flow with the inject node\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This node will simply inject a JSON object where the payload is set to a timestamp. We don\u2019t really care about that value. This is just a simple way to kick off the flow.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"getting-data-from-the-dht22\">Getting data from the DHT22<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In the Node-RED palette, find the <strong>rpi dht22 <\/strong>node and drag it onto the canvas. Double click on it to open the configuration window, and set the node properties as shown below:<\/p>\n\n\n\n<figure class=\"wp-block-image has-custom-border\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2019\/01\/8a0fb6d0-e922-42d7-b89a-c2cae4e314e1.webp\" alt=\"The rpi dht22 node configuration window\" style=\"border-radius:0px\" title=\"The rpi dht22 node configuration window\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Connect the <strong>inject<\/strong> node to the <strong>rpi dht22<\/strong> node by dragging the little handle from one to the other.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"reformatting-the-message\">Reformatting the message<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The JSON message produced by the DHT22node isn\u2019t formatted correctly for sending to Azure IoT, so we need to fix that. We will use the <strong>change<\/strong> node to do this, so drag it out from the palette onto the canvas and connect it to the DHT22 node. Double click on it to open the configuration window and set the node properties as shown below:<\/p>\n\n\n\n<figure class=\"wp-block-image has-custom-border\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2019\/01\/467424cd-bc79-4c11-9f75-514e41a63ea5.webp\" alt=\"How to edit the change node\" style=\"border-radius:0px\" title=\"How to edit the change node\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">For the functional part of this node, we will use JSONata, which is a query and transformation language for JSON documents. After selecting the JSONata type in the <strong>to<\/strong> selector, select the <strong>[\u2026] <\/strong>button to open the editor and enter the following:<\/p>\n\n\n\n<figure class=\"wp-block-image has-custom-border\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2019\/01\/5a29d0cd-39db-424b-a509-d024a955ee97.webp\" alt=\"Expression editor\" style=\"border-radius:0px\" title=\"Expression editor\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Here we are extracting the temperature and humidity values from the input JSON message and putting them inside the data element in the resulting JSON message. We\u2019re also adding the device ID and shared access key which you got from the Device Connection String earlier.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"sending-the-data-to-azure-iot-central\">Sending the data to Azure IoT Central<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Now that we\u2019ve got the JSON message ready, find the <strong>Azure IoT Hub node<\/strong> in the palette and drag it onto the canvas. Again, double click on it to open the configuration window and set the properties as shown here:<\/p>\n\n\n\n<figure class=\"wp-block-image has-custom-border\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2019\/01\/f221ad22-3b56-45ef-9966-2b6301efd801.webp\" alt=\"Azure IoT Hub node\" style=\"border-radius:0px\" title=\"Azure IoT Hub node\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"confirming-your-message-and-debugging\">Confirming your message and debugging<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The final node we will add to our flow is a <strong>debug<\/strong> node, which simply outputs the message it is given to the debug panel in Node-RED. Connect it to the end of the flow (after Azure IoT Hub) and set the name to \u201cHub Response.\u201d<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you\u2019re interested in seeing the JSON message at any point in the flow, you can add more <strong>debug<\/strong> nodes anywhere you want. You can enable or disable the output of a debug node by selecting the little box on the right side of the node.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"the-flow\">The flow<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Here is what your flow should look like. I\u2019ve added a couple of extra <strong>debug <\/strong>nodes while developing this flow, but you can see that only the Hub Response node is enabled.<\/p>\n\n\n\n<figure class=\"wp-block-image has-custom-border\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2019\/01\/cbc4537d-c6b3-482c-bc1a-df2fabf33dc5.webp\" alt=\"The flow\" style=\"border-radius:0px\" title=\"The flow\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Before you can run the flow, you need to deploy it from the workspace. To do this select the red <strong>Deploy<\/strong> button at the top right of the Node-RED screen. Then, simply select the little box on the left of the <strong>every minute<\/strong> node and it will start. Since we configured that node to run every minute, it will continue to send messages to Azure IoT Central until you stop it by either disabling the flow or redeploying.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Pop back over to your IoT Central app and you should start seeing data within a minute or so.<\/p>\n\n\n\n<figure class=\"wp-block-image has-custom-border\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2019\/01\/69d42621-2d8b-4597-ac82-d50bdb1593dd.webp\" alt=\"IoT Central App\" style=\"border-radius:0px\" title=\"IoT Central App\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">As you can see, connecting Node-RED to Azure IoT Central is pretty simple. This is a great way to quickly prototype and experiment with different sensors and message payloads without having to write any code! You can also use this approach for creating gateways or protocol translators so you can easily connect almost anything to Azure IoT Central.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"appendix-flow-source\">Appendix: Flow source<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you want to just copy-paste the whole thing in instead of building it up yourself, you can import the following JSON into Node-RED and just update the three values from your Device Connection String (see the instructions above).<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; gutter: false; title: ; quick-code: false; notranslate\" title=\"\">\n[{\"id\":\"9e47273a.f12738\", \"type\":\"tab\", \"label\":\"DHT22-IoTC\", \"disabled\":false, \"info\":\"\"}, {\"id\":\"b3d8f5b6.a243b8\", \"type\":\"debug\", \"z\":\"9e47273a.f12738\", \"name\":\"Hub Response\", \"active\":true, \"tosidebar\":true, \"console\":false, \"tostatus\":false, \"complete\":\"true\", \"x\":740, \"y\":340, \"wires\":[]}, {\"id\":\"117b0c09.6b3a04\", \"type\":\"azureiothub\", \"z\":\"9e47273a.f12738\", \"name\":\"Azure IoT Hub\", \"protocol\":\"mqtt\", \"x\":520, \"y\":340, \"wires\":[[\"b3d8f5b6.a243b8\"]]}, {\"id\":\"ee333823.1d33a8\", \"type\":\"inject\", \"z\":\"9e47273a.f12738\", \"name\":\"\", \"topic\":\"\", \"payload\":\"\", \"payloadType\":\"date\", \"repeat\":\"60\", \"crontab\":\"\", \"once\":false, \"onceDelay\":\"\", \"x\":210, \"y\":120, \"wires\":[[\"38f14b0d.96eb14\"]]}, {\"id\":\"38f14b0d.96eb14\", \"type\":\"rpi-dht22\", \"z\":\"9e47273a.f12738\", \"name\":\"\", \"topic\":\"rpi-dht22\", \"dht\":22, \"pintype\":\"0\", \"pin\":4, \"x\":400, \"y\":120, \"wires\":[[\"f0bfed44.e988b\"]]}, {\"id\":\"f0bfed44.e988b\", \"type\":\"change\", \"z\":\"9e47273a.f12738\", \"name\":\"\", \"rules\":[{\"t\":\"set\", \"p\":\"payload\", \"pt\":\"msg\", \"to\":\"{t \"deviceId\":\"{YOUR DEVICE ID} \", t \"key\":\"{YOUR KEY}\", t \"protocol\":\"mqtt\", t \"data\": {t \"temp\": $number(payload), t \"humidity\": $number(humidity)t t }tt}\", \"tot\":\"jsonata\"}], \"action\":\"\", \"property\":\"\", \"from\":\"\", \"to\":\"\", \"reg\":false, \"x\":280, \"y\":340, \"wires\":[[\"117b0c09.6b3a04\", \"db5b70be.81e2a\"]]}, {\"id\":\"db5b70be.81e2a\", \"type\":\"debug\", \"z\":\"9e47273a.f12738\", \"name\":\"Payload\", \"active\":true, \"tosidebar\":true, \"console\":false, \"tostatus\":false, \"complete\":\"payload\", \"x\":500, \"y\":420, \"wires\":[]}]\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>Today I want to show how simple it is to connect a temperature\/humidity sensor to Azure IoT Central using a Raspberry Pi and Node-RED.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ms_queue_id":[],"ep_exclude_from_search":false,"_classifai_error":"","_classifai_text_to_speech_error":"","_alt_title":"","footnotes":"","msx_community_cta_settings":[]},"categories":[1485],"tags":[],"audience":[3055,3053,3056],"content-type":[1511],"product":[1486],"tech-community":[],"topic":[],"coauthors":[533],"class_list":["post-1770","post","type-post","status-publish","format-standard","hentry","category-internet-of-things","audience-developers","audience-it-decision-makers","audience-it-implementors","content-type-best-practices","product-azure-iot-central","review-flag-1680286581-295","review-flag-1680286581-364","review-flag-1680286584-658","review-flag-1-1680286581-825","review-flag-3-1680286581-173","review-flag-4-1680286581-250","review-flag-anywh-1680286580-635","review-flag-disable","review-flag-disabled","review-flag-iot-1680286585-835","review-flag-new-1680286579-546"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Connecting Node-RED to Azure IoT Central | Microsoft Azure Blog<\/title>\n<meta name=\"description\" content=\"Today I want to show how simple it is to connect a temperature\/humidity sensor to Azure IoT Central using a Raspberry Pi and Node-RED.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/azure.microsoft.com\/en-us\/blog\/connecting-node-red-to-azure-iot-central\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Connecting Node-RED to Azure IoT Central | Microsoft Azure Blog\" \/>\n<meta property=\"og:description\" content=\"Today I want to show how simple it is to connect a temperature\/humidity sensor to Azure IoT Central using a Raspberry Pi and Node-RED.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/azure.microsoft.com\/en-us\/blog\/connecting-node-red-to-azure-iot-central\/\" \/>\n<meta property=\"og:site_name\" content=\"Microsoft Azure Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/microsoftazure\" \/>\n<meta property=\"article:published_time\" content=\"2019-01-22T00:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-11T11:00:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2019\/01\/a2fc8f9d-9125-42e5-9faf-905fed14a68c.webp\" \/>\n<meta name=\"author\" content=\"Peter Provost\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@azure\" \/>\n<meta name=\"twitter:site\" content=\"@azure\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Peter Provost\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/connecting-node-red-to-azure-iot-central\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/connecting-node-red-to-azure-iot-central\/\"},\"author\":[{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/peter-provost\/\",\"@type\":\"Person\",\"@name\":\"Peter Provost\"}],\"headline\":\"Connecting Node-RED to Azure IoT Central\",\"datePublished\":\"2019-01-22T00:00:00+00:00\",\"dateModified\":\"2025-06-11T11:00:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/connecting-node-red-to-azure-iot-central\/\"},\"wordCount\":1140,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/connecting-node-red-to-azure-iot-central\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2019\/01\/a2fc8f9d-9125-42e5-9faf-905fed14a68c.webp\",\"articleSection\":[\"Internet of things\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/azure.microsoft.com\/en-us\/blog\/connecting-node-red-to-azure-iot-central\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/connecting-node-red-to-azure-iot-central\/\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/connecting-node-red-to-azure-iot-central\/\",\"name\":\"Connecting Node-RED to Azure IoT Central | Microsoft Azure Blog\",\"isPartOf\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/connecting-node-red-to-azure-iot-central\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/connecting-node-red-to-azure-iot-central\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2019\/01\/a2fc8f9d-9125-42e5-9faf-905fed14a68c.webp\",\"datePublished\":\"2019-01-22T00:00:00+00:00\",\"dateModified\":\"2025-06-11T11:00:20+00:00\",\"description\":\"Today I want to show how simple it is to connect a temperature\/humidity sensor to Azure IoT Central using a Raspberry Pi and Node-RED.\",\"breadcrumb\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/connecting-node-red-to-azure-iot-central\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/azure.microsoft.com\/en-us\/blog\/connecting-node-red-to-azure-iot-central\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/connecting-node-red-to-azure-iot-central\/#primaryimage\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2019\/01\/a2fc8f9d-9125-42e5-9faf-905fed14a68c.webp\",\"contentUrl\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2019\/01\/a2fc8f9d-9125-42e5-9faf-905fed14a68c.webp\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/connecting-node-red-to-azure-iot-central\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog home\",\"item\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Internet of things\",\"item\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/category\/internet-of-things\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Connecting Node-RED to Azure IoT Central\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#website\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/\",\"name\":\"Microsoft Azure Blog\",\"description\":\"Get the latest Azure news, updates, and announcements from the Azure blog. From product updates to hot topics, hear from the Azure experts.\",\"publisher\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization\",\"name\":\"Microsoft Azure Blog\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2024\/06\/microsoft_logo.webp\",\"contentUrl\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2024\/06\/microsoft_logo.webp\",\"width\":512,\"height\":512,\"caption\":\"Microsoft Azure Blog\"},\"image\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/microsoftazure\",\"https:\/\/x.com\/azure\",\"https:\/\/www.instagram.com\/microsoftdeveloper\/\",\"https:\/\/www.linkedin.com\/company\/16188386\",\"https:\/\/www.youtube.com\/user\/windowsazure\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/person\/c702e5edd662b328b49b7e1180cab117\",\"name\":\"shakir\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g7664e653ea371ce16eaf75e9fa8952c4\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g\",\"caption\":\"shakir\"},\"sameAs\":[\"https:\/\/azure.microsoft.com\"],\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/shakir\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Connecting Node-RED to Azure IoT Central | Microsoft Azure Blog","description":"Today I want to show how simple it is to connect a temperature\/humidity sensor to Azure IoT Central using a Raspberry Pi and Node-RED.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/azure.microsoft.com\/en-us\/blog\/connecting-node-red-to-azure-iot-central\/","og_locale":"en_US","og_type":"article","og_title":"Connecting Node-RED to Azure IoT Central | Microsoft Azure Blog","og_description":"Today I want to show how simple it is to connect a temperature\/humidity sensor to Azure IoT Central using a Raspberry Pi and Node-RED.","og_url":"https:\/\/azure.microsoft.com\/en-us\/blog\/connecting-node-red-to-azure-iot-central\/","og_site_name":"Microsoft Azure Blog","article_publisher":"https:\/\/www.facebook.com\/microsoftazure","article_published_time":"2019-01-22T00:00:00+00:00","article_modified_time":"2025-06-11T11:00:20+00:00","og_image":[{"url":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2019\/01\/a2fc8f9d-9125-42e5-9faf-905fed14a68c.webp","type":"","width":"","height":""}],"author":"Peter Provost","twitter_card":"summary_large_image","twitter_creator":"@azure","twitter_site":"@azure","twitter_misc":{"Written by":"Peter Provost","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/connecting-node-red-to-azure-iot-central\/#article","isPartOf":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/connecting-node-red-to-azure-iot-central\/"},"author":[{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/peter-provost\/","@type":"Person","@name":"Peter Provost"}],"headline":"Connecting Node-RED to Azure IoT Central","datePublished":"2019-01-22T00:00:00+00:00","dateModified":"2025-06-11T11:00:20+00:00","mainEntityOfPage":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/connecting-node-red-to-azure-iot-central\/"},"wordCount":1140,"commentCount":0,"publisher":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization"},"image":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/connecting-node-red-to-azure-iot-central\/#primaryimage"},"thumbnailUrl":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2019\/01\/a2fc8f9d-9125-42e5-9faf-905fed14a68c.webp","articleSection":["Internet of things"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/azure.microsoft.com\/en-us\/blog\/connecting-node-red-to-azure-iot-central\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/connecting-node-red-to-azure-iot-central\/","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/connecting-node-red-to-azure-iot-central\/","name":"Connecting Node-RED to Azure IoT Central | Microsoft Azure Blog","isPartOf":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/connecting-node-red-to-azure-iot-central\/#primaryimage"},"image":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/connecting-node-red-to-azure-iot-central\/#primaryimage"},"thumbnailUrl":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2019\/01\/a2fc8f9d-9125-42e5-9faf-905fed14a68c.webp","datePublished":"2019-01-22T00:00:00+00:00","dateModified":"2025-06-11T11:00:20+00:00","description":"Today I want to show how simple it is to connect a temperature\/humidity sensor to Azure IoT Central using a Raspberry Pi and Node-RED.","breadcrumb":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/connecting-node-red-to-azure-iot-central\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/azure.microsoft.com\/en-us\/blog\/connecting-node-red-to-azure-iot-central\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/connecting-node-red-to-azure-iot-central\/#primaryimage","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2019\/01\/a2fc8f9d-9125-42e5-9faf-905fed14a68c.webp","contentUrl":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2019\/01\/a2fc8f9d-9125-42e5-9faf-905fed14a68c.webp"},{"@type":"BreadcrumbList","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/connecting-node-red-to-azure-iot-central\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog home","item":"https:\/\/azure.microsoft.com\/en-us\/blog\/"},{"@type":"ListItem","position":2,"name":"Internet of things","item":"https:\/\/azure.microsoft.com\/en-us\/blog\/category\/internet-of-things\/"},{"@type":"ListItem","position":3,"name":"Connecting Node-RED to Azure IoT Central"}]},{"@type":"WebSite","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#website","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/","name":"Microsoft Azure Blog","description":"Get the latest Azure news, updates, and announcements from the Azure blog. From product updates to hot topics, hear from the Azure experts.","publisher":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/azure.microsoft.com\/en-us\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization","name":"Microsoft Azure Blog","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2024\/06\/microsoft_logo.webp","contentUrl":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2024\/06\/microsoft_logo.webp","width":512,"height":512,"caption":"Microsoft Azure Blog"},"image":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/microsoftazure","https:\/\/x.com\/azure","https:\/\/www.instagram.com\/microsoftdeveloper\/","https:\/\/www.linkedin.com\/company\/16188386","https:\/\/www.youtube.com\/user\/windowsazure"]},{"@type":"Person","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/person\/c702e5edd662b328b49b7e1180cab117","name":"shakir","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g7664e653ea371ce16eaf75e9fa8952c4","url":"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g","caption":"shakir"},"sameAs":["https:\/\/azure.microsoft.com"],"url":"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/shakir\/"}]}},"msxcm_display_generated_audio":false,"msxcm_animated_featured_image":null,"distributor_meta":false,"distributor_terms":false,"distributor_media":false,"distributor_original_site_name":"Microsoft Azure Blog","distributor_original_site_url":"https:\/\/azure.microsoft.com\/en-us\/blog","push-errors":false,"_links":{"self":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts\/1770","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/comments?post=1770"}],"version-history":[{"count":2,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts\/1770\/revisions"}],"predecessor-version":[{"id":41387,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts\/1770\/revisions\/41387"}],"wp:attachment":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/media?parent=1770"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/categories?post=1770"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/tags?post=1770"},{"taxonomy":"audience","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/audience?post=1770"},{"taxonomy":"content-type","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/content-type?post=1770"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/product?post=1770"},{"taxonomy":"tech-community","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/tech-community?post=1770"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/topic?post=1770"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/coauthors?post=1770"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}