[RELEASE] Xiaomi Aqara Mijia Sensors and Switches Driver

Seeing some debug logs with debut logging disabled. I had a quick look at the code, but cannot find any apparent cause... Though I am not a developer, so what would be apparent to some is not to me.

Is there a way to disable these?

Driver version:
Xiaomi Aqara Mijia Sensors and Switches v0.13

Hhmmm. That's strange.
I'm using this driver for a few devices and I'm not seeing this.
Maybe try enabling, refresh/configure, then disable and refresh/configure for device 4393.

1 Like

Great idea! Will give that a try. Will also enable/save and disable/save logging in case it makes a difference.

2 Likes

Let me know if hitting it with a hammer works or not :wink:

1 Like

Lol. The sensor or the hub? :rofl:

Well, I haven’t seen any more logging since, so I will conclude that your solution worked! Thanks again!

2 Likes

Try to hit configure on those devices.

2 Likes

That is most likely a leftover scheduled job from a different driver. Doing as @igor.lehotan says should resolve it.

2 Likes

Does this driver work with the 1 second hack?

Do you mean the 5 second motion sensor hack? That is a hardware modification, and should be totally driver independent.

2 Likes

Yes that's the one but it seems to revert

@chirpy
Question about moisture sensors. I have quite a few Aqara but when they stop reporting the driver remains stuck on "present" so the Device Activity app never reports anything wrong. Is the just a quirk or a known issue?
Here's an example, still present today as are others that haven't had events in over 3 weeks.

Name Value Unit Description Text Source Type Date
voltage 3.01 volts DEVICE 2021-03-13 07:11:04.193 PST
battery 100 % DEVICE 2021-03-13 07:11:04.192 PST
voltage 3.00 volts DEVICE 2021-03-13 06:20:51.854 PST

Current States

  • battery : 100
  • presence : present
  • voltage : 3.01
  • water : dry

That would suggest that the scheduled job is missing. If you look at the device page there ought to be a " Scheduled Jobs" entry at the bottom for "presenceTracker". If it is not there, it's been removed somehow. To resurrect the presence check, hit "Configure" and then refresh the page and you should see the job scheduled at the bottom of the page.

Edit: The only thing I can think of at the moment as to why that job might be missing is if it was scheduled during recent day time savings.

I have re-associated all of them and hit Config. We'll see what happens.
There are no scheduled jobs on any of the devices. It's set to the default 12 hours.
I set one to 24 hours and a job appeared but it says "once"

Scheduled Jobs
Handler Next Run Time Prev Run Time Status Schedule
presenceTracker 2021-04-09 16:28:45 PDT PENDING Once

I'm going to release a new version of the driver shortly which should improve the Presence system.

I've just release v0.14

Improvements to Presence detection - You should check each device and hit 
Configure to ensure each device has the presenceTracker job schedules
Changed from BETA to RELEASE
3 Likes

Thank you @chirpy for providing this driver to HE community, great work!

I am happy to share that this driver works also with a brightness/illuminance sensor produced by different Chinese companies as "Powered By TUYA" :slight_smile: . It is also referred to as ' Tuya ZigBee Smart Light Sensor Wireless Brightness Sensor Intelligent Lighting Detector' in AliExpress.

  • endpointId: 01
  • application: 44
  • manufacturer: _TYZB01_4mdqxxnn
  • model: TS0222
  • softwareBuild:
  • inClusters: 0000,0400,0001,0500
  • outClusters: 0019,000A
  • driver: v0.8.2.0914b
1 Like

I'm glad it's working for you. I'll have a look at including a signature for it.

1 Like

I had an issue with some of my Xiaomi sensors not reporting present when they were actually present (they would report the status correctly while stating “not present”)

I did a configure / refresh on those sensors yesterday and still today they incorrectly reported the “not present” when the state changes would be reflected.

To resolve this, I found that disabling “Enable Presence Detection”, saving and then enabling “Enable Presence Detection” and saving preferences worked. After doing this, the sensors reported “Present” once the state changed.

I also did find that one of my sensors reported “Present” but wouldn’t report state changes... I did the same on that one after I re-discovered it on the network. Not sure if it will make a difference or not though - time will tell!

Had you upgraded to the latest release of the driver that I pushed out yesterday as this has several improvements to the Presence code?