Closed dhuddle closed 1 year ago
I might need some ranges for any values that need to be set, and scales if any of the values are scaled (besides the temperature which is documented).
For example, ph value: dp 102, value is 1500. Its quite a few years since my high school chemistry classes, but I think the range for pH is 0-14? So is that 1.500? Or maybe the scale factor is 200, and it is 7.5?
Ph value of 15 seems to be reported when the probe is not connected. But it should be 0-14. I do not hae the probe connected currently, and I get 15.
I found this elsewhere on github with more info on the values of min/max for the device:
"data": {
"endpoint": "https://openapi.tuyaus.com",
"auth_type": 0,
"country_code": "1",
"app_type": "tuyaSmart",
"mqtt_connected": true,
"disabled_by": null,
"disabled_polling": false,
"devices": [
{
"model": "YY-9909",
"category": "dgnbj",
"product_id": "5ok0wq7drlqyo2hb",
"product_name": "YY-9909",
"online": true,
"sub": false,
"function": {
"ph_warn_max": {
"type": "Integer",
"value": {
"unit": "",
"min": 0,
"max": 1500,
"scale": 2,
"step": 1
}
},
"ph_warn_min": {
"type": "Integer",
"value": {
"unit": "",
"min": 0,
"max": 1500,
"scale": 2,
"step": 1
}
},
"temp_warn_max": {
"type": "Integer",
"value": {
"unit": "\u2103",
"min": -100,
"max": 1100,
"scale": 1,
"step": 1
}
},
"temp_warn_min": {
"type": "Integer",
"value": {
"unit": "\u2103",
"min": -100,
"max": 1100,
"scale": 1,
"step": 1
}
},
"tds_warn_max": {
"type": "Integer",
"value": {
"unit": "ppm",
"min": 0,
"max": 199999,
"scale": 0,
"step": 1
}
},
"tds_warn_min": {
"type": "Integer",
"value": {
"unit": "ppm",
"min": 0,
"max": 199999,
"scale": 0,
"step": 1
}
},
"ec_warn_max": {
"type": "Integer",
"value": {
"unit": "us",
"min": 0,
"max": 199999,
"scale": 0,
"step": 1
}
},
"ec_warn_min": {
"type": "Integer",
"value": {
"unit": "us",
"min": 0,
"max": 199999,
"scale": 0,
"step": 1
}
},
"salinity_warn_max": {
"type": "Integer",
"value": {
"unit": "ppm",
"min": 0,
"max": 199999,
"scale": 0,
"step": 1
}
},
"salinity_warn_min": {
"type": "Integer",
"value": {
"unit": "ppm",
"min": 0,
"max": 199999,
"scale": 0,
"step": 1
}
},
"pro_warn_max": {
"type": "Integer",
"value": {
"unit": "S.G",
"min": 500,
"max": 2000,
"scale": 3,
"step": 1
}
},
"pro_warn_min": {
"type": "Integer",
"value": {
"unit": "S.G",
"min": 500,
"max": 2000,
"scale": 3,
"step": 1
}
},
"orp_warn_max": {
"type": "Integer",
"value": {
"unit": "mV",
"min": -2000,
"max": 2000,
"scale": 0,
"step": 1
}
},
"orp_warn_min": {
"type": "Integer",
"value": {
"unit": "mV",
"min": -2000,
"max": 2000,
"scale": 0,
"step": 1
}
},
"cf_warn_max": {
"type": "Integer",
"value": {
"unit": "CF",
"min": 0,
"max": 199999,
"scale": 2,
"step": 1
}
},
"cf_warn_min": {
"type": "Integer",
"value": {
"unit": "CF",
"min": 1,
"max": 199999,
"scale": 2,
"step": 1
}
},
"rh_warn_max": {
"type": "Integer",
"value": {
"unit": "%",
"min": 0,
"max": 100,
"scale": 0,
"step": 1
}
},
"rh_warn_min": {
"type": "Integer",
"value": {
"unit": "%",
"min": 0,
"max": 100,
"scale": 0,
"step": 1
}
}
},
"status_range": {
"temp_current": {
"type": "Integer",
"value": {
"unit": "\u2103",
"min": -100,
"max": 1100,
"scale": 1,
"step": 1
}
},
"sensor_list": {
"type": "Raw",
"value": {}
},
"ph_current": {
"type": "Integer",
"value": {
"unit": "",
"min": 0,
"max": 1500,
"scale": 2,
"step": 1
}
},
"ph_warn_max": {
"type": "Integer",
"value": {
"unit": "",
"min": 0,
"max": 1500,
"scale": 2,
"step": 1
}
},
"ph_warn_min": {
"type": "Integer",
"value": {
"unit": "",
"min": 0,
"max": 1500,
"scale": 2,
"step": 1
}
},
"temp_warn_max": {
"type": "Integer",
"value": {
"unit": "\u2103",
"min": -100,
"max": 1100,
"scale": 1,
"step": 1
}
},
"temp_warn_min": {
"type": "Integer",
"value": {
"unit": "\u2103",
"min": -100,
"max": 1100,
"scale": 1,
"step": 1
}
},
"tds_current": {
"type": "Integer",
"value": {
"unit": "ppm",
"min": 0,
"max": 199999,
"scale": 0,
"step": 1
}
},
"tds_warn_max": {
"type": "Integer",
"value": {
"unit": "ppm",
"min": 0,
"max": 199999,
"scale": 0,
"step": 1
}
},
"tds_warn_min": {
"type": "Integer",
"value": {
"unit": "ppm",
"min": 0,
"max": 199999,
"scale": 0,
"step": 1
}
},
"ec_current": {
"type": "Integer",
"value": {
"unit": "us",
"min": 0,
"max": 199999,
"scale": 0,
"step": 1
}
},
"ec_warn_max": {
"type": "Integer",
"value": {
"unit": "us",
"min": 0,
"max": 199999,
"scale": 0,
"step": 1
}
},
"ec_warn_min": {
"type": "Integer",
"value": {
"unit": "us",
"min": 0,
"max": 199999,
"scale": 0,
"step": 1
}
},
"salinity_current": {
"type": "Integer",
"value": {
"unit": "ppm",
"min": 0,
"max": 199999,
"scale": 0,
"step": 1
}
},
"salinity_warn_max": {
"type": "Integer",
"value": {
"unit": "ppm",
"min": 0,
"max": 199999,
"scale": 0,
"step": 1
}
},
"salinity_warn_min": {
"type": "Integer",
"value": {
"unit": "ppm",
"min": 0,
"max": 199999,
"scale": 0,
"step": 1
}
},
"pro_current": {
"type": "Integer",
"value": {
"unit": "S.G",
"min": 500,
"max": 2000,
"scale": 3,
"step": 1
}
},
"pro_warn_max": {
"type": "Integer",
"value": {
"unit": "S.G",
"min": 500,
"max": 2000,
"scale": 3,
"step": 1
}
},
"pro_warn_min": {
"type": "Integer",
"value": {
"unit": "S.G",
"min": 500,
"max": 2000,
"scale": 3,
"step": 1
}
},
"orp_current": {
"type": "Integer",
"value": {
"unit": "mV",
"min": -2000,
"max": 2000,
"scale": 0,
"step": 1
}
},
"orp_warn_max": {
"type": "Integer",
"value": {
"unit": "mV",
"min": -2000,
"max": 2000,
"scale": 0,
"step": 1
}
},
"orp_warn_min": {
"type": "Integer",
"value": {
"unit": "mV",
"min": -2000,
"max": 2000,
"scale": 0,
"step": 1
}
},
"cf_current": {
"type": "Integer",
"value": {
"unit": "CF",
"min": 0,
"max": 199999,
"scale": 2,
"step": 1
}
},
"cf_warn_max": {
"type": "Integer",
"value": {
"unit": "CF",
"min": 0,
"max": 199999,
"scale": 2,
"step": 1
}
},
"cf_warn_min": {
"type": "Integer",
"value": {
"unit": "CF",
"min": 1,
"max": 199999,
"scale": 2,
"step": 1
}
},
"rh_current": {
"type": "Integer",
"value": {
"unit": "%",
"min": 0,
"max": 100,
"scale": 0,
"step": 1
}
},
"rh_warn_max": {
"type": "Integer",
"value": {
"unit": "%",
"min": 0,
"max": 100,
"scale": 0,
"step": 1
}
},
"rh_warn_min": {
"type": "Integer",
"value": {
"unit": "%",
"min": 0,
"max": 100,
"scale": 0,
"step": 1
}
}
},
"status": {
"temp_current": 240,
"sensor_list": "AQEBAQEBAA==",
"ph_current": 864,
"ph_warn_max": 0,
"ph_warn_min": 0,
"temp_warn_max": 315,
"temp_warn_min": -100,
"tds_current": 266,
"tds_warn_max": 0,
"tds_warn_min": 0,
"ec_current": 532,
"ec_warn_max": 0,
"ec_warn_min": 0,
"salinity_current": 310,
"salinity_warn_max": 0,
"salinity_warn_min": 0,
"pro_current": 984,
"pro_warn_max": 500,
"pro_warn_min": 500,
"orp_current": 0,
"orp_warn_max": -2000,
"orp_warn_min": -2000
}
Current Temperature: 8 pH value: 102 EC value: 110 Salinity value: 113 Proportion value: 116 ORP value: 119
My fault, 107 is TDS too on my device, missed that between the whole chinese characters ;-)
So far, so good: This was properly auto detected!
update:
I hooked up both external temp probe and the ph meter (I'm guessing the prior temp reading was internal?) and the data looks viable.
For the record, this is updating every 15 seconds.
Thank you again - I think you can take this as "confirmed". This is very exciting - a ~$60 local home assistant integrated pH/temp/ec etc meter is unprecedented.
Switched to main to test and worked great. Thanks a lot!
Do you know when you will release this? I’ve updated and now it’s not working anymore (yeah it’s unreleased I know).
I'm waiting for a release too, i have a PH/ORP who seems to be a clone of YY-w9909 (w2839)
I just bought the YY-w9909. How to integrate it into HA? THANKS
Here's the basic process:
1) add the device to your Tuya account via the Smart Life app. 2) install this integration (read the documentation) 3) get a Tuya IOT developer account and get the device ID and local key (here's a video 4) add your device via this integration with those 2 pieces of info
Thank you, the integration is done but I only have the temperature and not the rest. should I do anything else afterwards?
"model": "YY-9909",
"device_id": "*************",
"dps_strings": [
"8 (value: 196)",
"102 (value: 826)",
"107 (value: 4610)",
"110 (value: 9220)",
"113 (value: 5380)",
"116 (value: 1004)",
"119 (value: 0)"
Do you have an idea for the other measurements?
It is all there, I have a test program that detects the config file and outputs the entities based on log info, and based on your "dps_strings" above, it gives the following:
yieryi_ph_meter matched 100%
sensor_ph:
sensor: 8.26
sensor_temperature:
sensor: 19.6
sensor_total_disolved_solids:
sensor: 4610
sensor_electrical_conductivity:
sensor: 9220
sensor_salinity:
sensor: 5380
sensor_specific_gravity:
sensor: 1.004
sensor_oxidation_reduction_potential:
sensor: 0
On Sun, 9 Apr 2023 at 18:09, Tony0727 @.***> wrote:
Do you have an idea for the other measurements?
— Reply to this email directly, view it on GitHub https://github.com/make-all/tuya-local/issues/555#issuecomment-1501082128, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACJNY67MFPWYXY3PJ7BYUALXAJ4ERANCNFSM6AAAAAAWAIYCTU . You are receiving this because you modified the open/close state.Message ID: @.***>
Thank you, I succeeded the integration.but I do not have the values X10 or X100. ,it's normal?
i have the same problem
can get current props values with tuya endponit /v2.0/cloud/thing/$device/shadow/properties
but have problem with gettinng logs with endpoint /v2.0/cloud/thing/$device/report-logs
Specifitation v1.0/iot-03/devices/$device/specification
include only temperature information^
{
"result": {
"category": "dgnbj",
"status": [
{
"code": "temp_current",
"name": "当前温度",
"type": "Integer",
"values": "{\"unit\":\"℃\",\"min\":-100,\"max\":1100,\"scale\":1,\"step\":1}"
}
]
},
"success": true,
"t": 1698586018969,
"tid": "d6489c01765e11ee8665fe445e07f2df"
}
Can see all data at iot.tuya.com/cloud/device/detail and filter only EC value
, but cant't do it with api
{
"result": {
"properties": [
{
"code": "temp_current",
"custom_name": "",
"dp_id": 8,
"time": 1698586314907,
"value": 188
},
{
"code": "sensor_list",
"custom_name": "",
"dp_id": 101,
"time": 1698586314803,
"value": "AQEBAQEBAA=="
},
{
"code": "ph_current",
"custom_name": "",
"dp_id": 102,
"time": 1698586314935,
"value": 907
},
{
"code": "ph_warn_max",
"custom_name": "",
"dp_id": 103,
"time": 1678613718900,
"value": 1052
},
{
"code": "ph_warn_min",
"custom_name": "",
"dp_id": 104,
"time": 1678613718900,
"value": 558
},
{
"code": "temp_warn_max",
"custom_name": "",
"dp_id": 105,
"time": 1678613718900,
"value": 322
},
{
"code": "temp_warn_min",
"custom_name": "",
"dp_id": 106,
"time": 1678613718900,
"value": -100
},
{
"code": "tds_current",
"custom_name": "",
"dp_id": 107,
"time": 1698586314938,
"value": 1992
},
{
"code": "tds_warn_max",
"custom_name": "",
"dp_id": 108,
"time": 1678613718900,
"value": 0
},
{
"code": "tds_warn_min",
"custom_name": "",
"dp_id": 109,
"time": 1678613718900,
"value": 0
},
{
"code": "ec_current",
"custom_name": "",
"dp_id": 110,
"time": 1698586314951,
"value": 3984
},
{
"code": "ec_warn_max",
"custom_name": "",
"dp_id": 111,
"time": 1678613718900,
"value": 3807
},
{
"code": "ec_warn_min",
"custom_name": "",
"dp_id": 112,
"time": 1678613718900,
"value": 0
},
{
"code": "salinity_current",
"custom_name": "",
"dp_id": 113,
"time": 1698586314978,
"value": 2324
},
{
"code": "salinity_warn_max",
"custom_name": "",
"dp_id": 114,
"time": 1678613718900,
"value": 0
},
{
"code": "salinity_warn_min",
"custom_name": "",
"dp_id": 115,
"time": 1678613718900,
"value": 0
},
{
"code": "pro_current",
"custom_name": "",
"dp_id": 116,
"time": 1698586314980,
"value": 1001
},
{
"code": "pro_warn_max",
"custom_name": "",
"dp_id": 117,
"time": 1678613718900,
"value": 500
},
{
"code": "pro_warn_min",
"custom_name": "",
"dp_id": 118,
"time": 1678613718900,
"value": 500
},
{
"code": "orp_current",
"custom_name": "",
"dp_id": 119,
"time": 1698586315009,
"value": 0
},
{
"code": "orp_warn_max",
"custom_name": "",
"dp_id": 120,
"time": 1678613718900,
"value": -2000
},
{
"code": "orp_warn_min",
"custom_name": "",
"dp_id": 121,
"time": 1678613718900,
"value": -2000
},
{
"code": "cf_current",
"custom_name": "",
"dp_id": 136,
"time": 1678613718900,
"value": 0
},
{
"code": "cf_warn_max",
"custom_name": "",
"dp_id": 137,
"time": 1678613718900,
"value": 0
},
{
"code": "cf_warn_min",
"custom_name": "",
"dp_id": 138,
"time": 1678613718900,
"value": 1
},
{
"code": "rh_current",
"custom_name": "",
"dp_id": 139,
"time": 1678613718900,
"value": 0
},
{
"code": "rh_warn_max",
"custom_name": "",
"dp_id": 140,
"time": 1678613718900,
"value": 0
},
{
"code": "rh_warn_min",
"custom_name": "",
"dp_id": 141,
"time": 1678613718900,
"value": 0
}
]
},
"success": true,
"t": 1698586324432,
"tid": "8c5ba7e6765f11ee9e03520921e69726"
}
@Tony0727 and @politsin, you do not appear to be using this integration, but attempting to do something yourself.
Log Message
Information about DPS mappings
From Debug output:
Product ID
Product ID: 5ok0wq7drlqyo2hb Name: YY-9909 Model: YY-9909
Information about how the device functions
Product link: here
This is a multifunction PH meter. It measure PH, electrical conductivity, total dissolved solids, salt, SG, temp used commonly for aquariums, swimming pools, and hydroponics. It has alarm function, as well as calibration. I cannot find the manual online atm, but I have an English one in hand and can scan if needed.
Thank you!