[OBSOLETE] Original & Aqara Xiaomi Zigbee Sensors (contact, temp, motion, button, outlet, leak, etc)

The sensor has a test mode, and during that time the hardware will detect new motion every 4-5 seconds. That’s what I meant by continuous.

In normal mode, when the sensor’s hardware detects motion, it is “blind” to motion detection for 60 seconds.

Sorry for the confusion, but I’m glad to hear it’s working for you.

I just updated the motion reset preferences text to have a better explanation, and the default is now 60, the same as the hardware. Feel free to grab the updated DTH code from the same link as I posted before.

Thanks!

1 Like

I guess I should have stated that I am using the Original Xiaomi T/H Sensor (Round one). After using the new DH all evening/night/morning, I like it. The battery is reporting about every hour. I have the T/H Sensor located in a bathroom with a shower so it updates at a pretty good rate since temp and humidity fluctuate a good bit in there. All seems good with that DH.
I like the “Today’s Humidity/Temp Hi/Low”, but only noticed that setting this morning.
The more I look at it the more I like that DH. So far, I don’t see anything I’d change about it.
Good job to all who worked on it and sorted things out along the way!
Thanks again!

I’ve just installed 4 original temp/humidity sensors using this device handler. It works really well. Thanks for the hard work creating it.

I’ve updated one to the upcoming handler. The centred display looks really good however “display temperature as an integer” isn’t working for me (though low/high temp/hum does). I’m still getting the decimal. Also, would it be possible to have temperature offset as a decimal please?

I am not seeing the decimal and have display as integer turned off. I am confused now. Maybe I will wait for the next report and see what happens.

Sorry, I’ve added an explanation in the preference page now:

That’s just the way this setting and the offsets work in both of the updated Temp/Humidity sensor DTHs - wait until the next report. I was able to get the high/low temperature and humidity display to change immediately on pressing save, however.

@C_S - Because these Xiaomi sensors are not scientific instruments and are not very accurate, I’m not sure how helpful a temperature offset with 0.1 precision will be, but I added that capability anyhow. :smile:

Download the updated test "original Xiaomi T/H sensor DTH from the same link as above - here.

Anyone interested in testing the upcoming updated Aqara T/H sensor DTH can grab it here.

1 Like

Hey - I didn’t complete a fix I had started on the battery level function of the code, and the code you grabbed won’t allow battery reports to show up, and displays an error in the live logging window.

I have finished that fix, and the battery reporting works great again. You can grab the fixed upcoming Aqara motion detector DTH from the same link as before - here.

Thanks again for testing it and letting me know how it’s working for you!

Well, thank you too for trying it out and letting us know how it’s working for you. As mentioned my above post, I made an update to the code to add an explanation how the “Display temp as integer” setting works, and changed the temp offset to allow decimal offset to be entered (for example -1.5).

@veeceeoh (Original Temp Humidity) May I please make a suggestion? The app page has the battery percentage next to the Humidity percentage. Just for aesthetics sake can you put a battery icon behind the number like humidity shows? Not a must, just looks nice.

It’s funny you should ask for that, because after I discovered SmartThings doesn’t provide their own battery icon to use, almost two weeks ago, I made custom battery and humidity icons, which looked great… on my iOS device.

Then I found out from @tmleafs that they did not display on his Android phone, and also the way that the SmartThings mobile app user interface presents icons in the iOS version is at a completely different size than on Android.

So I spent hours working on it, and then checking with @tmleafs, and everything I did would not display for him. He was able to save an image that he could display on his Android phone, but then I couldn’t fix it to look better and sized appropriately on iOS.

Really the problem here is that the SmartThings mobile app developer teams for the iOS and Android versions did not create the user interface in the same way. Besides the custom icon issues, also the text is different, large on one platform and small on the other, all capitals vs lower case. It’s really inconsistent, and kind of a mess.

So, anyhow, we’re still trying to make a custom battery icon that will look acceptable on both platforms. But it will be huge on Android and tiny on iOS. It will hopefully come in a later update.

OK thanks for the quick answer, the text drives me crazy sometimes. As I mentioned the gray on white is nuts.This is the icon I have used before.
index

Are you on iOS or Android?

IOS, but I remember I had to do something. This is the master image.

Keith…I’m getting an error when I try to create a DH with this code. I get:

Org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: script_dth_metadata_1c50fa53_fcb3_445a_aacb_8a194bc47ed1: 73: unexpected token: } @ line 73, column 9. } ^ 1 error

Can you please double check latest. Thanks.

Just a quick question on the modified DH’s.
Are they going to replace the bspranger ones or do we need to use the new repository that you are using.

They’ll update the bspranger repository once tested and approved.

1 Like

Thanks Alec.

It was an extra comma in the test Aqara motion sensor DTH that wasn’t supposed to be there, and has been fixed.

For anyone trying these soon-to-be-released updates, please remember they are still being tested, so although the code is considered “ready to test”, we’re making adjustments here and there, and so should be considered as “beta”.

The links I’ve been sharing to the grab the updated test DTH code are to what’s called a “Pull Request” which is how to manage an update to a repository before it has been tested. It is temporary, however, and when it’s decided the code is good to use by everyone, it gets “merged” (overwrites) into the main repository.

So when the new versions are ready for release we will definitely replace the bspranger/Xiaomi collection of device handlers with the updated code on GitHub, and make an announcement with a description of all fixes / improvements.

After that, the links to test code will not work anymore.

Fix worked for me. Thanks!

1 Like

I keep my house at 18 in the day and 19 at night. I guess British Columbia is like Scotland. We are all perfectly comfy :wink:

On the Aqara motion detector is there a way to set the sensitivity, it seems vary sensitive.