Aqara - motion sensor

Hello everyone, I may have a silly question.

I have a Gladys installation running on a Raspberry Pi 4, mainly with Zigbee devices.

I recently bought some Aqara motion sensors. They show up without any problem in Gladys, however they do not show up in my HomeKit, even though all the other accessories are present.

I’ve performed updates, restarts, etc…

Does anyone have any idea?

Hi @gsr_oyo, I don’t think we support motion sensors in HomeKit!

@bertrandda if you happen to drop by :slight_smile:

I confirm. List of devices available on HomeKit:

  • lights (on/off, color, color temperature, brightness)
  • outlets (on/off)
  • temperature sensor (temperature)
  • contact sensor (open/closed)
2 Likes

Thank you for the information.
Do you think these devices will be added to HomeKit in the near future?

Want to know whether I should set everything up directly on Gladys :wink:

Thanks for your replies

Very hard to say — originally it’s @bertrandda who maintains this integration but I haven’t seen him on the forum since this summer :stuck_out_tongue: Anyway, anyone can contribute, it’s open-source… :slight_smile:

Create a feature request to keep a record of the request!

It’s done :wink:

Thanks for the advice :wink:

1 Like

Hi, I’ll try to take care of it quickly. I have a PR in progress on HomeKit, I can add it with the rest

1 Like

I started something here if you want to take a look GitHub - cicoub13/Gladys at feat-homekit-motion-sensor

2 Likes

Thank you very much :wink: you’re awesome!

Thanks @cicoub13, what you did looks good to me. However, the PR already in progress optimizes the HomeKit process quite a bit and integrating new devices is much easier (1 line in the buildService file, 1 line in the sendState file + device mapping). What I can propose is that we try to merge the first PR and then you take care of adding the motion sensor in the new way. Otherwise you can merge your PR — I’ll rebase mine and make the changes to that sensor accordingly, whichever you prefer.

1 Like

That works for me if your PR is soon ready to be merged :+1:

2 Likes

Hi @cicoub13, the PR has been merged — you can take care of the motion sensor. If you need help, don’t hesitate; I can explain the changes that took place.

1 Like

The PR is here feat(homekit): Add motion sensors by cicoub13 · Pull Request #1914 · GladysAssistant/Gladys · GitHub

The Docker image is here (from 11 PM :snail:) : docker pull cicoub13/gladys:homekit-motion-sensor

I’m testing with real devices tomorrow

1 Like

Hello everyone. Maybe a silly question, but what should I do if I want to test this image?
Do I start a new Docker container?
Is there a risk it will conflict with the other Zigbee containers already in place?
Or is it better to try it on a new SD card?

@pierre-gilles had made a tutorial: Tutoriel: Lancer une image Docker de test

2 Likes

Thanks a lot, I’ll test that this weekend, I think :wink:

Okay, I tested and it doesn’t work :frowning:
I tried converting the last_value to Boolean, inverting it, nothing helps.
On the iPad, no change is propagated (whereas on Gladys and in the logs, it is).

I put console.log everywhere and I don’t see where the problem is coming from :thinking:

Is your sensor visible on the HomeKit network? Is it just the value that isn’t changing?
This weekend I’ll pick up your PR and test with virtual devices to help you

1 Like

That’s it. Visible but no change. I reset HomeKit, same.

@cicoub13 do you have the logs with all your console.log statements?