This is an external ESPHome component for the DIY Geiger Counter Module GGreg20_V3 by IoT-devices LLC.
The component simplifies the integration of the GGreg20_V3 module with any ESP-based device running ESPHome. It moves complex logic—including pulse counting, dead time filtering, dose calculation, and status determination—from YAML into reliable C++.

The component automatically calculates and provides six essential sensors in Home Assistant:
-
Radiation Power (
$\mu\text{Sv/h}$ ): Ionizing radiation power. -
Equivalent Dose (
$\mu\text{Sv/h}$ ): Equivalent dose absorbed by the human body. -
Total Accumulated Dose (
$\mu\text{Sv}$ ): Total integrated dose over time. -
Radiation Counts Per Minute (
$\text{CPM}$ ): Calculated pulse rate per measurement period. -
Instant Pulse Count (
$\text{count}$ ): Raw, instant pulse count. - Status (Text Sensor): Operational status and warning level.
This component is distributed as an ESPHome External Component.
In your external_components
section, pointing to this GitHub repository.
Add the main configuration block, defining your pin, measurement parameters, and desired sensors. All
Name | Type | Default | Description |
---|---|---|---|
pin |
Pin | REQUIRED | The GPIO pin the pulse output is connected to. |
int_logic |
integer | 0 |
Sets the Interrupt (ISR) processing logic: 0 = Active-Low (default), 1 = Active-High |
measurement_period |
integer | 60 |
The interval, in seconds, over which pulses are counted to calculate |
dead_time_us |
integer | 190 |
The minimum time between two pulses for a signal to be valid, in microseconds. This implements dead time correction. |
dose_power_factor |
float | 0.00378 |
Conversion factor for Ionizing Radiation Power ( |
equivalent_dose_factor |
float | 0.00332 |
Conversion factor for Equivalent Dose ( |
The following configuration blocks must be provided to define the sensor entities.
Name | Type | Description |
---|---|---|
radiation_power |
Sensor | Configuration for the Raiation Power ( |
equivalent_dose |
Sensor | Configuration for the Equivalent Dose ( |
total_dose |
Sensor | Configuration for the Total Accumulated Dose ( |
cpm |
Sensor | Configuration for the Counts Per Minute ( |
count |
Sensor | Configuration for the Instant Pulse Count ( |
status |
Text Sensor | Configuration for the System Status text sensor. |
The Status sensor is a Text Sensor that reports the current operational state based on the calculated
Condition | Status | Notes |
---|---|---|
Sensor Overflow Error | Radiation level exceeds the GM tube's capacity. | |
Danger | High radiation level. | |
Warning | Elevated radiation level. | |
Normal | Safe or typical background level. | |
Sensor Error (Low Count) | Possible sensor disconnection or tube malfunction (too few pulses received). |
You can use standard
sensor:
- platform: filter
name: "GGreg20 Radiation Power MA5"
# Source ID combines the Component ID and the sensor's normalized key/name:
source_id: ggreg_radiation_power
filters:
- sliding_window_moving_average:
window_size: 5
send_every: 1

esphome:
name: sensor-node
external_components:
- source:
type: local
path: ./my_components/
components: [ggreg20_v3]
ggreg20_v3:
id: ggreg
# Pin configuration for Active-Low operation (default)
pin:
number: GPIO4
mode: INPUT # No pullup - GGreg20_V3 manages output
inverted: true # Read LOW as logical "1" (active state)
# Interrupt logic: 0 = Active-Low (default), 1 = Active-High
int_logic: 0
# Measurement settings
measurement_period: 60 # seconds (minimum 10)
dead_time_us: 190 # microseconds (0-1000)
# Calibration factors (adjust for your specific sensor)
dose_power_factor: 0.00378 # CPM to µSv/h conversion for J305
equivalent_dose_factor: 0.00332 # CPM to equivalent µSv/h conversion for J305
# Sensor definitions (All IDs are mandatory)
radiation_power:
name: "Radiation Power"
equivalent_dose:
name: "Radiation Equivalent Dose"
total_dose:
name: "Total Accumulated Dose"
cpm:
name: "Radiation CPM"
count:
name: "Pulse Count"
status:
name: "Sensor Status"
esphome:
name: sensor-node
external_components:
- source:
type: git
url: https://github.com/iotdevicesdev/esphome_external_components
ref: main
components: [ggreg20_v3]
ggreg20_v3:
id: ggreg
# Pin configuration for Active-Low operation (default)
pin:
number: GPIO4
mode: INPUT # No pullup - GGreg20_V3 manages output
inverted: true # Read LOW as logical "1" (active state)
# Interrupt logic: 0 = Active-Low (default), 1 = Active-High
int_logic: 0
# Measurement settings
measurement_period: 60 # seconds (minimum 10)
dead_time_us: 190 # microseconds (0-1000)
# Calibration factors (adjust for your specific sensor)
dose_power_factor: 0.00378 # CPM to µSv/h conversion for J305
equivalent_dose_factor: 0.00332 # CPM to equivalent µSv/h conversion for J305
# Sensor definitions (All IDs are mandatory)
radiation_power:
name: "Radiation Power"
equivalent_dose:
name: "Radiation Equivalent Dose"
total_dose:
name: "Total Accumulated Dose"
cpm:
name: "Radiation CPM"
count:
name: "Pulse Count"
status:
name: "Sensor Status"

Geiger counter GGreg20_V3: maximum radiation that can be measured
Geiger tube J305: How to calculate the conversion factor of CPM to μSv/h Technical note