Tuya soil temp/moisture sensor (TZE200_myd45weu) moisture reading stalls
Moderator: leecollings
-
- Posts: 13
- Joined: Monday 08 March 2021 15:07
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: The Netherlands
- Contact:
Tuya soil temp/moisture sensor (TZE200_myd45weu) moisture reading stalls
Hi All,
Last weeks I struggled a bit to get a Tuya soil temp and moisture sensor to work, but with the help of the deconz forum we finally managed to get it working, now the thing is, yesterday the sensor was finally added to Domoticz (using the deconz-domoticz plugin). and shows up as two sensors in Domoticz. The temperature sensors works as expected, gets updated frequently and is changing values now and then, the soil sensor is something else:
Yesterday when added it first reported 200CB *very dry* which was correct as the sensor was just lying around on my desk. After putting it in soil which was quite wet it started at 0CB (very wet) and then seemed to stabalize at 6cb (still very wet). then after the rain of yesterday evening it went to 0cb again, which is quite understandable. Though at the moment it still is displaying 0cb, which in theoretically is possible, but according to domoticz the "last seen at" says 05:31 this morning, and last record in the "log" of the sensor is at 6:30. When looking at devices I also see the last seen of 05:31....
Now comes the strange part, if I look at the json that's being reported in the deconz plugin in Domoticz it shows me that the last-seen and last-updated retrieved from the sensor(s) is just a few minutes ago, which is still 10000 (translated to 0cb, so okay there), though is not being processed by domoticz anymore......
Am I seeing something what's not here, or does this sound familiar to someone?
As said: the temp sensor part is being updated as expected and only the moisture part is reporting in a strange way.
Last weeks I struggled a bit to get a Tuya soil temp and moisture sensor to work, but with the help of the deconz forum we finally managed to get it working, now the thing is, yesterday the sensor was finally added to Domoticz (using the deconz-domoticz plugin). and shows up as two sensors in Domoticz. The temperature sensors works as expected, gets updated frequently and is changing values now and then, the soil sensor is something else:
Yesterday when added it first reported 200CB *very dry* which was correct as the sensor was just lying around on my desk. After putting it in soil which was quite wet it started at 0CB (very wet) and then seemed to stabalize at 6cb (still very wet). then after the rain of yesterday evening it went to 0cb again, which is quite understandable. Though at the moment it still is displaying 0cb, which in theoretically is possible, but according to domoticz the "last seen at" says 05:31 this morning, and last record in the "log" of the sensor is at 6:30. When looking at devices I also see the last seen of 05:31....
Now comes the strange part, if I look at the json that's being reported in the deconz plugin in Domoticz it shows me that the last-seen and last-updated retrieved from the sensor(s) is just a few minutes ago, which is still 10000 (translated to 0cb, so okay there), though is not being processed by domoticz anymore......
Am I seeing something what's not here, or does this sound familiar to someone?
As said: the temp sensor part is being updated as expected and only the moisture part is reporting in a strange way.
-
- Posts: 13
- Joined: Monday 08 March 2021 15:07
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: The Netherlands
- Contact:
Re: Tuya soil temp/moisture sensor (TZE200_myd45weu) moisture reading stalls
Small update: this morning at 5:53 an update from the sensor was received (a little over 24 hours after the last update) again 0 (100% wet), and no updates since....
-
- Posts: 815
- Joined: Wednesday 15 August 2018 14:38
- Target OS: -
- Domoticz version:
- Contact:
Re: Tuya soil temp/moisture sensor (TZE200_myd45weu) moisture reading stalls
Hello.
Your probrem is you have not enought values ?
The raw value from API (visible on custom page or phoscon/help/API Information/sensors) is variable or you only have 0 or 10000 ?
(To check if the problem come from the convertion deconz>domoticz or direclty from bad value from deconz)
Your probrem is you have not enought values ?
The raw value from API (visible on custom page or phoscon/help/API Information/sensors) is variable or you only have 0 or 10000 ?
(To check if the problem come from the convertion deconz>domoticz or direclty from bad value from deconz)
-
- Posts: 13
- Joined: Monday 08 March 2021 15:07
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: The Netherlands
- Contact:
Re: Tuya soil temp/moisture sensor (TZE200_myd45weu) moisture reading stalls
Thorgal,
As can be seen in the API call I just did on the sensor:
{
"config": {
"battery": 90,
"offset": 0,
"on": true,
"reachable": true
},
"etag": "72dd15c52f807ba0e8c34f7a3f4e7dd4",
"lastannounced": "2023-07-05T00:02:24Z",
"lastseen": "2023-07-06T17:55Z",
"manufacturername": "_TZE200_myd45weu",
"modelid": "TS0601",
"name": "Moisture 20",
"state": {
"lastupdated": "2023-07-06T17:55:57.759",
"lowbattery": false,
"moisture": 10000
},
"swversion": "1.0.8",
"type": "ZHAMoisture",
"uniqueid": "a4:c1:38:58:c4:64:32:ad-01-0408"
}
The result is new (lastupdated is not from long ago).
I understood Domoticz only updates values once in 24 hours when the value itself doesn't change, which is in line with the fact that this morning again (this time around 6:00) 1 update was done in domoticz...
Though, as it is dry for almost all day now, I would expect the 100% (10000) of wetness to have at least dropped a few % (100's of points)
When the sensor was just added to domoticz/deconz it went from 0 (in dry air) to 10000 (in wet soil), then dropped to 9700 and back to 10000 again after rain, so I looked like working at that moment, though as said, I actually expected him to drop again now....
Edit 6-7-2023 21:15: After removing the batteries and plugging them in again, the device triggered an update, as it went from 200cb (0 value) at start directly to 0cb (10000) in the next domoticz reading. So the device does something, though not what I would expect.
As can be seen in the API call I just did on the sensor:
{
"config": {
"battery": 90,
"offset": 0,
"on": true,
"reachable": true
},
"etag": "72dd15c52f807ba0e8c34f7a3f4e7dd4",
"lastannounced": "2023-07-05T00:02:24Z",
"lastseen": "2023-07-06T17:55Z",
"manufacturername": "_TZE200_myd45weu",
"modelid": "TS0601",
"name": "Moisture 20",
"state": {
"lastupdated": "2023-07-06T17:55:57.759",
"lowbattery": false,
"moisture": 10000
},
"swversion": "1.0.8",
"type": "ZHAMoisture",
"uniqueid": "a4:c1:38:58:c4:64:32:ad-01-0408"
}
The result is new (lastupdated is not from long ago).
I understood Domoticz only updates values once in 24 hours when the value itself doesn't change, which is in line with the fact that this morning again (this time around 6:00) 1 update was done in domoticz...
Though, as it is dry for almost all day now, I would expect the 100% (10000) of wetness to have at least dropped a few % (100's of points)
When the sensor was just added to domoticz/deconz it went from 0 (in dry air) to 10000 (in wet soil), then dropped to 9700 and back to 10000 again after rain, so I looked like working at that moment, though as said, I actually expected him to drop again now....
Edit 6-7-2023 21:15: After removing the batteries and plugging them in again, the device triggered an update, as it went from 200cb (0 value) at start directly to 0cb (10000) in the next domoticz reading. So the device does something, though not what I would expect.
-
- Posts: 815
- Joined: Wednesday 15 August 2018 14:38
- Target OS: -
- Domoticz version:
- Contact:
Re: Tuya soil temp/moisture sensor (TZE200_myd45weu) moisture reading stalls
Yep, values are too "extrem". I have see some negative return for this device, but some others can use it normaly.
Need to check if the problem is from deconz or the device.
If I remember you have access to the GUI ?
Need to check if the problem is from deconz or the device.
If I remember you have access to the GUI ?
-
- Posts: 13
- Joined: Monday 08 March 2021 15:07
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: The Netherlands
- Contact:
Re: Tuya soil temp/moisture sensor (TZE200_myd45weu) moisture reading stalls
Nope, I don't, I'm using the headless raspbian image, I can create the debug logging using the CLI params as needed.
Though if it would really make a big difference, I could (temporary) put my stick into a pi400 and install the GUI enabled version of deconz on that. Then I would be able to use the GUI, so if that would make sense...
Though if it would really make a big difference, I could (temporary) put my stick into a pi400 and install the GUI enabled version of deconz on that. Then I would be able to use the GUI, so if that would make sense...
-
- Posts: 815
- Joined: Wednesday 15 August 2018 14:38
- Target OS: -
- Domoticz version:
- Contact:
Re: Tuya soil temp/moisture sensor (TZE200_myd45weu) moisture reading stalls
I m asking for another sample on the github https://github.com/dresden-elektronik/d ... ssues/6731
But I don't think the device is talkative enought to see debug output "in live".
You can make a try with a water bottle.
Just enable logs with flag "info" (--dbg-info=1 on cli), you will see some logs like this one
It will be raw zigbee value from the device, without interpretation, so will be possible to see if we have more values.
But I don't think the device is talkative enought to see debug output "in live".
You can make a try with a water bottle.
Just enable logs with flag "info" (--dbg-info=1 on cli), you will see some logs like this one
Code: Select all
"TY_DATA_REORT: seq %u, dpid: 0x0003, type: 0x%02X, length: %u, val: %d\n"
-
- Posts: 13
- Joined: Monday 08 March 2021 15:07
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: The Netherlands
- Contact:
Re: Tuya soil temp/moisture sensor (TZE200_myd45weu) moisture reading stalls
I'll give it a try and will come back to you with the results.
-
- Posts: 13
- Joined: Monday 08 March 2021 15:07
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: The Netherlands
- Contact:
Re: Tuya soil temp/moisture sensor (TZE200_myd45weu) moisture reading stalls
Thorgal,
Just did some testing and it was quite interesting.
I started on Domoticz with the everlasting 0cb (superwet).
I went to grab the device for some testing and almost right after grabbing the device from the soil domoticz went straight to 200cb (dry as a desert).
So that sudden change as picked up and reported.
I then started deconz in debug mode and here are the results of the dutch jury
I dipped the sensor into water, which was picked up almost instant, logged to deconz info and changed in Domoticz to 0cb again.
After that picked it out of the water again and again, almost instant it went up to 200cb.
After that I put it back into the water, this time it wasn't picked up instantly, though after short pressing the button it did report it back to 6cb this time (I saw that before, so for some reason it thinks it's 97% wet.
Then again, picked it out and put it into a cactus standing by here which I put a little water in it for testing purposes and it reported 56cb, so it actually seems to be picking up correct numbers up as well then....
I restarted deconz as service, and brought the sensor back to my garden. It now went directly from 200 (dry) to 0 again (after putting it in the soil) and that's where it's at now.....
For some reason it almost looks like it is able to pick up big movements in moisture without any issue, though smaller changes (caused by a dry day after rain for instance) aren't picked up at all (even after a whole dry day it is just reporting 0cb every day (after it's 24 hour reporting interval).
And just in case: the device is closer to my stick at it's oficial position then the test position and I have multiple 220v power lights in that area as well, so signalling shouldn't be a problem here.
Just did some testing and it was quite interesting.
I started on Domoticz with the everlasting 0cb (superwet).
I went to grab the device for some testing and almost right after grabbing the device from the soil domoticz went straight to 200cb (dry as a desert).
So that sudden change as picked up and reported.
I then started deconz in debug mode and here are the results of the dutch jury
- Spoiler: show
I dipped the sensor into water, which was picked up almost instant, logged to deconz info and changed in Domoticz to 0cb again.
After that picked it out of the water again and again, almost instant it went up to 200cb.
After that I put it back into the water, this time it wasn't picked up instantly, though after short pressing the button it did report it back to 6cb this time (I saw that before, so for some reason it thinks it's 97% wet.
Then again, picked it out and put it into a cactus standing by here which I put a little water in it for testing purposes and it reported 56cb, so it actually seems to be picking up correct numbers up as well then....
I restarted deconz as service, and brought the sensor back to my garden. It now went directly from 200 (dry) to 0 again (after putting it in the soil) and that's where it's at now.....
For some reason it almost looks like it is able to pick up big movements in moisture without any issue, though smaller changes (caused by a dry day after rain for instance) aren't picked up at all (even after a whole dry day it is just reporting 0cb every day (after it's 24 hour reporting interval).
And just in case: the device is closer to my stick at it's oficial position then the test position and I have multiple 220v power lights in that area as well, so signalling shouldn't be a problem here.
-
- Posts: 815
- Joined: Wednesday 15 August 2018 14:38
- Target OS: -
- Domoticz version:
- Contact:
Re: Tuya soil temp/moisture sensor (TZE200_myd45weu) moisture reading stalls
Supposing you haven't 20 tuya device (haven't checked if logs are from the same one)
And no more value (the dutch jury have spoken), so 0, 100 , 72 and 97 %, converted to domoticz value : 200 , 0 , 56 and 6 %.
So exaclty the value you have see, and the device haven't send more.
IDK what to say, tuya device haven't report/bind for tuya cluster, all is native, and this device don't have a setting to change the sensibility https://www.zigbee2mqtt.io/devices/TS0601_soil.html
Code: Select all
09:17:47:892 TY_DATA_REPORT: seq 6, dpid: 0x03, type: 0x02, length: 4, val: 100
09:18:29:957 TY_DATA_REPORT: seq 10, dpid: 0x03, type: 0x02, length: 4, val: 0
09:18:52:018 TY_DATA_REPORT: seq 14, dpid: 0x03, type: 0x02, length: 4, val: 97
09:21:18:781 TY_DATA_REPORT: seq 26, dpid: 0x03, type: 0x02, length: 4, val: 72
So exaclty the value you have see, and the device haven't send more.
IDK what to say, tuya device haven't report/bind for tuya cluster, all is native, and this device don't have a setting to change the sensibility https://www.zigbee2mqtt.io/devices/TS0601_soil.html
-
- Posts: 13
- Joined: Monday 08 March 2021 15:07
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: The Netherlands
- Contact:
Re: Tuya soil temp/moisture sensor (TZE200_myd45weu) moisture reading stalls
So if I understand right, I'm stuck with a device that misbehaves in a way, although it is able to work as long as (as it seems now) the changes in value are super big (that probably will only be when given water from a situation when the device measures dry soil, but that will never happen in normal day life, right?
I'll see if I can test it for a longer time at my test location of yesterday, to see if it picks up smaller variation in there, which would puzzle me, but on the other hand, why not....
BY the way, I do own a couple of Tuya (based) devices, but they were not part of the test window
I'll see if I can test it for a longer time at my test location of yesterday, to see if it picks up smaller variation in there, which would puzzle me, but on the other hand, why not....
BY the way, I do own a couple of Tuya (based) devices, but they were not part of the test window
-
- Posts: 13
- Joined: Monday 08 March 2021 15:07
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: The Netherlands
- Contact:
Re: Tuya soil temp/moisture sensor (TZE200_myd45weu) moisture reading stalls
Before we dive any deeper into this.
I just did a testrun with the/a plant in my office, a cactus, which normally has quite dry soil.
It's the one that gave 56cb after a bunch of water.
Today I put in in the soil again and it gave me a much higher value (142), and after stabilizing a little below, I gave it another bit of water and again, it lowered till 82. So long story short, it seems just to be working here. What is the fact that causes multpile days of 0 (100% moisture) in a row then when it's outside......?
I have a theory: it might be the case that in the pot that I'm measuring, the moisture content is actually way above the content it classifies as 100% moisture, which causes it to report 0 for multiple days in a row, because the moisture saturation at the sensor depth is still > 100% measurement all the time. I will put it back and see what it does if all (automatic) hidrations are disabled for a few days and it really must get dryer (also at sensor depth).
Although I find it strange cause at the current weather (dry, sunny and windy) I would expect the level the change during the day, but let's see.
I just did a testrun with the/a plant in my office, a cactus, which normally has quite dry soil.
It's the one that gave 56cb after a bunch of water.
Today I put in in the soil again and it gave me a much higher value (142), and after stabilizing a little below, I gave it another bit of water and again, it lowered till 82. So long story short, it seems just to be working here. What is the fact that causes multpile days of 0 (100% moisture) in a row then when it's outside......?
I have a theory: it might be the case that in the pot that I'm measuring, the moisture content is actually way above the content it classifies as 100% moisture, which causes it to report 0 for multiple days in a row, because the moisture saturation at the sensor depth is still > 100% measurement all the time. I will put it back and see what it does if all (automatic) hidrations are disabled for a few days and it really must get dryer (also at sensor depth).
Although I find it strange cause at the current weather (dry, sunny and windy) I would expect the level the change during the day, but let's see.
-
- Posts: 815
- Joined: Wednesday 15 August 2018 14:38
- Target OS: -
- Domoticz version:
- Contact:
Re: Tuya soil temp/moisture sensor (TZE200_myd45weu) moisture reading stalls
Here you have a graph for this device from a z2m user https://github.com/dresden-elektronik/d ... 1629844479
Ha have more values, but bouncing one.
Ha have more values, but bouncing one.
-
- Posts: 13
- Joined: Monday 08 March 2021 15:07
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: The Netherlands
- Contact:
Re: Tuya soil temp/moisture sensor (TZE200_myd45weu) moisture reading stalls
Mine didn't even had that problem, this is mine from the last day, the first rampup is going from 0 to 200 when starting the test and as can be seen, after a shile I put it back into the outside soil again (an 0cb since), but the time doing the tests actually looks good.
I'll keep you posted about the progress.
I'll keep you posted about the progress.
Last edited by petervz on Friday 14 July 2023 8:13, edited 1 time in total.
-
- Posts: 13
- Joined: Monday 08 March 2021 15:07
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: The Netherlands
- Contact:
Re: Tuya soil temp/moisture sensor (TZE200_myd45weu) moisture reading stalls
All (en Thorgal),
I'm so sorry for keeping you busy in this "problem", now I found out there is no problem at all.
After transferring the sensor to another pot, it started displaying values and as can be seen in the attached picture, it responds perfectly during the day and the drop in dryness, is also clearly visible as at 6:00 the irrigation kicked in.
Thanks for you time!
Some advice for anyone looking for these kind of problems, probably the sensor is quite sensitive for moisture, so expect him to stay at 100% (or 0cb in Domoticz) for a long time, when it's wet, ony one measurement (displaying 0) per 24 hours in normal in that case.
I'm so sorry for keeping you busy in this "problem", now I found out there is no problem at all.
After transferring the sensor to another pot, it started displaying values and as can be seen in the attached picture, it responds perfectly during the day and the drop in dryness, is also clearly visible as at 6:00 the irrigation kicked in.
Thanks for you time!
Some advice for anyone looking for these kind of problems, probably the sensor is quite sensitive for moisture, so expect him to stay at 100% (or 0cb in Domoticz) for a long time, when it's wet, ony one measurement (displaying 0) per 24 hours in normal in that case.
-
- Posts: 815
- Joined: Wednesday 15 August 2018 14:38
- Target OS: -
- Domoticz version:
- Contact:
Re: Tuya soil temp/moisture sensor (TZE200_myd45weu) moisture reading stalls
Perhaps the moisture in ground don't work like humidity in air. There is probably a physical reaction with water in earth when you just put the water.
-
- Posts: 13
- Joined: Monday 08 March 2021 15:07
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: The Netherlands
- Contact:
Re: Tuya soil temp/moisture sensor (TZE200_myd45weu) moisture reading stalls
I have no clue how it works exactly, but now I am monitoring another pot, levels are being updated regularly and today I even managed to build a simple LUA script that monitors the cb values to start and stop irrigating and because of the now correct working, it really works like a charm.
Using these moisture sensors has a learning curve, but I expect it to be a steep one, so probably I'll manage to keep the plants in top condition without spending to much water.... Now we only need a dedicated sensor for every plant / tree
Using these moisture sensors has a learning curve, but I expect it to be a steep one, so probably I'll manage to keep the plants in top condition without spending to much water.... Now we only need a dedicated sensor for every plant / tree
Who is online
Users browsing this forum: No registered users and 1 guest