IKEA Bilresa switch & node-red-matter-controller

I have successfully added an IKEA's cheap matter over thread device (Bilresa switch) to the inexpensive (ca £20) Aqara M100 Thread border router and accessed its output in Node Red via @sammachin/node-red-matter-controller on a raspberry pi Zero2w running 64bit piOS PixieI.

  • I used the Aqara App on an iPhone to setup the IKEA Bilresa on the Aqara M100 .

All that is needed in order to automate the Thread routing of the rpi to the IKEA device on the Thread network is to add accept-ra: true and dhcp6: true to the Netplan YAML file in /etc/netplan/under the wlan0 section .

  1. The actual address for Netplan configuration file is found by ls /etc/netplan/

You will likely see a file named something like 90-NM-e64bd22a...yaml or 01-netcfg.yaml.

  1. Open that specific file sudo nano /etc/netplan/<90-NM...yaml>
    Add accept-ra: true and dhcp6: true under the wlan0 interface.

YAML

network:
  version: 2
  wifis:
    wlan0:
      renderer: NetworkManager
      match: {}
      dhcp4: true
      dhcp6: true        # <--- Add this for IPv6 support
      accept-ra: true    # <--- Add this to catch the Thread routes
      access-points:
        "PLUSNET-37AW2T":
          auth:
...

Reboot the rpi for the changes to take effect.

The Matter Pairing Code for the device (e.g Bilresa) in the Aqara App can now be used for the Commissioning in a Device Management Node of the node-red-matter-controller.

If the initial commissioning of the device in Node Red with the Matter Pairing code fails, can sometimes help to press a button on the Bilresa to wake things up so-to-speak

Limitations
While one can detect the keypress of the individual buttons on the Bilresa in Node Red, differentiation of keypresses as single, double or long as detected in the Aqara App appears not to be discernible.

If in the Node Red there is an error in the handling of the output because of e.g. inappropriate settings used in one of the Matter nodes, then the rpi may crash such that the json file for the flow needs to be removed and one has to start afresh with an empty flow workspace mv /home/pi/.node-red/flows.json /home/pi/.node-red/flows_broken.json.

Folllowing crashes you will have to use a new pairing code, if that fails in Node Red Commissioning

commissionDevice 01898118552  BILRESA
2026-02-09 17:52:04.026 ERROR  Controller~missioner Commissioning step 7.1: OperationalCredentials.Certificates failed with error: Commission error for "addNoc": 9, undefined ... Aborting commissioning

then you may need to

  1. Clean the Pi's Memory
  • Stop Node-RED: node-red-stop
  • Wipe the Matter folder: rm -rf /home/pi/.matter
  • Start Node-RED: node-red-start

or failing that

  1. Factory Reset the IKEA Switch and rejoin the Thread Network, etc , i.e. start afresh.
1 Like

Thanks for that it looks really useful,

I picked up a few of the Ikea Matter devices the other day myself

  • Both the Bilresa Button and the Scroll Button
  • The Alpstuga Air Monitor
  • Myggbett Door Sensor
  • Myggspray Motion Sensor

I was having trouble commissioning them to my Pi as it seemed to be an IPv6 routing issue, so sounds like accept-ra is what I'm missing. Although I don't think my Pi is using netplan its the older method

1 Like

FURTHER OBSERVATIONS

Having successfully got the BILRESA working with Node Red decided to get the Myggbett door sensor. But commissioning in Node Red failed!

11 Feb 17:59:46 - [info] Started modified nodes
commissionDevice 16282814403  MYGGBETT
11 Feb 17:59:51 - [error] [mattermanager:d72155d82f696f97] Error: No device discovered using identifier {}! Please check that the relevant device is online.
commissionDevice 16282814403  MYGGBETT
11 Feb 18:00:02 - [error] [mattermanager:d72155d82f696f97] Error: Received incorrect key confirmation from the receiver.

It then occurred to me that I may have linked the BILRESA to Alexa on the Echo Dot (gen 5) prior to commissioning in Node Red, though I can't be sure that was the case.

Nevertheless once that was done ...

11 Feb 18:29:08 - [info] Started modified nodes
commissionDevice 03101946740  MYGGBETT
11 Feb 18:33:09 - [info] [mattermanager:MYGGBETT] Commissioned MYGGBETT as nodeId 12374590424128426792