{"id":7949,"date":"2020-04-28T13:35:16","date_gmt":"2020-04-28T12:35:16","guid":{"rendered":"http:\/\/www.markwilson.co.uk\/blog\/?p=7949"},"modified":"2020-04-28T13:35:22","modified_gmt":"2020-04-28T12:35:22","slug":"getting-started-with-azure-sphere-part-2-integration-with-azure-services","status":"publish","type":"post","link":"https:\/\/www.markwilson.co.uk\/blog\/2020\/04\/getting-started-with-azure-sphere-part-2-integration-with-azure-services.htm","title":{"rendered":"Getting started with Azure Sphere: Part 2 (integration with Azure services)"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Last week, I wrote about <a href=\"https:\/\/www.markwilson.co.uk\/blog\/2020\/04\/getting-started-with-azure-sphere-part-1-setup-and-running-a-sample-app.htm\">my experiences getting some sample code running on an Avnet Azure Sphere Starter Kit<\/a>. That first post walked through installing the SDK, setting up my development environment (I chose to use Visual Studio Code), configuring the device (including creating a tenant, claiming the device, connecting the device to Wi-Fi, and updating the OS), and downloading and deploying a sample app.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Since then, I&#8217;ve managed to make some steps forward with the Element 14 out of the box demo by Brian Willess (<a href=\"https:\/\/www.element14.com\/community\/groups\/azuresphere\/blog\/2019\/04\/24\/avnets-azure-sphere-starter-kit-out-of-box-demo-part-1-of-3\">part 1<\/a>, <a href=\"https:\/\/www.element14.com\/community\/groups\/azuresphere\/blog\/2019\/05\/01\/azure-sphere-starter-kit-out-of-box-demo-blog-post-2\">part 2<\/a> and <a href=\"https:\/\/www.element14.com\/community\/groups\/azuresphere\/blog\/2019\/05\/09\/avnets-azure-sphere-starter-kit-out-of-box-demo-part-3-of-3\">part 3<\/a>). Rather than repeat Brian&#8217;s posts, I&#8217;ll focus on what I did to work around a few challenges along the way.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Working around compiler errors in Visual Studio Code using the command line<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">My first issue was that the Element 14 blogs are based on Visual Studio &#8211; not Visual Studio Code and I was experiencing issues where Code would complain it couldn&#8217;t find a compiler. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thanks my colleague Andrew Hawker who was also experimenting with his Starter Kit, but using a Linux VM, I had a workaround. That workaround was to run CMake and Ninja from the command line, then to sideload the resulting app package onto the device from the Azure Sphere Developer Command Prompt:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>cmake ^<br>-G \"Ninja\" ^<br>-DCMAKE_TOOLCHAIN_FILE=\"C:\\Program Files (x86)\\Microsoft Azure Sphere SDK\\CMakeFiles\\AzureSphereToolchain.cmake\" ^<br>-DAZURE_SPHERE_TARGET_API_SET=\"4\" ^<br>-DAZURE_SPHERE_TARGET_HARDWARE_DEFINITION_DIRECTORY=\"C:\\Users\\%username%\\AzureSphereHacksterTTC\\Hardware\\avnet_mt3620_sk\" ^<br>-DAZURE_SPHERE_TARGET_HARDWARE_DEFINITION=\"avnet_mt3620_sk.json\" ^<br>--no-warn-unused-cli ^<br>-DCMAKE_BUILD_TYPE=\"Debug\" ^<br>-DCMAKE_MAKE_PROGRAM=\"ninja.exe\" ^<br>\"C:\\Users\\%username%\\AzureSphereHacksterTTC\\AvnetStarterKitReferenceDesign\"<br>ninja<br>azsphere device sideload deploy --imagepackage AvnetStarterKitReferenceDesign.imagepackage<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I wasn&#8217;t able to <a href=\"https:\/\/docs.microsoft.com\/en-gb\/azure-sphere\/app-development\/manual-build\">view the debug output<\/a> (despite my efforts to use <a href=\"https:\/\/putty.org\/\">PuTTY<\/a> to read <code>192.168.35.2:2342<\/code>) but I was confident that the app was working on the device so moved on to integrating with cloud services.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Brian Willess has since updated <a href=\"https:\/\/github.com\/Avnet\/AzureSphereHacksterTTC\">the repo<\/a> so it should now work with Visual Studio Code (at least for the high level application) and I have successfully tested the non-connected scenario (<a href=\"https:\/\/www.element14.com\/community\/groups\/azuresphere\/blog\/2019\/04\/24\/avnets-azure-sphere-starter-kit-out-of-box-demo-part-1-of-3\">part 1<\/a>) with the changes.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Integration with Azure IoT Hub, device twins and Azure Time Series Insights<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.element14.com\/community\/groups\/azuresphere\/blog\/2019\/05\/01\/azure-sphere-starter-kit-out-of-box-demo-blog-post-2\">Part 2<\/a> of the series of posts I was working though is where the integration starts. The basic steps (refer to Brian Willess&#8217; post for full details) were:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Create an <a href=\"https:\/\/azure.microsoft.com\/en-gb\/services\/iot-hub\/\">Azure IoT hub<\/a>, which is a cloud-hosted back-end for secure communication with Internet of Things (IoT) devices, of which the Azure Sphere is just one of many options.<\/li><li>Create and configure the IoT Hub Device Provisioning Service (DPS), including:<ul><li>Downloading a certificate from the Azure Sphere tenant (using <code>azsphere tenant download-CA-certificate --output CAcertificate.cer<\/code> at the Azure Sphere Developer Command Prompt) and using this to authenticate with the DPS, including validation with the verification code generated by the Azure portal (<code>azsphere tenant download-validation-certificate --output validation.cer --verificationcode <em>verificationcode<\/em><\/code>) and uploading the resulting certificate to the portal.<\/li><li>Creating an Enrollment Group, to enrol any newly-claimed device whose certificate is signed by my tenant. This stage also includes the creation of an initial device twin state, editing the JSON to include some extra lines:<br><code>\"userLedRed\": false,<\/code><br><code>\"userLedGreen\": false,<\/code><br><code>\"userLedBlue\": true<\/code><\/li><\/ul><ul><li>The initial blue illumination of the LED means that we can see when the Azure Sphere has successfully connected to the IoT Hub.<\/li><\/ul><\/li><li>Edit the application source code (I used Visual Studio Code but any editor will do) to:<ul><li>Uncomment <code>#define IOT_HUB_APPLICATION<\/code> in build_options.h.<\/li><li>Update the <code>CmdArgs<\/code> line in app_manifest.json with the ID Scope from the DPS Overview in the Azure portal.<\/li><li>Update the <code>AllowedConnections<\/code> line in app_manifest.json with the FQDNs from the DPS Overview (Global Device Endpoint) and the IoT Hub (Hostname) in the Azure portal.<\/li><li>Update the <code>DeviceAuthentication<\/code> line in app_manifest.json with the Azure Sphere tenant ID (which may be obtained using <code>azsphere tenant show-selected<\/code> at the Azure Sphere Developer Command Prompt).<\/li><\/ul><\/li><li>Build and run the app. I used the CLI as detailed above, but this should now be possible within Visual Studio Code. <\/li><li>Use the <a href=\"https:\/\/docs.microsoft.com\/en-gb\/azure\/iot-hub\/iot-hub-devguide-device-twins\">device twin<\/a> capabilities to manipulate the device, for example turning LEDs on\/off (though clearly there are more complex scenarios that could be used in real deployments!).<\/li><li>Create a <a href=\"https:\/\/azure.microsoft.com\/en-gb\/services\/time-series-insights\/\">Time Series Insights<\/a> resource in Azure, which is an analytics solution to turn IoT data into actionable insights.<ul><li>Create the Time Series Insights environment using the existing IoT Hub with an access policy of <code>iothubowner<\/code> and consumer group of <code>$Default<\/code>.<\/li><\/ul><\/li><li>Add events inside the Time Series Insights to view the sensor readings from the Azure Sphere device.<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.markwilson.co.uk\/blog\/images\/azure-sphere-time-series-insights.png?resize=700%2C446&#038;ssl=1\" alt=\"Time Series Insights showing sensor data from an Azure Sphere device.\" width=\"700\" height=\"446\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Time Series Insights can get expensive for a simple test project without any real value. I could quickly have used my entire month&#8217;s Azure credits, so I deleted the resource group used to contain my Azure Sphere resources before moving on to the next section&#8230; <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Integration with Azure IoT Central<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Azure IoT Central is a hosted IoT platform. It is intended to take away much of the underlying complexity and let organisations quickly build IoT solutions using just a web interface. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Following <a href=\"https:\/\/www.element14.com\/community\/groups\/azuresphere\/blog\/2019\/05\/09\/avnets-azure-sphere-starter-kit-out-of-box-demo-part-3-of-3\">part 3<\/a> in Brian Willess&#8217; Azure Sphere series, I was able to get my device working with IoT Central, both using the web interface to control the LEDs on the board and also pushing sensor data to a dashboard. As before, these are the basic steps and refer to Brian Willess&#8217; post for full details:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><a href=\"https:\/\/apps.azureiotcentral.com\/build\/new\/custom\">Create a new IoT Central application<\/a>.<\/li><li>Select or create a template:<ul><li>Use the IoT device custom template.<\/li><li>Either import an existing capability model (<a href=\"https:\/\/markwilson.co.uk\/blog\/data\/avnet-azure-sphere-starter-kit-template.json\">this was mine<\/a>) or create one, adding interfaces (sensors, buttons, information, etc.) and capabilities.<\/li><li>Create custom views &#8211; e.g. for LED device control or for device metrics.<\/li><\/ul><\/li><li>Publish the template.<\/li><li>Configure DPS:<ul><li>Download a certificate from the Azure Sphere tenant using <code>azsphere tenant download-CA-certificate --output CAcertificate.cer<\/code> at the Azure Sphere Developer Command Prompt. (This is the same certificate already generated for the IoT Hub example.)<\/li><li>Upload the certificate to IoT Central and generate a validation code, then use <code>azsphere tenant download-validation-certificate --output validation.cer --verificationcode <em>verificationcode<\/em><\/code> to apply this.<\/li><li>Upload the new validation certificate.<\/li><\/ul><\/li><li>Create a non-simulated device in IoT Central:<\/li><li>Run <code>ShowIoTCentralConfig.exe<\/code>, providing the ID Scope and a shared access signature key for the device (both obtained from the Device Connection details in IoT Central) and the Device ID (from the device created in the previous step). Make a note of details provided by the tool <\/li><li>Configure the application source code to connect to IoT Central: <ul><li>Uncomment <code>#define IOT_CENTRAL_APPLICATION<\/code> in build_options.h.<\/li><li>Update the <code>CmdArgs<\/code> line in app_manifest.json with the ID Scope obtained from the Device Connection details in IoT Central.<\/li><li>Update the <code>AllowedConnections<\/code> line in app_manifest.json with the FQDNs obtained by running <code>ShowIoTCentralConfig.exe<\/code>.<\/li><li>Update the <code>DeviceAuthentication<\/code> line in app_manifest.json with the Azure Sphere tenant ID (which may be obtained using <code>azsphere tenant show-selected<\/code> at the Azure Sphere Developer Command Prompt).<\/li><\/ul><\/li><li>Build and run the application.<\/li><li>Associate the Azure Sphere device with IoT Central (the device created previously was just a &#8220;dummy&#8221; to get some configuration details). IoT Central should have found the real device but it will need to be &#8220;migrated&#8221; to the appropriate device group to pick up the template created earlier.<\/li><li>Open the device and enjoy the data!  <\/li><\/ol>\n\n\n\n<blockquote class=\"twitter-tweet\"><p lang=\"en\" dir=\"ltr\">It\u2019s amazing how much fun turning some LEDs on\/off from <a href=\"https:\/\/twitter.com\/hashtag\/Azure?src=hash&amp;ref_src=twsrc%5Etfw\">#Azure<\/a> IoT Central can be <a href=\"https:\/\/twitter.com\/hashtag\/AzureSphere?src=hash&amp;ref_src=twsrc%5Etfw\">#AzureSphere<\/a>! <a href=\"https:\/\/t.co\/3YCETiOTZm\">pic.twitter.com\/3YCETiOTZm<\/a><\/p>\u2014 Mark Wilson ???? (@markwilsonit) <a href=\"https:\/\/twitter.com\/markwilsonit\/status\/1253413062691835904?ref_src=twsrc%5Etfw\">April 23, 2020<\/a><\/blockquote> <script async=\"\" src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script>\n\n\n\n<p class=\"wp-block-paragraph\">I hadn&#8217;t expected IoT Central to cost much (if anything, because the first two devices are free) but I think the app I&#8217;m using is pretty chatty so I&#8217;m being charged for extra messages (30,000 a month sounds like a lot until you realise it&#8217;s only around 40 an hour on a device that&#8217;s sending frequent updates to\/from the service). It seems to be costing just under \u00a31\/day (from a pool of credits) so I won&#8217;t be worrying too much!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What&#8217;s next for my Azure Sphere device?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Having used Brian Willess&#8217; posts at Element 14 to get an idea of how this should work, I think my next step is to buy some external sensors and write some real code to monitor something real&#8230; unfortunately the sensors I want are on back order until the summer but watch this space!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last week, I wrote about my experiences getting some sample code running on an Avnet Azure Sphere Starter Kit. That first post walked through installing the SDK, setting up my development environment (I chose to use Visual Studio Code), configuring the device (including creating a tenant, claiming the device, connecting the device to Wi-Fi, and &hellip; <a href=\"https:\/\/www.markwilson.co.uk\/blog\/2020\/04\/getting-started-with-azure-sphere-part-2-integration-with-azure-services.htm\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Getting started with Azure Sphere: Part 2 (integration with Azure services)<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[218],"tags":[367,719,120],"class_list":["post-7949","post","type-post","status-publish","format-standard","hentry","category-technology","tag-internet-of-things","tag-microsoft-azure-sphere","tag-visual-studio"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Getting started with Azure Sphere: Part 2 (integration with Azure services) - markwilson.it<\/title>\n<meta name=\"description\" content=\"Some notes from my experience of playing around with an Azure Sphere MT3620 Starter Kit, following a few blogs to connect to a variety of Azure services\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.markwilson.co.uk\/blog\/2020\/04\/getting-started-with-azure-sphere-part-2-integration-with-azure-services.htm\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Getting started with Azure Sphere: Part 2 (integration with Azure services) - markwilson.it\" \/>\n<meta property=\"og:description\" content=\"Some notes from my experience of playing around with an Azure Sphere MT3620 Starter Kit, following a few blogs to connect to a variety of Azure services\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.markwilson.co.uk\/blog\/2020\/04\/getting-started-with-azure-sphere-part-2-integration-with-azure-services.htm\" \/>\n<meta property=\"og:site_name\" content=\"markwilson.it\" \/>\n<meta property=\"article:published_time\" content=\"2020-04-28T12:35:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-04-28T12:35:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.markwilson.co.uk\/blog\/images\/azure-sphere-time-series-insights.png\" \/>\n<meta name=\"author\" content=\"Mark Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@markwilsonit\" \/>\n<meta name=\"twitter:site\" content=\"@markwilsonit\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mark Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated 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:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2020\\\/04\\\/getting-started-with-azure-sphere-part-2-integration-with-azure-services.htm#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2020\\\/04\\\/getting-started-with-azure-sphere-part-2-integration-with-azure-services.htm\"},\"author\":{\"name\":\"Mark Wilson\",\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/98f61365e7c39d6be942174b8c4de468\"},\"headline\":\"Getting started with Azure Sphere: Part 2 (integration with Azure services)\",\"datePublished\":\"2020-04-28T12:35:16+00:00\",\"dateModified\":\"2020-04-28T12:35:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2020\\\/04\\\/getting-started-with-azure-sphere-part-2-integration-with-azure-services.htm\"},\"wordCount\":1269,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/98f61365e7c39d6be942174b8c4de468\"},\"image\":{\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2020\\\/04\\\/getting-started-with-azure-sphere-part-2-integration-with-azure-services.htm#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/images\\\/azure-sphere-time-series-insights.png\",\"keywords\":[\"Internet of Things\",\"Microsoft Azure Sphere\",\"Microsoft Visual Studio\"],\"articleSection\":[\"Technology\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2020\\\/04\\\/getting-started-with-azure-sphere-part-2-integration-with-azure-services.htm#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2020\\\/04\\\/getting-started-with-azure-sphere-part-2-integration-with-azure-services.htm\",\"url\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2020\\\/04\\\/getting-started-with-azure-sphere-part-2-integration-with-azure-services.htm\",\"name\":\"Getting started with Azure Sphere: Part 2 (integration with Azure services) - markwilson.it\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2020\\\/04\\\/getting-started-with-azure-sphere-part-2-integration-with-azure-services.htm#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2020\\\/04\\\/getting-started-with-azure-sphere-part-2-integration-with-azure-services.htm#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/images\\\/azure-sphere-time-series-insights.png\",\"datePublished\":\"2020-04-28T12:35:16+00:00\",\"dateModified\":\"2020-04-28T12:35:22+00:00\",\"description\":\"Some notes from my experience of playing around with an Azure Sphere MT3620 Starter Kit, following a few blogs to connect to a variety of Azure services\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2020\\\/04\\\/getting-started-with-azure-sphere-part-2-integration-with-azure-services.htm#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2020\\\/04\\\/getting-started-with-azure-sphere-part-2-integration-with-azure-services.htm\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2020\\\/04\\\/getting-started-with-azure-sphere-part-2-integration-with-azure-services.htm#primaryimage\",\"url\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/images\\\/azure-sphere-time-series-insights.png\",\"contentUrl\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/images\\\/azure-sphere-time-series-insights.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2020\\\/04\\\/getting-started-with-azure-sphere-part-2-integration-with-azure-services.htm#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Getting started with Azure Sphere: Part 2 (integration with Azure services)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/\",\"name\":\"markwilson.it\",\"description\":\"get-info -class technology | write-output &gt; \\\/dev\\\/web\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/98f61365e7c39d6be942174b8c4de468\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/98f61365e7c39d6be942174b8c4de468\",\"name\":\"Mark Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/i0.wp.com\\\/www.markwilson.co.uk\\\/blog\\\/uploads\\\/image-4.png?fit=800%2C800&ssl=1\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/www.markwilson.co.uk\\\/blog\\\/uploads\\\/image-4.png?fit=800%2C800&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/www.markwilson.co.uk\\\/blog\\\/uploads\\\/image-4.png?fit=800%2C800&ssl=1\",\"width\":800,\"height\":800,\"caption\":\"Mark Wilson\"},\"logo\":{\"@id\":\"https:\\\/\\\/i0.wp.com\\\/www.markwilson.co.uk\\\/blog\\\/uploads\\\/image-4.png?fit=800%2C800&ssl=1\"},\"description\":\"A Chartered IT Professional, with recent experience in technology leadership, IT strategy and practice management roles, Mark Wilson is an Enterprise Architect in the Advisory and Management Group at risual. During a career spanning more than two decades, Mark has gained widespread recognition as an expert in his field including both industry and national press exposure. In addition to certifications from Microsoft, VMware, Red Hat, The Open Group and Axelos, Mark held a Microsoft Most Valuable Professional (MVP) award for three years and is now part of the MVP Reconnect programme. Mark is also well-known on social media and maintains an award-winning blog.\",\"sameAs\":[\"http:\\\/\\\/www.markwilson.co.uk\\\/\",\"https:\\\/\\\/www.instagram.com\\\/markwilsonuk\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/markawilson\\\/\",\"https:\\\/\\\/x.com\\\/markwilsonit\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCWHlZCoHRTocdvtrOJ2IL4A\"],\"url\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/author\\\/mark-wilson\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Getting started with Azure Sphere: Part 2 (integration with Azure services) - markwilson.it","description":"Some notes from my experience of playing around with an Azure Sphere MT3620 Starter Kit, following a few blogs to connect to a variety of Azure services","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:\/\/www.markwilson.co.uk\/blog\/2020\/04\/getting-started-with-azure-sphere-part-2-integration-with-azure-services.htm","og_locale":"en_GB","og_type":"article","og_title":"Getting started with Azure Sphere: Part 2 (integration with Azure services) - markwilson.it","og_description":"Some notes from my experience of playing around with an Azure Sphere MT3620 Starter Kit, following a few blogs to connect to a variety of Azure services","og_url":"https:\/\/www.markwilson.co.uk\/blog\/2020\/04\/getting-started-with-azure-sphere-part-2-integration-with-azure-services.htm","og_site_name":"markwilson.it","article_published_time":"2020-04-28T12:35:16+00:00","article_modified_time":"2020-04-28T12:35:22+00:00","og_image":[{"url":"https:\/\/www.markwilson.co.uk\/blog\/images\/azure-sphere-time-series-insights.png","type":"","width":"","height":""}],"author":"Mark Wilson","twitter_card":"summary_large_image","twitter_creator":"@markwilsonit","twitter_site":"@markwilsonit","twitter_misc":{"Written by":"Mark Wilson","Estimated reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.markwilson.co.uk\/blog\/2020\/04\/getting-started-with-azure-sphere-part-2-integration-with-azure-services.htm#article","isPartOf":{"@id":"https:\/\/www.markwilson.co.uk\/blog\/2020\/04\/getting-started-with-azure-sphere-part-2-integration-with-azure-services.htm"},"author":{"name":"Mark Wilson","@id":"https:\/\/www.markwilson.co.uk\/blog\/#\/schema\/person\/98f61365e7c39d6be942174b8c4de468"},"headline":"Getting started with Azure Sphere: Part 2 (integration with Azure services)","datePublished":"2020-04-28T12:35:16+00:00","dateModified":"2020-04-28T12:35:22+00:00","mainEntityOfPage":{"@id":"https:\/\/www.markwilson.co.uk\/blog\/2020\/04\/getting-started-with-azure-sphere-part-2-integration-with-azure-services.htm"},"wordCount":1269,"commentCount":0,"publisher":{"@id":"https:\/\/www.markwilson.co.uk\/blog\/#\/schema\/person\/98f61365e7c39d6be942174b8c4de468"},"image":{"@id":"https:\/\/www.markwilson.co.uk\/blog\/2020\/04\/getting-started-with-azure-sphere-part-2-integration-with-azure-services.htm#primaryimage"},"thumbnailUrl":"https:\/\/www.markwilson.co.uk\/blog\/images\/azure-sphere-time-series-insights.png","keywords":["Internet of Things","Microsoft Azure Sphere","Microsoft Visual Studio"],"articleSection":["Technology"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.markwilson.co.uk\/blog\/2020\/04\/getting-started-with-azure-sphere-part-2-integration-with-azure-services.htm#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.markwilson.co.uk\/blog\/2020\/04\/getting-started-with-azure-sphere-part-2-integration-with-azure-services.htm","url":"https:\/\/www.markwilson.co.uk\/blog\/2020\/04\/getting-started-with-azure-sphere-part-2-integration-with-azure-services.htm","name":"Getting started with Azure Sphere: Part 2 (integration with Azure services) - markwilson.it","isPartOf":{"@id":"https:\/\/www.markwilson.co.uk\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.markwilson.co.uk\/blog\/2020\/04\/getting-started-with-azure-sphere-part-2-integration-with-azure-services.htm#primaryimage"},"image":{"@id":"https:\/\/www.markwilson.co.uk\/blog\/2020\/04\/getting-started-with-azure-sphere-part-2-integration-with-azure-services.htm#primaryimage"},"thumbnailUrl":"https:\/\/www.markwilson.co.uk\/blog\/images\/azure-sphere-time-series-insights.png","datePublished":"2020-04-28T12:35:16+00:00","dateModified":"2020-04-28T12:35:22+00:00","description":"Some notes from my experience of playing around with an Azure Sphere MT3620 Starter Kit, following a few blogs to connect to a variety of Azure services","breadcrumb":{"@id":"https:\/\/www.markwilson.co.uk\/blog\/2020\/04\/getting-started-with-azure-sphere-part-2-integration-with-azure-services.htm#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.markwilson.co.uk\/blog\/2020\/04\/getting-started-with-azure-sphere-part-2-integration-with-azure-services.htm"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.markwilson.co.uk\/blog\/2020\/04\/getting-started-with-azure-sphere-part-2-integration-with-azure-services.htm#primaryimage","url":"https:\/\/www.markwilson.co.uk\/blog\/images\/azure-sphere-time-series-insights.png","contentUrl":"https:\/\/www.markwilson.co.uk\/blog\/images\/azure-sphere-time-series-insights.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.markwilson.co.uk\/blog\/2020\/04\/getting-started-with-azure-sphere-part-2-integration-with-azure-services.htm#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.markwilson.co.uk\/blog"},{"@type":"ListItem","position":2,"name":"Getting started with Azure Sphere: Part 2 (integration with Azure services)"}]},{"@type":"WebSite","@id":"https:\/\/www.markwilson.co.uk\/blog\/#website","url":"https:\/\/www.markwilson.co.uk\/blog\/","name":"markwilson.it","description":"get-info -class technology | write-output &gt; \/dev\/web","publisher":{"@id":"https:\/\/www.markwilson.co.uk\/blog\/#\/schema\/person\/98f61365e7c39d6be942174b8c4de468"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.markwilson.co.uk\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/www.markwilson.co.uk\/blog\/#\/schema\/person\/98f61365e7c39d6be942174b8c4de468","name":"Mark Wilson","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/i0.wp.com\/www.markwilson.co.uk\/blog\/uploads\/image-4.png?fit=800%2C800&ssl=1","url":"https:\/\/i0.wp.com\/www.markwilson.co.uk\/blog\/uploads\/image-4.png?fit=800%2C800&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.markwilson.co.uk\/blog\/uploads\/image-4.png?fit=800%2C800&ssl=1","width":800,"height":800,"caption":"Mark Wilson"},"logo":{"@id":"https:\/\/i0.wp.com\/www.markwilson.co.uk\/blog\/uploads\/image-4.png?fit=800%2C800&ssl=1"},"description":"A Chartered IT Professional, with recent experience in technology leadership, IT strategy and practice management roles, Mark Wilson is an Enterprise Architect in the Advisory and Management Group at risual. During a career spanning more than two decades, Mark has gained widespread recognition as an expert in his field including both industry and national press exposure. In addition to certifications from Microsoft, VMware, Red Hat, The Open Group and Axelos, Mark held a Microsoft Most Valuable Professional (MVP) award for three years and is now part of the MVP Reconnect programme. Mark is also well-known on social media and maintains an award-winning blog.","sameAs":["http:\/\/www.markwilson.co.uk\/","https:\/\/www.instagram.com\/markwilsonuk\/","https:\/\/www.linkedin.com\/in\/markawilson\/","https:\/\/x.com\/markwilsonit","https:\/\/www.youtube.com\/channel\/UCWHlZCoHRTocdvtrOJ2IL4A"],"url":"https:\/\/www.markwilson.co.uk\/blog\/author\/mark-wilson"}]}},"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":7920,"url":"https:\/\/www.markwilson.co.uk\/blog\/2020\/04\/getting-started-with-azure-sphere-part-1-setup-and-running-a-sample-app.htm","url_meta":{"origin":7949,"position":0},"title":"Getting started with Azure Sphere: Part 1 (setup and running a sample app)","author":"Mark Wilson","date":"Wednesday 22 April 2020","format":false,"excerpt":"Late in 2019, I got my hands on an Azure Sphere Starter Kit, which I've been intending to use for an IoT project, using some of the on-board sensors for temperature and potentially an external one for humidity... A little bit of #AzureSphere goodness just arrived on my doorstep... now\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.markwilson.co.uk\/blog\/topic\/technology"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.markwilson.co.uk\/blog\/images\/azure-sphere-sdk.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.markwilson.co.uk\/blog\/images\/azure-sphere-sdk.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.markwilson.co.uk\/blog\/images\/azure-sphere-sdk.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":6903,"url":"https:\/\/www.markwilson.co.uk\/blog\/2017\/01\/playing-around-azure-cognitive-services.htm","url_meta":{"origin":7949,"position":1},"title":"Playing around with Azure Cognitive Services","author":"Mark Wilson","date":"Friday 27 January 2017","format":false,"excerpt":"I've been spending quite a bit of time recently getting more familiar with some of the advanced workloads in Microsoft Azure. After all, infrastructure as a service is commodity,\u00a0so I'm looking at services that can be used to drive real value for my customers (more on that in another post...).\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.markwilson.co.uk\/blog\/topic\/technology"},"img":{"alt_text":"Demos in the Azure Cognitive Services Sample app","src":"https:\/\/i0.wp.com\/www.markwilson.co.uk\/blog\/images\/intelligent-kiosk.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.markwilson.co.uk\/blog\/images\/intelligent-kiosk.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.markwilson.co.uk\/blog\/images\/intelligent-kiosk.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":7940,"url":"https:\/\/www.markwilson.co.uk\/blog\/2020\/04\/weeknote-17-2020-geeking-out-and-taking-advantage-of-the-sunshine.htm","url_meta":{"origin":7949,"position":2},"title":"Weeknote 17\/2020: Geeking out and taking advantage of the sunshine","author":"Mark Wilson","date":"Sunday 26 April 2020","format":false,"excerpt":"Another week of socially-distanced, furloughed fun: here are some of the highlights... \"Playing\" with tech: Azure Sphere I took a break from exam study this week, partly because I had some internal meetings that made a big hole in the calendar and diverted my attention. Instead, I finally got my\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.markwilson.co.uk\/blog\/topic\/technology"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":7656,"url":"https:\/\/www.markwilson.co.uk\/blog\/2019\/03\/microsoft-ignite-the-tour-london-recap.htm","url_meta":{"origin":7949,"position":3},"title":"Microsoft Ignite | The Tour: London Recap","author":"Mark Wilson","date":"Tuesday 19 March 2019","format":false,"excerpt":"One of the most valuable personal development activities in my early career was a trip to the Microsoft TechEd conference in Amsterdam. I learned a lot - not just technically but about making the most of events to gather information, make new industry contacts, and generally top up my knowledge.\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.markwilson.co.uk\/blog\/topic\/technology"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1409,"url":"https:\/\/www.markwilson.co.uk\/blog\/2009\/04\/so-what-exactly-is-windows-azure.htm","url_meta":{"origin":7949,"position":4},"title":"So, what exactly is Windows Azure?","author":"Mark Wilson","date":"Tuesday 7 April 2009","format":false,"excerpt":"At last year's Microsoft Professional Developers' Conference, Windows Azure was the big news. Finally, Microsoft had put its cards on the table and announced their strategy for cloud computing! But, since Ray Ozzie's keynote in LA last autumn, it's seemed pretty quiet on the Windows Azure front. That's understandable -\u2026","rel":"","context":"In \"Microsoft Azure\"","block_context":{"text":"Microsoft Azure","link":"https:\/\/www.markwilson.co.uk\/blog\/tag\/azure"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":7821,"url":"https:\/\/www.markwilson.co.uk\/blog\/2020\/01\/microsoft-online-services-tenants-subscriptions-and-domain-names.htm","url_meta":{"origin":7949,"position":5},"title":"Microsoft Online Services: tenants, subscriptions and domain names","author":"Mark Wilson","date":"Thursday 23 January 2020","format":false,"excerpt":"I often come across confusion with clients trying to understand the differences between tenants, subscriptions and domain names when deploying Microsoft services. This post attempts to clear up some misunderstandings and to - hopefully - make things a little clearer. Each organisation has a Microsoft Online Services tenant which has\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.markwilson.co.uk\/blog\/topic\/technology"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/posts\/7949","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=7949"}],"version-history":[{"count":5,"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/posts\/7949\/revisions"}],"predecessor-version":[{"id":7955,"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/posts\/7949\/revisions\/7955"}],"wp:attachment":[{"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=7949"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=7949"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=7949"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}