SUSE Hackweek 15 just finished. This time I wanted to come up with a tool and hardware to control my window shutters. The good thing is that they are already motorized and have wired command. Thus I could easily hack a GPIO-based solution.
Obviously I bought some hardware in advance to have it on time: I mostly needed a relay board. I chose the 16 modules one from Sainsmart, with a 12V 2A power supply for it. I could be argued that 16 relays is way too much to handle one shutter motor, but I need two relays for it (one for each direction) and my final goal is to control 8 window shutters.
To add some salt to this hackweek, I deciced to run a SLES 12 SP2 for Raspberry Pi on my Raspberry Pi 3. The fact is that none of the GPIO library was working on SLES as they were expecting some rasbian-specific things.
Thus this hackweek was a nice opportunity to get RPi.GPIO and mraa to work on SLES. The patches are pending upstream review here, here and here. The patched packages for openSUSE Tumbleweed and SLES are pending review as well.
Just not to forget the final goal of my hackweek, here are some pictures of how I hacked the shutter to detect the end positions: