<div dir="ltr">Sharing for your amusement.<div><br></div><div>As we all know "Pi" part of Raspberry Pi comes from Python as it is deemed the right language for high school kids can experiment and learn. I have been using Perl on RPi and it seems to do well with many automations I did.</div>
<div><br></div><div>Sharing a recent example FYI...</div><div><br><div class="gmail_quote"><div dir="ltr"><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Ramana Mokkapati</b> <span dir="ltr"><<a href="mailto:mvr707@gmail.com" target="_blank">mvr707@gmail.com</a>></span><br>

Date: Sat, Jun 29, 2013 at 11:13 AM<br>Subject: Raspberry Perl<br>To: "Mr. Ramana Mokkapati" <<a href="mailto:mvr707@gmail.com" target="_blank">mvr707@gmail.com</a>><br><br><br><div dir="auto"><p><span style="background-color:rgba(255,255,255,0)">Just coming back from my dentist visit, reminded of Perl based home automation. Sharing the story and geeky details. :-)<br>
<br>Dentist told me she forgot to switch of AC at home. I quickly pulled my iPhone to show how the my living room lights can be switched from cell phone, <br>and how my home lights go on at sunset (yes based on season it adjusts automatically). Needless to say, dentist was impressed and wanted more details <br>
for her high school kid interested in programming. :-)<br><br>Coming to geeky stuff...<br><br>One can use a power switch connected to GPIO of Raspberry Pi, or better still use a WeMo switch from Belkin ($40) that can control upto 1800W of load. </span><span style="background-color:rgba(255,255,255,0)">iP</span><span style="background-color:rgba(255,255,255,0)">hone app would let you control the switch.</span></p>
<p><span style="background-color:rgba(255,255,255,0)"><br>Use Perl modules<br>WebService::Belkin::WeMo::Discover<br>WebService::Belkin::WeMo::Device<br>
<br>And control the switch - this is a cool way to control UPnP devices via Net::UPnP module.<br><br>Net::Sunrise is another cool module to find the sunrise and sunset times, once you have the latitude and longitude info. The cron job wakes up <a>at 5am</a> <br>

and calculates the sunrise time and spawns the actual job via "at" command.<br><br>Of course, we may use Astro::MoonPhase if you have to fire a job only on new/full moon night. :-)</span></p></div></div></div></div>
</div></div>