First experience automating shutters

This year I’ve set up window shutter automations on my house, and I wanted to share the experience. Read on...

Motorising

It started with motorising the shutters. Three were already motorised, and after having problems with winder cables fraying on two other large shutters, I decided to motorise them as well. The conversion was very straight forward, with the motor sliding into the shutter tube and mounting to a bracket on one end. Be sure to run the motor in the shutter down direction to its limit before installing, to make commissioning pain free. With those installed the shutters were motorised and controlled using a physical rotary switch on the wall. Manual mode.

Automation device

When looking for a device to add automation, I dug into how the motors were wired. They have an earth, one neutral and two active wires, where power to one active/neutral combination gives rotation in one direction, and power to the other active/neutral combination gives rotation in the other direction. With that understanding I looked for devices with two relays supporting mains voltage. I came across the Shelly Plus 2PM which was a great fit. It works with mains power, has two inputs for the existing switch, has two relays and a ‘cover’ mode for shutters, connects via Wi-Fi and doesn’t require the internet.

When the electrician connected it in, the existing wiring was terminated to a strip block, and separate wires were run to the Shelly. It’s small, smaller than you expect, so fitting the existing wires in its terminals would have been a problem. Since power and motor wiring was all in the wall directly behind the switch, getting it wired in was straight forward.

When the shutter motors operate, I should call out that they have physical position limits which cut power in a direction. So, when closing the shutter, it rotates a certain number of times and hits a physical limit within the shutter (adjustable) and cuts the power. The result is that you can turn the rotary switch to ‘down’ and leave it there. The motor will close the shutter and then stop by itself.

After connecting the Shelly, how does it work? When setting up the Shelly and selecting ‘cover’ mode, it has an initialisation process where it runs the shutter up and down a few times to hit these limits. It must detect the current draw drop and know that it has reached the motor limit. With this done, the Shelly then knows what position it is in, 0% being closed and 100% being open.

The Shelly is clever in how it handles electrical inputs and digital commands. It works by the last input or command taking precedence. In practice this means that if the shutter were closed using the physical switch, a digital command could override this and move it to any position. By moving the physical switch to ‘off’ then to ‘up’ or ‘down’, it again takes over control. This is great as it doesn’t affect how existing switches can be used, but still offers full automation.

Drivers and control

With the Shelly in place the next step was to introduce automation. Shelly has their own app and automation support, but I wanted something universal that would work with all the things. That included HomeKit, which I wanted to try out. I went with a C8 for its ‘all in one’ package, broad capabilities and openness. The first hurdle was finding a driver for the Shelly. Shelly’s official driver didn’t suit the need, no cover mode (!!). I experimented with a few other custom drivers and settled with one Dmitry Rozovik developed. It exposes the functions and devices I needed and has proven to be very reliable. I combined this with Ikea Somrig buttons with drivers by Dan Danache (amazing support). The great thing about these buttons is they support press, double-press, hold and release gestures. This offered some interesting options for functionality. I’ve settled on the following:

  • Press – Fully up or fully down
  • Double-press – Up or down to separate preset positions
  • Hold and release – Move up or down until released

The combination was working great. My only niggle is the lag between pressing the Somrig buttons and the command reaching the C8. The 0.5 - 0.75 sec delay makes it feel a little broken, though I guess it’s just battery operated button life.

HomeKit

The last step to this process was exposing the shutters to HomeKit. It’s simple to do this from the C8 HomeKit app, but they didn’t function properly and it took some time to work out why. It came down to the driver reporting the position as a floating point number instead of an integral number. After much custom virtual driver hacking I figured it out. The appearance in HomeKit is nothing out of the ordinary. Tap the tile icon to open or close, or tap elsewhere on the tile and drag the shutter to a specific position.

I’ve set up automations in HomeKit to control the shutters. They automatically open and close around sunrise and sunset. Bedrooms open a little at sunrise, but then fully an hour or so later. During the summer months, if the forecast temp is over 30oC, the front shutters lower late morning, and the dining room shutter lowers around midday to avoid direct sun. Everything opens up before dinner time, so we have natural light in the house. It’s pretty neat and somewhat passive, the house just adjusts itself for our comfort (not really, but you know what I mean).

Final thoughts

  • While testing, I found the motors get really hot when operating for just 1 minute, even without load. Perhaps it’s the tube design without heat fins, but it doesn’t seem right. They typically operate for 20 secs twice daily, and have a low wattage, so they should be ok (?!)

  • The Shelly works great, the web UI is really impressive. Inputs and cover mode fit the need very well. I found the mobile app to be clunky, I just used it for initial setup, nothing more.

  • The situation with HE device drivers is tricky. I understand Hubitat can’t support all device models and revisions, it’s too much. Shelly though, should put effort into supporting the key ecosystems. I’m thankful for Dmitry Rozovik’s efforts and watch the progress of Daniel Winks with interest.

  • When moving the shutter to a position (0 to 100), it’s never that percentage open when you look at the window, it's always less. This is because the first 10-15% of movement from closed is lifting the slats from one another from being stacked to having small gaps between. Perhaps this could be abstracted with a tailored driver or app, to make the positions 10 - 100 more accurate.

  • HomeKit integration works pretty well, but it’s a black box. HomeKit supports more than what drivers offer at the moment, e.g. ‘CurrentPosition’ and ‘TargetPosition’ attributes vs a single ‘position’ attribute. Would it give a different, better experience with more finesse? Probably, I don’t know, but as the Hubitat attribute mappings are undocumented, I can’t tell.

Bottom line, the setup has proven reliable and ties into both physical controls in the home and the tech ecosystem of my family. It's just 5 devices, but feels really natural and falls into the background.

-- Tom

2 Likes