Convert Samsung SmartThings devices to real smart ESPHome devices - new project

Hello.

I have some Samsung appliances in home and I’ve never liked having to communicate with a device in the next room via Samsung’s servers. The recent news about a paid API was the final straw. I enjoy reverse engineering and challenges, so I decided to tinker a bit, resulting in a decoded protocol. I’ve began from my refrigerator RF23R62E3B1 (2022 or 2023 production year) which is shipped without WiFi but after reviewing PCB the documentation I found connector which is used to wire WiFi module, on documentation to newer refrigerators I found that module is placed in top left corner below plastic cover and in mine I have empty connector in this place. In other places I found that Samsung uses UART communication but on mine lines are silent. I’ve connected signal analyzer in Samsung dryer module and get communication main PCB ↔ WiFi module, I played around with this a bit and managed to talk to my fridge. I found two modules which are used:

  • CWAP210M with Mediatek 7686
  • CWAM210S with Samsung ARTIK
    Both uses same Samsung UART appliances protocol which have standard read all/read/write/report operations and TLV datapoints.
    For now I have:
  • almost fully mapped my fridge datapoints (3 not mapped and not changing values, I cannot guess what is this) and dryer
  • working tools to discover new devices (list, scan and dump available data points)
  • working ESPHome component which can utilize protocol mapping defined in YAML

I don’t know if Samsung uses this in newest appliances and I’m looking for people who want to test it and help map other devices which will allow the devices to be converted to ESPhome and enable you to get rid of SmartThings :slight_smile: In refrigerators operation is simple, you must unscrew some (2-3) screws, disconnect original module and connect USB-UART converter or ESP32, in dryer WiFi module is soldered on display PCB and RX/TX wires must be soldered to testpoints. I don’t know how it looks on other appliances.

The goal is to get rid of SmartThings entirely from devices. For now I must do some cleanup work and will publish project on GitHub over the next few days.

Example config to get this:

esphome:
  name: refrigerator
  friendly_name: Lodówka

wifi:
  ssid: [...]
  password: [...]

esp32:
  board: wemos_d1_uno32

external_components:
  - source:
      type: local
      path: ../components
    components: [opensmartthings]

api:
  encryption:
    key: [...]

uart:
  rx_pin: 16
  tx_pin: 17
  id: appliance_uart
  baud_rate: 9600
  data_bits: 8
  parity: NONE
  stop_bits: 1
  rx_buffer_size: 512

opensmartthings:
  id: fridge_uart
  uart_id: appliance_uart
  profile: refrigerator
  auto_discovery: true
  reject_unadvertised_writes: true
  keepalive_interval: 30s

# -----------------------------------------------------------------------------
# Read-only state and diagnostics
# -----------------------------------------------------------------------------
binary_sensor:
  - platform: opensmartthings
    opensmartthings_id: fridge_uart
    property: fridge_door_open
    name: Fridge Door

  - platform: opensmartthings
    opensmartthings_id: fridge_uart
    property: freezer_door_open
    name: Freezer Door

  - platform: opensmartthings
    opensmartthings_id: fridge_uart
    property: water_filter_alarm
    name: Water Filter Alarm

  - platform: opensmartthings
    id: control_locked_state
    opensmartthings_id: fridge_uart
    property: control_locked
    name: Control Locked State
    internal: true

  - platform: opensmartthings
    id: dispenser_locked_state
    opensmartthings_id: fridge_uart
    property: dispenser_locked
    name: Dispenser Locked State
    internal: true

sensor:
  - platform: opensmartthings
    opensmartthings_id: fridge_uart
    property: fridge_current_temperature
    name: Fridge Current Temperature
    unit_of_measurement: "°C"

  - platform: opensmartthings
    opensmartthings_id: fridge_uart
    property: freezer_current_temperature
    name: Freezer Current Temperature
    unit_of_measurement: "°C"

  - platform: opensmartthings
    opensmartthings_id: fridge_uart
    property: water_filter_usage
    name: Water Filter Usage
    unit_of_measurement: "%"

text_sensor:
  - platform: opensmartthings
    opensmartthings_id: fridge_uart
    property: manufacturer
    name: Appliance Manufacturer

  - platform: opensmartthings
    opensmartthings_id: fridge_uart
    property: appliance_type
    name: Appliance Type

  - platform: opensmartthings
    opensmartthings_id: fridge_uart
    property: serial_number
    name: Appliance Serial Number

event:
  - platform: opensmartthings
    opensmartthings_id: fridge_uart
    property: door_open_alarm_event
    name: Door Open Alarm

# -----------------------------------------------------------------------------
# Controller entities
# -----------------------------------------------------------------------------
switch:
  - platform: opensmartthings
    opensmartthings_id: fridge_uart
    property: door_alarm_enabled
    name: Door Alarm

  - platform: opensmartthings
    opensmartthings_id: fridge_uart
    property: power_cool_enabled
    name: Power Cool

  - platform: opensmartthings
    opensmartthings_id: fridge_uart
    property: power_freeze_enabled
    name: Power Freeze

  - platform: opensmartthings
    opensmartthings_id: fridge_uart
    property: ice_maker_enabled
    name: Ice Maker

  # Temporary config-only bridges. The protocol property itself is writable,
  # but the current manifest classifies it as a binary_sensor rather than switch.
  - platform: template
    id: control_lock
    name: Control Lock
    lambda: |-
      if (id(control_locked_state).has_state()) {
        return id(control_locked_state).state;
      }
      return {};
    turn_on_action:
      - lambda: |-
          id(fridge_uart).write_boolean(
              esphome::opensmartthings::PropertyId::REFRIGERATOR_STATE_CONTROL_LOCKED,
              true);
    turn_off_action:
      - lambda: |-
          id(fridge_uart).write_boolean(
              esphome::opensmartthings::PropertyId::REFRIGERATOR_STATE_CONTROL_LOCKED,
              false);

  - platform: template
    id: dispenser_lock
    name: Dispenser Lock
    lambda: |-
      if (id(dispenser_locked_state).has_state()) {
        return id(dispenser_locked_state).state;
      }
      return {};
    turn_on_action:
      - lambda: |-
          id(fridge_uart).write_boolean(
              esphome::opensmartthings::PropertyId::REFRIGERATOR_STATE_DISPENSER_LOCKED,
              true);
    turn_off_action:
      - lambda: |-
          id(fridge_uart).write_boolean(
              esphome::opensmartthings::PropertyId::REFRIGERATOR_STATE_DISPENSER_LOCKED,
              false);

number:
  - platform: opensmartthings
    opensmartthings_id: fridge_uart
    property: fridge_setpoint
    name: Fridge Setpoint
    unit_of_measurement: "°C"

  - platform: opensmartthings
    opensmartthings_id: fridge_uart
    property: freezer_setpoint
    name: Freezer Setpoint
    unit_of_measurement: "°C"

Intrested in this, I have a samsung washer and dryer that use the HD2018GH dongle

Have you Linux and UART adapter and some skills to connecting electronic wires? It will beneed to wire USB A socket to UART adapter - this dongle it is not USB electrically.

Hey @arturzx
I have a “SAMSUNG WW90T554DAE/S7” washing / steam machine. I have all necessary tools & skills to try this. However, according to Gemini, this is a newer machine that isn’t using the “USB-like” dongle. Any chance you have an idea where to look?

Hello @rowra. Newer machines without dongles have it integrated on control PCB, mechanism is same. You must solder two wires on this pads marked with purple color.

Interesting! I have a washing machine of about 5 years old I guess.. but hesitating to take it apart. No idea where to start tbh…

Is that dongle inside the machine or something you actually need to plugin somewhere?

Look at photo above. There is no dongle but chip usually built-in in dongles (green one) is soldered on control PCB. It is required to solder two wires on its (RX/TX) lines.

I’ve got a USB-to-TTL UART adapter and some spare esp32’s laying around