Hackster will be offline on Monday, September 30 from 8pm to 10pm PDT to perform some scheduled maintenance.

Canonical's Farshid Tavakolizadeh Turns a Raspberry Pi Into a Matter Gadget with Ubuntu Core

Reference application makes it easy to create a Matter-compatible smart home lighting device in minutes.

Canonical engineering manager Farshid Tavakolizadeh has penned a guide showing how a Raspberry Pi running the company's Ubuntu Core 24 Linux distribution can be used to quickly build a Matter-compatible smart home device.

"With the release of Matter 1.3, it is now easier than ever to create interoperable home appliances," Tavakolizadeh explains. "Ubuntu Core provides a secure and reliable foundation for running smart home applications that are responsible not only for home appliances but also for critical infrastructure powering smart door locks, garage doors, surveillance and security systems."

To prove that, Tavakolizadeh demonstrates how to use Ubuntu Core — a version of the company's popular Ubuntu Linux distribution, which features containerization and isolation functionality designed with security and maintainability for the Internet of Things (IoT) in mind — on a low-cost Raspberry Pi single-board computer to build a prototype of a Matter-compliant smart home device, toggling an LED connected to the board's general-purpose input/output (GPIO) header.

"The matter-pi-gpio-commander is a snap that turns a Raspberry Pi into a Matter lighting device," Tavakolizadeh explains of Canonical's reference application, designed to be deployed in the snap software package format. "The application allows the control of the GPIO to switch on and off an LED, over the Matter standard. This application can serve as a template for building your own application from a tested starting point."

Using the snap is as simple as installing it using the command-line tools, then configuring it for the GPIO pin to which the LED is connected — as well as switching it to use the RP1 controller, if you're working through the project on the new Raspberry Pi 5. The snap can then advertise itself over the network to anything capable of handling Matter devices — with Tavakolizadeh suggesting the command-line chip-tool for ease of testing.

Tavakolizadeh's guide is available on the Ubuntu blog, while the source code for matter-pi-gpio-commander is published to GitHub under the permissive Apache 2.0 license; Ubuntu Core 24 can be downloaded from the official website.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles