-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[New device support]: TS0601 _TZE200_lvkk0hdg (EPTTECH Tank Level Monitor Zigbee) #21015
Comments
It is working now ? |
I only have it working via local tuya and using a tuya zigbee gateway. |
Have you tried setup by the new way tuya in the first February home assistant release ? https://www.home-assistant.io/integrations/tuya/ |
I have the same problem.... unsupported :( |
HI how you did it? |
So far I can only use it reliable using a tuya zigbee hub and add the zigbee water tank meter to it as a subdevice. In Home Assistant using this localtuya fork https://xzetsubou.github.io/hass-localtuya/ With the information in this thread you can configure the various entities in localtuya |
Hey! Are you still trying to do it directly with zigbee2mqtt or just stayed with local tuya? |
Still local tuya |
Okay I´ll stick with HA without local tuya and try then, thank you! |
Hi, I am also also interested in adding support for this device trough Zigbee2MQTT. Same as you, I am struggling with other 4 datapoints. For all four I am getting an error "No converter available". |
Like everyone here, I'd like to get this working and added as an officially supported device! |
I thing I finally figure it out. It took a while for me to better understand how to work with zigbee-herdsman-conversters since it is not really well documented and I am relatively new to Zigbee2MQTT. I just added custom So here is my external configuration: const fz = require("zigbee-herdsman-converters/converters/fromZigbee");
const tz = require("zigbee-herdsman-converters/converters/toZigbee");
const exposes = require("zigbee-herdsman-converters/lib/exposes");
const reporting = require("zigbee-herdsman-converters/lib/reporting");
const {} = require("zigbee-herdsman-converters/lib/modernExtend");
const e = exposes.presets;
const ea = exposes.access;
const tuya = require("zigbee-herdsman-converters/lib/tuya");
const utils = require("zigbee-herdsman-converters/lib/utils");
const dp = {
instalationHeight: 19,
liquidDepthMax: 21,
maxSet: 7,
miniSet: 8,
};
const tzdatapoints = {
key: [
"installation_height",
"liquid_depth_max",
"max_set",
"mini_set",
],
convertSet: async (entity, key, value, meta) => {
switch (key) {
case "installation_height": {
await tuya.sendDataPointValue(entity, dp.instalationHeight, value);
break;
}
case "liquid_depth_max": {
await tuya.sendDataPointValue(entity, dp.liquidDepthMax, value);
break;
}
case "max_set": {
await tuya.sendDataPointValue(entity, dp.maxSet, value);
break;
}
case "mini_set": {
await tuya.sendDataPointValue(entity, dp.miniSet, value);
break;
}
}
},
};
const definition = {
// Since a lot of TuYa devices use the same modelID, but use different datapoints
// it's necessary to provide a fingerprint instead of a zigbeeModel
fingerprint: [
{
// The model ID from: Device with modelID 'TS0601' is not supported
// You may need to add \u0000 at the end of the name in some cases
modelID: "TS0601",
// The manufacturer name from: Device with modelID 'TS0601' is not supported.
manufacturerName: "_TZE200_lvkk0hdg",
},
],
model: "TS0601_tlc2206zb",
vendor: "TuYa",
whiteLabel: [
{
vendor: "EPTTECH",
model: "TLC2206-ZB",
},
],
description: "EPTTECH Tank Level Monitor Zigbee",
fromZigbee: [tuya.fz.datapoints],
// toZigbee: [tuya.tz.datapoints],
toZigbee: [tzdatapoints],
onEvent: tuya.onEventSetTime, // Add this if you are getting no converter for 'commandMcuSyncTime'
configure: tuya.configureMagicPacket,
exposes: [
// Here you should put all functionality that your device exposes
e
.numeric("liquid_level_percent", ea.STATE)
.withUnit("%")
.withDescription("Liquid level percentage"),
e
.numeric("liquid_depth", ea.STATE)
.withUnit("m")
.withDescription("Liquid Depth"),
e
.enum("liquid_state", ea.STATE, ["low", "normal", "high"])
.withDescription("Liquid State"),
e
.numeric("installation_height", ea.STATE_SET)
.withUnit("mm")
.withDescription("Height from sensor to tank bottom")
.withValueMin(100)
.withValueMax(3000)
.withValueStep(1),
e
.numeric("mini_set", ea.STATE_SET)
.withUnit("%")
.withDescription("Liquid minimal percentage")
.withValueMin(0)
.withValueMax(100)
.withValueStep(1),
e
.numeric("max_set", ea.STATE_SET)
.withUnit("%")
.withDescription("Liquid max percentage")
.withValueMin(0)
.withValueMax(100)
.withValueStep(1),
e
.numeric("liquid_depth_max", ea.STATE_SET)
.withUnit("mm")
.withDescription("Height from sensor to liquid level")
.withValueMin(100)
.withValueMax(2000)
.withValueStep(1),
],
meta: {
// All datapoints go in here
tuyaDatapoints: [
[22, "liquid_level_percent", tuya.valueConverter.raw],
[2, "liquid_depth", tuya.valueConverter.divideBy100],
[
1,
"liquid_state",
tuya.valueConverterBasic.lookup({ low: 1, normal: 0, high: 2 }),
],
[19, "installation_height", tuya.valueConverter.raw],
[7, "max_set", tuya.valueConverter.raw],
[8, "mini_set", tuya.valueConverter.raw],
[21, "liquid_depth_max", tuya.valueConverter.raw],
],
},
extend: [
// A preferred new way of extending functionality.
],
};
module.exports = definition; I would appreciate if someone else could test configuration and give feedback. Then we could maybe move further and suggest it as an officially supported device. |
I have removed my tuya gateway and local tuya in HA and connected the TLC ZB directly to HA again. So far it works like a charm |
@gregorobreza |
Working perfectly, thank you so much for the code n_n @gregorobreza |
@gregorobreza it's working fine on my end too. Thanks! |
Hello,
|
After many tests, I just needed to leave a blank line at the end of the file. 😊 |
Hm interesting 🤔. Happy to hear that you solved it!👍 |
Hi!. Somebody knows if this new device is going to be integrated in the native Z2M in a close future? I have just purchased it and I don't feel very confortable yet touching the guts of Z2M so, if it's comming to Z2M, I will just wait a little. Thanks in advance!. |
Received sensor today, and was detected fine by @gregorobreza definition #21015 (comment) |
I decided to give a try to @gregorobreza code a try (thank you very much sir) and it worked great. The sensor started reporting perfectly. But, sadly, as soon as I configured the levels of my setup using the "Expose" tab on Z2M the device does not report the level anymore. I was not able to fix it, I keep getting zero per cent :( |
Just to add that I just noticed on the debug logs of Z2M that the device is sending a huge ammount of messages per minute with its current status. Didn't count them but I estimate 100 message per minute easily. I let one log line here for if it helps 2024-06-17 23:00:49MQTT publish: topic 'zigbee2mqtt/nivel_gasoil', payload '{"installation_height":1045,"linkquality":87,"liquid_depth":0,"liquid_depth_max":100,"liquid_level_percent":0,"liquid_state":"low","max_set":95,"mini_set":20}' |
I noticed this as well, the Availability reflects this as the device is always 'just now' and doesn't seem to quit. Would be nice to be able to set the report interval if possible. |
Thats strange... Are you sure your configured levels make sense and are set correctly based on sensor instructions? |
I am not really sure that device support setting reporting interval. Device behaves in the same manner when used with tuya hub and it seem this is expected behaviour. But definitely worth to dig a bit deeper to check if possible. |
Hello. Correspondence...correspondence, I received the new device. I tried it with the tuya app, so far all settings are working perfectly. Zigbee2mqtt is coming next week... |
Hello. All values of the new device work correctly even under HA. :D Finally! |
very nice :) did you have also the problem with a flood of messages in HA? |
Yes. It flashed a lot... I still don't know what the solution is... |
What happens if it reports many times? |
I've tried setting the debounce value with little success. with a value between 1 and 10. It has slowed down to the point where the device doesn't even matter anymore. What am I doing wrong? @jesse-kaufman |
|
@DrTrotty I have found this problems in my case
|
Can unnecessary data be deleted? For example, every month... |
On home assistant you can set the period that short term data will be keep, but is a single value for ALL entities. You cannot set period for entity, you can exclude some by using filters. Long term are keep forever, but is a summary then lower data space need. |
Thanks. |
Hi guys, I also bought this sensor for my oil barrels. Today I added it via Z2MQTT, but I don't see any entities. Can someone help me how to get the sensor to work under HA? |
This is what I see on Z2MQTT: Über |
You'll need to add an external converter to Z2M:
TZE200.js contents:const fz = require("zigbee-herdsman-converters/converters/fromZigbee");
const tz = require("zigbee-herdsman-converters/converters/toZigbee");
const exposes = require("zigbee-herdsman-converters/lib/exposes");
const reporting = require("zigbee-herdsman-converters/lib/reporting");
const {} = require("zigbee-herdsman-converters/lib/modernExtend");
const e = exposes.presets;
const ea = exposes.access;
const tuya = require("zigbee-herdsman-converters/lib/tuya");
const utils = require("zigbee-herdsman-converters/lib/utils");
const dp = {
instalationHeight: 19,
liquidDepthMax: 21,
maxSet: 7,
miniSet: 8,
};
const tzdatapoints = {
key: [
"installation_height",
"liquid_depth_max",
"max_set",
"mini_set",
],
convertSet: async (entity, key, value, meta) => {
switch (key) {
case "installation_height": {
await tuya.sendDataPointValue(entity, dp.instalationHeight, value);
break;
}
case "liquid_depth_max": {
await tuya.sendDataPointValue(entity, dp.liquidDepthMax, value);
break;
}
case "max_set": {
await tuya.sendDataPointValue(entity, dp.maxSet, value);
break;
}
case "mini_set": {
await tuya.sendDataPointValue(entity, dp.miniSet, value);
break;
}
}
},
};
const definition = {
// Since a lot of TuYa devices use the same modelID, but use different datapoints
// it's necessary to provide a fingerprint instead of a zigbeeModel
fingerprint: [
{
// The model ID from: Device with modelID 'TS0601' is not supported
// You may need to add \u0000 at the end of the name in some cases
modelID: "TS0601",
// The manufacturer name from: Device with modelID 'TS0601' is not supported.
manufacturerName: "_TZE200_lvkk0hdg",
},
],
model: "TS0601_tlc2206zb",
vendor: "TuYa",
whiteLabel: [
{
vendor: "EPTTECH",
model: "TLC2206-ZB",
},
],
description: "EPTTECH Tank Level Monitor Zigbee",
fromZigbee: [tuya.fz.datapoints],
// toZigbee: [tuya.tz.datapoints],
toZigbee: [tzdatapoints],
onEvent: tuya.onEventSetTime, // Add this if you are getting no converter for 'commandMcuSyncTime'
configure: tuya.configureMagicPacket,
exposes: [
// Here you should put all functionality that your device exposes
e
.numeric("liquid_level_percent", ea.STATE)
.withUnit("%")
.withDescription("Liquid level percentage"),
e
.numeric("liquid_depth", ea.STATE)
.withUnit("m")
.withDescription("Liquid Depth"),
e
.enum("liquid_state", ea.STATE, ["low", "normal", "high"])
.withDescription("Liquid State"),
e
.numeric("installation_height", ea.STATE_SET)
.withUnit("mm")
.withDescription("Height from sensor to tank bottom")
.withValueMin(100)
.withValueMax(3000)
.withValueStep(1),
e
.numeric("mini_set", ea.STATE_SET)
.withUnit("%")
.withDescription("Liquid minimal percentage")
.withValueMin(0)
.withValueMax(100)
.withValueStep(1),
e
.numeric("max_set", ea.STATE_SET)
.withUnit("%")
.withDescription("Liquid max percentage")
.withValueMin(0)
.withValueMax(100)
.withValueStep(1),
e
.numeric("liquid_depth_max", ea.STATE_SET)
.withUnit("mm")
.withDescription("Height from sensor to liquid level")
.withValueMin(100)
.withValueMax(2000)
.withValueStep(1),
],
meta: {
// All datapoints go in here
tuyaDatapoints: [
[22, "liquid_level_percent", tuya.valueConverter.raw],
[2, "liquid_depth", tuya.valueConverter.divideBy100],
[
1,
"liquid_state",
tuya.valueConverterBasic.lookup({ low: 1, normal: 0, high: 2 }),
],
[19, "installation_height", tuya.valueConverter.raw],
[7, "max_set", tuya.valueConverter.raw],
[8, "mini_set", tuya.valueConverter.raw],
[21, "liquid_depth_max", tuya.valueConverter.raw],
],
},
extend: [
// A preferred new way of extending functionality.
],
};
module.exports = definition; |
@jesse-kaufman Wow, that was quick and then it should recognize all entities and then everything should work? Thank you very much. And do I have to remove the device and add it again? |
@Suschibomber if this is the "Zigbee Manufaturer" your sensor is different from the one that we are talking here. The aliexpress link that you send shows a different model ME201WZ |
😫 Ok and what do I do now? |
You can try to put your data in the fingerprint definition in the js file to see if it works. If not works I suggest to open a new issue to start checking this device. |
Can you tell me by chance how I do it? I'm not so practiced in it. |
It's working for EPTTECH TLC2206-ZB (TZE200.js). Thanks @jesse-kaufman ! |
Hi Community! I also bought the TLC2606-ZB and trying to make it work. However, I’m using ZHA. Is there any way to make it work or do I need to migrate to Z2M? Apologies if this is a dumb question, I’m still pretty new to this. :) Thanks for your support! |
same here Im using ZHA too, any idea how to integrate? |
for ZHA I came up with custom quirk, but either it is not recognized or there is something wrong with it: from zigpy.profiles import zha # Importing zha profile Define the data points (DPs) for the sensorTUYA_TANK_LEVEL_PERCENT_DP = 22 class LiquidLevelStatus(t.enum8): class TuyaTankLevelMeasurement(TuyaLocalCluster):
class TuyaTankLevelCluster(TuyaMCUCluster):
class EPTTECH_TLC2206ZB(CustomDevice):
` |
Hi @elik745i , I think you should post this custom quirk in zigpy/zha-device-handlers issues 😉 |
For those frustrated with the spammy-ness of this device, it looks like there's a new "throttle" feature coming (17ac9cf )! I just switched my Z2M container over to latest-dev and it works great! I didn't see a place to configure the throttle in the GUI, but when I added it to configuration.yaml, it worked as expected! Throttling it back to 15s makes a huge difference in the responsiveness of the web GUI and I'll probably throttle it back even further—once a minute is probably plenty for my application |
Yes, my patch was only on the backend, you must configure on yaml until someone that knows how the frontend works add it to the frontend. I use 30s and 45s in my devices. |
Cool, cool, no worries! I'm super grateful for the addition! I have this water level sensor and 5 mmWave sensors that are super chatty and throttling them back has made a significant difference in the amount of traffic |
Link
https://www.aliexpress.com/item/1005006395402636.html
Database entry
{"id":66,"type":"EndDevice","ieeeAddr":"0x0ceff6fffe4bdda2","nwkAddr":39698,"manufId":4098,"manufName":"_TZE200_lvkk0hdg","powerSource":"Battery","modelId":"TS0601","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":81,"inClusterList":[0,4,5,61184],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"65503":"�ME-\u0019%NE-\u0019aNE-j�NE-j\u000fPE-j�KE-j�KE-\u0019>LE-i","65506":31,"65508":0,"65534":0,"appVersion":65,"modelId":"TS0601","manufacturerName":"_TZE200_lvkk0hdg","powerSource":3,"zclVersion":3,"stackVersion":0,"hwVersion":1,"dateCode":""}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":65,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{"configured":-708457359},"lastSeen":1706198663760,"defaultSendRequestWhen":"immediate"}
Comments
I have followed all the documentation on how to add a new unsupported device, but I got stuck on the configuration file. Only 3 out of the 7 Tuya Data Points are working (the read-only points), but the other 4 data points for configuration of the device are seen in Tuya IOT, but refused to be configured in Zigbee2MQTT
The attached external definition file is an attempt to setup the device, but that all I got and do not know how to continue.
The working Data Points and also the failing Data Points are all described in the definition file for easy reference.
NOTE: There is also an identical device, but then it's a Wifi based device. In the Smart Life app both devices are fully working (all 7 Data Points), but in HA (either via Zigbee2MQTT or LocalTuya) only 3 out of 7 Data Points can be used.
See for the TLC2206 Wifi device https://www.aliexpress.com/item/1005005758585356.html
Both devices have equal Data Points
{"1":"Liquid level status","2":"Liquid level depth","7":"Set Max","8":"Set Mini","19":"Installation height","21":"Sensor to full line","22":"Liquid level ratio"}
External defintion
The text was updated successfully, but these errors were encountered: