Swedish Precision, Home Assistant

Swedish Precision, Home Assistant
Photo by Adam Kolmacka / Unsplash

I've long had a lot of IoT devices around the house, from basic switches (WeMo, TPLink, Athom, various AliExpress specials) to "proper" home automation gear from Shelly and others.

I've used Home Assistant to tie them together, because Apple Home is a tire fire, and really it's one of the only ways to get all these things talking. For the most part, it's worked really well, and been very reliable, even tho I really need to wipe it all and set everything up again, with the additional knowledge of having run this for a number of years.

Some of the bits I've done so far:

  • A Shelly 1PM (or equivalent) running a 30A relay, which controls the spa motor/heater. The Shelly has an external sensor which is in the water - nicely isolated - so when it hits 39 degrees, it turns off (sadly our spa's temperature sensor is broken). The spa is under 16A, in theory, and I had a "rated at 16A" smart relay on there for a while. Lets just say they don't handle continuous 16A very well. The 30A relay is massively over-spec'ed, but I can switch it on and off with the Shelly using sub-2W of power going through it, and its under 50% of capacity running the heater and pump. I also tried a solid state relay (SSR), but it overheated in a big way. Useful if you can dump the heat, but not for this case.
  • Various Shellys on extension leads, controlling outside lights (in IP6x boxes), the tank-to-tank pump, the coffee machine. They have proven to be incredibly reliable, with the main problem being the older models not being reliable on the wifi with some of the newer Unifi settings. The current generation (gen4) are perfect.
  • I had some of the Shelly BLU Distance sensors in the water tanks, which worked out the percent full the tank was. This was amazing but they didn't handle the summer humidity (90-99%) in the tank, so they failed. I hope they make something to replace it, it was awesome being able to move water until the tank was full, not having to guess.
  • Some plug in switches which control mosquito repellers for summer - on around 7pm, off at 5am, so we never forget to turn them off, and can leave the doors open in summer; or fairy lights which we mostly use in the bedroom. Current ones are from Athom, but IKEA also make one which would work nicely for this, and I've had TPLink and WeMo previously. (first-gen Athom were a fire hazard, current-gen are better designed)
  • Temperature and Humidity sensors from Xiaomi (bluetooth) in most rooms, mostly for monitoring, which connect over Bluetooth LE via the newer Shelly relays (newer version here). Batteries last 9-12 months, and they are reliable if you have a Bluetooth relay (shelly!) nearby. Turns out their humidity sensor isn't overly accurate (out by about 10%).
  • Some of the Shelly WIFI buttons, so I can trigger and control some of these.

Recently IKEA opened in New Zealand, so we now have access to their modern range of IoT devices, so on a recent trip (ok, 2) I decided to try out a few of their devices.

I started out with a few of the double buttons (BILRESA) and temperature/humidity sensors (TIMMERFLOTTE). They are all Thread/Matter, but I have a modern Apple TV, so I have a Thread Border Gateway on the network.

Or so I thought.

Thread and Matter are protocols which I'm still working out.

Thread can be thought of as a peer to wifi or ethernet - on the wire communication between devices, but designed as a mesh, self-repairable, and completely based on IPv6.

Matter sits on top of that, but it can also sit on top of wifi or ethernet. Matter describes the devices - switch, sensor etc.

Matter can work over wifi, but in general it doesn't, as wifi's not great for power-efficient devices. Thread has its own IPv6-based, 2.4Ghz network protocol which is designed for mesh networking with low power devices, and I've found, so far, that it's much quicker and efficient than wifi. The Shelly relays (gen4) work with Matter, but over wifi, not Thread. All the IKEA stuff works over Thread, but not wifi.

Thread and ethernet (or wifi) can be bridged with a thread border router. And Thread is designed to work with multiple border routers on a ethernet network.

So I installed the basics - the Python Matter Server which integrates directly into Home Assistant - and made sure the IPv6 was enabled (tho not well configured) on the local network. As I run Home Assistant in docker, this was mostly enabling IPv6 on my network and the NUC I use to host docker containers, and in docker itself.

Once that was set up, I had to add devices. Home Assistant will do this, and you basically take a picture of the QR code on the device, and it adds it (the IKEA app and Apple Home will also do this).

In theory.

In practice you need to be within a few meters of the Apple TV (the gateway), and it only works about 10% of the time. While I got it working, it was frustrating, and the gateway had a habit of forgetting the device if it was far away (10-15m, thru a few walls). Quite frustrating when its a switch to turn off the bedroom lights.

It also didn't work at all in our secondary room - the studio where I work. This is about 35m from the main house, so its near the edge of the 2.4Ghz range.

So I went looking for another Thread Border Router, as a Thread network can have more than one router by design. And it turns out my options were various Ali Express specials, or a DIRIGERA gateway from IKEA.

Did I mention IKEA just opened in NZ?

So I bought one for the studio, added it to the network using the Ikea Home Smart app, and Home Assistant just found it and used it. Now everything on the Thread network was so much more stable, not just things at that end of the property. The buttons which were forgotten have not disappeared since.

The underground switch, DIRIGERA, and POE Injector for the bedroom AP

I've got another DIRIGERA for the house this weekend, and installed in the box under the house with a switch and POE injector. It should make the things in the house a lot more stable, I think. If I could turn the Apple TV TBR off, I would.

I'm still trying to work out a use for the dimmer switch (button plus scroll wheel), but at $15 I got one to try and see if it'll work.


The takeaway from this is:

  • Thread and Matter are excellent, but you need to get a decent Thread Border Router, and the Apple TV is NOT a decent TBR.
  • IKEA make decent gear at a good price. They are not the only ones, but they are in most countries, so give them a go. Home Assistant integration is fairly easy and stable.
  • For seldom-used devices like buttons and temperature sensors, Thread/Matter is excellent as its designed for exactly this. The delay from pressing a button to a light coming on is sub-second with Thread, and maybe 3-5 seconds with wifi. The BTLE temperature sensors are bit more reliable (when near a Shelly with a BTLE relay), but not by a lot, and the range on Thread is better.

So definitely worth a shot, if you're in NZ and want to give the IKEA gear a try. Price and selection are good, and they usually have stock even if the online shipping time is slow AF.

Also: meatballs.