Skip to main content

Posts

Showing posts from August, 2021

SMS messaging on Raspberry Pi with Gammu

Background Ever wanted to be alerted when the power fails at home? I typically worry that food in the freezer will go off when I am on vacation! (Yep, that's how I tick). I have recently installed a UPS system which I use to protect various IT and network devices from instant power loss, enabling them to shutdown gracefully. This is particulary important for my Raspberry Pi (Pi) devices, which are sensitive to this issue, as SD-Cards can be corrupted and then not re-boot.  The UPS I have installed interfaces via USB with my Raspberry Pi server using the Linux Network UPS tools NUT so that I can monitor status changes (e.g. grid power loss) and this is further integrated into my openHAB -based home automation system. This setup will be covered in another post.  I wanted to additionally be alerted when grid power fails via SMS to my mobile phone. To do this I have purchased a pre-owned USB Internet Surf Stick and a pay-as-you-go SIM card (zero cost) which I can load with credit. I a