English
English
简体中文
日本語

Atom Socket ESPHome Component

The Atom Socket component controls the socket switch and reads energy parameters.

1. Component Overview

Item Information
Product Name Atom Socket
SKU K055
Main Function Socket control; voltage, current, and power monitoring
Communication Interface UART, GPIO
ESPHome Components hlw8032, gpio
ESPHome Version Requirement /

2. Component Description

Including Official Components

UART Bus

Configure the UART bus:

uart:
  rx_pin: GPIO22
  baud_rate: 4800
  parity: EVEN

Sensor Energy Monitoring

Add the Sensor component:

The HLW8032 energy metering chip collects voltage, current, and power data.

sensor:
  - platform: hlw8032
    voltage:
      name: HLW8032 Voltage
      id: hlw8032_voltage
    current:
      name: HLW8032 Current
      id: hlw8032_current
    power:
      name: HLW8032 Power
      id: hlw8032_power
    apparent_power:
      name: HLW8032 Apparent Power
      id: hlw8032_apparent_power
    power_factor:
      name: HLW8032 Power Factor
      id: hlw8032_power_factor

Switch Socket Control

Add the Switch component:

switch:
  - platform: gpio
    name: "Atom Socket"
    pin:
      number: GPIO23
      inverted: false
    restore_mode: ALWAYS_ON
Notice
Click Atom Socket to view the complete configuration example.

3. Reference Example

After connecting the device to Home Assistant, you can view the socket switch and energy monitoring entities:

Notice
HLW8032 power-related entities produce valid readings only when the relay is on and a load is connected.
Page Tools
PDF
On This Page