Skip to content
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

For newly added TS0601_soil TuYa Soil sensor: expose soil_moisture instead of humidity #15946

Closed
f0gster opened this issue Jan 4, 2023 · 10 comments
Labels
problem Something isn't working

Comments

@f0gster
Copy link

f0gster commented Jan 4, 2023

What happened?

1st of, thanks for adding TS0601_soil TuYa Soil sensor.
I have the device, so I played with an external converter before 1.29. It was awfully similar to your added code, apart of one thing: I'm suggesting changing humidity, that you are currently exposing, to soil_moisture.

All existing soil sensors are exposing soil_moisture (some also humidity on top of that).
TuYa Soil sensor is clearly not sending air humidity - that is easy to check. When I have a sensor in the air (not in soil), for example just near me, it will send 0. Obviously, air humidity is not 0 (all other sensors exposing humidity will show something different).

Hope it makes sense to you.

What did you expect to happen?

Expose soil_moisture

How to reproduce it (minimal and precise)

No response

Zigbee2MQTT version

1.29.0

Adapter firmware version

20221102

Adapter

Sonoff Zigbee 3.0 USB Dongle Plus CC2652P

Debug log

No response

@f0gster f0gster added the problem Something isn't working label Jan 4, 2023
@Koenkk
Copy link
Owner

Koenkk commented Jan 5, 2023

@kris969 @cloudbr34k84 what do you think?

@cloudbr34k84
Copy link

@kris969 @cloudbr34k84 what do you think?
I'm not fussed, makes sense tbh, but doesn't bother me either way

@kris969
Copy link

kris969 commented Jan 5, 2023

I have no idea yet on how it's reported on other soil sensors...
Anyway it could make sense.

The exact is description is: Tuya Zigbee Wireless Soil Moisture Meter Temperature Humidity, so base on this everything is possible!

A suggestion should be to expose both soil_moisture and humidity with, of course, the same report value. This way, everyone will be ok, and existing usages will not be impacted.
But, @Koenkk I don't know if it will be tricky for you to do this?

@f0gster
Copy link
Author

f0gster commented Jan 5, 2023

My point/idea (reason for this report) is that reported data should be consistent.
Imagine you have a few outdoor (air) humidity sensors. You might want to aggregate on humidity. You won't be able to do that easily now with TS0601_soil, because the humidity it reports now has nothing to do with air humidity.
The same about soil moisture - imagine you have a few sensors across your garden (I do have 2 now to experiment with) and would like to get an aggregate state of moisture in the soil. You could not get an average of soil_moisture as TS0601_soil reports it as humidity.
All this is not super crucial, of course. Sure I can get the data I need and do whatever with it - it will just require more manual actions (more code).

Again, air humidity and humidity of soil (soil_moisture) are not the same. You may have wet soil and dry air or another way around... This sensor report only one of these two values, which is the humidity of the soil.

@kris969
Copy link

kris969 commented Jan 5, 2023

@f0gster : I agree!

@Koenkk
Copy link
Owner

Koenkk commented Jan 6, 2023

Done!

Changes will be available in the dev branch in a few hours from now. (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html)

Koenkk added a commit to Koenkk/zigbee-herdsman-converters that referenced this issue Jan 6, 2023
@Koenkk Koenkk closed this as completed Jan 6, 2023
@kris969
Copy link

kris969 commented Jan 10, 2023 via email

@kris969
Copy link

kris969 commented Feb 10, 2024

I use this channel to address this comment to soil sensor'users.
This comment is not relative to an z2m issue, but only talk about a sensor issue.
It concern battery drain with such sensor that should last more than one year, in reality after around 3 months batteries are low. I'm not sure the sensor use the hibernate mode and I notice it send report values every minutes that is really to much. I tried to find a new firmware for this device but I have found none.
Did someone has found a fix or a workaround to this sensor issues?

here are information reportes by z2m:
"manufacturerID": 4417
"hardwareVersion": 1
"applicationVersion": 72
"dateCode": ""
"stackVersion": 0
"zclVersion": 3

@Hellingajes
Copy link

Hello, I got the new version of this device, they said the battery issue is fixed with this version. After switching z2m to dev branch I was able to pair it succesfully, however, the states are not reporting, only lqi, the rest says: null
What can I do to fix it?

@Hellingajes
Copy link

Hello, I got the new version of this device, they said the battery issue is fixed with this version. After switching z2m to dev branch I was able to pair it succesfully, however, the states are not reporting, only lqi, the rest says: null What can I do to fix it?

After a few days, it fixed it self!
Perhaps a reminder to move this device to main branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants