make-all / tuya-local

Local support for Tuya devices in Home Assistant
MIT License
1.1k stars 448 forks source link

Request support for Yieryi 7 in 1 Chlorine Meter #2056

Open robinhood-code opened 3 weeks ago

robinhood-code commented 3 weeks ago

Log Message

Device matches ir_remote_sensors with quality of 9%. DPS: {"updated_at": 1719397437.7439659, "1": 0, "2": 181, "7": 98, "10": 1000, "11": 0, "101": 455, "102": -1, "103": "EUStandard", "104": false, "105": 0, "106": 140, "107": 0, "108": 20000, "109": 0, "110": 999, "111": 0, "112": 40, "113": 0, "114": 0, "115": 0, "116": 0, "117": 0, "118": false}

Information about DPS mappings

{
  "result": {
    "model": "{\"modelId\":\"e80190\",\"services\":[{\"actions\":[],\"code\":\"\",\"description\":\"\",\"events\":[],\"name\":\"默认服务\",\"properties\":[
{\"abilityId\":1,\"accessMode\":\"ro\",\"code\":\"tds_in\",\"description\":\"\",\"extensions\":{\"attribute\":\"1664\"},\"name\":\"TDS\",\"typeSpec\":{\"type\":\"value\",\"max\":10000,\"min\":0,\"scale\":0,\"step\":1,\"unit\":\"ppm\"}},
{\"abilityId\":2,\"accessMode\":\"ro\",\"code\":\"temp_current\",\"description\":\"\",\"extensions\":{\"attribute\":\"1152\"},\"name\":\"Temperature\",\"typeSpec\":{\"type\":\"value\",\"max\":1000,\"min\":0,\"scale\":1,\"step\":1,\"unit\":\"℃\"}},
{\"abilityId\":7,\"accessMode\":\"ro\",\"code\":\"battery_percentage\",\"description\":\"\",\"extensions\":{\"attribute\":\"1664\"},\"name\":\"电池电量\",\"typeSpec\":{\"type\":\"value\",\"max\":100,\"min\":0,\"scale\":0,\"step\":1,\"unit\":\"%\"}},
{\"abilityId\":10,\"accessMode\":\"ro\",\"code\":\"ph\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-p7\",\"attribute\":\"1152\"},\"name\":\"pH\",\"typeSpec\":{\"type\":\"value\",\"max\":140,\"min\":0,\"scale\":1,\"step\":1,\"unit\":\"\"}},
{\"abilityId\":11,\"accessMode\":\"ro\",\"code\":\"conductivity_value\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_mode\",\"attribute\":\"1152\"},\"name\":\"电导率\",\"typeSpec\":{\"type\":\"value\",\"max\":20000,\"min\":0,\"scale\":0,\"step\":1,\"unit\":\"uS/cm\"}},
{\"abilityId\":101,\"accessMode\":\"ro\",\"code\":\"orp_value\",\"description\":\"\",\"name\":\"ORP\",\"typeSpec\":{\"type\":\"value\",\"max\":1200,\"min\":-1200,\"scale\":0,\"step\":1,\"unit\":\"mV\"}},
{\"abilityId\":102,\"accessMode\":\"ro\",\"code\":\"cl_value\",\"description\":\"\",\"name\":\"余氯\",\"typeSpec\":{\"type\":\"value\",\"max\":40,\"min\":0,\"scale\":1,\"step\":1,\"unit\":\"mg/L\"}},
{\"abilityId\":103,\"accessMode\":\"rw\",\"code\":\"ph_buffer\",\"description\":\"\",\"name\":\"pH标准\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"AsiaStandard\",\"EUStandard\"]}},
{\"abilityId\":104,\"accessMode\":\"rw\",\"code\":\"backlight\",\"description\":\"\",\"name\":\"背光\",\"typeSpec\":{\"type\":\"bool\"}},
{\"abilityId\":105,\"accessMode\":\"rw\",\"code\":\"backlight_value\",\"description\":\"\",\"name\":\"BacklightValue\",\"typeSpec\":{\"type\":\"value\",\"max\":16777216,\"min\":0,\"scale\":0,\"step\":1,\"unit\":\"\"}},
{\"abilityId\":106,\"accessMode\":\"rw\",\"code\":\"phmaxlimit\",\"description\":\"\",\"name\":\"pH上限值\",\"typeSpec\":{\"type\":\"value\",\"max\":140,\"min\":0,\"scale\":1,\"step\":1,\"unit\":\"\"}},
{\"abilityId\":107,\"accessMode\":\"rw\",\"code\":\"phminlimit\",\"description\":\"\",\"name\":\"pH下限值\",\"typeSpec\":{\"type\":\"value\",\"max\":140,\"min\":0,\"scale\":1,\"step\":1,\"unit\":\"\"}},
{\"abilityId\":108,\"accessMode\":\"rw\",\"code\":\"ecmaxlimit\",\"description\":\"\",\"name\":\"EC上限值\",\"typeSpec\":{\"type\":\"value\",\"max\":20000,\"min\":0,\"scale\":0,\"step\":1,\"unit\":\"uS/cm\"}},
{\"abilityId\":109,\"accessMode\":\"rw\",\"code\":\"ecminlimit\",\"description\":\"\",\"name\":\"EC下限值\",\"typeSpec\":{\"type\":\"value\",\"max\":20000,\"min\":0,\"scale\":0,\"step\":1,\"unit\":\"uS/cm\"}},
{\"abilityId\":110,\"accessMode\":\"rw\",\"code\":\"orpmaxlimit\",\"description\":\"\",\"name\":\"ORP上限值\",\"typeSpec\":{\"type\":\"value\",\"max\":1200,\"min\":-1200,\"scale\":0,\"step\":1,\"unit\":\"mV\"}},
{\"abilityId\":111,\"accessMode\":\"rw\",\"code\":\"orpminlimit\",\"description\":\"\",\"name\":\"ORP下限值\",\"typeSpec\":{\"type\":\"value\",\"max\":1200,\"min\":-1200,\"scale\":0,\"step\":1,\"unit\":\"mV\"}},
{\"abilityId\":112,\"accessMode\":\"rw\",\"code\":\"clmaxlimit\",\"description\":\"\",\"name\":\"CL上限值\",\"typeSpec\":{\"type\":\"value\",\"max\":40,\"min\":0,\"scale\":1,\"step\":1,\"unit\":\"mg/L\"}},
{\"abilityId\":113,\"accessMode\":\"rw\",\"code\":\"clminlimit\",\"description\":\"\",\"name\":\"CL下限值\",\"typeSpec\":{\"type\":\"value\",\"max\":40,\"min\":0,\"scale\":1,\"step\":1,\"unit\":\"mg/L\"}},
{\"abilityId\":114,\"accessMode\":\"rw\",\"code\":\"phcal\",\"description\":\"\",\"name\":\"pH校准\",\"typeSpec\":{\"type\":\"value\",\"max\":1400,\"min\":0,\"scale\":2,\"step\":1,\"unit\":\"\"}},
{\"abilityId\":115,\"accessMode\":\"rw\",\"code\":\"eccal\",\"description\":\"\",\"name\":\"EC校准\",\"typeSpec\":{\"type\":\"value\",\"max\":20000,\"min\":0,\"scale\":0,\"step\":1,\"unit\":\"us/cm\"}},
{\"abilityId\":116,\"accessMode\":\"rw\",\"code\":\"orpcal\",\"description\":\"\",\"name\":\"ORP校准\",\"typeSpec\":{\"type\":\"value\",\"max\":1200,\"min\":-1200,\"scale\":0,\"step\":1,\"unit\":\"mV\"}},
{\"abilityId\":117,\"accessMode\":\"ro\",\"code\":\"salttds_value\",\"description\":\"\",\"name\":\"SALT\",\"typeSpec\":{\"type\":\"value\",\"max\":20000,\"min\":0,\"scale\":0,\"step\":1,\"unit\":\"ppm\"}},
{\"abilityId\":118,\"accessMode\":\"rw\",\"code\":\"phreset\",\"description\":\"\",\"name\":\"pH复位\",\"typeSpec\":{\"type\":\"bool\"}}]}]}"
  },
  "success": true,
  "t": 1719397672156,
  "tid": "be386a6e33a611efaed6f615e854d753"
}

Product ID

{ "result": [ { "active_time": 1719397155, "bind_space_id": "58683392", "category": "szjcy", "create_time": 1719397155, "custom_name": "Pool Water Sensor", "icon": "smart/icon/bay1606811370355JFJM/80df8bead2f6c2487ea14ef97f94c10c.jpg", "id": "bf92d8f2e604e745d4aosd", "ip": "", "is_online": true, "lat": "-33.8", "local_key": "", "lon": "151.11", "model": "BLE-YL01", "name": "Yieryi 7 in 1 Chlorine Meter", "product_id": "v1jqz5cy", "product_name": "Yieryi 7 in 1 Chlorine Meter", "sub": true, "update_time": 1719397222, "uuid": "94b216fffe754ac2" } ], "success": true, "t": 1719397754831, "tid": "ef8370f933a611efaed6f615e854d753" }

Information about how the device functions

https://www.aliexpress.com/item/1005005971938123.html?spm=a2g0o.order_list.order_list_main.11.597c1802v5zzh3

WiFi Zigbee 7 in 1 Chlorine Meter PH ORP EC TDS Salinity Temp CL Salt Water ppm Tester APP Control Monitor for Swimming Pool Spa

WiFi Zigbee Chlorine Meter Features: 【pH Salt Tester for Saltwater Pool】: Professional water quality tester greatly facilitates you to confirm the pH and salinity (ppm) level in the current pool when start using the salt chlorinator generator; Also work for weekly salt check, to ensure chlorinator running well, balance the salt, chlorine and pH level. Good helper for salt water pool. 【Free Chlorine and pH Tester】: Recommends pH 7.2-7.8pH and free chlorine concentration of 1-3mg/L in pools; pH and chlorine monitor can test both the free chlorine and pH, to know both levels are in the optimum range for clear pool. 【Zigbee Wireless APP Control】: Wireless connection. After the pH and salinity tester is connected to your smartphone, open the Tuya APP, can view real-time swimming pool data anytime and anywhere (APP is free). The highest or lowest value of measurement can be set according to demand in the smart scene, the detection result is out of range can be prompted on the APP, allowing you to disinfect the pool at the best time. Device must be used with a gateway 【Multifunctional 7 in 1 Pool Monitor】: Monitor the pH, ORP, Salinity, Chlorine, EC, TDS, Temp value. Range: pH(0.0-14.0pH), Salinity (0-9990ppm), ORP(-999~+999mV), CL(0.0-4.0mg/L), EC(0-9990μS/cm, 10.01-19.99mS/cm), TDS(0-9990ppm), Temperature(32.0-122.0℉); Professional pH ORP CL Salt tester for swimming pool, Above Ground Pool, Inground Pool, inflatable pool, Saltwater Pool, Chlorinated Pool, Spa, Hot Tub. 【Other Design you Need】: Support solar charging and USB charging (very convenient for outdoor backyard pool); Floating design, Floating in the water; Support 2.4GHz WiFi connection; Easy to calibrate in the app.

robinhood-code commented 3 weeks ago

Done in PR: https://github.com/make-all/tuya-local/pull/2020

make-all commented 3 weeks ago

Will keep this open to track the missing dps from #2020, since all the required info is here.

robinhood-code commented 4 days ago

Just a follow-up, not sure why there are 2 entries when I'm trying to add the device. I think ble-yl01_waterquality_tester is the right one

image

make-all commented 4 days ago

The file was supposed to be renamed, but a later change was made to the wrong file, which brought the old name back alongside. ble-yl01_waterquality_tester.yaml contains the latest version of the config, but the intended name was ble_yl01_watertester.yaml. A migration has been added so you don't have to worry about using the wrong file for now.

robinhood-code commented 2 days ago

it's me again but I think the CL value (dp 102) needs to be divided by 10.

Here is the screen cap showing the values from TL and that from the Tuya app:

image image
      {
        "code": "cl_value",
        "custom_name": "",
        "dp_id": 102,
        "time": 1721384773800,
        "type": "value",
        "value": 5
      },

TDS (dp 1) is always 0 even query in iot.tuya.com

      {
        "code": "tds_in",
        "custom_name": "",
        "dp_id": 1,
        "time": 1721193136366,
        "type": "value",
        "value": 0
      },