I was searching around for tips on adding and updating the Ikea Shortcut button ( E1812) using zigbee2mqtt and while I found bits here and there, I couldn’t find a one-stop shop. So I thought I’d offer a dummies guide for people like me.
I have the Sonoff USB Dongle and it was already up and running with some other Zigbee gear.
-
Pairing was fairly simple after putting the battery in. It requires 4 quick presses of the button inside the battery compartment. While I have read it is 4 in 5 seconds, I found it would not go into pairing mode unless the presses were done in less than 1.5 seconds. The red light on the edge of the compartment will flash if you get the timing right.
-
Then after clicking the “Permit Join” option up the top of the Zigbee2mqtt page in HA, it’s a wait. I found I had to 4-click the button a couple of times before the interrogation/handshake began.
-
Initially mine came up a partial pairing and said it was unsupported. Be patient. It can take a couple of minutes for all the protocols to be sorted out and then it will show the IEEE address, manufacturer, model, etc. Click the little blue pencil & pad symbol on the right to change the name to something friendly and if you want that to show up in HA.
-
Now to the firmware update (OTA) Select OTA from the menu at the top. In the search criteria put the friendly name. (I used the IEEE and nothing came up.) It might take a while for the button to be checked, so it might not show up initially.
-
In the meantime, it is useful to expose the update sensors. There are two - update-available and update_state. I found the battery_condition and link_quality were also disabled. (You expose those by going to configuration/entities and search for the friendly name: eg: Ikea Button - enable the one you want)
-
Have a look at the state (in Developer Tools) of the “update_available” sensor and it should tell you whether an update is ready.
-
Go back to zigbee2mqtt and select OTA - hopefully it has by now recognised the button has an update. Click on the physical button to make sure it is awake and then you should be able to click on the option to download the firmware (BTW - make sure the battery sensor is showing 100% - this is power hungry)
-
Nothing will happen for a couple of minutes so don’t copy me and start clicking on things. It just stops the process.
-
Check the log - you can search for the button friendly name and when something starts happening, it will give you updates every couple of minutes. The OTA page will eventually do the same. You can also see the state change of the update sensor on the Developer page
-
Mine took two and a half hours, so go and have lunch, dinner, a holiday. The log and Developer Tools (state) page will give you a percentage process and the number of minutes left. The OTA page gives the progress in a more user friendly hours and minutes.
-
When it gets to 100%, it will fluff around for another minute or two, but should then settle down and give you info. BTW, you will need to click the button in the various options to expose their states - ie -1-click, double-click and hold/release. When mine first updated, it was missing states. The best place to check is the log. Trying to check in the State or “Exposes” will be confusing because it sends a null string immediately after the click, so it looks like it has done nothing.