Switches not appearing in HomeKit

Hi there,

I added a IKEA Tradfri ON/OFF Switch and a Senic Friends of Hue Smart Switch. They are both compatible with Zigbee2MQTT and have been successfully paired.

Unfortunately, they are not shown in Apple Home. Lights do appear there though, so it’s not about a general issue with the HomeKit integration.

I suppose the Tradfri switch should work since it’s an ordinary two-state switch. But for some reason it doesn’t.

Regarding the Senic switch, since this is a switch with four states (on_1, on_2, off_1, off_2), I think this is not compatible with Gladys yet?

Best,
Patrick

Hey!

I don’t think we support those switch in the Homekit integration! But it can be added if requested :slight_smile: What would be the use case here?

I think there might be a translation issue in the documentation, compatible devices are listed here:

By “switch” we mean “power plug” :smiley:

Yes I don’t think it’s compatible with Gladys yet, but it could be added.

Do you have developer knowledge / want to contribute (In that case I can point you how to get started), or you can create a “feature request” on this forum to ask for this feature :slight_smile:

Thanks!

The use case for these switches (or buttons :smiley:) would be to provide a physical device to turn lights on and off. Especially the Senic switches look like a normal wall switch which is pretty neat.

I do have developer knowledge but not sure if it’s too rusty :wink:. I think I would like to try!

I was asking more about the use case of having those buttons in Homekit :slight_smile:

Sure!

We have a developer documentation, you can setup a development env:

or

Then, the best way to learn more about how we work on Gladys would be to look into an existing pull request on Github working on Zigbee2mqtt:

Example:

Don’t hesitate if you have any questions, and if you struggle we can help you anytime :slight_smile:

Right, sorry :sweat:

I have Apple HomeKit devices that are directly connected to an Apple HomePod. I would like to control these with my Zigbee buttons. Also, I use Apple Home as my central Smart Home application and like if all devices and accessories are combined there.

Thanks, that’s straightforward.

But how do I get the Gladys Zigbee2Mqtt integration working locally for testing? Since Gladys needs to be running on Docker for this to work I can’t follow the instructions you linked, right?

I tried to “Reopen in Container” using VS Code which seems to work but when I then try to open http://localhost:1444 the page doesn’t load (“endless loading”). Again, outside of a Docker container this works fine.

Is there something I’m missing? (I’m using macOS)

You can’t ! ^^

I usually hack around by starting the Zigbee2mqtt repo locally (outside Docker, just as a plain Node program):

And then in Gladys I modify the variables in the database (t_variable table) to tell the Z2M integration to speak to a local MQTT broker.

If you don’t succeed in doing that, you don’t necessarily have to make it work locally.

You can make a PR, build a Docker image and try the docker image on your linux installation.