Pool - PH / ORP - Tuya W2839 - Modify datapoint? how?

Hi all,

I am having a pool and what to do some automatic watercare.
Means, I need to know PH / ORP.

Therefor, on Reddit, someone modified this W2839 3-in-1- WIFI Tuya device and soldered an ESP12f.
https://www.reddit.com/r/homeassistant/comments/zwv4d5/pool_sensors_orp_ph_and_temp_via_esphome_working/

His config:

esphome:
name: water-ph-ec
friendly_name: Water PH EC
esp8266:
  board: esp01_1m
# Enable logging
logger:
  baud_rate: 0
# Enable Home Assistant API
  api:
  encryption:
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

captive_portal:

# disable hardware logger to free up UART pins
logger:
  baud_rate: 0

uart:
  rx_pin: GPIO3
  tx_pin: GPIO1
  baud_rate: 115200

sensor:
  - platform: "tuya"
    name: "ORP_Temp"
    sensor_datapoint: 8
    unit_of_measurement: "°C"
    device_class: "temperature"
    state_class: "measurement"
    accuracy_decimals: 1
    filters:
      - multiply: 0.1

  - platform: "tuya"
    name: "ORP_PH"
    sensor_datapoint: 106
    state_class: "measurement"
    accuracy_decimals: 2
    filters:
      - multiply: 0.01
  
  - platform: "tuya"
    name: "ORP_ORP"
    sensor_datapoint: 131
    state_class: "measurement"

Unfortunately there some more information missing and I am not yet expierienced with the tuya platform.

1.) Does anybody have a good idea how we can calibrate the sensors?
So putting these in some measurement solution of PH 7 and ORP 750mV, I would assume I can adjust the value measured to exactly that.

2.) How would we able to make use of the Plugs?
I assume, when reading the Tuya FAN, this would be a “switch_datapoint:” but not yet known which one right? :frowning:

So is someone knowing how we can find out the datapoints?

Cheers Chris

Replying on my own entry now :wink:

I replaced the chip with an ESP12f.

1.) Calibration is done by the device itself, the original CB3S or my ESP12f is only there for communication, means, calibration as per manual of the device

2.) Plugs cannot be switched, at least I did not find an datapoint for it, the are switched when min/max is reached.

@ jesserockz Would you be able to help and state if there is an possible way to the following?

So, I am more or less new to the tuya component.

Nonetheless I followed the following to obtain my datapoints and device id.
LocalTuya - Using Tuya IoT Platform to obtain not only Local Keys, but al

Here is the output: (while I removed the parameters not used by this device)

{
  "result": {
    "properties": [
      {
        "code": "temp_current",
        "custom_name": "",
        "dp_id": 8,
        "time": 1691057134623,
        "value": 250
      },
      {
        "code": "sensor_list",
        "custom_name": "",
        "dp_id": 101,
        "time": 1691057134632,
        "value": "AAEAAAAAAQAA"
      },
      {
        "code": "temp_warn_max",
        "custom_name": "",
        "dp_id": 102,
        "time": 1691057134753,
        "value": 350
      },
      {
        "code": "temp_warn_min",
        "custom_name": "",
        "dp_id": 103,
        "time": 1691055109302,
        "value": 210
      },
      {
        "code": "ph_current",
        "custom_name": "",
        "dp_id": 106,
        "time": 1691057134781,
        "value": 1500
      },
      {
        "code": "ph_warn_max",
        "custom_name": "",
        "dp_id": 107,
        "time": 1691057134795,
        "value": 700
      },
      {
        "code": "ph_warn_min",
        "custom_name": "",
        "dp_id": 108,
        "time": 1691055107684,
        "value": 0
      },
      {
        "code": "orp_current",
        "custom_name": "",
        "dp_id": 131,
        "time": 1691057135006,
        "value": -1974
      },
      {
        "code": "orp_warn_max",
        "custom_name": "",
        "dp_id": 132,
        "time": 1691055108105,
        "value": 150
      },
      {
        "code": "orp_warn_min",
        "custom_name": "",
        "dp_id": 133,
        "time": 1691055108155,
        "value": -2000
      }
    ]
  },
  "success": true,
  "t": 1691057138615,
  "tid": "4be74fa331e511ee871736843e81b476"
}{
  "result": {
    "properties": [
      {
        "code": "temp_current",
        "custom_name": "",
        "dp_id": 8,
        "time": 1691057134623,
        "value": 250
      },
      {
        "code": "sensor_list",
        "custom_name": "",
        "dp_id": 101,
        "time": 1691057134632,
        "value": "AAEAAAAAAQAA"
      },
      {
        "code": "temp_warn_max",
        "custom_name": "",
        "dp_id": 102,
        "time": 1691057134753,
        "value": 350
      },
      {
        "code": "temp_warn_min",
        "custom_name": "",
        "dp_id": 103,
        "time": 1691055109302,
        "value": 210
      },
      {
        "code": "ph_current",
        "custom_name": "",
        "dp_id": 106,
        "time": 1691057134781,
        "value": 1500
      },
      {
        "code": "ph_warn_max",
        "custom_name": "",
        "dp_id": 107,
        "time": 1691057134795,
        "value": 700
      },
      {
        "code": "ph_warn_min",
        "custom_name": "",
        "dp_id": 108,
        "time": 1691055107684,
        "value": 0
      },
      {
        "code": "orp_current",
        "custom_name": "",
        "dp_id": 131,
        "time": 1691057135006,
        "value": -1974
      },
      {
        "code": "orp_warn_max",
        "custom_name": "",
        "dp_id": 132,
        "time": 1691055108105,
        "value": 150
      },
      {
        "code": "orp_warn_min",
        "custom_name": "",
        "dp_id": 133,
        "time": 1691055108155,
        "value": -2000
      }
    ]
  },
  "success": true,
  "t": 1691057138615,
  "tid": "4be74fa331e511ee871736843e81b476"
}

The plug for PH or ORP of the device are switched when the “min” or “max” value is reached.
Currently I don’t see any possibility to switch the plug on my own.

Question:
Can someone help me to understand how I can modify the datapoints?
Especially these:

{
        "code": "ph_warn_max",
        "custom_name": "",
        "dp_id": 107,
        "time": 1691057134795,
        "value": 700
      },
      {
        "code": "ph_warn_min",
        "custom_name": "",
        "dp_id": 108,
        "time": 1691055107684,
        "value": 0
      },
      {
        "code": "orp_warn_max",
        "custom_name": "",
        "dp_id": 132,
        "time": 1691055108105,
        "value": 150
      },
      {
        "code": "orp_warn_min",
        "custom_name": "",
        "dp_id": 133,
        "time": 1691055108155,
        "value": -2000
      }

Appreciate every help on that.

Thanks
CHris

hate to say it Chris, but that Tuya website output doesn’t look like the ones I have used.

Did you perhaps use the “Get device specification…” menu option, or the “Get Device Specification Attribute” menu entry with capital “D” and capital “S” ?

Indeed it looks different to all I have seen for now, when getting details about Tuya devices from their api browser.

But yeah, I think the relays for the plugs are only indirectly controlled by “min” and “max” value for e.g. PH or ORP.

I opened the device, connected RX/TX of the CB3S chip to an ESP32 TX/RX.
So I am using that device only for measuring and doing the work in an own ESP.

Maybe useful for others:

additionally some infos from the iot.tuya

{
  "result": {
    "category": "dgnbj",
    "functions": [
      {
        "code": "temp_warn_max",
        "desc": "{\"unit\":\" ℃\",\"min\":-100,\"max\":1100,\"scale\":1,\"step\":1}",
        "name": "温度高报警值",
        "type": "Integer",
        "values": "{\"unit\":\" ℃\",\"min\":-100,\"max\":1100,\"scale\":1,\"step\":1}"
      },
      {
        "code": "temp_warn_min",
        "desc": "{\"unit\":\" ℃\",\"min\":-100,\"max\":1100,\"scale\":1,\"step\":1}",
        "name": "温度低报警值",
        "type": "Integer",
        "values": "{\"unit\":\" ℃\",\"min\":-100,\"max\":1100,\"scale\":1,\"step\":1}"
      },
      {
        "code": "ph_warn_max",
        "desc": "{\"unit\":\"ph\",\"min\":0,\"max\":1500,\"scale\":2,\"step\":1}",
        "name": "pH 高报警值",
        "type": "Integer",
        "values": "{\"unit\":\"ph\",\"min\":0,\"max\":1500,\"scale\":2,\"step\":1}"
      },
      {
        "code": "ph_warn_min",
        "desc": "{\"unit\":\"ph\",\"min\":0,\"max\":1500,\"scale\":2,\"step\":1}",
        "name": "pH 低报警值",
        "type": "Integer",
        "values": "{\"unit\":\"ph\",\"min\":0,\"max\":1500,\"scale\":2,\"step\":1}"
      },
      {
        "code": "tds_warn_max",
        "desc": "{\"unit\":\"PPM\",\"min\":0,\"max\":199999,\"scale\":0,\"step\":1}",
        "name": "TDS 高报警值",
        "type": "Integer",
        "values": "{\"unit\":\"PPM\",\"min\":0,\"max\":199999,\"scale\":0,\"step\":1}"
      },
      {
        "code": "tds_warn_min",
        "desc": "{\"unit\":\"PPM\",\"min\":0,\"max\":199999,\"scale\":0,\"step\":1}",
        "name": "TDS 低报警值",
        "type": "Integer",
        "values": "{\"unit\":\"PPM\",\"min\":0,\"max\":199999,\"scale\":0,\"step\":1}"
      },
      {
        "code": "ec_warn_max",
        "desc": "{\"unit\":\"us\",\"min\":0,\"max\":199999,\"scale\":0,\"step\":1}",
        "name": "EC高报警值",
        "type": "Integer",
        "values": "{\"unit\":\"us\",\"min\":0,\"max\":199999,\"scale\":0,\"step\":1}"
      },
      {
        "code": "ec_warn_min",
        "desc": "{\"unit\":\"us\",\"min\":0,\"max\":199999,\"scale\":0,\"step\":1}",
        "name": "EC低报警值",
        "type": "Integer",
        "values": "{\"unit\":\"us\",\"min\":0,\"max\":199999,\"scale\":0,\"step\":1}"
      },
      {
        "code": "salinity_warn_max",
        "desc": "{\"unit\":\"ppm\",\"min\":0,\"max\":199999,\"scale\":0,\"step\":1}",
        "name": "盐度高报警值",
        "type": "Integer",
        "values": "{\"unit\":\"ppm\",\"min\":0,\"max\":199999,\"scale\":0,\"step\":1}"
      },
      {
        "code": "salinity_warn_min",
        "desc": "{\"unit\":\"ppm\",\"min\":0,\"max\":199999,\"scale\":0,\"step\":1}",
        "name": "盐度低报警值",
        "type": "Integer",
        "values": "{\"unit\":\"ppm\",\"min\":0,\"max\":199999,\"scale\":0,\"step\":1}"
      },
      {
        "code": "pro_warn_max",
        "desc": "{\"unit\":\" S.G\",\"min\":500,\"max\":2000,\"scale\":3,\"step\":1}",
        "name": "比重高报警值",
        "type": "Integer",
        "values": "{\"unit\":\" S.G\",\"min\":500,\"max\":2000,\"scale\":3,\"step\":1}"
      },
      {
        "code": "pro_warn_min",
        "desc": "{\"unit\":\" S.G\",\"min\":500,\"max\":2000,\"scale\":3,\"step\":1}",
        "name": "比重低报警值",
        "type": "Integer",
        "values": "{\"unit\":\" S.G\",\"min\":500,\"max\":2000,\"scale\":3,\"step\":1}"
      },
      {
        "code": "orp_warn_max",
        "desc": "{\"unit\":\"mV\",\"min\":-2000,\"max\":2000,\"scale\":0,\"step\":1}",
        "name": "ORP高报警值",
        "type": "Integer",
        "values": "{\"unit\":\"mV\",\"min\":-2000,\"max\":2000,\"scale\":0,\"step\":1}"
      },
      {
        "code": "orp_warn_min",
        "desc": "{\"unit\":\"mV\",\"min\":-2000,\"max\":2000,\"scale\":0,\"step\":1}",
        "name": "ORP低报警值",
        "type": "Integer",
        "values": "{\"unit\":\"mV\",\"min\":-2000,\"max\":2000,\"scale\":0,\"step\":1}"
      },
      {
        "code": "cf_warn_max",
        "desc": "{\"unit\":\"CF\",\"min\":0,\"max\":199999,\"scale\":2,\"step\":1}",
        "name": "CF高报警值",
        "type": "Integer",
        "values": "{\"unit\":\"CF\",\"min\":0,\"max\":199999,\"scale\":2,\"step\":1}"
      },
      {
        "code": "cf_warn_min",
        "desc": "{\"unit\":\"CF\",\"min\":1,\"max\":199999,\"scale\":2,\"step\":1}",
        "name": "CF底报警值",
        "type": "Integer",
        "values": "{\"unit\":\"CF\",\"min\":1,\"max\":199999,\"scale\":2,\"step\":1}"
      },
      {
        "code": "rh_warn_max",
        "desc": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}",
        "name": "湿度高报警值",
        "type": "Integer",
        "values": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}"
      },
      {
        "code": "rh_warn_min",
        "desc": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}",
        "name": "湿度低报警值",
        "type": "Integer",
        "values": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}"
      }
    ],
    "status": [
      {
        "code": "temp_current",
        "name": "温度值",
        "type": "Integer",
        "values": "{\"unit\":\"℃\",\"min\":-100,\"max\":1100,\"scale\":1,\"step\":1}"
      },
      {
        "code": "sensor_list",
        "name": "传感器列表",
        "type": "Raw",
        "values": "{}"
      },
      {
        "code": "temp_warn_max",
        "name": "温度高报警值",
        "type": "Integer",
        "values": "{\"unit\":\" ℃\",\"min\":-100,\"max\":1100,\"scale\":1,\"step\":1}"
      },
      {
        "code": "temp_warn_min",
        "name": "温度低报警值",
        "type": "Integer",
        "values": "{\"unit\":\" ℃\",\"min\":-100,\"max\":1100,\"scale\":1,\"step\":1}"
      },
      {
        "code": "ph_current",
        "name": "pH 值",
        "type": "Integer",
        "values": "{\"unit\":\"ph\",\"min\":0,\"max\":1500,\"scale\":2,\"step\":1}"
      },
      {
        "code": "ph_warn_max",
        "name": "pH 高报警值",
        "type": "Integer",
        "values": "{\"unit\":\"ph\",\"min\":0,\"max\":1500,\"scale\":2,\"step\":1}"
      },
      {
        "code": "ph_warn_min",
        "name": "pH 低报警值",
        "type": "Integer",
        "values": "{\"unit\":\"ph\",\"min\":0,\"max\":1500,\"scale\":2,\"step\":1}"
      },
      {
        "code": "tds_current",
        "name": "TDS 值",
        "type": "Integer",
        "values": "{\"unit\":\"ms/cm\",\"min\":0,\"max\":199999,\"scale\":0,\"step\":1}"
      },
      {
        "code": "tds_warn_max",
        "name": "TDS 高报警值",
        "type": "Integer",
        "values": "{\"unit\":\"PPM\",\"min\":0,\"max\":199999,\"scale\":0,\"step\":1}"
      },
      {
        "code": "tds_warn_min",
        "name": "TDS 低报警值",
        "type": "Integer",
        "values": "{\"unit\":\"PPM\",\"min\":0,\"max\":199999,\"scale\":0,\"step\":1}"
      },
      {
        "code": "ec_current",
        "name": "EC值",
        "type": "Integer",
        "values": "{\"unit\":\"us\",\"min\":0,\"max\":199999,\"scale\":0,\"step\":1}"
      },
      {
        "code": "ec_warn_max",
        "name": "EC高报警值",
        "type": "Integer",
        "values": "{\"unit\":\"us\",\"min\":0,\"max\":199999,\"scale\":0,\"step\":1}"
      },
      {
        "code": "ec_warn_min",
        "name": "EC低报警值",
        "type": "Integer",
        "values": "{\"unit\":\"us\",\"min\":0,\"max\":199999,\"scale\":0,\"step\":1}"
      },
      {
        "code": "salinity_current",
        "name": "盐度值",
        "type": "Integer",
        "values": "{\"unit\":\"PPM\",\"min\":0,\"max\":199999,\"scale\":0,\"step\":1}"
      },
      {
        "code": "salinity_warn_max",
        "name": "盐度高报警值",
        "type": "Integer",
        "values": "{\"unit\":\"ppm\",\"min\":0,\"max\":199999,\"scale\":0,\"step\":1}"
      },
      {
        "code": "salinity_warn_min",
        "name": "盐度低报警值",
        "type": "Integer",
        "values": "{\"unit\":\"ppm\",\"min\":0,\"max\":199999,\"scale\":0,\"step\":1}"
      },
      {
        "code": "pro_current",
        "name": "比重值",
        "type": "Integer",
        "values": "{\"unit\":\" S.G\",\"min\":500,\"max\":2000,\"scale\":3,\"step\":1}"
      },
      {
        "code": "pro_warn_max",
        "name": "比重高报警值",
        "type": "Integer",
        "values": "{\"unit\":\" S.G\",\"min\":500,\"max\":2000,\"scale\":3,\"step\":1}"
      },
      {
        "code": "pro_warn_min",
        "name": "比重低报警值",
        "type": "Integer",
        "values": "{\"unit\":\" S.G\",\"min\":500,\"max\":2000,\"scale\":3,\"step\":1}"
      },
      {
        "code": "orp_current",
        "name": "ORP值",
        "type": "Integer",
        "values": "{\"unit\":\"mV\",\"min\":-2000,\"max\":2000,\"scale\":0,\"step\":1}"
      },
      {
        "code": "orp_warn_max",
        "name": "ORP高报警值",
        "type": "Integer",
        "values": "{\"unit\":\"mV\",\"min\":-2000,\"max\":2000,\"scale\":0,\"step\":1}"
      },
      {
        "code": "orp_warn_min",
        "name": "ORP低报警值",
        "type": "Integer",
        "values": "{\"unit\":\"mV\",\"min\":-2000,\"max\":2000,\"scale\":0,\"step\":1}"
      },
      {
        "code": "cf_current",
        "name": "CF",
        "type": "Integer",
        "values": "{\"unit\":\"CF\",\"min\":0,\"max\":199999,\"scale\":2,\"step\":1}"
      },
      {
        "code": "cf_warn_max",
        "name": "CF高报警值",
        "type": "Integer",
        "values": "{\"unit\":\"CF\",\"min\":0,\"max\":199999,\"scale\":2,\"step\":1}"
      },
      {
        "code": "cf_warn_min",
        "name": "CF底报警值",
        "type": "Integer",
        "values": "{\"unit\":\"CF\",\"min\":1,\"max\":199999,\"scale\":2,\"step\":1}"
      },
      {
        "code": "rh_current",
        "name": "湿度值",
        "type": "Integer",
        "values": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}"
      },
      {
        "code": "rh_warn_max",
        "name": "湿度高报警值",
        "type": "Integer",
        "values": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}"
      },
      {
        "code": "rh_warn_min",
        "name": "湿度低报警值",
        "type": "Integer",
        "values": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}"
      }
    ]
  },

And some more

{
  "result": {
    "category": "dgnbj",
    "functions": [
      {
        "code": "temp_warn_max",
        "desc": "temp warn max",
        "name": "temp warn max",
        "type": "Integer",
        "values": "{\"unit\":\" ℃\",\"min\":-100,\"max\":1100,\"scale\":1,\"step\":1}"
      },
      {
        "code": "temp_warn_min",
        "desc": "temp warn min",
        "name": "temp warn min",
        "type": "Integer",
        "values": "{\"unit\":\" ℃\",\"min\":-100,\"max\":1100,\"scale\":1,\"step\":1}"
      },
      {
        "code": "ph_warn_max",
        "desc": "ph warn max",
        "name": "ph warn max",
        "type": "Integer",
        "values": "{\"unit\":\"ph\",\"min\":0,\"max\":1500,\"scale\":2,\"step\":1}"
      },
      {
        "code": "ph_warn_min",
        "desc": "ph warn min",
        "name": "ph warn min",
        "type": "Integer",
        "values": "{\"unit\":\"ph\",\"min\":0,\"max\":1500,\"scale\":2,\"step\":1}"
      },
      {
        "code": "tds_warn_max",
        "desc": "tds warn max",
        "name": "tds warn max",
        "type": "Integer",
        "values": "{\"unit\":\"PPM\",\"min\":0,\"max\":199999,\"scale\":0,\"step\":1}"
      },
      {
        "code": "tds_warn_min",
        "desc": "tds warn min",
        "name": "tds warn min",
        "type": "Integer",
        "values": "{\"unit\":\"PPM\",\"min\":0,\"max\":199999,\"scale\":0,\"step\":1}"
      },
      {
        "code": "ec_warn_max",
        "desc": "ec warn max",
        "name": "ec warn max",
        "type": "Integer",
        "values": "{\"unit\":\"us\",\"min\":0,\"max\":199999,\"scale\":0,\"step\":1}"
      },
      {
        "code": "ec_warn_min",
        "desc": "ec warn min",
        "name": "ec warn min",
        "type": "Integer",
        "values": "{\"unit\":\"us\",\"min\":0,\"max\":199999,\"scale\":0,\"step\":1}"
      },
      {
        "code": "salinity_warn_max",
        "desc": "salinity warn max",
        "name": "salinity warn max",
        "type": "Integer",
        "values": "{\"unit\":\"ppm\",\"min\":0,\"max\":199999,\"scale\":0,\"step\":1}"
      },
      {
        "code": "salinity_warn_min",
        "desc": "salinity warn min",
        "name": "salinity warn min",
        "type": "Integer",
        "values": "{\"unit\":\"ppm\",\"min\":0,\"max\":199999,\"scale\":0,\"step\":1}"
      },
      {
        "code": "pro_warn_max",
        "desc": "pro warn max",
        "name": "pro warn max",
        "type": "Integer",
        "values": "{\"unit\":\" S.G\",\"min\":500,\"max\":2000,\"scale\":3,\"step\":1}"
      },
      {
        "code": "pro_warn_min",
        "desc": "pro warn min",
        "name": "pro warn min",
        "type": "Integer",
        "values": "{\"unit\":\" S.G\",\"min\":500,\"max\":2000,\"scale\":3,\"step\":1}"
      },
      {
        "code": "orp_warn_max",
        "desc": "orp warn max",
        "name": "orp warn max",
        "type": "Integer",
        "values": "{\"unit\":\"mV\",\"min\":-2000,\"max\":2000,\"scale\":0,\"step\":1}"
      },
      {
        "code": "orp_warn_min",
        "desc": "orp warn min",
        "name": "orp warn min",
        "type": "Integer",
        "values": "{\"unit\":\"mV\",\"min\":-2000,\"max\":2000,\"scale\":0,\"step\":1}"
      },
      {
        "code": "cf_warn_max",
        "desc": "cf warn max",
        "name": "cf warn max",
        "type": "Integer",
        "values": "{\"unit\":\"CF\",\"min\":0,\"max\":199999,\"scale\":2,\"step\":1}"
      },
      {
        "code": "cf_warn_min",
        "desc": "cf warn min",
        "name": "cf warn min",
        "type": "Integer",
        "values": "{\"unit\":\"CF\",\"min\":1,\"max\":199999,\"scale\":2,\"step\":1}"
      },
      {
        "code": "rh_warn_max",
        "desc": "rh warn max",
        "name": "rh warn max",
        "type": "Integer",
        "values": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}"
      },
      {
        "code": "rh_warn_min",
        "desc": "rh warn min",
        "name": "rh warn min",
        "type": "Integer",
        "values": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}"
      }

And some more:
The instruction set of the category “dgnbj”

When I assume, I cannot change “integers” but “enum” and maybe “boolean”, I could still play around with the following:

{
  "result": {
    "category": "dgnbj",
    "functions": [
      {
        "code": "muffling",
        "desc": "muffling",
        "name": "muffling",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "alarm_volume",
        "desc": "alarm volume",
        "name": "alarm volume",
        "type": "Enum",
        "values": "{\"range\":[\"low\",\"middle\",\"high\",\"mute\"]}"
      },
      {
        "code": "alarm_ringtone",
        "desc": "alarm ringtone",
        "name": "alarm ringtone",
        "type": "Enum",
        "values": "{\"range\":[\"1\",\"2\",\"3\",\"4\",\"5\"]}"
      },
      {
        "code": "self_checking",
        "desc": "self checking",
        "name": "self checking",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "alarm_time",
        "desc": "alarm time",
        "name": "alarm time",
        "type": "Integer",
        "values": "{\"unit\":\"s\",\"min\":0,\"max\":60,\"scale\":0,\"step\":1}"
      },
      {
        "code": "alarm_switch",
        "desc": "alarm switch",
        "name": "alarm switch",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "self_checking",
        "desc": "self checking",
        "name": "self checking",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "alarm_switch",
        "desc": "alarm switch",
        "name": "alarm switch",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "muffling",
        "desc": "muffling",
        "name": "muffling",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "master_mode",
        "desc": "master mode",
        "name": "master mode",
        "type": "Enum",
        "values": "{\"range\":[\"disarmed\",\"arm\",\"home\",\"sos\"]}"
      },
      {
        "code": "alarm_volume",
        "desc": "alarm volume",
        "name": "alarm volume",
        "type": "Enum",
        "values": "{\"range\":[\"low\",\"middle\",\"high\",\"mute\"]}"
      },
      {
        "code": "alarm_ringtone",
        "desc": "alarm ringtone",
        "name": "alarm ringtone",
        "type": "Enum",
        "values": "{\"range\":[\"1\",\"2\",\"3\",\"4\",\"5\"]}"
      },
      {
        "code": "alarm_time",
        "desc": "alarm time",
        "name": "alarm time",
        "type": "Integer",
        "values": "{\"unit\":\"s\",\"min\":0,\"max\":60,\"scale\":0,\"step\":1}"
      }
    ]
  },
  "success": true,
  "t": 1691279083637,
  "tid": "0d7351fe33ea11eebce64a9bf16c60a7"
}

But as said, I will probably use an Astra Rocket Controller to controll my pool.

Hope this here is helpful for anyone looking for the same about the W2839 :wink:

regards
Chris

I also soldered in an ESP 12-F. However, it doesn’t connect to the WiFi. But when I put the chip on my development board, everything works without any problems. Do you have to do more than swap the old chip for the new one?

You have to solder some resistors and connect gpio0 to get the esp booting.

I stayed with serial connection as I do not trust the socket of the controller

Edit:
And if you just want ESPhome, you should google

Cb3s tinylibre

This will do the job for you.

For my usecase i will remain with the serial connection as I require my second device to have the sensor data without wifi

Hey, I could need help to set the device up with esphome, are you still active here?

What do you need?

The CB3S is same as a ESP12f (8266)

Two possibilities:
1.) Exchange the cb3s by a esp12f (watch out you need pull up and pull down on some gpio like serial2 / en and others)

2.)
Connect tx / rx and gnd to an external esp if your choice (rocketcontroller is nice)

Esphome is simple, just do as described in the tuya component

Hint:
The w2839 worls independently from the wifi chip you use.
Means the function of the w2839 remains same when adding an esp and connecting to Esphome and finally HA

which image I should use with cb3s tinylibre?

I just converted my device to esphome with ESP8266-12F.
Thanks for posting your solution.

Just for other people coming here. The config in the initial post is missing
tuya:
You just have to add this to the code.

Also I had to switch the baud_rate on my unit to 9600. 115200 was not working for me, was always getting this error:

If no further output is received, confirm that this is a supported Tuya device.
1 Like

@Mugga
can you please post a finished code (config) ?
Thanx

Its exactly like the first one, only with the two changes I mentioned

captive_portal:
    
      
tuya:

uart:
  rx_pin: GPIO3
  tx_pin: GPIO1
  baud_rate: 9600


sensor:
  - platform: "tuya"
    name: "ORP_Temp"
    sensor_datapoint: 8
    unit_of_measurement: "°C"
    device_class: "temperature"
    state_class: "measurement"
    accuracy_decimals: 1
    filters:
      - multiply: 0.1

  - platform: "tuya"
    name: "ORP_PH"
    sensor_datapoint: 106
    state_class: "measurement"
    accuracy_decimals: 2
    filters:
      - multiply: 0.01
  
  - platform: "tuya"
    name: "ORP_ORP"
    sensor_datapoint: 131
    state_class: "measurement"


  - platform: wifi_signal
    name: "WiFi Signal Sensor"
    update_interval: 60s