It feels like I have been bitch... complaining too much lately. So here is a pleasant change of pace. I got hold of Zigbee gear from IKEA just before the holidays. Here is how I added an IKEA Trådfri shortcut button type E1812 into our Domoticz based home automation system via a Sonoff Zigbee Bridge running Zigbee2Tasmota.
Table of Content
- The Simplest IKEA Trådfri Button
- Sorry to Say, It's Discontinued
- Pairing Mode
- Pairing with Zigbee2Tasmota on the Sonoff ZBBbridge
- Zigbee Messages from the Trådfri Shortcut Button
- Tasmota Rules for Converting Zigbee Messages to MQTT Messages
- Updating the Trådfri Shortcut Button Firmware - Not Yet
- Looking at Battery Usage
- Conclusion
The Simplest IKEA Trådfri Button
For more than a year, I had been contemplating the purchase of an air quality sensor from IKEA. The upcoming holidays provided an excuse to purchase a couple of these "hackable" devices as a modest gift for myself. The IKEA Web site also advertised Trådfri shortcut buttons at a very low price. There was not much information about these on the site, but there were links to two PDF files. One is the typical IKEA instruction manual with cryptic pictograms about changing the battery, changing the image under the transparent top cover of the switch, and an inordinate number of textless images about affixing the switch. The other had actual text repeating the warning on the Web site: the "button works only in conjunction with a TRÅDFRI gateway". There was no question of adding a Dirigera hub to our system, but since the button was a Zigbee device, there was a chance that it would work.
With uncharacteristic haste, I quickly searched the Web to see if the shortcut button was compatible with my "Tasmotized" Sonoff Zigbee Bridge. I could not find a definitive answer, but the Tradfri Shortcut Button page in the Blakadder Zigbee Device Compatibility Repository was encouraging. It does not confirm compatibility with Zigbee2Tasmota
(Z2T) on the Sonoff Zigbee Bridge, but it states that the button is compatible with Zigbee2MQTT
which "inspired" Z2T
. Furthermore, the button is said to be compatible with Zigbee For Domoticz
which uses the bellows
library to support Silicon Labs EFR32 Zigbee radios as found in the Sonoff Zigbee Bridge. The library's Hardware requirement specifically says that it will work with the ITEAD Sonoff ZBBridge flashed with Tasmota firmware and EmberZNet firmware (in other words with Z2T
).
I was not too sure what to make of the brightness stop
and brightness up/down
actions, but the on
action probably meant that it could be used to toggle Domoticz devices or groups off and on or to trigger scenes much like the Sonoff SNZB-01 Zigbee button already in use in my spouse's office. Furthermore, it has physical attributes that make it very useful. Like the Aqara Opple smart switches, it has a magnet in its base which fits in an included metal base plate that can be screwed to a wall, side of a cupboard, or the underside of a table or desktop. There's also a double-sided tape pad to avoid making holes if desired. A removable transparent cover plate makes it easy to label the button. A lot of thought went into the design.
To cut to the chase, I ordered four buttons (at $CDN 3.99 + tax and shipping for a total of $ 7,92 each) and received them five days later on the 20th of December and that's despite a one-day delay because of a powerful storm that left us without power for 12 hours and others for many days. I quickly verified that the Trådfri button could be paired with the Sonoff ZBBridge running Z2T
and that the latter could receive three action type messages from the button plus a battery status message.
Sorry to Say, It's Discontinued
Since they were compatible with our home automation system, I wanted to order more Trådfri shortcut buttons, but found that they were no longer available for delivery although some were still in stock in stores. There was no time to get to any IKEA store during the holidays; the nearest is 2.5 hours away. Yesterday I checked again and ran into the following notice.

That explains the astonishing low price. It may also explain the speed at which the included CR2032 batteries lost their charge; at least I hope so, but more on that later. The buttons may still be available in some stores and other countries, but it's probably the case that what follows will be of interest to very few, perhaps only to my future self as I have deployed only one button so far.
This product was not available for very long. The Verge announced the product at the end of October 2019 in Ikea’s smart button leaks with a tease of scenes to come just five days after the product was filed with the FCC. It was to officially launch in February of 2020 but only became available in late 2020 and early 2021 depending on the country. Looking at home automation sites, users were still experiencing difficulties with the device in the summer of 2021.
- IKEA Tradfri Shortcut Button - DeCONZ Setup Guide Good description and photos by ZuluWhiskey (June 3, 2021 to August 10, 2021)
- McMornan in Ikea Shortcut Button (E1812) Stops Working After Pairing issue in the zigbee2mqtt repository April 20, 2021 to Jan 20, 2022.
- TRADFRI shortcut button - zigbee2mqtt - pair & update in the Home Assistant Zigbee configuration forum started in February 2022 and active 3 days ago.
Pairing Mode

Remove the screw on the back plate of the button to get access to the battery compartment and the pairing button.
The retaining screw is captured by a transparent washer. Note the metal insert into which the retaining screw is fixed. The quality of this button is very good, except that the magnet eventually detached from the back plate and adhered to the IKEA battery which apparently contains more ferrous material than other batteries on hand. The errant magnet was glued to the back plate with a dab of 5-minute epoxy. Time will tell if this is a good solution.
Insert a fresh battery into the holder, positive side up as shown above. Press the 🔗 link button four times in quick succession. It will be obvious when the IKEA button is in pairing mode which is indicated by an initially pulsing red LED at the top left corner that may turn steadily on after a while. See Tradfri ON/OFF Switch on the Blakadder site for what may be a more accurate description of the link LED.
Look at the 50 second mark of the 1 minute 41 second video How to set up your smart blinds using the IKEA Home smart app or at the 24 second mark of the 1 minute 38 second video Comment utiliser le bouton de raccourci TRÅDFRI. Pairing is child's play for those that make IKEA videos.
Pairing with Zigbee2Tasmota on the Sonoff ZBbridge
To tell the truth, I fumbled a bit while pairing each of the four buttons. The timing of the link button presses seems to be critical. With some patience, I managed to pair each button by varying the time the link button is held down and the time between link button presses. Below the pairing of a second Trådfri button will be shown. First, here is the Tasmota console output of the ZBBridge on restart after the bridge had been successfully paired to four devices: a Sonoff Zigbee button, two Aqara Opple smart switches and a first Trådfri shortcut button.
At this point I inserted a battery in the second Trådfri shortcut button, then I put Z2T
in pairing mode with the command ZbPermitJoin 1 and attempted to put the button in pairing mode also.
Do make sure that the battery is relatively fresh. I had problems with the initial attempt at pairing a button with the Zigbee bridge because the supplied battery was too spent and lost most of its charge in the process without my realizing it. Ryan Gregg also made this point.
Zigbee Messages from the Trådfri Shortcut Button
Let's use the button to see what messages Zigbee2Tasmota running on the Sonoff Zigbee Bridge will return in response to button press events.
To reprise the Blakadder information, the button performs 3 distinct actions.
Cluster | Command | reference | ||
---|---|---|---|---|
0x0006 | On/Off | 0x01 | On | p. 3-53 |
0x0008 | Level Control | 0x05 | Move (with On/Off) | p. 3-63 |
0x0008 | Level Control | 0x07 | Stop | p. 3-64 |
The on/off cluster (0x0006) has distinct commands for on
, off
, toggle
and others. The IKEA button only returns on
events. That's probably why someone said that the shortcut button was really half an on/off switch. Not to worry, we are not bound by the cluster commands and we shall interpret the on
command as a toggle
command which works perfectly well Domoticz.
Similarly, we shall interpret the level control cluster (0x0008) commands, meant to implement some sort of dimming function, as a long press that can toggle a second light. Consequently, the move command (i.e. 0008!05
which marks the beginning of a long press) will be ignored and only the stop command (0008!07
) corresponding to the button release will be used to toggle the state of the second device.
Before going on with the implementation of these ideas, let's not forget the first message received after pairing.
A virtual percentage sensor in Domoticz will record the battery percentage reported by the shortcut button. The relatively simple Domoticz notification mechanism will be used to report a low battery state.
Tasmota Rules for Converting Zigbee Messages to MQTT Messages
Tasmota rules will be used to convert each of the three incoming Zigbee messages from the shortcut button into an outgoing MQTT message meant for Domoticz. Simplifying just a little bit, a Tasmota rule has the following syntax:
ON
, DO
and ENDON
are literals, meaning that they are text constants which must be entered as shown including the separating space. The [command]
will publish a Domoticz MQTT message toggling a virtual device on or off or updating the battery percentage. For example, my office light can be toggled on or off by sending the following MQTT JSON formatted message {"command":"switchlight","idx":87,"switchcmd":"Toggle"}
to topic domoticz/in
to the MQTT server running on our local area network. This is done with the following command within a rule:
This works because the settings of Tasmota on the Zigbee bridge include the IP address and port of the MQTT server plus user credentials if required.
Triggers for rules are basically string matches when it comes to Zigbee messages. The simplest syntax of a Zigbee [trigger]
is:
Again, zbreceived
and the #
separator are literals. The [DeviceId]
is the short (4 hexadecimal digit) address of the Zigbee device. Combining the above parts yields the following rule.
The rule to toggle the second light in my office which is controlled by a virtual switch with index 173 is similar.
The third rule is used to display the battery percentage in a virtual sensor with index 206.
The three rules can be combined into rule set 1 of the ZigbeeToTasmota firmware. This is done by entering the following command in the Tasmota console
The following is then diplayed.
Defining the rule set is not enough, it must be enabled by entering the rule1 on command. The following is then shown on the console.
Note how some quotes (") are escaped with a backslash symbol (\") in the MQT(T) RESULT message. Never escape special characters when entering the rule. Almost always, there is more than one way of doing things. The rule trigger does not have to be a cluster command. Basically, triggers are based on matching substrings of the Zigbee message as seen above when dealing with the battery percentage. Consequently, the following are all equivalent triggers.
While on the topic of equivalency, the following rule which published an MQTT message to the Wi-Fi switch controlling the office light directly would work just as well.
I prefer centralizing home automation commands through the Domoticz server for a couple of reasons. Obviously, the command needed by the physical device must ultimately be sent to it, whether it is by a rule command from ZigbeeToTasmota or by a script run by Domoticz. I just find it cleaner to have Z2T communicate with Domoticz using MQTT systematically. Domoticz in turn communicates with IoT devices in whichever manner is required by the latter because some IoT devices might not be running Tasmota or even supports MQTT at all. Another of my habits is to use index numbers to identify devices instead of friendly names, probably because initially I often changed the latter. It's not as if I have never accidentally erased a virtual sensor and hence lost an index number, but I have found them to be more stable than sensor names.
Updating the Trådfri Shortcut Button Firmware - Not Yet
Be aware that the firmware of the Trådfri shortcut button can be different from the one found in the four purchased buttons. The current Ikea release notes (version 1.26.0, December 4, 2023) show that IKEA has often modified the firmware on its gateway to improve the way it handles the short cut button, especially for Apple's Homekit. More importantly for my situation, IKEA released a newer version of the button's firmware in May of 2023.
Unfortunately, I have not had much success querying any of my Zigbee devices using the Z2T zbsend
command and consequently, could not ascertain the firmware version of my new old Trådfri shortcut buttons. However, looking at the Hubitat zigbee driver for the button (E1812.groovy) I found this little nugget.
Since the array of input clusters of the button did not include FC7C
, I first tought my IKEA buttons were using the original firmware. However, there was another version in between (2.3.080 released 2021-10-21) and I do not know its "fingerprint". According to the release notes, the last two (24.4.6 in May 2023 and 2.3.080 in October 2021) versions added a double press capability. Since my buttons do not have that action, I am confident that the new, old stock, Trådfri shortcut buttons purchased in December 2023 are running the original firmware released in November 2020 even if they seem to have a 2234 production date code (34th week of 2022). Is this a problem? The double press is not essential to me. While there's ready approval for simple single-click buttons, there is very little general acceptance of "complicated" additional actions linked to double clicks and long presses. Frankly as the number of "smart buttons" increases in our house, it is becoming too hard to remember what they all do. I have resorted to paper legends stuck to the switches. That's OK for the basement office dweller, but it is not appreciated by others. However the release notes for the 24.4.6 release contain important information.
So far the button has been stable, but battery performance is another matter as explained in the next section. However, updating the firmware is not easily done. As far as I can tell, ZigbeeToTasmota cannot perform over-the-air firmware of Zigbee devices. The choices are then limited to either getting a Zigbee coordinator such as the new Trådfri gateway or, more likely, a Zigbee USB dongle capable of running Zigbee2mqtt. In either case that is not about to happen. Furthermore, the addition of the double press action in the newer versions of the software means that the Zigbee message for single presses is delayed by 400 ms according to Simon Arlott in Modifying the IKEA TRÅDFRI Shortcut Button. The Simon Arlott paper and associated repository do show how to patch the new firmware to disable the double tap action. It looks like a new toolchain would have to be installed to do this. On the other hand, it would mean that it is possible to update the shortcut button firmware directly over a serial connection à la Sonoff Basic. Again this is something that will not be attempted in the foreseeable future.
Looking at Battery Usage
On January 4th, the last of the IKEA batteries that came with the buttons was inserted into the one button that is actually deployed. By about 3 A.M. the next day, the battery percentage was down to 60. Surprising when the other three Zigbee buttons in the house are still showing 100% battery capacity after months of use. A reasonably accurate DVM measured 3.1 volts across the battery's terminal once removed from the circuit. I don't believe that such a voltage corresponds to a depleted CR2032, but, of course, it is only a measure of potential and not current. I left the battery in. On January 8th, the Domoticz Web interface reported that the percentage was a surprising 100%.
According to the Zigbee bridge log, the battery was at full capacity putting out 3 volts (assuming that it's value is rounded to the nearest integer). Amazing! This is better than a perpetual motion machine. Maybe the battery is a rechargeable coin cell getting its power from the mechanical energy of the button press? Cutting edge engineering in a $ 4 device, quite the bargain. The very next day, the level fell to 87%. That lasted for about a month, but on February 3rd the battery percentage dropped to 34%. I assumed that it would need to be replaced very soon only to see it climb back up to 74 and then 87% over the next two days. Then the level dropped to a very low 16% on the 13th. Nevertheless, the button has been operating without any problem. I'll wait before replacing the battery. There could be more wild fluctuations. Maybe the "stability improvement" of the May 2023 button firmware update has to do with the measurement of the battery level. I suspect that there will be yet another update to this post in the next few weeks.
Those last two predictions made on the 14th February were not wrong as the Domoticz graph shows.
I am writing this on the 26th of February, the Zigbee button remains functionnal even while the reported battery percentage has been at 16 % for the last two days. Can't wait to see when it will be necessary to replace the battery.
Domoticz is sending email notifications whenever the battery level is updated with a value below 85%. that look like this.
Sorry about the Franglais, the user interface language was temporarily set to English when the notification was sent.
Getting such warnings is easily accomplished by filling a few fields in the Domoticz battery level sensor Notifications
page. Click on the thumbnail to see the page in full size. All the active notification systems listed are not actually used; only e-mails are sent because none of the other methods are defined. Of course, the e-mail parameters must be specified and that is done in the Setup/Settings/Email
tab.
All good things come to an end. The battery of the Trådfri shortcut button finally gave out. The last time the button was used to turn an office light on was at 22:00 on the 29th of March. Then it reported a battery level of 21% every five minutes up to 22:55 on the 29th of March. Since then, there's been no sign of life, but I waited a couple of days before pronouncing the battery dead because on three occasions in the past it recussitated from a low level of 16%.
As expected given the above discussion, the button had to be paired once again with the Zigbee coordinator. When that happened, its short address changed which meant that the Tasmota rule for the button had to be modified.
Conclusions
When first dipping my toe into the Zigbee world, I chose what seemed like the easiest route, namely isolating the Zigbee network from the home automation system by going through a physical Zigbee - MQTT bridge. Using the Sonoff Zigbee Bridge meant that nothing had to be changed in Domoticz itself and on the small computer hosting the home automation system. I would probably defend that approach if queried about it now. However I am now a bit more informed and I realize that getting a Zigbee coordinator such as a Sonoff Zibgee USB dongle (either model) would have been a good idea even if it had meant a steeper learning curve. Had that decision been made, then I would be in a position (attempt) to update the shortcut button's firmware. Access to much more detailed logs would be available and it would be easier to communicate with the Zigbee devices... I think. I will be in a better position to discuss this later when I finally decide on how to improve our home Zigbee network and act on that decision.
The Trådfri shortcut button is the third and latest type of Zigbee remote button added to our home automation system. They have all become much more useful than I initially thought. Small, light, unobtrusive, and battery operated, they can be placed anywhere. They are being used as adjuncts to awkwardly placed wall switches or wall plugs. An Amazon Echo Dot was used to control a couple of hard-to-reach lights in an office used by my spouse. Since the Sonoff Zigbee button was added over a year ago as another way to control those lights, my spouse has been using it more and more to the point where she has disconnected the Echo Dot for a few months now. In much the same circumstances, I am using the newly deployed Trådfri shortcut button to control a couple of lights beyond my physical reach. I was turning these on or off by shouting at an Amazon Echo Show in the next room, but now after only a couple of days I realize that it will soon be possible to turn the Echo Show microphone off at all times except for video calls. The camera has always been off, and as I write this it occurs to me that it should be possible to create a shroud to hide the distracting, always on screen.
When I purchased the shortcut buttons, I was contemplating trying to transform them into water leak detectors. Now I think that they will be an important part of the strategy to get rid of all smart speakers. So it is back to the drawing board when it comes to water leak detection although I now have no doubt that well-designed commercial zibgee based devices could be used in that function.
I may revisit the Trådfri shortcut button in one or two future posts. It could be interesting to write about any solution to the update problem mentioned in the previous section. I am also intrigued about using the button as a remote dimmer in conjunction with a CE Smart Home dimmer purchased and installed in May 2019. In my estimation that was the original purpose of the button and implementing that would require an interesting Domoticz script.
Finally, here is a link to the SOMRIG Shortcut button which I think is meant to be a replacement for the discontinued shortcut button. Because the product details contain the following sentence Assign 1-6 scenes from the app and select which to start with single press, double press, or long press it is obviously more complex than the Trådfri shortcut button. The device must have two buttons (under the single dot at the top and the under the double dot at the bottom) with three actions each and it must be much bigger given that it has an AAA battery instead of a coin cell. Nevertheless, it is very affordable at CDN $ 8.99. There is an even cheaper and slightly smaller button, the Rodret that could be used as power switch and dimmer control. Both could be worthwhile additions. Wonder when they will be on sale?