-
Notifications
You must be signed in to change notification settings - Fork 638
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
[Device Support Request] MoesHouse Presence sensor #1645
Comments
Can you try to add the device to the If you are not familiar, there are some guides about it. Maybe the most popular can be: You will need to copy the Add your manufacturer in the MODELS_INFO: [
("_TZE200_ar0slwnd", "TS0601"),
("_TZE200_ikvncluo", "TS0601"),
("_TZE200_sfiy5tfs", "TS0601"),
("_TZE200_mrf6vtua", "TS0601"),
("_TZE200_ztc6ggyl", "TS0601"),
], Save & restart. Then check if device signature changes, that would mean that the device loads the quirk. |
If the quirk is working, do you mind to create the PR to add your device to the mainstream? Just edit from the web the file content with the detected changes and follow the instructions:
|
This has been added in another issue: However it really needs to be improved such that the GUI has control of the device settings rather than only providing the two sensor entities. |
Looking at the default values of the MmwRadarManufCluster I can see the following: |
Hello I connected the presence sensor ("_TZE200_ikvncluo") back via the SmartLife app to get the dp_id values from Tuya IOT. This is the resulting debugging decode: If someone could take these to make a configurable quirk for the "_TZE200_ikvncluo" that would be awesome. I'm not sure this is 100% correct from Tuya IOT - also no info on Lux levels for example. Note the example dp_4 is the maximum distance value and as reported by @sparkydave1981 above the value of 600 is for the default value of 6 meters. And dp_3 is the minimum distance and if you wanted that to be 1 meter you would have to enter 100. According to the product specs the max detect range is 6 meters, but the Tuya IOT and SmartLife app allows for a value up to 9.5 meters (950). Could the units be set to "cm" (centimeters) to match the device values? { screenshot from the SmartLife App showing the configurable options for the device: |
The second question i think its depending of the unit you have configurated is ZHA selecting the type. For the first one is HA adding its deom the class and its not possible adding any extra information. PS: Nice have you back !!!! |
Have investigated this. It doesn't depend on unit, only on number of "steps". If the number of "steps" is more than 256 it will be edit box. |
So its with people that cant read code and only speculating ;-(( |
This comment was marked as resolved.
This comment was marked as resolved.
Hi @vietpv89, according to your screenshot, my code is not used. It seems like your ZHA still use file modified as mentioned in #1645 (comment) Name of the class in my code TuyaMmwRadarOccupancy. Recheck please content of ts0601_motion.py file. |
Also delete the |
@vietpv89 Do you have any new response? |
Any update on this quirk? I'm wanting to try and get the sensor to switch back to "clear" faster after motion stops. Is that ID: 0x0021 ? |
I would say that is the DP_102 (fading time or hold time) |
That would be the 'standar' value, but nobody has verified or tested which DP is using Tuya, and nobody has mapped the DP to that attribute. |
You must edit the "Value" value and leave empty the "Manufacturer Code Override". To check, just push the "get zigbee attribute". If value don't change, the debug logs will be needed. |
Yep, so that's what I initially tried but it still says '600' which is the default value. How do I get the debug logs? what would I be looking for in the logs? |
Take a look here:
Once enabled, look at the logs when you try to update the value. Call the command several times to be able to identify the generated logs and post it here. |
With those debug settings my log gets spammed so hard it's impossible to do much at all! I had a 2GB log in a matter of 16 hours or so... |
Any update on this? Sending values via the device "manage zigbee device" UI doesn't seem to actually update the device for me. (I haven't tried your quirk as yet as I'm not entirely sure how.... I have an existing quirk that was used to get the device working to it's current level) |
Yes, I've updated version. It looks like TuyaAttributesCluster from zhaquirks.tuya.mcu doesn't support float values, so I've changed all settings to int. So, delays measured now in milisecons and ranges in centimeters. I'ts a bit ugly but works. I also has problem with Illuminance, I not sure in conversation formula, but it may be a defect of mine sensor. Here is my current code:
|
Thank you. How would I add this to my HA setup? When I first got these sensors I added a custom quirk called ts0601_motion.py in order to get a working sensor with just the basic two entities. Would I add your code as a new file? |
Not sure how much of this is related but I see a bunch of mmWave stuff in there...
|
Just remove ts0601_motion.py, since it overwrites file from zhaquirks package, and create new file ts0601_radar.py with content of my code. |
Thanks for the confirmation @KevinVanthuyne. After updating to the the latest version of HA, removing all quirks and devices, restarting my hardware and repairing every sensor, everything started to work again. This is weird though. |
@PlusPlus-ua My sensor is working but all the configuration sliders show unavailable now so cannot be adjusted which is weird. I tried removing and adding again using your quirk as I was before but now the configuration sliders have just disappeared completely. Ignore me it seems that my HA stopped using your quirk in the last update and defaulted to the tuya mmwave quick I edited your quirk with tje device info as someone suggested above and now its all back sorry if I bothered you. |
I haven't been able to get this code working, seems I cant have a custom quirk for a device that is already "integrated" into ZHA. |
Because you need to add that device signature to it. I have same model use this, also remember to delete the pycache in the custom quirks folder then restart HA.
|
That did the trick, thank you! |
I've added the quirk code mentioned here to a specific file: As far as I can tell the file is loaded fine (I made sure to delete that folder's pycache folder as well when present before restarting HA), and I get this device info and entities: Although it is mostly working, there are some missing entities; when comparing to this Zigbee2MQTT listing, these aren't available, being the first one kind of important to create some automations:
Beside this, and as visible in the screenshot above, the illuminance sensor doesn't return a correct measurement. Regardless of the light intensity in the room the measured value is 2 lx. Can these be fixed? Additional screenshots: |
Quirk works great. with _TZE200_holel4dk for the Moes unit I have. Thanks to all for the work on this. |
I get this error message after reloading the config,
|
The original code stopped working for me with 2023.3.0, |
Thank you @rabin-io for sharing your updated code. I had the same error after updating to 2023.3.0 and took out all my Zigbee devices. Working perfect again now, thank you. |
@PlusPlus-ua I'm working with your code for more than a month, and I found it to be stable and usable, is there any PR to marge your code to the main branch? |
After upgrading my Home Assistant from 2023.2.5 to 2023.3.3 I had an error in HA due to this ZHA quirk and the only way to get HA to load the ZHA integration was to remove this quirk, but now these sensors do not work. Anyone else have this problem? |
Future HA versions (likely 2022.3.4 or 2022.3.5) won't crash your ZHA instance anymore if you have a bad custom quirk. Take a look at the link sent by rabin-io. It looks like that custom quirk should work on the latest releases. Also, PRs of custom quirks are welcome. |
Thank you! I really should have looked at the recent comments to see this before I posted. EDIT: I have restarted HA with the code provided above but my sensors are still unavailable. (at the least the quirk didn't crash ZHA on startup) Any ideas? |
Hello @rabin-io is it possible to include this device signature: ("_TZE200_ikvncluo", "TS0601"), That's a Moes Prescence Sensor and I can confirm this code works. Just not sure how to merge it into your code for others to use. |
Thank you rabin-io, this now works for me (the devices in the OP). Much appreciated mate. Are you going to create a PR to get this merged into core ZHA? |
I'm not the original author of the code, I'm just using it same as you, I can open a PR for it, but I think it should come from @PlusPlus-ua which I think is the original author. |
Hi, Sorry guys, I'm a bit out of context now. @rabin-io - your version works like a charm on two of my sensors. My old code has problem with _TZE204_ztc6ggyl one, you - not. Please open PR, you have polished my code, add me as co-author if you like. |
Thanks @PlusPlus-ua , A PR was opened. |
Hi, I managed to get it working by changing this line:
With this change it provides controls and both illuminance and presence sensing. |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions. |
This quirk also seems to (mostly) work with TS0601 by _TZE204_clrdrnya with some caveats:
|
Is your feature request related to a problem? Please describe.
Device support
Describe the solution you'd like
Please provide support for MoesHouse (Tuya) Zigbee Presence Sensor
Device signature
Diagnostic information
Additional logs
Additional context
![image](https://user-images.githubusercontent.com/7628509/177681280-47b5bf2c-02d8-4983-8a61-44bf3cb2165f.png)
The text was updated successfully, but these errors were encountered: