Many of you might already have their home equipped with radio controlled shutters which is definitely very convenient – just push the button on your remote control and get the shutters opened, closed or stopped in between. Some of the remote controls also include a timer which furthermore allows you to define a fixed time for daily opening / closing the shutters, usually opening them in the morning and closing them in the evening. I also have installed such radio controlled shutters in my house and enjoy the convenience of not having to wind them up / down manually and to be able to set timers for automatically winding them up in the morning and down in the evening. Additionally my remote controls allow to have up to five shutters controlled at once with just one button click (one remote control can control up to five shutters). Even though the timers already allow for a certain level of automation, it is pretty annoying that one has to change timers at least every other week because of the daily change in sunrise / sundown times which sums up to many minutes within two weeks, in case you always want your shutters to go up at sunrise and go down at sunset. Why would you want that – from my opinion one does not want to sit in a house with shutters all closed when it is still sunny outside, on the other hand you might want to make sure to close the shutters at sunset as it gets easier to look inside your house when it is darker outside than inside with lights turned on. Also for me it was not sufficient to just open / close five shutters at once – I wanted to be able to open / close all shutters at once or all except one at once (for example all shutters shall open except in one bedroom where one family member is still sleeping) as well as to be able to control my shutters via voice assistant and last but not least to integrate them with my Smart Home scenarios.
I figured out that the shutter motors installed in my house listen to 433 Mhz radio signals. First thing I tried was buying a cheap 3rd party 433 Mhz gateway online which promised to be able to learn the commands sent from my remote controls and would then be able to connect to online services as well as voice assistants. But that did not work out unfortunately as it was not possible to make the gateway learn the signals sent from my radio controls. I contacted the device manufacturer of my shutter motors and asked them for a solution but they answered that it would not be possible to control their devices with any third party radio equipment, hence I realized that I would most likely have to implement an own solution.
Second attempt was to open one of the original remote controls, take the circuit board out and to solder wires at the contact points of the buttons up / down / stop as well as at the buttons for channel switching up / down in order to short circuit the buttons. With a simple transistor circuit I was then able to remote control each button on the circuit board from a Raspberry PI device. But that was not a real solution as it still only allowed me to control up to five shutters at once (each remote control only allowed for five channels) and required to send commands one after the other as channel switching was necessary in between the commands when addressing multiple shutters (resulting in noticeable time delays).
So for a solid solution I needed to be able to send the radio signals to the shutters without “misusing” the remote controls but with an independent transmitter. To achieve this, I analyzed the radio signals that are being sent from the remote controls to the shutters in order to open / close / stop them with an oscilloscope. I realized that there was a pattern — pushing a button triggers a series of up to 20 pulse width modulated signals, each indicated by a starting sequence with highs / lows at different defined lengths followed by the first part of the signal payload representing an “address” of the shutter (actually seems to be the unique address of the radio control followed by a number representing the channel selected on the RC which the shutter motor can learn to listen to in teaching mode) and the second part of the payload representing the command (up / down / stop). So after figuring that out, the next step was clear – I want to be able to send out such radio signals on my own from a Raspberry Pi in order to control the shutters dynamically. And that is what I implemented.
How it works
The solution I built with a cloud-connected Raspberry PI is illustrated in the following high level architecture drawing.
I can send radio signals following the signal pattern described above to the shutters and receive radio signals from the remote controls. Why to receive signals from the remote controls? That is necessary to get also informed when someone opens/closes the shutters via remote control in order to be able to hold the actual As-Is state of the shutters in the cloud. The cloud is connected to further clients like voice assistants Alexa and Google Assistant as well as a web interface (via an API authorizing each user to access the API with a token obtained from an authorizer component) which can receive the As-Is state of the device and display it to the user. When these additional clients want the state of a shutter to be changed, they send a new To-Be state to the cloud that is being received as an event by the Raspberry, which then can send out a radio signal to the shutters in order to change the As-Is state of the shutter to the To-Be state and update the As-Is state in the cloud subsequently.
Additionally, on the Raspberry PI, I daily request the sunrise / sundown times from a free cloud API service (https://sunrise-sunset.org/api) which I can then use to set a timer for the shutters to automatically open right at sunrise and close exactly at sunset or with any random positive / negative delay. Also I implemented a configuration page where I can exclude certain shutters from this automatism, for example if I do not want the shutters in the sleeping room to automatically open too early in the morning.
The cool thing is that I can now also include the shutters in my voice assistant routines, so for example when we decide to manually keep one shutter open in the evening even though the sun is already down (perhaps in order to get some more fresh air in the house), the latest when I say „O.K Google, Good Night“, the routine will make sure to close all shutters before I go to bed.
This solution works quite well and I am happy to share more details in case I see comments of readers being interested in more details.
No responses yet