New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Solar / Floating Water Quality Tester #7215
Comments
Here the complete DDF I receive value but for chlorine I'm not sure ist correct: ONLY WORK WITH THE LAST BETA VERSION OF deCONZ 2.23.0-beta {
"schema": "devcap1.schema.json",
"manufacturername": "_TZE200_v1jqz5cy",
"modelid": "TS0601",
"vendor": "Tuya",
"product": "Zigbee Chlorine Meter PH ORP EC TDS Salinity Temp CL",
"sleeper": false,
"status": "Gold",
"path": "/devices/_TZE200_TS0601_v1jqz5cy_v7.json",
"subdevices": [
{
"type": "$TYPE_TEMPERATURE_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x0514"
],
"items": [
{
"name": "attr/id"
},
{
"name": "attr/lastannounced"
},
{
"name": "attr/lastseen"
},
{
"name": "attr/manufacturername"
},
{
"name": "attr/modelid"
},
{
"name": "attr/name"
},
{
"name": "attr/swversion",
"refresh.interval": 86394,
"read": {
"at": "0x0001",
"cl": "0x0000",
"ep": 0,
"fn": "zcl"
},
"parse": {
"at": "0x0001",
"cl": "0x0000",
"ep": 255,
"fn": "zcl",
"script": "tuya_swversion.js"
}
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "config/battery",
"refresh.interval": 3600,
"read": {
"fn": "tuya"
},
"parse": {
"dpid": 7,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
},
"default": 0
},
{
"name": "config/on"
},
{
"name": "config/reachable"
},
{
"name": "state/lastupdated"
},
{
"name": "state/temperature",
"refresh.interval": 3600,
"read": {
"fn": "tuya"
},
"parse": {
"dpid": 2,
"eval": "Item.val = (10 * Attr.val);",
"fn": "tuya"
},
"default": 0
}
]
},
{
"type": "$TYPE_PH_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x0512"
],
"items": [
{
"name": "attr/lastannounced"
},
{
"name": "attr/lastseen"
},
{
"name": "attr/manufacturername"
},
{
"name": "attr/modelid"
},
{
"name": "attr/name"
},
{
"name": "attr/swversion",
"refresh.interval": 86400,
"read": {
"at": "0x0001",
"cl": "0x0000",
"ep": 0,
"fn": "zcl"
},
"parse": {
"at": "0x0001",
"cl": "0x0000",
"ep": 255,
"fn": "zcl",
"script": "tuya_swversion.js"
}
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "cap/measured_value/unit",
"static": "pH"
},
{
"name": "config/battery",
"refresh.interval": 3600,
"read": {
"fn": "tuya"
},
"parse": {
"dpid": 7,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
},
"default": 0
},
{
"name": "config/on"
},
{
"name": "config/reachable"
},
{
"name": "state/lastupdated"
},
{
"name": "state/measured_value",
"refresh.interval": 3600,
"read": {
"fn": "tuya"
},
"parse": {
"dpid": 10,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
},
"default": 0
}
]
},
{
"type": "$TYPE_CHLORINE_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x041a"
],
"items": [
{
"name": "attr/id"
},
{
"name": "attr/lastannounced"
},
{
"name": "attr/lastseen"
},
{
"name": "attr/manufacturername"
},
{
"name": "attr/modelid"
},
{
"name": "attr/name"
},
{
"name": "attr/swversion",
"refresh.interval": 86400,
"read": {
"at": "0x0001",
"cl": "0x0000",
"ep": 0,
"fn": "zcl"
},
"parse": {
"at": "0x0001",
"cl": "0x0000",
"ep": 255,
"fn": "zcl",
"script": "tuya_swversion.js"
}
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "cap/measured_value/max",
"default": 0
},
{
"name": "cap/measured_value/min",
"default": 0
},
{
"name": "cap/measured_value/unit",
"static": "mg/L"
},
{
"name": "config/battery",
"refresh.interval": 3600,
"read": {
"fn": "tuya"
},
"parse": {
"dpid": 7,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
},
"default": 0
},
{
"name": "config/on"
},
{
"name": "config/reachable"
},
{
"name": "state/lastupdated"
},
{
"name": "state/measured_value",
"refresh.interval": 3600,
"parse": {
"dpid": 102,
"eval": "Item.val = (ZclFrame.at(3) << 32) | (ZclFrame.at(2) << 16) | (ZclFrame.at(1) << 8) | ZclFrame.at(0);",
"fn": "tuya"
},
"default": 0
}
]
},
{
"type": "$TYPE_ORP_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x042a"
],
"items": [
{
"name": "attr/id"
},
{
"name": "attr/lastannounced"
},
{
"name": "attr/lastseen"
},
{
"name": "attr/manufacturername"
},
{
"name": "attr/modelid"
},
{
"name": "attr/name"
},
{
"name": "attr/swversion",
"refresh.interval": 86400,
"read": {
"at": "0x0001",
"cl": "0x0000",
"ep": 0,
"fn": "zcl"
},
"parse": {
"at": "0x0001",
"cl": "0x0000",
"ep": 255,
"fn": "zcl",
"script": "tuya_swversion.js"
}
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "cap/measured_value/max",
"description": "Maximum value of state/measured_value.",
"default": 0
},
{
"name": "cap/measured_value/min",
"description": "Minimum value of state/measured_value.",
"default": 0
},
{
"name": "cap/measured_value/unit",
"static": "mV"
},
{
"name": "config/battery",
"refresh.interval": 3600,
"read": {
"fn": "tuya"
},
"parse": {
"dpid": 7,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
},
"default": 0
},
{
"name": "config/on"
},
{
"name": "config/reachable"
},
{
"name": "state/lastupdated"
},
{
"name": "state/measured_value",
"refresh.interval": 3600,
"parse": {
"dpid": 101,
"eval": "Item.val = (ZclFrame.at(3) << 32) | (ZclFrame.at(2) << 16) | (ZclFrame.at(1) << 8) | ZclFrame.at(0);",
"fn": "tuya"
},
"default": 0
}
]
},
{
"type": "$TYPE_EC_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x043a"
],
"items": [
{
"name": "attr/id"
},
{
"name": "attr/lastannounced"
},
{
"name": "attr/lastseen"
},
{
"name": "attr/manufacturername"
},
{
"name": "attr/modelid"
},
{
"name": "attr/name"
},
{
"name": "attr/swversion",
"refresh.interval": 86400,
"read": {
"at": "0x0001",
"cl": "0x0000",
"ep": 0,
"fn": "zcl"
},
"parse": {
"at": "0x0001",
"cl": "0x0000",
"ep": 255,
"fn": "zcl",
"script": "tuya_swversion.js"
}
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "cap/measured_value/max",
"description": "Maximum value of state/measured_value.",
"default": 0
},
{
"name": "cap/measured_value/min",
"description": "Minimum value of state/measured_value.",
"default": 0
},
{
"name": "cap/measured_value/unit",
"static": "μS/cm"
},
{
"name": "config/battery",
"refresh.interval": 3600,
"read": {
"fn": "tuya"
},
"parse": {
"dpid": 7,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
},
"default": 0
},
{
"name": "config/on"
},
{
"name": "config/reachable"
},
{
"name": "state/lastupdated"
},
{
"name": "state/measured_value",
"refresh.interval": 3600,
"parse": {
"dpid": 11,
"eval": "Item.val = (ZclFrame.at(3) << 32) | (ZclFrame.at(2) << 16) | (ZclFrame.at(1) << 8) | ZclFrame.at(0);",
"fn": "tuya"
},
"default": 0
}
]
},
{
"type": "$TYPE_TDS_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x042B"
],
"items": [
{
"name": "attr/lastannounced"
},
{
"name": "attr/lastseen"
},
{
"name": "attr/manufacturername"
},
{
"name": "attr/modelid"
},
{
"name": "attr/name"
},
{
"name": "attr/swversion",
"refresh.interval": 86400,
"read": {
"at": "0x0001",
"cl": "0x0000",
"ep": 0,
"fn": "zcl"
},
"parse": {
"at": "0x0001",
"cl": "0x0000",
"ep": 255,
"fn": "zcl",
"script": "tuya_swversion.js"
}
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "cap/measured_value/unit",
"static": "ppm"
},
{
"name": "config/battery",
"refresh.interval": 3600,
"read": {
"fn": "tuya"
},
"parse": {
"dpid": 7,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
},
"default": 0
},
{
"name": "config/on"
},
{
"name": "config/reachable"
},
{
"name": "state/lastupdated"
},
{
"name": "state/measured_value",
"refresh.interval": 3600,
"read": {
"fn": "tuya"
},
"parse": {
"dpid": 1,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
},
"default": 0
}
]
},
{
"type": "$TYPE_SALT_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x040D"
],
"items": [
{
"name": "attr/lastannounced"
},
{
"name": "attr/lastseen"
},
{
"name": "attr/manufacturername"
},
{
"name": "attr/modelid"
},
{
"name": "attr/name"
},
{
"name": "attr/swversion",
"refresh.interval": 86400,
"read": {
"at": "0x0001",
"cl": "0x0000",
"ep": 0,
"fn": "zcl"
},
"parse": {
"at": "0x0001",
"cl": "0x0000",
"ep": 255,
"fn": "zcl",
"script": "tuya_swversion.js"
}
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "cap/measured_value/unit",
"static": "ppm"
},
{
"name": "config/battery",
"refresh.interval": 3600,
"read": {
"fn": "tuya"
},
"parse": {
"dpid": 7,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
},
"default": 0
},
{
"name": "config/on"
},
{
"name": "config/reachable"
},
{
"name": "state/lastupdated"
},
{
"name": "state/measured_value",
"refresh.interval": 3600,
"read": {
"fn": "tuya"
},
"parse": {
"dpid": 117,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
},
"default": 0
}
]
}
]
} |
Hi @manup Result of Chlorine = 6721026 (raw number) normally CL must be a range of 0.0 - 4.0 mg/L Expression in DDF: Item.val = (ZclFrame.at(3) << 32) | (ZclFrame.at(2) << 16) | (ZclFrame.at(1) << 8) | ZclFrame.at(0); And used with a subdivides chlorine_sensor.json not sure if it's used?!? Tag "cap/measured_value/dimension" don't exist with the last version 2.23.0-beta {
"schema": "subdevice1.schema.json",
"type": "$TYPE_CHLORINE_SENSOR",
"name": "ZHAChlorine",
"restapi": "/sensors",
"order": 20,
"uuid": ["$address.ext", "0x01", "0x041A"],
"items": [
"config/on",
"config/reachable",
"state/measured_value",
"cap/measured_value/min",
"cap/measured_value/max",
"cap/measured_value/unit",
"cap/measured_value/dimension",
"state/lastupdated"
]
} API deCONZ result: {
"config": {
"battery": 100,
"on": true,
"reachable": true
},
"etag": "64fd79b6ef86579b29dce3fc7198041a",
"lastannounced": null,
"lastseen": "2023-09-08T15:18Z",
"manufacturername": "_TZE200_v1jqz5cy",
"modelid": "TS0601",
"name": "Thermostat",
"state": {
"lastupdated": "2023-09-08T15:16:53.173",
"measured_value": 6721026
},
"swversion": "1.0.1",
"type": "$TYPE_CHLORINE_SENSOR",
"uniqueid": "e0:79:8d:ff:fe:b8:b8:ef-01-041a"
} |
Whoa, congratulations, huge and complete integration. Don't forget to add the new json file.
All of thoses sensors are usefull ? on my side I don't see what is ec, orp and tds ...
If you enable debug flag ZCL, we will be able to see the complete zigbee raw request, and I can decryt it if needed. |
Hi @Smanar "All of thoses sensors are usefull ? on my side I don't see what is ec, orp and tds ..." Depends your swimming pool. SALT is only useful if your swimming pool use saltwater. Here a description of the different Sensor: EC: Electrical Conductivity https://www.aquaread.com/sensors/ec#:~:text=EC%20or%20Electrical%20Conductivity%20of,on%20the%20concentration%20of%20ions. ""type": "$TYPE_CHLORINE_SENSOR", I resolve this issue I also must include all new subdevices into constants.json "/usr/share/deCONZ/devices/generic" {
"schema": "constants1.schema.json",
"manufacturers" : {
"$MF_BOSCH": "Bosch",
"$MF_IKEA": "IKEA of Sweden",
"$MF_LUMI": "LUMI",
"$MF_LUTRON": "Lutron",
"$MF_PHILIPS": "Philips",
"$MF_SAMJIN": "Samjin",
"$MF_SIGNIFY": "Signify Netherlands B.V.",
"$MF_TUYA": "Tuyatec",
"$MF_XIAOMI": "XIAOMI"
},
"device-types": {
"$TYPE_AIR_PURIFIER": "ZHAAirPurifier",
"$TYPE_AIR_QUALITY_SENSOR": "ZHAAirQuality",
"$TYPE_CARBONDIOXIDE_SENSOR": "ZHACarbonDioxide",
"$TYPE_CHLORINE_SENSOR": "ZHAChlorine",
"$TYPE_EC_SENSOR": "ZHAEc",
"$TYPE_FORMALDEHYDE_SENSOR": "ZHAFormaldehyde",
"$TYPE_PARTICULATEMATTER_SENSOR": "ZHAParticulateMatter",
"$TYPE_ALARM_SENSOR": "ZHAAlarm",
"$TYPE_BATTERY_SENSOR": "ZHABattery",
"$TYPE_COLOR_DIMMABLE_LIGHT": "Color dimmable light",
"$TYPE_COLOR_LIGHT": "Color light",
"$TYPE_COLOR_TEMPERATURE_LIGHT": "Color temperature light",
"$TYPE_CONSUMPTION_SENSOR": "ZHAConsumption",
"$TYPE_DIMMABLE_LIGHT": "Dimmable light",
"$TYPE_DIMMABLE_PLUGIN_UNIT": "Dimmable plug-in unit",
"$TYPE_DIMMER_SWITCH": "Dimmer switch",
"$TYPE_DOOR_LOCK_CONTROLLER": "Door lock controller",
"$TYPE_DOOR_LOCK": "Door Lock",
"$TYPE_EXTENDED_COLOR_LIGHT": "Extended color light",
"$TYPE_FIRE_SENSOR": "ZHAFire",
"$TYPE_HUMIDITY_SENSOR": "ZHAHumidity",
"$TYPE_LIGHT_LEVEL_SENSOR": "ZHALightLevel",
"$TYPE_MOISTURE_SENSOR": "ZHAMoisture",
"$TYPE_ON_OFF_LIGHT": "On/Off light",
"$TYPE_ON_OFF_LIGHT_SWITCH": "On/Off light switch",
"$TYPE_ON_OFF_OUTPUT": "On/Off output",
"$TYPE_ON_OFF_PLUGIN_UNIT": "On/Off plug-in unit",
"$TYPE_ON_OFF_SWITCH": "On/Off switch",
"$TYPE_OPEN_CLOSE_SENSOR": "ZHAOpenClose",
"$TYPE_ORP_SENSOR": "ZHAOrp",
"$TYPE_PH_SENSOR": "ZHAPh",
"$TYPE_POWER_SENSOR": "ZHAPower",
"$TYPE_PRESENCE_SENSOR": "ZHAPresence",
"$TYPE_PRESSURE_SENSOR": "ZHAPressure",
"$TYPE_RANGE_EXTENDER": "Range extender",
"$TYPE_RELATIVE_ROTARY": "ZHARelativeRotary",
"$TYPE_SALT_SENSOR": "ZHASalt",
"$TYPE_SMART_PLUG": "Smart plug",
"$TYPE_SPECTRAL_SENSOR": "ZHASpectral",
"$TYPE_SWITCH": "ZHASwitch",
"$TYPE_TDS_SENSOR": "ZHATds",
"$TYPE_TEMPERATURE_SENSOR": "ZHATemperature",
"$TYPE_THERMOSTAT": "ZHAThermostat",
"$TYPE_VIBRATION_SENSOR": "ZHAVibration",
"$TYPE_WARNING_DEVICE": "Warning device",
"$TYPE_WATER_LEAK_SENSOR": "ZHAWater",
"$TYPE_WINDOW_COVERING_DEVICE": "Window covering device",
"$TYPE_ZGP_SWITCH": "ZGPSwitch"
}
}
I will check later about value with the FLAG ZCL or I must use a formula from the raw number (6688770) to find the Chlorine CL who have this range 0.0-4.0 mg/L ?!? A other question how would be possible to calibrate this tools? |
Whaou ! Nice try ! ;-)
The |
May be, or by adding a new /config/calibration item for sensors that have this function available and a write function (may not so easy if value is raw). Seems that there are two PH calibration for this device ?! 103: pH Calibration |
Here the list of the Datapoint (Updated) 1: TDS For PH there is finally 3 datapoints one with 10 (only Read) and the other with 103 (EU Calibration) and 114 (Asia Calibration). PH Example: ORP Example: |
I will make a new DDF to clean that. |
I think you have to refer here for the DP list : zigpy/zha-device-handlers#2565 (comment) |
Has been changed to |
Ha ? oups, good to know, for me this file was optionnal. Lol, I like the new sensors
(I don't have swimming pool, but from my memory we were checking only ph on my old one) It's a professional product ? Seriously you have information about the device working mode ?
|
Yes it is … I think it’s used from into Tuya App but can be easily made by home automation software |
But how ? |
Here a new version of DDF without repeating function read for Tuya: Please check @BabaIsYou if it's correct? I also try with a other version config/offset with DP 103 and DP 114 but receive 0 like value. {
"name": "config/offset",
"parse": {
"dpid": 114,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
},
"default": 0
}, New DDF: {
"schema": "devcap1.schema.json",
"manufacturername": "_TZE200_v1jqz5cy",
"modelid": "TS0601",
"vendor": "Tuya",
"product": "Zigbee Chlorine Meter PH ORP EC TDS Salinity Temp CL",
"sleeper": false,
"status": "Gold",
"path": "/devices/_TZE200_TS0601_v1jqz5cy_v10.json",
"subdevices": [
{
"type": "$TYPE_TEMPERATURE_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x0514"
],
"items": [
{
"name": "attr/id"
},
{
"name": "attr/lastannounced"
},
{
"name": "attr/lastseen"
},
{
"name": "attr/manufacturername"
},
{
"name": "attr/modelid"
},
{
"name": "attr/name"
},
{
"name": "attr/swversion",
"refresh.interval": 86394,
"read": {
"at": "0x0001",
"cl": "0x0000",
"ep": 0,
"fn": "zcl"
},
"parse": {
"at": "0x0001",
"cl": "0x0000",
"ep": 255,
"fn": "zcl",
"script": "tuya_swversion.js"
}
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "config/battery",
"refresh.interval": 3600,
"read": {
"fn": "tuya"
},
"parse": {
"dpid": 7,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
},
"default": 0
},
{
"name": "config/on"
},
{
"name": "config/reachable"
},
{
"name": "state/lastupdated"
},
{
"name": "state/temperature",
"refresh.interval": 3600,
"read": {
"fn": "tuya"
},
"parse": {
"dpid": 2,
"eval": "Item.val = (10 * Attr.val);",
"fn": "tuya"
},
"default": 0
}
]
},
{
"type": "$TYPE_PH_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x0512"
],
"items": [
{
"name": "attr/lastannounced"
},
{
"name": "attr/lastseen"
},
{
"name": "attr/manufacturername"
},
{
"name": "attr/modelid"
},
{
"name": "attr/name"
},
{
"name": "attr/swversion",
"refresh.interval": 86400,
"read": {
"at": "0x0001",
"cl": "0x0000",
"ep": 0,
"fn": "zcl"
},
"parse": {
"at": "0x0001",
"cl": "0x0000",
"ep": 255,
"fn": "zcl",
"script": "tuya_swversion.js"
}
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "cap/measured_value/unit",
"static": "pH"
},
{
"name": "config/on"
},
{
"name": "config/reachable"
},
{
"name": "state/lastupdated"
},
{
"name": "state/measured_value",
"parse": {
"dpid": 10,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
},
"default": 0
}
]
},
{
"type": "$TYPE_CHLORINE_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x041a"
],
"items": [
{
"name": "attr/id"
},
{
"name": "attr/lastannounced"
},
{
"name": "attr/lastseen"
},
{
"name": "attr/manufacturername"
},
{
"name": "attr/modelid"
},
{
"name": "attr/name"
},
{
"name": "attr/swversion",
"refresh.interval": 86400,
"read": {
"at": "0x0001",
"cl": "0x0000",
"ep": 0,
"fn": "zcl"
},
"parse": {
"at": "0x0001",
"cl": "0x0000",
"ep": 255,
"fn": "zcl",
"script": "tuya_swversion.js"
}
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "cap/measured_value/max",
"default": 0
},
{
"name": "cap/measured_value/min",
"default": 0
},
{
"name": "cap/measured_value/unit",
"static": "mg/L"
},
{
"name": "config/on"
},
{
"name": "config/reachable"
},
{
"name": "state/lastupdated"
},
{
"name": "state/measured_value",
"parse": {
"dpid": 102,
"eval": "Item.val = (ZclFrame.at(3) << 32) | (ZclFrame.at(2) << 16) | (ZclFrame.at(1) << 8) | ZclFrame.at(0);",
"fn": "tuya"
},
"default": 0
}
]
},
{
"type": "$TYPE_ORP_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x042a"
],
"items": [
{
"name": "attr/id"
},
{
"name": "attr/lastannounced"
},
{
"name": "attr/lastseen"
},
{
"name": "attr/manufacturername"
},
{
"name": "attr/modelid"
},
{
"name": "attr/name"
},
{
"name": "attr/swversion",
"refresh.interval": 86400,
"read": {
"at": "0x0001",
"cl": "0x0000",
"ep": 0,
"fn": "zcl"
},
"parse": {
"at": "0x0001",
"cl": "0x0000",
"ep": 255,
"fn": "zcl",
"script": "tuya_swversion.js"
}
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "cap/measured_value/max",
"description": "Maximum value of state/measured_value.",
"default": 0
},
{
"name": "cap/measured_value/min",
"description": "Minimum value of state/measured_value.",
"default": 0
},
{
"name": "cap/measured_value/unit",
"static": "mV"
},
{
"name": "config/on"
},
{
"name": "config/reachable"
},
{
"name": "state/lastupdated"
},
{
"name": "state/measured_value",
"parse": {
"dpid": 101,
"eval": "Item.val = (ZclFrame.at(3) << 32) | (ZclFrame.at(2) << 16) | (ZclFrame.at(1) << 8) | ZclFrame.at(0);",
"fn": "tuya"
},
"default": 0
}
]
},
{
"type": "$TYPE_EC_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x043a"
],
"items": [
{
"name": "attr/id"
},
{
"name": "attr/lastannounced"
},
{
"name": "attr/lastseen"
},
{
"name": "attr/manufacturername"
},
{
"name": "attr/modelid"
},
{
"name": "attr/name"
},
{
"name": "attr/swversion",
"refresh.interval": 86400,
"read": {
"at": "0x0001",
"cl": "0x0000",
"ep": 0,
"fn": "zcl"
},
"parse": {
"at": "0x0001",
"cl": "0x0000",
"ep": 255,
"fn": "zcl",
"script": "tuya_swversion.js"
}
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "cap/measured_value/max",
"description": "Maximum value of state/measured_value.",
"default": 0
},
{
"name": "cap/measured_value/min",
"description": "Minimum value of state/measured_value.",
"default": 0
},
{
"name": "cap/measured_value/unit",
"static": "μS/cm"
},
{
"name": "config/on"
},
{
"name": "config/reachable"
},
{
"name": "state/lastupdated"
},
{
"name": "state/measured_value",
"parse": {
"dpid": 11,
"eval": "Item.val = (ZclFrame.at(3) << 32) | (ZclFrame.at(2) << 16) | (ZclFrame.at(1) << 8) | ZclFrame.at(0);",
"fn": "tuya"
},
"default": 0
}
]
},
{
"type": "$TYPE_TDS_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x042B"
],
"items": [
{
"name": "attr/lastannounced"
},
{
"name": "attr/lastseen"
},
{
"name": "attr/manufacturername"
},
{
"name": "attr/modelid"
},
{
"name": "attr/name"
},
{
"name": "attr/swversion",
"refresh.interval": 86400,
"read": {
"at": "0x0001",
"cl": "0x0000",
"ep": 0,
"fn": "zcl"
},
"parse": {
"at": "0x0001",
"cl": "0x0000",
"ep": 255,
"fn": "zcl",
"script": "tuya_swversion.js"
}
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "cap/measured_value/unit",
"static": "ppm"
},
{
"name": "config/on"
},
{
"name": "config/reachable"
},
{
"name": "state/lastupdated"
},
{
"name": "state/measured_value",
"parse": {
"dpid": 1,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
},
"default": 0
}
]
},
{
"type": "$TYPE_SALT_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x040D"
],
"items": [
{
"name": "attr/lastannounced"
},
{
"name": "attr/lastseen"
},
{
"name": "attr/manufacturername"
},
{
"name": "attr/modelid"
},
{
"name": "attr/name"
},
{
"name": "attr/swversion",
"refresh.interval": 86400,
"read": {
"at": "0x0001",
"cl": "0x0000",
"ep": 0,
"fn": "zcl"
},
"parse": {
"at": "0x0001",
"cl": "0x0000",
"ep": 255,
"fn": "zcl",
"script": "tuya_swversion.js"
}
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "cap/measured_value/unit",
"static": "ppm"
},
{
"name": "config/on"
},
{
"name": "config/reachable"
},
{
"name": "state/lastupdated"
},
{
"name": "state/measured_value",
"parse": {
"dpid": 117,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
},
"default": 0
}
]
}
]
} I will try later other test but now swimming! |
If it's just an offset, you don't need to use dp, can just use something like
and
the offset will be managed by deconz direclty. |
IMO, if I understand correctly the wiki, only one read for tuya fn is needed for the whole device. Then it's better to choose the one with the lowest refresh.interval (temperature for instance that is the more "volatile" parameter in this list) to populate all the other items at this interval.
|
New version: {
"schema": "devcap1.schema.json",
"manufacturername": "_TZE200_v1jqz5cy",
"modelid": "TS0601",
"vendor": "Tuya",
"product": "Zigbee Chlorine Meter PH ORP EC TDS Salinity Temp CL",
"sleeper": false,
"status": "Gold",
"path": "/devices/_TZE200_TS0601_v1jqz5cy_v12.json",
"subdevices": [
{
"type": "$TYPE_TEMPERATURE_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x0514"
],
"items": [
{
"name": "attr/id"
},
{
"name": "attr/lastannounced"
},
{
"name": "attr/lastseen"
},
{
"name": "attr/manufacturername"
},
{
"name": "attr/modelid"
},
{
"name": "attr/name"
},
{
"name": "attr/swversion"
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "config/battery",
"read": {
"fn": "none"
},
"parse": {
"dpid": 7,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
},
"default": 0
},
{
"name": "config/on"
},
{
"name": "config/reachable"
},
{
"name": "state/lastupdated"
},
{
"name": "state/temperature",
"refresh.interval": 3600,
"read": {
"fn": "tuya"
},
"parse": {
"dpid": 2,
"eval": "Item.val = (10 * Attr.val);",
"fn": "tuya"
},
"default": 0
}
]
},
{
"type": "$TYPE_PH_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x0512"
],
"items": [
{
"name": "attr/lastannounced"
},
{
"name": "attr/lastseen"
},
{
"name": "attr/manufacturername"
},
{
"name": "attr/modelid"
},
{
"name": "attr/name"
},
{
"name": "attr/swversion"
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "cap/measured_value/unit",
"static": "pH"
},
{
"name": "config/on"
},
{
"name": "config/reachable"
},
{
"name": "state/lastupdated"
},
{
"name": "state/measured_value",
"read": {
"fn": "none"
},
"parse": {
"dpid": 10,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
},
"default": 0
}
]
},
{
"type": "$TYPE_CHLORINE_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x041a"
],
"items": [
{
"name": "attr/id"
},
{
"name": "attr/lastannounced"
},
{
"name": "attr/lastseen"
},
{
"name": "attr/manufacturername"
},
{
"name": "attr/modelid"
},
{
"name": "attr/name"
},
{
"name": "attr/swversion"
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "cap/measured_value/max",
"default": 0
},
{
"name": "cap/measured_value/min",
"default": 0
},
{
"name": "cap/measured_value/unit",
"static": "mg/L"
},
{
"name": "config/on"
},
{
"name": "config/reachable"
},
{
"name": "state/lastupdated"
},
{
"name": "state/measured_value",
"read": {
"fn": "none"
},
"parse": {
"dpid": 102,
"eval": "Item.val = (ZclFrame.at(3) << 32) | (ZclFrame.at(2) << 16) | (ZclFrame.at(1) << 8) | ZclFrame.at(0);",
"fn": "tuya"
},
"default": 0
}
]
},
{
"type": "$TYPE_ORP_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x042a"
],
"items": [
{
"name": "attr/id"
},
{
"name": "attr/lastannounced"
},
{
"name": "attr/lastseen"
},
{
"name": "attr/manufacturername"
},
{
"name": "attr/modelid"
},
{
"name": "attr/name"
},
{
"name": "attr/swversion"
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "cap/measured_value/max",
"description": "Maximum value of state/measured_value.",
"default": 0
},
{
"name": "cap/measured_value/min",
"description": "Minimum value of state/measured_value.",
"default": 0
},
{
"name": "cap/measured_value/unit",
"static": "mV"
},
{
"name": "config/on"
},
{
"name": "config/reachable"
},
{
"name": "state/lastupdated"
},
{
"name": "state/measured_value",
"read": {
"fn": "none"
},
"parse": {
"dpid": 101,
"eval": "Item.val = (ZclFrame.at(3) << 32) | (ZclFrame.at(2) << 16) | (ZclFrame.at(1) << 8) | ZclFrame.at(0);",
"fn": "tuya"
},
"default": 0
}
]
},
{
"type": "$TYPE_EC_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x043a"
],
"items": [
{
"name": "attr/id"
},
{
"name": "attr/lastannounced"
},
{
"name": "attr/lastseen"
},
{
"name": "attr/manufacturername"
},
{
"name": "attr/modelid"
},
{
"name": "attr/name"
},
{
"name": "attr/swversion"
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "cap/measured_value/max",
"description": "Maximum value of state/measured_value.",
"default": 0
},
{
"name": "cap/measured_value/min",
"description": "Minimum value of state/measured_value.",
"default": 0
},
{
"name": "cap/measured_value/unit",
"static": "μS/cm"
},
{
"name": "config/on"
},
{
"name": "config/reachable"
},
{
"name": "state/lastupdated"
},
{
"name": "state/measured_value",
"read": {
"fn": "none"
},
"parse": {
"dpid": 11,
"eval": "Item.val = (ZclFrame.at(3) << 32) | (ZclFrame.at(2) << 16) | (ZclFrame.at(1) << 8) | ZclFrame.at(0);",
"fn": "tuya"
},
"default": 0
}
]
},
{
"type": "$TYPE_TDS_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x042B"
],
"items": [
{
"name": "attr/lastannounced"
},
{
"name": "attr/lastseen"
},
{
"name": "attr/manufacturername"
},
{
"name": "attr/modelid"
},
{
"name": "attr/name"
},
{
"name": "attr/swversion"
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "cap/measured_value/unit",
"static": "ppm"
},
{
"name": "config/on"
},
{
"name": "config/reachable"
},
{
"name": "state/lastupdated"
},
{
"name": "state/measured_value",
"read": {
"fn": "none"
},
"parse": {
"dpid": 1,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
},
"default": 0
}
]
},
{
"type": "$TYPE_SALT_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x040D"
],
"items": [
{
"name": "attr/lastannounced"
},
{
"name": "attr/lastseen"
},
{
"name": "attr/manufacturername"
},
{
"name": "attr/modelid"
},
{
"name": "attr/name"
},
{
"name": "attr/swversion"
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "cap/measured_value/unit",
"static": "ppm"
},
{
"name": "config/on"
},
{
"name": "config/reachable"
},
{
"name": "state/lastupdated"
},
{
"name": "state/measured_value",
"read": {
"fn": "none"
},
"parse": {
"dpid": 117,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
},
"default": 0
}
]
}
]
} |
Now I understand @Smanar how the offset working. Not sure it's work with this device. Here the notice how to calibrate PH / ORP / EC if you have the app and the gateway. I don't have. Calibration methods: •Ph calibration
•ORP calibration
•EC Calibration
How I can calibrate with deCONZ? Shall I create new subdevices with DP 114 and DP 103 for PH Calibration? |
He, yep, I don't see other method, I don't find better method, problem is only "light" device have "send request only" field
But I don't know the type and the value to use. For this code I m using a "bool" type with 0/1. (And need to add a new json file again, a config_calibration_item.json but this one can be used for all sensor) |
When I look the log info I can see type 0x02 means value I change Bool with Double {
"schema": "resourceitem1.schema.json",
"id": "config/calibration",
"datatype": "Double",
"access": "RW",
"public": true,
"description": "Calibrate Solution."
} Here in DDF: {
"name": "config/calibration",
"read": {
"fn": "none"
},
"write": {
"dpid": 114,
"dt": "0x02",
"eval": "Item.val;",
"fn": "tuya"
}
}, In API I see value null. How I can write a calibration number? |
So type 2 is classic value (so double in the json is fine)
0x02 is tuya type,converted in 0x2b for deconz type. For information I will be away for a week, so can't help to finish this device. |
As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs. |
As there has not been any response in 28 days, this issue will be closed. @ OP: If this issue is solved post what fixed it for you. If it is not solved, request to get this opened again. |
Device
Screenshots
Basic
Identify
Alarms
Device Temperature
Groups
Scenes
On/Off
Level Control
Color Control
Simple Metering
Diagnostics
Other clusters that are not mentioned above
The text was updated successfully, but these errors were encountered: