[Deprecated] Xiaomi / Aqara / Opple Drivers with Presence!

For Pairing

For the future

You Sir are a legend.
I can finally put that Opple button to proper use.

1 Like

Let me know how it goes :slight_smile: So far I'm the only one who has tested these drivers with those buttons since none of the beta testers had them. It should be rather easy and straight forward to get them working, but I'd be happy to know if there are problems that needs fixing.

It took a few goes pairing them to actually get them to be responsive.
Now all of the 30 events seem to be working.

1 Like

I can usually pair them in one try, but you usually have to press a button once when the message in the log asks for it. And it needs to be done quickly before the device leaves pairing mode.

It was more it took forever to actually pair and the time it work it was pretty quick.
I just realise my hub is running slow and needs a reboot so I'll blame that.

1 Like

@markus Jsut replaced the driver for my temp sensor and it works good. Thank you!
Is there any way you could make it so that the temp offset shows up under Run Custom Action in RM?

That way I could make a simple, not so accurate, temp calibration rule. :slight_smile:

How do you want that to work? The offset is applied to the next time a temperature is reported. If what you want is to have an offset which is different depending on the current value, you'd need a different filter, like a linear regression filter. In general you don't need anything more complex for simple temperature data than a filter like that. It's easy to implement, in fact I have a version written in Groovy, the issue is that entering the training data is never going to be "user friendly".

EDIT: Here is an example of how the training data could look like for W readings:

"0.0:1.14;62.06167:10.93;1503.27161:247.6;1599.81213:263.7;3923.67700:631.4;7109.50928:1148.0;7237.0857:1193.0;7426.71338:1217.0"

I actually just need the offset to be 13 when the temp is above 50C and then back to 0 when below 40 again.

It’s because when the temp gets higher the the sensors spec, which is 60C, it shows a wrong value. It’s not important that it’s 100% accurate since I only use it for a notification when the temp is above 70.
I could leave the offset on 13 all the time but it’s nice to be able to see the normal room temp in the sauna from time to time also.

If that is all you want? May I suggest that you create a virtual temperature sensor and just set up rules to do exactly that.
If you change the offset from outside the driver and then go below 50, then when do you know that it really has gone down below 50 again? It would make for easier logic in RM to just read the value from your actual temperature device, then set the temperature of a virtual device based on the input value from this one and applying your offset.

@markus

Very nice job! I especially like the addition of Presence capability - it provides a really simple way to keep track of Mijia/Aqara devices in Node-RED.

5 Likes

@markus, I freaking love these drivers!

Thank you so much for the additional stuff, and helping me keep mine connected :+1:

3 Likes

Yes, that was my thought, there are many easy ways to track Presence. The hope is that these drivers will also make it MUCH less likely you actually encounter issues.

Thank you for testing them :slight_smile:

2 Likes

Brilliant idea! I hope other developers consider your approach. My congratulations and thanks again.

1 Like

I really would like to have a dedicated capability for this, that would be even nicer. Presence will have to do for now :slight_smile:

3 Likes

That is true for me too.
I'm very lazy and I was forced to write groovy xiaomi drivers by the lack of smart light sensor driver. It was my first , and I changed it a lot since the first version. After that I continued to write for my own fun although the available drivers were ok for me. I discovered a lot, and I'm still continuing.
I found the markus drivers excellent, and I can imagine he uses a custom generator/version manager to mantain them. That is also the way I would have done (and I'm doing).
Thanks Markus.

Any news about veeceeoh? Did he leave HE platform?

1 Like

Glad you like them :slight_smile: I hope they will be useful.

I am, I've written one to handle my drivers and manage all parts they share. Without automatic code-reuse these drivers would quickly become hard to maintain. The code for this is on my github, but there is no documentation...

I would also like to know, there was someone who told me there was a Tweet or Instagram picture posted by him in mid April, but in general he seems to not even be online anymore.

1 Like

@markus I will look into using a virtual temp sensor. Good idea!

The below 50 is just for resetting the offset once it has first reached 70. Doesn’t matter if it’s 60, 50 or 40 really.

Temp and Humidity driver seems to be working good so far. I like the new options and layout in the device page.

Any plans to do other devices like the vibration sensor or magic cube?

1 Like