{"id":177439,"date":"2021-04-17T08:41:27","date_gmt":"2021-04-17T15:41:27","guid":{"rendered":"https:\/\/m2msupport.net\/m2msupport\/?page_id=177439"},"modified":"2021-04-17T17:39:11","modified_gmt":"2021-04-18T00:39:11","slug":"add-device-registry-in-google-cloud-platform-gcp-using-iot-cloud-tester","status":"publish","type":"page","link":"https:\/\/m2msupport.net\/m2msupport\/add-device-registry-in-google-cloud-platform-gcp-using-iot-cloud-tester\/","title":{"rendered":"Add device registry in Google Cloud Platform (GCP) using IoT Cloud Tester"},"content":{"rendered":"<p>Devices are added to Device Registries within the project in the Google Cloud Platform (GCP).<\/p>\n<p><a href=\"https:\/\/m2msupport.net\/m2msupport\/download-iot-cloud-tester\/\">IoT Cloud Tester<\/a>\u00a0 application provides an easy interface to create device registry in Google Cloud platform.<\/p>\n<h1>To create a device registry in Google Cloud project,<\/h1>\n<ul>\n<li>Select the project.<\/li>\n<li>In the &#8216;Device Registries&#8217; tab, select the region and press &#8216;Add Registry&#8217;.<\/li>\n<li>Registry ID is automatically generated but that can be changed.<\/li>\n<li>Add default topic, device state topic and additional topics.<\/li>\n<\/ul>\n<p>Following information are required to create device registry in Google Cloud,<\/p>\n<ul>\n<li>Registry ID<\/li>\n<li>Project ID<\/li>\n<li>Region<\/li>\n<li>Protocol used by the devices &#8211; MQTT or HTTP or both<\/li>\n<li>Logging level &#8211; Disabled\/Error\/Info\/Debug<\/li>\n<li>Default topic<\/li>\n<li>Device State topic (optional)<\/li>\n<li>Additional topic(s) (optional)<\/li>\n<\/ul>\n<p><a href=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/04\/add_registry.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-177443\" src=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/04\/add_registry.png\" alt=\"\" width=\"850\" height=\"806\" srcset=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/04\/add_registry.png 850w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/04\/add_registry-300x284.png 300w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/04\/add_registry-768x728.png 768w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/04\/add_registry-600x569.png 600w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/04\/add_registry_2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-177441\" src=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/04\/add_registry_2.png\" alt=\"\" width=\"1025\" height=\"933\" srcset=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/04\/add_registry_2.png 1025w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/04\/add_registry_2-300x273.png 300w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/04\/add_registry_2-768x699.png 768w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/04\/add_registry_2-1024x932.png 1024w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/04\/add_registry_2-600x546.png 600w\" sizes=\"auto, (max-width: 1025px) 100vw, 1025px\" \/><\/a><\/p>\n<p>To create a device registry request in GCP, a post request is made to the below URL with the\u00a0eventNotificationConfigs set for the topics.<\/p>\n<p><strong>Request sent to GCP to create new device registry.<\/strong><\/p>\n<p><code><br \/>\nPOST:https:\/\/cloudiot.googleapis.com\/v1\/projects\/iot-cloud-tutorial\/locations\/asia-east1\/registries<\/code><\/p>\n<p><code>{<\/code><\/p>\n<p><code><\/code><code><\/code><\/p>\n<p>&#8220;eventNotificationConfigs&#8221; : [ {<\/p>\n<p><code><\/code><code><\/code><\/p>\n<p>&#8220;pubsubTopicName&#8221; : &#8220;projects\/iot-cloud-tutorial\/topics\/humidity&#8221;,<\/p>\n<p><code><\/code><code><\/code><\/p>\n<p>&#8220;subfolderMatches&#8221; : &#8220;humidity&#8221;<\/p>\n<p><code><\/code><code><\/code><\/p>\n<p>}, {<\/p>\n<p><code><\/code><code><\/code><\/p>\n<p>&#8220;pubsubTopicName&#8221; : &#8220;projects\/iot-cloud-tutorial\/topics\/temperature&#8221;<\/p>\n<p><code><\/code><code><\/code><\/p>\n<p>} ],<\/p>\n<p><code><\/code><code><\/code><\/p>\n<p>&#8220;httpConfig&#8221; : {<\/p>\n<p><code><\/code><code><\/code><\/p>\n<p>&#8220;httpEnabledState&#8221; : &#8220;HTTP_ENABLED&#8221;<\/p>\n<p><code><\/code><code><\/code><\/p>\n<p>},<\/p>\n<p><code><\/code><code><\/code><\/p>\n<p>&#8220;id&#8221; : &#8220;reg_193129&#8221;,<\/p>\n<p><code><\/code><code><\/code><\/p>\n<p>&#8220;logLevel&#8221; : &#8220;NONE&#8221;,<\/p>\n<p><code><\/code><code><\/code><\/p>\n<p>&#8220;mqttConfig&#8221; : {<\/p>\n<p><code><\/code><code><\/code><\/p>\n<p>&#8220;mqttEnabledState&#8221; : &#8220;MQTT_ENABLED&#8221;<\/p>\n<p><code><\/code><code><\/code><\/p>\n<p>}<\/p>\n<p><code><\/code><code><\/code><\/p>\n<p>}<\/p>\n<p><code><\/code><code><\/code><\/p>\n<p><strong>Response for GCP for device registry creation.\u00a0<\/strong><\/p>\n<p>{<\/p>\n<p><code><\/code><code><\/code><\/p>\n<p>&#8220;eventNotificationConfigs&#8221; : [ {<\/p>\n<p><code><\/code><code><\/code><\/p>\n<p>&#8220;pubsubTopicName&#8221; : &#8220;projects\/iot-cloud-tutorial\/topics\/humidity&#8221;,<\/p>\n<p><code><\/code><code><\/code><\/p>\n<p>&#8220;subfolderMatches&#8221; : &#8220;humidity&#8221;<\/p>\n<p><code><\/code><code><\/code><\/p>\n<p>}, {<\/p>\n<p><code><\/code><code><\/code><\/p>\n<p>&#8220;pubsubTopicName&#8221; : &#8220;projects\/iot-cloud-tutorial\/topics\/temperature&#8221;<\/p>\n<p><code><\/code><code><\/code><\/p>\n<p>} ],<\/p>\n<p><code><\/code><code><\/code><\/p>\n<p>&#8220;httpConfig&#8221; : {<\/p>\n<p><code><\/code><code><\/code><\/p>\n<p>&#8220;httpEnabledState&#8221; : &#8220;HTTP_ENABLED&#8221;<\/p>\n<p><code><\/code><code><\/code><\/p>\n<p>},<\/p>\n<p><code><\/code><code><\/code><\/p>\n<p>&#8220;id&#8221; : &#8220;reg_193129&#8221;,<\/p>\n<p><code><\/code><code><\/code><\/p>\n<p>&#8220;logLevel&#8221; : &#8220;NONE&#8221;,<\/p>\n<p><code><\/code><code><\/code><\/p>\n<p>&#8220;mqttConfig&#8221; : {<\/p>\n<p><code><\/code><code><\/code><\/p>\n<p>&#8220;mqttEnabledState&#8221; : &#8220;MQTT_ENABLED&#8221;<\/p>\n<p><code><\/code><code><\/code><\/p>\n<p>},<\/p>\n<p><code><\/code><code><\/code><\/p>\n<p>&#8220;name&#8221; : &#8220;projects\/iot-cloud-tutorial\/locations\/asia-east1\/registries\/reg_193129&#8221;,<\/p>\n<p><code><\/code><code><\/code><\/p>\n<p>&#8220;stateNotificationConfig&#8221; : { }<\/p>\n<p><code><br \/>\n<\/code><\/p>\n<p><code><\/code><code>}<br \/>\n<\/code><br \/>\nThe added registry can be viewed in the Google Cloud console.<\/p>\n<p><a href=\"https:\/\/console.cloud.google.com\/iot\/locations\/asia-east1\/registries\/reg_193129\/overview?project=iot-cloud-tutorial\">https:\/\/console.cloud.google.com\/iot\/locations\/asia-east1\/registries\/reg_193129\/overview?project=iot-cloud-tutorial<\/a><\/p>\n<p><a href=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/04\/add_registry_3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-177444\" src=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/04\/add_registry_3.png\" alt=\"\" width=\"1522\" height=\"958\" srcset=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/04\/add_registry_3.png 1522w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/04\/add_registry_3-300x189.png 300w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/04\/add_registry_3-768x483.png 768w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/04\/add_registry_3-1024x645.png 1024w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/04\/add_registry_3-600x378.png 600w\" sizes=\"auto, (max-width: 1522px) 100vw, 1522px\" \/><\/a><\/p>\n<div class=\"video-responsive\"><iframe loading=\"lazy\" id=\"youTubePlayer\" src=\"https:\/\/www.youtube.com\/embed\/fbPkawU1fr0?hd=1\" width=\"750\" height=\"421\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Devices are added to Device Registries within the project in the Google Cloud Platform (GCP). IoT Cloud Tester\u00a0 application provides an easy interface to create device registry in Google Cloud platform. To create a device registry in Google Cloud project, &hellip; <a href=\"https:\/\/m2msupport.net\/m2msupport\/add-device-registry-in-google-cloud-platform-gcp-using-iot-cloud-tester\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"iot_tutorial_template.php","meta":{"footnotes":""},"class_list":["post-177439","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/177439","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/comments?post=177439"}],"version-history":[{"count":6,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/177439\/revisions"}],"predecessor-version":[{"id":177507,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/177439\/revisions\/177507"}],"wp:attachment":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/media?parent=177439"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}