{"id":2373,"date":"2022-09-16T00:09:12","date_gmt":"2022-09-15T21:09:12","guid":{"rendered":"https:\/\/iot-devices.com.ua\/connecting-the-ggreg20_v3-radiation-sensor-to-the-home-assistant-server-via-esp-home-integration-part-2\/"},"modified":"2025-12-25T19:23:15","modified_gmt":"2025-12-25T17:23:15","slug":"connecting-ggreg20_v3-radiation-sensor-to-home-assistant-server-via-esp-home-integration-part2","status":"publish","type":"post","link":"https:\/\/iot-devices.com.ua\/en\/connecting-ggreg20_v3-radiation-sensor-to-home-assistant-server-via-esp-home-integration-part2\/","title":{"rendered":"Connecting the GGreg20_V3 Radiation Sensor to the Home Assistant Server via ESP Home Integration &#8211; part 2"},"content":{"rendered":"\n<p>We offer you <strong>the second<\/strong> <strong>part of the description<\/strong> of the procedure of connecting the detector (sensor) GGreg20 in combination with the main controller ESP8266 or ESP32 to the Home Assistant server via the ESP Home plug-in.<\/p>\n\n<p><strong>First part<\/strong> of the description, see the link<strong><a href=\"https:\/\/iot-devices.com.ua\/en\/connecting-ggreg20-radiation-sensor-to-home-assistant-server-via-esp-home-integration\/\" class=\"rank-math-link\">Connecting the GGreg20_V3 Radiation Sensor to the Home Assistant Server via ESP Home Integration<\/a><\/strong><\/p>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><strong>Note<\/strong> . This publication is suitable for all versions of the ionizing radiation detector manufactured by IoT-devices: GGreg20_V1, GGreg20_V2, GGreg20_V3 <\/p><p>Since the entire line of these detectors is focused on the SBM-20 tube, all versions of the devices have the same algorithm and coefficients for calculating the power level and dose of ionizing radiation.<\/p><p>The accuracy of the measurement is affected only by the individual properties of the SBM-20 tube installed in each GGreg20_V3 detector. The specifications of the tube manufacturer indicate a limit range of measurement accuracy of <a href=\"https:\/\/zapadpribor.com\/sbm20\/\" target=\"_blank\" rel=\"noopener\">20%<\/a> . On practice, this means that two identical GGreg20 devices, but with different SBM-20 tubes, can give results (not more than) with the specified deviation in the number of pulses.<\/p><\/blockquote>\n\n<h2 class=\"wp-block-heading\">Steps to connect GGreg20 to Home Assistant \u2013 continued.<\/h2>\n\n<h4 class=\"wp-block-heading\">Step 5. Select the GPIO pin on the controller that will register the pulses from GGreg20<br\/>Step 6. Connect the GGreg20_V3 radiation detector to the ESP8266 controller via the Out connector to the selected GPIO of the controller<br\/>Step 7. Build and write firmware for the controller<\/h4>\n\n<h3 class=\"wp-block-heading\">Hardware connection GGreg20_V3 and controller<\/h3>\n\n<p>In steps 5 and 6, we give an example of a connection for ESP8266. For the ESP32 controller, everything is the same. The only difference is the number, purpose and numbering of ESP32&#8217;s GPIOs as a more powerful hardware platform. But the general technological logic is identical.<\/p>\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-6.png\"><img fetchpriority=\"high\" decoding=\"async\" width=\"960\" height=\"540\" src=\"https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-6.png\" alt=\"\" class=\"wp-image-1075\" srcset=\"https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-6.png 960w, https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-6-454x255.png 454w, https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-6-300x169.png 300w, https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-6-768x432.png 768w\" sizes=\"(max-width: 960px) 100vw, 960px\" \/><\/a><\/figure>\n\n<p>Fig. Connecting GGreg20_V3 to a classic NodeMCU board with ESP8266<\/p>\n\n<h4 class=\"wp-block-heading\"><strong>Step 5<\/strong>. Select the GPIO pin on the controller that will register the pulses from GGreg20<\/h4>\n\n<p>If this is your first time dealing with ESP8266 and you do not know which GPIO is best to use for a pulse counter, we recommend using <a class=\"rank-math-link\" href=\"https:\/\/alterstrategy.com\/recommended-pin-use-standard\/\" target=\"_blank\" rel=\"noopener\">\u0421the GPIO Planning and Application Standard for ESP8266-12 \/ NodeMCU \/ Lua projects<\/a>, developed by <a class=\"rank-math-link\" href=\"https:\/\/alterstrategy.com\/alterstrategy-about\/\" target=\"_blank\" rel=\"noopener\">alterstrategy.lab<\/a> .<\/p>\n\n<p>For example, it could be GPIO0 (D3). This pin is convenient because it has a built-in Flash button in most devices and boards based on the ESP8266 module &#8211; in case you need to check how the controller counts pulses without a sensor, it is possible to simulate pulses with a button. That is why all the examples in this publication are for GPIO0 (D3).<\/p>\n\n<h4 class=\"wp-block-heading\"><strong>Step 6.<\/strong>. Connect the GGreg20_V3 radiation detector to the ESP8266 controller via the Out connector to the selected GPIO of the controller<\/h4>\n\n<p>As you can see, the connection is quite simple &#8211; you only need to supply power from the NodeMCU for the GGreg20 module, and connect the output (Out) of the sensor to the input (D3) of the controller and supply 5V to the micro USB connector of the NodeMCU.<\/p>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><strong>Note.<\/strong> Note that you may not have GGreg20 at all &#8211; in this case, you can simulate the pulses by simply pressing the Flash button (GPIO0 \/ D3) a certain number of times per minute.<\/p><\/blockquote>\n\n<h3 class=\"wp-block-heading\">Flashing the ESP device with GGreg<\/h3>\n\n<h4 class=\"wp-block-heading\"><strong>Step 7<\/strong>. Build and write firmware for the controller<\/h4>\n\n<p>Before building the firmware, you need to validate the yaml file we created. This will protect us from file errors that we may have accidentally made.<\/p>\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-7-1024x727.png\"><img decoding=\"async\" width=\"1024\" height=\"727\" src=\"https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-7-1024x727.png\" alt=\"\" class=\"wp-image-1076\" srcset=\"https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-7-1024x727.png 1024w, https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-7-454x322.png 454w, https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-7-300x213.png 300w, https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-7-768x545.png 768w, https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-7.png 1470w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n<p>Fig. YAML code of the counter, which is planned to be flashed to the controller ESP8266<\/p>\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-8-1024x651.png\"><img decoding=\"async\" width=\"1024\" height=\"651\" src=\"https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-8-1024x651.png\" alt=\"\" class=\"wp-image-1077\" srcset=\"https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-8-1024x651.png 1024w, https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-8-454x289.png 454w, https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-8-300x191.png 300w, https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-8-768x488.png 768w, https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-8.png 1411w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n<p>Fig. Yaml code validation was successful<\/p>\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-9-1024x656.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"656\" src=\"https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-9-1024x656.png\" alt=\"\" class=\"wp-image-1078\" srcset=\"https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-9-1024x656.png 1024w, https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-9-454x291.png 454w, https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-9-300x192.png 300w, https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-9-768x492.png 768w, https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-9.png 1402w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n<p>Fig. Start compiling the firmware binary for a specific yaml code<\/p>\n\n<p>If the controller is new &#8211; you need to compile and download to the PC a binary firmware bin-file in the ESP Home interface &#8211; click DOWNLOAD BINARY after successful compilation.<\/p>\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-10-1024x656.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"656\" src=\"https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-10-1024x656.png\" alt=\"\" class=\"wp-image-1079\" srcset=\"https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-10-1024x656.png 1024w, https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-10-454x291.png 454w, https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-10-300x192.png 300w, https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-10-768x492.png 768w, https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-10.png 1402w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n<p>Fig. Compilation completed successfully<\/p>\n\n<p>Next you need to write the firmware to the controller (ESP8266 \/ ESP32). This can be done by means of the ESPHome-Flasher utility. It can be freely found and downloaded via the Internet.<\/p>\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-11.png\"><img loading=\"lazy\" decoding=\"async\" width=\"711\" height=\"643\" src=\"https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-11.png\" alt=\"\" class=\"wp-image-1083\" srcset=\"https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-11.png 711w, https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-11-454x411.png 454w, https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-11-300x271.png 300w\" sizes=\"(max-width: 711px) 100vw, 711px\" \/><\/a><\/figure>\n\n<p>Fig. General view of the esphome-flasher utility<\/p>\n\n<p>If the controller has already been flashed with ESP Home &#8211; just fill in the updated firmware over the air via OTA Update. But note that we deliberately do not consider this option to update the firmware, because the purpose of the article is to show how to connect the new GGreg20 with the new ESP8266 to Home Assistant.<\/p>\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-12-1024x363.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"363\" src=\"https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-12-1024x363.png\" alt=\"\" class=\"wp-image-1084\" srcset=\"https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-12-1024x363.png 1024w, https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-12-454x161.png 454w, https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-12-300x106.png 300w, https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-12-768x272.png 768w, https:\/\/iot-devices.com.ua\/wp-content\/uploads\/2021\/07\/image-12.png 1416w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n<p>Fig. Launch of an alternative procedure for updating the firmware via WiFi-air &#8211; OTA Update<\/p>\n\n<p>After flashing the firmware and restarting the new device, it is recommended to restart the Home Assistant server too.<\/p>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><strong>Important! <\/strong> After starting the server you need to go to the menu Configuration -&gt; Integration. Find there a new device that we flashed and connect it to the server configuration, if it is not connected automatically.<\/p><\/blockquote>\n\n<h2 class=\"wp-block-heading\">Conclusions<\/h2>\n\n<p>We&#8217;ve completed the following steps to connect GGreg20 to Home Assistant:<\/p>\n\n<h5 class=\"wp-block-heading\">Step 5. Select the GPIO pin on the controller that will register the pulses from GGreg20<br\/>Step 6. Connect the GGreg20_V3 radiation detector to the ESP8266 controller via the Out connector to the selected GPIO of the controller<br\/>Step 7. Build and write firmware for the controller<\/h5>\n\n<p>Next, we look at the following steps in detail &#8211; <a href=\"https:\/\/iot-devices.com.ua\/en\/pidklyuchennya-sensora-radiacziyi-ggreg20_v3-do-servera-home-assistant-cherez-integracziyu-esp-home-3\/\">part 3<\/a> :<\/p>\n\n<h5 class=\"wp-block-heading\">Step 8. Check the log of the new ESP8266 controller with GGreg20 connected<br\/>Step 9. Check for new entities on the server side<br\/>Step 10. Add GGreg20 radiation sensor widgets to the Dashboard<br\/>Step 11. Add a push notification automation script to the Home Assistant application for crossing thresholds<\/h5>\n\n<p>That&#8217;s all. Good luck!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We offer you the second part of the description of the procedure of connecting the detector (sensor) GGreg20 in combination with the main controller ESP8266 or ESP32 to the Home Assistant server via the ESP Home plug-in. First part of the description, see the linkConnecting the GGreg20_V3 Radiation Sensor to the Home Assistant Server via [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4308,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"0","ocean_second_sidebar":"0","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"0","ocean_custom_header_template":"0","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"0","ocean_menu_typo_font_family":"0","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"0","omw_enable_modal_window":"enable","ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"on","ocean_gallery_id":[],"footnotes":""},"categories":[88],"tags":[417,93,94,210,96,98],"class_list":["post-2373","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tips-en","tag-application-note-en","tag-esp32-en","tag-esp8266-en","tag-esphome-en","tag-ggreg20_v3-en","tag-home-assistant-en","entry","has-media","owp-thumbs-layout-horizontal","owp-btn-normal","owp-tabs-layout-horizontal","has-no-thumbnails","has-product-nav"],"_links":{"self":[{"href":"https:\/\/iot-devices.com.ua\/en\/wp-json\/wp\/v2\/posts\/2373","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/iot-devices.com.ua\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/iot-devices.com.ua\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/iot-devices.com.ua\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/iot-devices.com.ua\/en\/wp-json\/wp\/v2\/comments?post=2373"}],"version-history":[{"count":2,"href":"https:\/\/iot-devices.com.ua\/en\/wp-json\/wp\/v2\/posts\/2373\/revisions"}],"predecessor-version":[{"id":4317,"href":"https:\/\/iot-devices.com.ua\/en\/wp-json\/wp\/v2\/posts\/2373\/revisions\/4317"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/iot-devices.com.ua\/en\/wp-json\/wp\/v2\/media\/4308"}],"wp:attachment":[{"href":"https:\/\/iot-devices.com.ua\/en\/wp-json\/wp\/v2\/media?parent=2373"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/iot-devices.com.ua\/en\/wp-json\/wp\/v2\/categories?post=2373"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/iot-devices.com.ua\/en\/wp-json\/wp\/v2\/tags?post=2373"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}