6-7 years ago we installed a roller shutter at the window of our sons bedroom. Main reason was to keep his bedroom cool during the summer, but also to make it really dark in there if it was necessary. Roller shutters are very good at keeping the heat out during the summer, but they can also improve isolation during the winter. And of course, they create a delaying barrier for uninvited guests.
So, how are we going to control all these roller shutters? With 12 remotes? Neh. With 1 remote, where you first have to select the shutter you want to control with an average of 6 button clicks? Nope. And where it’s hard to control variable groups of roller shutters at the same time with 1 click of a button? No. Or only lower the shutters that are located on the south side of the house? No! Sounds like horror, home automation-wise..
It does cost a lot of money to automate 12 roller shutters, but I’m sure that if we want to really use these roller shutters efficiently, there has to be some sort of automation involved. And I don’t just say that because I like to automate things 😉
Somfy has a wide range of products to control awnings, blinds, garage doors and roller shutters. Either by wall mounted controls, remote controls; the 3rd option is the Somfy RS485 RTS Transmitter:
This transmitter is not only for roller shutters; it can also be used to control other products like screens, curtains, blinds etcetera. This 16 channel 433 MHz transmitter has a RS-485 to connect this transmitter to non-Somfy systems (like mine), the protocol is well documented, so nothing stands in the way to integrate our dozen roller shutters.
Being the impatient one, I already have this transmitter for a week while the roller shutters have been ordered today – and the software interface is already finished for as far I can see without being able to do a hardware test. Cause the protocol is relatively easy, it didn’t take very long to write the code.
The RS485 protocol works with variable length frames which look like this:
Message ID, ACK bit, frame length, node type, source & destination address, payload and checksum. That’s it. Defining this in Delphi could look like this:
type TSomfyNodeID = array[1..3] of byte; TSomfyNodeType = byte; TSomfyFrameData = TDynByteArray; TSomfyChecksum = word; TSomfyFrame = class(TObject) protected _MSG : byte; _ACKLEN : byte; _NODETYPE : byte; _SOURCE : TSOmfyNodeID; _DEST : TSOmfyNodeID; _DATA : TSomfyFrameData; _CHECKSUM : TSOmfyChecksum; ... ... end; TSomfyRXFrame = class(TSomfyFrame) private function Validate:boolean; public constructor Create(const RawData:String); virtual; property Valid:boolean read Validate; end;
An additional ≈200 lines of code and the interface is finished; another 30 lines of code for the ‘RollerShutter’ device class and everything is in place to control the roller shutters from my system: triggered by events, with our own remotes, touchscreens – whatever we want.