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

Help writing groovy device driver #28

Open
AutomateMyLifee opened this issue Jun 24, 2021 · 3 comments
Open

Help writing groovy device driver #28

AutomateMyLifee opened this issue Jun 24, 2021 · 3 comments

Comments

@AutomateMyLifee
Copy link

I'm trying to get this sensor working with the Smartthings/Hubitat platform. It paired easily to the hub, but I had to create my own driver. So far I have the sensors accurately reporting battery and values from BME280 (temp, humid, and pressure), but I can't get the sensor to send the correct values for the soil moisture. These are the commands I sent to configure the device so it sends data.
Screenshot from 2021-06-23 18-43-03
But the soil cluster (0408) is sending the attribute 0201 instead of 0000. I had it reporting the soil moisture at one point, but I must be sending the wrong config because now it stopped sending the correct value. I checked all source code best I could, but I don't really have experience with ZigBee firmware. What am I doing wrong with the config command?
Screenshot from 2021-06-23 18-59-20

@bojanpotocnik
Copy link

I think the problem may actually be in the SmartThings/Hubitat.

All working clusters IDs are defines from zcl.h, that is standard ZCL General Clusters or ZCL Measurement & Sensing Clusters (there is also a reference to the same ZCL standard on the SmartThings page).

SOIL_HUMIDITY cluster is not part of the ZCL v7 specification, that is why its ID is the only one manually typed in source, instead of using define from zcl.h. Consequently it is also not present within SmartThings Capabilities.

ZigBee Cluster Library Specification:

  • For BME, 0x0405 Relative Humidity Measurement - 0x0000 MeasuredValue (4.7.2.2.1) is used
  • For soil moisture, nonexistent cluster 0x0408 Soil Humidity Measurement? - Relative Humidity in % - 0x0200-0xFFFE Vendor defined (3.14.11.19.1.2) is used

So the behaviour is correct and per-specs: because Soil Humidity is not yet supported in the Zigbee standard, author chose vendor defined Relative Humidity type 0x0201 out of range 0x0200-0xFFFE for vendor defined types.

@bojanpotocnik
Copy link

@AutomateMyLifee try with the new release 2.1.0, if there will be any difference.

@AutomateMyLifee
Copy link
Author

I haven't found any more success. The new firmware give the same behavior, except there is some warning about the endpoint 2. So you are saying that the value from cluster 0x0408 and attribute 0x0201 should give soil humidity? I tried putting the sensor in water and in air and this value stays basically the same. Isn't it in the source code that the attribute should MeasuredValue, which is 0x0000?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants