I recently just flashed my Atomi (Tuya branded heater) with ESPHome and all went well (had to flash via USB to serial as tuya-convert
would not work). However, I can’t seem to get the device to talk to the hardware to control it; I’ve read quite a few things and it sounds like maybe I cannot use UART, so is there another option or am I doing this incorrectly?
My config
Note: I have the same chip as noted in this article, and even followed this for reference: Controlling an Electriq iQool AC with ESPHome and Home Assistant
esp8266:
board: esp_wroom_02
uart:
rx_pin: GPIO13
tx_pin: GPIO15
baud_rate: 9600
debug:
direction: BOTH
sequence:
- lambda: UARTDebug::log_hex(direction, bytes, ' ');
tuya:
# climate:
# - platform: tuya
# name: Space Heater
# id: atomi
# supports_heat: true
# reports_fahrenheit: true
# switch_datapoint: 1
# target_temperature_datapoint: 2
# current_temperature_datapoint: 3
# active_state:
# datapoint: 102
# heating_value: 1
# swing_mode:
# horizontal_datapoint: 104
# preset:
# eco:
# datapoint: 5
# temperature: 60
Logs
[03:16:46][I][app:100]: ESPHome version 2025.4.1 compiled on Apr 30 2025, 03:15:50
[03:16:46][C][wifi:600]: WiFi:
[03:16:46][C][wifi:428]: Local MAC: <REDACTED>
[03:16:46][C][wifi:433]: SSID: [redacted]
[03:16:46][C][wifi:436]: IP Address: <REDACTED>
[03:16:46][C][wifi:439]: BSSID: [redacted]
[03:16:46][C][wifi:441]: Hostname: 'space-heater'
[03:16:46][C][wifi:443]: Signal strength: -57 dB ▂▄▆█
[03:16:46][V][wifi:445]: Priority: 0.0
[03:16:46][C][wifi:447]: Channel: 6
[03:16:46][C][wifi:448]: Subnet: <REDACTED>
[03:16:46][C][wifi:449]: Gateway: <REDACTED>
[03:16:46][C][wifi:450]: DNS1: <REDACTED>
[03:16:46][C][wifi:451]: DNS2: <REDACTED>
[03:16:46][C][logger:177]: Logger:
[03:16:46][C][logger:178]: Max Level: VERY_VERBOSE
[03:16:46][C][logger:179]: Initial Level: VERY_VERBOSE
[03:16:46][C][logger:181]: Log Baud Rate: 0
[03:16:46][C][logger:182]: Hardware UART: UART0
[03:16:46][C][uart.arduino_esp8266:118]: UART Bus:
[03:16:46][C][uart.arduino_esp8266:119]: TX Pin: GPIO15
[03:16:46][C][uart.arduino_esp8266:120]: RX Pin: GPIO13
[03:16:46][C][uart.arduino_esp8266:122]: RX Buffer Size: 256
[03:16:46][C][uart.arduino_esp8266:124]: Baud Rate: 9600 baud
[03:16:46][C][uart.arduino_esp8266:125]: Data Bits: 8
[03:16:46][C][uart.arduino_esp8266:126]: Parity: NONE
[03:16:46][C][uart.arduino_esp8266:127]: Stop bits: 1
[03:16:46][C][uart.arduino_esp8266:129]: Using hardware serial interface.
[03:16:46][C][captive_portal:089]: Captive Portal:
[03:16:46][C][mdns:116]: mDNS:
[03:16:46][C][mdns:117]: Hostname: space-heater
[03:16:46][V][mdns:118]: Services:
[03:16:46][V][mdns:120]: - _esphomelib, _tcp, 6053
[03:16:46][V][mdns:122]: TXT: version = 2025.4.1
[03:16:46][V][mdns:122]: TXT: mac = <REDACTED>
[03:16:46][V][mdns:122]: TXT: platform = ESP8266
[03:16:46][V][mdns:122]: TXT: board = esp_wroom_02
[03:16:46][V][mdns:122]: TXT: network = wifi
[03:16:46][V][mdns:122]: TXT: api_encryption = <REDACTED>
[03:16:46][C][esphome.ota:073]: Over-The-Air updates:
[03:16:46][C][esphome.ota:074]: Address: space-heater.local:8266
[03:16:46][C][esphome.ota:075]: Version: 2
[03:16:46][C][esphome.ota:078]: Password configured
[03:16:46][C][safe_mode:018]: Safe Mode:
[03:16:46][C][safe_mode:019]: Boot considered successful after 60 seconds
[03:16:46][C][safe_mode:021]: Invoke after 10 boot attempts
[03:16:46][C][safe_mode:022]: Remain in safe mode for 300 seconds
[03:16:46][C][api:140]: API Server:
[03:16:46][C][api:141]: Address: space-heater.local:6053
[03:16:46][C][api:143]: Using noise encryption: YES
[03:16:46][C][tuya:041]: Tuya:
[03:16:46][C][tuya:044]: Initialization failed. Current init_state: 0
[03:16:46][C][tuya:049]: If no further output is received, confirm that this is a supported Tuya device.
[03:16:50][V][tuya:438]: Sending Tuya: CMD=0x00 VERSION=0 DATA=[] INIT_STATE=0
[03:16:50][D][uart_debug:114]: >>> 55:AA:00:00:00:00:FF
[03:16:51][V][tuya:438]: Sending Tuya: CMD=0x00 VERSION=0 DATA=[] INIT_STATE=0
[03:16:51][D][uart_debug:114]: >>> 55:AA:00:00:00:00:FF
[03:16:51][V][tuya:438]: Sending Tuya: CMD=0x00 VERSION=0 DATA=[] INIT_STATE=0
[03:16:51][D][uart_debug:114]: >>> 55:AA:00:00:00:00:FF
[03:16:51][V][tuya:438]: Sending Tuya: CMD=0x00 VERSION=0 DATA=[] INIT_STATE=0
[03:16:51][D][uart_debug:114]: >>> 55:AA:00:00:00:00:FF
[03:16:52][V][tuya:438]: Sending Tuya: CMD=0x00 VERSION=0 DATA=[] INIT_STATE=0
[03:16:52][D][uart_debug:114]: >>> 55:AA:00:00:00:00:FF
[03:16:52][E][tuya:464]: Initialization failed at init_state 0
I am able to hit the physical buttons and see some data in the logs pop up and even played with turning on the device which sporadically works with this snippet as I was seeing this string when hitting the on button: F2:F2:02:10:01:01:02:02:00:02:04:3C:01:01:3D:01:02:00:01:9D:7E
:
switch:
- platform: template
id: "power_heater"
name: "Power_Heater"
turn_on_action:
- uart.write: [0xF2, 0xF2, 0x02, 0x10, 0x01, 0x01, 0x02, 0x02, 0x00, 0x02, 0x04, 0x3C, 0x01, 0x01, 0x3D, 0x01, 0x02, 0x00, 0x01, 0x9D, 0x7E]