Adventures in Hoomekit: The Shelly Button

The Shelly Button is exactly the kind of nightmare that I had hoped to avoid in Homekit. On paper, it seems remarkably simple and straight-forward: a small Wi-Fi enabled device that doesn’t try to do too much. In theory, when you press the button, it should connect to a URL.

After several hours of effort, I have not yet gotten it to work. It’s at that horrible point where everything should be working correctly, but nothing _is actually working. I mostly wanted to set this up via the built-in web server. At first, it seemed very simple and straight-forward: I got it on my home network, and set up to hit a simple Python HTTP server on my Mac. Nothing happens.

I try to get it associated with the app, and that is a repeat: things appear to work, but don’t. The app can see the button, but I can’t add it to my list of devices. I struggle with this for two nights and several hours, before almost giving up.

In the joys of real-time blogging, things seem to have magically fixed themselves: the button is now a real device in the Shelly App, and pressing the button registers an HTTP call in my simple server. Now that this works, let me see about getting this to talk to HomeBridge.

In the end, it was fairly easy to set up. There are a few things that may trip you up:

  • There are two Shelly Homebridge plug-ins: “homebridge-shelly-switch,” and “homebridge-shelly.” For the Shelly Button you want the plain “homebridge-shelly” plugin, not the “Switch” plug-in.

  • If you want to use the button as a doorbell (my use case), the “homebridge-fake-doorbell” seems to make everything work the way I want it to. However, I don’t know (yet) what happens if you are playing music when the doorbell rings.

Updated: