I have a blind uncle for whom we installed electric curtains for Christmas a couple of years ago as he doesn't know when it goes dark. Currently these are on a rather unreliable timer. Even if the timer were reliable, it doesn't account for the changing sunset time or the change from BST to GMT and back. Generally this hasn't been a problem as we visit and reset the timer monthly. But the COVID lockdown restrictions here in the UK have shown the problems in this arrangement.
Having looked at several other options I am considering building a controller using a Raspberry Pi Zero and a relay module. I have two choices for connecting the relay module to the RPI - USB or GPIO. My preference is USB but want to check what is involved in controlling the USB port with Perl. Is USB::LibUSB going to be sufficient to control two relays on a module like this one or are there pitfalls awaiting me with USB?
My plan is that the RPI will get sunset time for each day, open the curtains at 8:30am local time (GMT or BST) and close them at sunset (perhaps with a fixed offest if necessary). I've not used a Raspberry Pi before - any advice or suggestions?
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link or
or How to display code and escape characters
are good places to start.