WebThings vs. Matter: A Comparative Protocol Analysis
- Operating system: WebThingsOS
- Packages: Webthings TP Link Kasa Add On
- Hardware: Raspberry Pi 3 (with an microSD card) ,Google Nest Hub (2.Gen),TP-Link LB 110 smart bulb
At first, we did a lot of research regarding the hardware. Our intention was to create a Smart Home scenario using Webthings and Matter respectively. We soon realized that it wouldn't be that easy to find hardware that is supported by both protocols. The reason for this is, that the development of Webthings has been discontinued in 2020 and is now only supported through open source. Matter on the other hand is brand new and was launched in the winter of 2022. So not a lot of devices still support Webthings and not a lot of devices are already compatible with Matter. Especially because Matter utilizes a new protocol called thread build on the same stack as Zigbee using IEEE 802.15.4.
Our first attempt was to set up the Webthings Gateway using a Raspberry Pi 3. The first batch of devices consisted of a Tradfri Zigbee lamp and an Amazon Echo Dot. We tried to connect to the Amazon Echo Dot via Wi-Fi and failed because of compatability issues. The Tradfri bulb also yielded no better results. Although there exists an add-on for Webthings to support Zigbee, we could not find/connect the smart bulb.
After a lot of reasearch we felt confident to try out the matter protocol. We found out that there is no such thing as an open source matter gateway but that it is build into the devices of big tech companies like Google, Apple or Samsung. That meant we had to get devices of those big players as a gateway. We decided on the Google Nest Hub. If we wanted to connect something using Zigbee with Matter we would have had to get another supported Gateway supporting the Zigbee Protocol. All of that made us reconsider testing Zigbee altogether and we decided that we would rather focus on Wi-Fi devices.
We then found devices that supposedly should work with Matter as well as Webthings. All our cards were on the EVE devices. The Smart Plug, Motion Sensor and Window Intrusion Sensor. But that also didn't work out. The problem was that altough all of those devices support both protocols, from the factory they are only usable via the Apple HomePod. In order to get them to work with other devices you first need to update the Firmware using an Apple HomePod. So that was also not an option in the little remaining time.
We finally found a device that worked with both Smart Home Protocols. The TP-Link LB110. We were reliefed to say the least. Finally we could start testing to find out the differences between the two protocols. But thats when things started to get a little bit weird. Our idea was to use a laptop as the router/gateway in order to sniff the packets being sent via wireshark. We used the Hotspot function of Windows. No problem there with the Webthings gateway. But as soon as we connected the bulb and the Google Nest Hub the Hotspot lost its connection to the internet. Because of that the bulb and the Nest Hub, which both need a connection to the internet did not work anymore. Also when removed from the network the connection did not come back. We tried it on 2 different laptops and both now do not have functioning hotspots anymore.
So there aren't any captures we can analyze for Matter. Also we are not quite sure if the Nest Hub even utilizes the Matter Protocol when not using Thread.
Unfortunately because ot the circumstances we were not able to get the wanted results. Our goal was to find smart things that could be included in both protocols. This is not feasible until today & in the end it turned out that our TP-Link light bulb does not support Thread or Matter. We researched and came to the conclusion that Smart Things only support either Thread/Matter or the common protocols like Zigbee/Wi-Fi/Z-Wave and not both.
In the end, it turned out that we could only add Smart Things that supported Wi-Fi to the WebThings gateway. A Zigbee dongle for support & a suitable add-on didn't help. Matter didn't have a device that was also compatible with WebThings, so we couldn't make the comparison we wanted.
However considering that we are a team of IT students with some knowledge and that both protocols should unify existing smart homes within a single protocol, it is fair to say that there is at this point in time no best solution because both of them have great issues. Webthings appeals more to open source enthusiasts that want to tinker with their smart home devices whereas Matter is a more plug and play approach to the smart home ecosystem. It however lacks the customizability of its opponent.
- Install the latest gateway Image latest gateway Image from WebThings. Flash the downloaded Image on the microSD card using Etcher for example.
- Boot your Raspberry Pi. After booting up the gateway, it will create an Wi-Fi hotspot with the name "WebThings Gateway XXXX". Use an personal computer to connect to the network.
- After establishing a connection to the gateway, a page will appear which shows nearby WiFi networks. Connect to your home network.
- Now you should be able to access the gateways UI via http://192.168.2.1 or http://gateway.local .
- After navigating to the local gateway page, you will be given the option to register a free subdomain
- You will be led to an Page to create an user account
- After all the steps you will be redirected to an empty "Things" screen of the gateway where you can start to add devices.
- When clicking on the "+" the WebThings Gateway will search for Smart Things that are in the same WLAN network and nearby. Here the bulb was immediately detected and so we added it to our WebThings network.
- Here we can see that we added the bulb successfully to our network. That's the overview page of all Smart Things that are implemented. If we want to control a Smart Thing we need to click on it.
- After we clicked on the bulb, we get options to change the brightness of the bulb, turn it on or off & view the power consumption.
We also tried to sniff the traffic between the Control Panel device, the Smart Bulb & the WebThings Gateway, so we can analyze how the way of communication looks like. Actually we wanted to compare the packet sizes with the packets of Matter, but since this did not work, we simply analyzed them.
- Control Panel device: 192.168.137.193 /24
- TP-Link Smart Bulb: 192.168.137.92 /24
- WebThings Gateway: 192.168.137.219 /24
- We filtered the messages by source & destination addresses to clearly show the handshakes and to show the sending of application data.
- In this first picture we can see how the bulb wants to establish a TCP connection with an Amazon server for cloud-based functionality. Such smart home devices, rely on cloud services for remote control and management. After Application Data is sent between the smart bulb and the Amazon server, the bulb wants to finish the connection.
- This capture shows that the amazon server answers to the SYN from the bulb with an SYN ACK and then application data is exchanged.
- Here we can see the communication initiated by the control panel device to the Google Network, where afterwards application data is exchanged. Afterwards the connection is getting closed by the google network which can be seen in the last capture.
- Here we can see the opposite site, where the Google Network answers with an SYN ACK and since then messages are exchanged until the google network wants to finish the session.