The AlarmPi is a Raspberry Pi powered smart alarm clock, which I designed and created after getting thoroughly fed up of how inflexible and un-user-friendly most alarm clocks on the market are (you can read a bit more about the AlarmPi’s inception in this blog post).
The heart of the device is a Raspberry Pi with the Raspbian OS, running a Python script which controls the hardware, and takes various inputs to control when it should play an alarm (an internet radio feed). I’ve put together this short video explaining some of the key features
As mentioned, the AlarmPi runs off a Raspberry Pi, which is connected up to the following:
- 20×4 RGB Backlit LCD display
- I2C LCD Backpack (see this post for integrating with the LCD display)
- 1.2″ 4-Digit 7-Segment display
- 2 * Metal push buttons
- Rotary encoder
- TSL2561 Luminosity sensor
- MAX98306 Stereo 3.7W Class D Audio Amplifier
- 2 * 3″ 8ohm 1W speakers
The wiring is currently all done on a temporary prototyping breadboard, when I’ve finished playing with the wiring I may get round to soldering it all properly!
The case is made from 5mm thick clear perspex, which I ordered cut to measure from PlasticSheets.com. I then drilled/cut holes in the side and top panels for the buttons/rotary encoder and speakers, and mounted the LCD and 7-segment displays using A2/M2 nuts and bolts. It’s held off the ground by 4 rubber feet, one in each corner, to ensure that screws don’t scratch whatever surface it is on. The case itself doesn’t give a great look, as I made it without access to the proper tools, and it was only supposed to be a temporary measure!
- Google Calendar integration
Alarms are set based on integration with my work Google Calendar, which contains my entire work schedule. Since I work shifts, it knows to wake me up with enough time to get ready and travel in the morning (see travel time below), and to let me lie in when I’m working in the afternoon/evening, all without me having to input the information manually. Any updates to my calendar are automatically taken into consideration up until the point of the alarm being set, at which point it is fixed and can only be manually edited.
- Travel time calculation
Using the Google Maps Distance Matrix API, travel time to my work locations are calculated and taken into consideration when planning alarms. When an alarm is automatically set based on an event on my Google Calendar, the location of that event is read, and a base travel time calculated from my home location. One hour before the alarm is due to go off, this is then re-calculated and adjusted accordingly – so in the event of traffic being better or worse than normal, you get the optimum time in bed!
Using the OpenWeatherMap API, the AlarmPi fetches the latest weather information and displays this on the front LCD panel. This is also read out when the alarm is cancelled.
I’ve integrated the Google TTS engine mentioned in one of my blog posts so that the AlarmPi will read information as necessary (such as the weather, as above), rather than struggling to focus on the display when you’ve first woken up!
- Internet radio
The FM signal in my bedroom is terrible, so the AlarmPi plays internet radio stations instead. A set of stations can be programmed in, and the alarm can set off any one in particular. In the event of the station being unplayable (such as the internet connection being down), the alarm will revert to a sound file based on the Pi, so the wakeup call isn’t missed!
- Automatic backlight
A lot of alarm clocks have a configurable backlight, which can be set for different brightness values. However, what may work at night is next to invisible in the light of day! The AlarmPi has a luminosity sensor on the top panel, which automatically reconfigures the backlight of the LCD and 7-segment display depending on the ambient lighting, so it’s nice and bright during the day, but dimmed at night.
- Web interface
In the past, I’ve gone away for a week and forgotten to disable my alarm clock, which means my neighbours get the joy of an alarm going off for a couple of hours every morning before timing out. The AlarmPi has a web interface that allows the changing of the most common settings (including “holiday mode” which disables all alarms) remotely.
- Home lighting integration
I use OpenHAB to control some MiLight bulbs around my house. While not strictly part of the AlarmPi, I’ve attached a NFC tag to the top of the box which tells my phone to send a signal to OpenHAB to switch off all lights when I go to bed. When the alarm goes off, another signal is sent from the AlarmPi to OpenHAB to say that I’m awake, and the lights will be switched back on if it’s still dark (very much needed at 4am, rather than groping in the dark for a light switch!).
The AlarmPi is obviously a bespoke piece of hardware, and a lot of the code I’ve written is irrelevant unless you’re copying me piece-for-piece – but I’ve released the code here: https://github.com/mattdy/alarmpi so you can have a look and a good laugh at my Python programming skills!
There is a slightly outdated script called
installer.sh included in the project, which will give you a clue to the majority of dependencies, however there may be some I’ve missed out!
The entire program is designed to run as a Supervisor job to ensure it is always running, even after a crash or power outage.
I’ve included a diagram of how all these components are wired together (roughly), so you can get an idea of how it works! Please forgive the lack of proper components in some places, I’ve tried to label everything as clearly as possible, but there are quite a lot of elements to fit into a small space! Click on the picture to view full-size
While AlarmPi does everything I need right now, there are a few things I’d like to add in future.
- Wake-up Lighting
A lot of alarms now come with ‘wake-up lighting’, which simulates a sunrise over a period before the alarm goes off, supposedly helping the body wake up naturally, rather than suddenly with the alarm.
While the web interface does an adequate job of changing settings and alarms, I intend to make an API at some point to allow other systems to integrate with AlarmPi
Please get in touch if you have any comments or questions about the build!
Pingback: AlarmPi: The Raspberry Pi Smart Alarm Clock | Matt Dyson
Could You share electronic schema how thisall thinks are connected tu raspberry?
Thanks a lot!
I have two additional questions:
Have you thought about Real Time Clock in this Project (in case of no internet access after raspberry reboot)?
What happens when an alarm occurs when there is access to the Internet?
One again: Thanks a lot! its great idea!
I decided not to bother with an RTC as I was running out of GPIO pins on the Pi. This could be fixed by using a B+, but for the moment I’m happy that the time will automatically update from NTP once the internet comes back up after reboot. If an alarm triggers and the internet radio source fails to play for whatever reason, then a file stored on the SD card is played and looped instead.
I got an error while running the alarmpi.py. Where can I find or install Player.py?
Traceback (most recent call last):
File “alarmpi.py”, line 21, in
File “/home/pi/Documents/alarmpi/AlarmThread.py”, line 10, in
File “/home/pi/Documents/alarmpi/MediaPlayer.py”, line 2, in
from mplayer import Player
ImportError: cannot import name Player
See https://github.com/baudm/mplayer.py for installation details
Still have the error after installing mplayer from https://github.com/baudm/mplayer.py
ImportError: cannot import name Player
Is there other things that I need to install or configure?
Make sure you’ve run the
python setup.py installcommand in the installation directory, and that you’re using the full
from mplayer import Playerwith the mplayer installation directory linked in your AlarmPi checkout.
Otherwise, maybe try using
import mplayerand reference
Thank you so much. Managed to get mplayer working.
Now I got an error: No module named LCDControl.LCDControl
Where do I get the library from?
I have copied LCDControl.py into the same directory as alarmpi.py, but still experienced the following error:
Traceback (most recent call last):
File “alarmpi.py”, line 22, in
File “/home/pi/Documents/alarmpi/LcdThread.py”, line 1, in
from LCDControl.LCDControl import LCDControl
ImportError: No module named LCDControl
You may need to change that line to
from LCDControl import LCDControlinstead, depending on how you’ve set up the libraries.
Any idea what went wrong?
[2014-12-22 22:13:38,128] INFO alarmpi: Starting up AlarmPi
[2014-12-22 22:13:38,131] DEBUG alarmpi: Loading settings
[2014-12-22 22:13:38,157] INFO Settings: Volume adjusted to 80
[2014-12-22 22:13:38,160] DEBUG alarmpi: Loading media
[2014-12-22 22:13:38,170] INFO MediaPlayer: Playing voice: ‘Starting up’
/bin/sh: 1: /usr/bin/vol: not found
[2014-12-22 22:13:38,195] DEBUG alarmpi: Loading clock
/bin/sh: 1: /usr/bin/googletts: not found[2014-12-22 22:13:38,212] DEBUG alarmpi: Loading alarm control
[2014-12-22 22:13:38,222] ERROR AlarmGatherer: GCal credentials have expired
[2014-12-22 22:13:38,224] WARNING AlarmGatherer: Remove calendar.dat and run ‘python AlarmGatherer.py’ to fix
[2014-12-22 22:13:38,232] DEBUG alarmpi: Loading LCD
[2014-12-22 22:13:38,237] INFO Weather: Weather cache expired or doesn’t exist, re-fetching
Traceback (most recent call last):
File “alarmpi.py”, line 109, in
File “alarmpi.py”, line 55, in execute
lcd = LcdThread.LcdThread(alarm,self.stop)
File “/home/pi/Documents/alarmpi/LcdThread.py”, line 52, in __init__
self.lcd = LCDControl()
File “/home/pi/Documents/alarmpi/LCDControl.py”, line 30, in __init__
self.lcd = AdafruitLcd()
File “/home/pi/Documents/alarmpi/RpiLcdBackpack/RpiLcdBackpack.py”, line 97, in __init__
IOError: [Errno 2] No such file or directory
/home/pi/Documents/alarmpi/LCDControl.py:146: RuntimeWarning: No channels have been set up yet – nothing to clean up! Try cleaning up at the end of your program instead!
A few things!
– vol script not installed – see the installer script
– googletts script not installed – see my blog post on the subject
– You need to change a line in RpiLcdBackpack.py to reflect the new i2c address on the Pi – see http://mattdyson.org/blog/2013/05/using-20×4-rgb-lcd-over-i2c-with-a-raspberry-pi/ for more details
– You haven’t set up your Google Calendar credentials properly, the log output has details on what to do to fix that
Probably worth re-iterating at this point that my code isn’t there to be used directly – I’ve made it available for reference and inspiration
I’m getting the same vol error ‘/bin/sh: 1: /usr/bin/vol: not found’ and i don’t see anything about it in the installer script. how do i get this taken care of?
The ‘vol’ script is taken from http://www.dronkert.net/rpi/vol.html – you may need to edit it to get it working on your Pi though
Thanks for responding the link worked perfect. I still need to sort out some static i get through my speakers.
I’m using a 16×4 lcd, so no extra pins, like you had, however do you think that the backlight should be dimmable also, using the lux sensor?
I also plan to add in a sunrise simulation that should go off 1/2 hour before my alarm is set. I won’t need the traffic adjustment part you added in, but that is a cool idea.
I had some problems with static as well – solved by using a USB soundcard rather than the Pi’s onboard audio.
You should be able to dim the backlight by finding the relevant pins and connecting them directly rather than using the I2C (or other) backpack. You may even be able to connect the lux sensor directly, but I chose to do the dimming through software as my hardware knowledge isn’t that great!
I had thought of adding a sunrise simulation to mine, but that’s a future expansion I think! Please share details of your alarm when it’s finished!
Thanks so much for the code! my alarm clock is really coming along now.
I’ve been banging my head against a wall with an issue with AlarmGatherer.py though, I wondered if you’d experienced the same problem. It appears that when the google api is requesting the calendar entries, something is prepending a slash before events? to the query so the url is malformed. I’m not good enough with code to work through how the URL is generated or what is causing the issue. Any input very gratefully received.
All the best,
root@piradio:/home/pi/alarmpi# python AlarmGatherer.py
Running credential check
Traceback (most recent call last):
File “AlarmGatherer.py”, line 119, in
File “AlarmGatherer.py”, line 82, in getNextEventTime
nextEvent = self.getNextEvent()
File “AlarmGatherer.py”, line 75, in getNextEvent
timeMin=”%sZ” % (time.isoformat())
File “/usr/local/lib/python2.7/dist-packages/oauth2client/util.py”, line 135, in positional_wrapper
return wrapped(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/googleapiclient/http.py”, line 723, in execute
raise HttpError(resp, content, uri=self.uri)
Seems the error was stripped.
googleapiclient.errors.HttpError: HttpError 404 when requesting https://www.googleapis.com/calendar/v3/calendars//events?orderBy=startTime&timeMin=2015-01-29T10%3A00%3A00Z&key=stripped&alt=json&singleEvents=true&maxResults=1 returned “Not Found”
Glad you’re able to take inspiration from this and create your own alarm clock – would love to see the finished product!
Sadly I’ve got no idea what’s going on with that error – the actual formatting of the URL should be handled by the
apiclient.discoverypackage, and it does seem that somewhere an extra forward-slash is being added into the URL. Perhaps you’d be better off asking in one of the Google Calendar forums, hopefully someone there may be able to help! Good luck!
Check out pynum2words module. http://sourceforge.net/projects/pynum2word/
I found it much nicer when converting larger numbers in the speech function in Weather.py. it also does the nice thing of saying “point” for decimals. Therefore I’m not limiting my numbers to integers and using a round to two decimals. I have now got my wind speed setup like this “2.24mph@NNE” spoken like “the wind is blowing two point two four miles per hour from the north-northeast”
The compass directions was done by converting the 360 degree information into compass coordinates. Your code is great i just can picture the same units of measurement in my head, so I’m converting measurements to units I’m familiar with.
Can you integrate a DS1307 Real Time Clock breakout board kit into the clock. Just in case the electric goes out. I am going to build this as my very first electronics project. But instead of plastic for the case, i want to enclose it in a nice redwood or mahogany wood enclosure sorta like the old fashion radios of the 30’s.
It should be possible to integrate a RTC into the clock, I chose not to because I was running out of GPIO pins, but with the newer Raspberry Pi’s you shouldn’t have this problem. I did originally intend to make a wooden case, but don’t currently have access to a workshop in order to make one, so I had to rely on what I could buy straight off the internet!
I’d love to see details of your project when it’s finished – please do share!
Thanks will do, i did have one more question, can you sub the 4×20 lcd display with a 2×16 instead or would this require a rework of the code too work?
You may need to make some changes to the
LCDControl.pylibrary in order to make it work with a 16×2 display, but it shouldn’t be too difficult to make it work!
Thanks Matt, I think ill just stay with the 4×20 lcd. I’m sorry too ask such Noob questions. This will sure be an undertaking for me, but i enjoy new challenges. I was running thru the wiring diagram. I will be using a raspberry pi b+ for my clock. Where would you recommend installing the RTC board up too the PI??
Don’t apologise for asking questions – it’s fantastic that you’re embracing the challenge and I’m happy to help!
The wiring of the RTC will vastly differ depending on the component you use – most seem to require either multiple GPIO pins (the B+ will have plenty of spares), or I2C, so you can just piggy-back it on to the other I2C components.
Hi, I’d love to get you Project running and i investigate some days now. Allmost working, but still one prob.
I ran into the same problem as Neil did. It isn’t a problem of the duble // in the uri I guess. Found a page that says it’s not a typo.
I think It’s because of a faulty development key. Actually I dont get what the development key is?
I created a Client ID for native application and was provided a client id and a client secret but not a derlopers key.
Can you tell me what the development key and how to get it?
Probebly obvious. But I’m somehow blind for the obvious::)
Hi..thanks for sharing
Thanks for everything.
I’ll get my Pi in few days, i really don’t know anything at.
In your , how to link the Pi with the “board system” ?
Thanks, Matt for this awesome project. Has anyone made any updates / breakthroughs lately? By chance Matt will you be doing a video tutorial about this project? I think it would really helpful not only to me but other NOOBS.
Came across your project whilst doing some research. Have you given any thoughts to commercialising aspects of you project?
Commercialising in what respect? I had thought of pursuing turning this into a product, but I think it’s much more fun to make your own!
Yes, turning it into a commercial product. Drop me a private email if you interesting in discussing this further.
I took a brief look in the project dir, looking for the Python logic that controls the amplifer but could not see it. Probably pilot error but i’ll ask just the same where should i look for the amplifier logic
There isn’t actually any Python code relating to the amplifier – it simply draws power and amplifies the input, no programming required!
I saw the SDR and SDL pins were connected in your schmatic and thought there might be some code there .
This is amazing, Matt… I’ve got a very similar rig myself. This is what the first version looked like: https://instagram.com/p/sC7tzml422/ but I’ve extended it since.
* Red 2″ Adafruit LED backpack with digits inverted. I chose red so it’s less disturbing at night. This is mounted in a black plastic enclosure from Maplin with a red cellophane sheet to tone down to a richer red colour;
* TSL2561 luminosity sensor to dim the display at night. I was using a simple photoresistor and capacitor drain setup before, but it was slowing things down;
* 433MHz RF transmitter to control mains switches linked to lamps and a desk fan; and also to my computer monitors so I can switch my Mac from my desk to a monitor mounted on an arm above my bed so I can carry on where I left off if my back starts to hurt;
* HTU21D and BMP180 for monitoring air pressure, temperature and humidity. They give an early warning alert for possible migraines.
* IR sensor for getting control signals from cheap remote controls I’ve put in various places for convenience;
* USB battery pack, which acts as a poor man’s UPS for the Pi: it’s on constant charge, and the Pi runs off it;
* Raspberry Pi, running Python to control the clock, brightness, etc. The code’s quite similar.
* LIRC for both RF transmission and the IR remote sensing;
* A simple web app for controlling from iPad.
* A box under my bed with an Arduino and four relays to control the recline/sit motors for my bed, and accelerometers on the bed frame to detect current status. This is done, but it’s not programmed or wired to the Pi yet.
* A servo motor connected to an Espruino with WiFi for controlling the tilt on the venetian blind in the window. This works, but I’m awaiting parts to power it properly.
* A drill motor and relay bank to hoist the blind itself. It’s a heavy wooden venetian blind, so it needs a good, well-geared motor to lift the 10kg. A power screwdriver/drill from Lidl whose battery had died serves the purpose. I’m just finding time to hook it up.
The same Pi also acts as a Wii remote proxy to send Bluetooth commands to my iPad (long story), and a printer server for a couple of label printers and other widgets.
I’ve looked into using Jasper (http://jasperproject.github.io) for constant speech recognition to control all this, but I haven’t got a good enough recognition rate yet.
Nice project. I have a few questions about the case. Did you purchase 6 pre-cut sheets? What kind of tools did you use to make the screw holes/hold for buttons/speakers? Thanks.
The plastic was ordered from PlasticSheets.com cut to size (the main panels being 1/2 A4 size for ease of prototyping). I drilled pilot holes for the screws with a standard hand-held drill, and the holes for buttons/speakers were done by making multiple holes with the drill and then filing the remainder away – this was quite a tedious process for the speaker holes!
Hi, kind of new to python, and pi as a whole. I was wondering how hard it would be to use the 16×4 lcd to have one button for a clock, and one for weather.Thanks, any tips are greatly appreciated.
I started out working on a wake-up light/alarm on the arduino with additional fm tuner, rtc and PWM-controllable power output for slowly rising first yellow light and then white light up to 100 Watt in total. (Why call it a wake up light when there is hardly any light output..)
I have now reconsidered and would like to base it all on a raspberry instead. Your project seems like a good start allthough I would want to switch to a touch lcd screen probably. They allow for very nice visual presentation/gui and make navigating menu’s way more simple for the user. 🙂 Also, touch screens are getting very cheap lately. A 5″ hdmi based screen is only 30 $ and if we want to go very cheap we can even use a 3,5″ touchscreen for just 15 $. 🙂
Hi Matt, I have problems with Wiring audio amplifier.
I have max98306. On your’s picture there are 10 pins. but my part have only 9 – http://www.adafruit.com/products/987
Can You help mi
I think the information on the Adafruit website regarding the amplifier should answer your questions
i’ve got the same issue. Any idea how you solved it?
It seems that te MAX98306 amplifier is changed in the mean time. Only have the SDWN pin. No SDL or SDR
Just found it, He uses another type.
Stereo 2.1W Class D Audio Amplifier – TPA2012
This is another amplifier from adafruit with the SDL and SDR pins. Not the MAX98306 he mentioned above.
My Feature Wish List:
– Smartphone Like simple to use Alarm Interface (Apple iPhone)
– Display additional International Times (Local + 2 More)
– Time Zone Support for Alarm: Wake me up when it is 3:00pm in India
– Precision: Atomic and/or other sources. The time should be sync’d with some source. Automatic DST.
– Fail Safe mechanisms (don’t want to miss the flight) like backup battery power
Really great work,
I am trying to modify the file Menucotrl.py to have a sub menu with extra options, have you some tips to do that easily ?
Amazing project. I am really excited. I don’t have experience with python therefore do you think it will be feasible to carry out everything necessary to build this alarm?
Any idea what went wrong?
Traceback (most recent call last):
File “/usr/lib/python2.7/threading.py”, line 810, in __bootstrap_inner
File “/home/pi/pywork/AlarmThread.py”, line 181, in run
File “/home/pi/pywork/AlarmThread.py”, line 96, in soundAlarm
File “/home/pi/pywork/MediaPlayer.py”, line 21, in soundAlarm
File “/home/pi/pywork/MediaPlayer.py”, line 50, in playStation
self.player = Player()
File “/home/pi/pywork/mplayer/core.py”, line 109, in __init__
File “/home/pi/pywork/mplayer/core.py”, line 322, in spawn
File “/usr/lib/python2.7/subprocess.py”, line 710, in __init__
File “/usr/lib/python2.7/subprocess.py”, line 1335, in _execute_child
OSError: [Errno 2] No such file or directory
Howdy Mr. Matt!
I really like this project, I am making my own “timer” for a school project and would like to use both a 20×4 lcd and an 4 digit 7 segment display, would you mind explaining how you wired them together, and the code you used to make them run?
Thank you for your contribution to the community!
Thank you for taking the time to post this. I am using your project as inspiration for my own.
I chose to build the case from a single sheet of acrylic, purchased from the local hardware store.
Using a heat gun I bent each side, one at a time, until I had a box. For added strength I epoxied the two ends together where they met.
Total cost of materials was a little under 20 US dollars for an 18″x24″ sheet of acrylic, which was enough to build two cases.
Now I need to carefully drill out the holes.
After carefully cutting and drilling, I’ve got the components mounted to the front.
Im going ro make one but insted of turn thing i use extera 3 buttons im useing a rasbery pi 3
Thank you for your blog! I’m using a 1.2″ 7 segments LED HT16K33 and a I2C 20×4 LCD both connected by I2C. I have the problem that the raspberry pi only detect one of them when they’re both connected. I’m using the command sudo i2cdetect -y 1. When I disconnect one It can detect both, the problem is when I connect both together.
The 7 segments has 3v and 5v Vcc, and both have to be connected. I’ve tryied to desconnect one of them and see what happen… And If i disconnect 5v. The raspberry pi can detect both but the 7 segments don’t work well.
I think I’m going to buy 0.56″ 7 segments, but any help will save some money!
Thank you for your contribution to the community!
I’m a bit confused by this statement – if one of the devices is disconnected, how can the rPi detect it?!
The only obvious thing I can think of is if they’re trying to use the same I2C address? If not, try using a separate 5v pin on the rPi for each device, perhaps combined they’re trying to pull too much power and not functioning correctly?
Sorry for the misunderstanding. The problem is when both are connected the 7 segments is not detected and it is not working. I get the “Error accessing 0x70: Check your I2C address “. The address for the LCD is 27 and 70 for the 7 segments, so it can’t be an address problem. I’ve tried using separate 5v and is still not detected.
I’ve bought the LCD from china, so maybe that’s the problem, I think I’m going to buy an adafruit LCD and try it.
Thank you Matt for helping me!
I’ve used a 7 segments LED 0.56″ HT16K33 Backpack from Adafruit and now it’s working perfect. I don’t know why but with the 1,2″ 7 segments the raspberry pi didn’t recognize the i2c address.
Awesome project (and glad to see you’re still responding to peeps!). I had an idea to do something similar this and your project has saved me some of the legwork and inspired me to experiment some more, e.g. I’m integrating a RTC module and touch sensors instead of buttons, and no LCD display.. at least for now, I was contemplating an App/API for management. I note you used a USB soundcard and I was wondering which one you recommend? (looked like: Plugable USB Audio Adapter (C-Media HS 100B Chip)
This is my current prototype. https://www.dropbox.com/sc/csi6vq4q6t1mttr/AAAVV4kLklVd6IELmYt6JEYua
I have perspex sheet and acrylic glue. I think that’s probably going to be the hardest part, to make it aesthetically pleasing too! I have a cunning plan tho, so I will let you know how it goes 😀
Would raise my hand for the wake up light 😀
Some other ideas:
1.) I sometimes forgot to switch off the alarm clock when I´m not at home (working in another country). So an option to discover me (e.g. my phone is in the same WLAN as the clock) might prevent it from waking up the neighbors 😀
2.) it would be great if we could have a 3rd button which can be enabled or not. The 3rd button will switch off the numbers and the display during the night. Most clocks i had (and hate) produce so a bright light from the numbers for the clock that’s hard to sleep. So if i need the time in the night, i could then press the 3rd (maybe bigger button) to get that solved. Or even cooler … it listen to my voice and if I need the clock i could as for it ;-).
You might consider this one.
Some projects of mine make use of a so called Out-0f-Office mechanism. At the moment it is implemented as a semaphore e.g. ooo.sem (filename). The ooo.sem can be set even when I am out via a vpn tunnel to one of the raspi’s. Contents ooo.sem: 2017-10-01|15:15:49 | cv_utils.py Out of Office t=NO. Scripts read the ooo.sem check date/time stamp en status – YES/NO
The system is not connected to google agenda or other outside dependencies since these services might be disrupted, not properly updated or even changed without notice.
Thus some of the outside lights stay off, hot water boiler is not heated, some parts of the security system are de/activated, and a daily report on system performance etc. is mailed; contents is depending on am I in or out.
any way to show the time and other stuff to a small monitor instead
I really like the look of this and want to try and put something similar together. I do have a few questions though.
-How does everything connect to the Pi itself? The circuit diagram doesn’t show that connection.
-What are the connectors you have used .for Ethernet/power from the edge of the case to the Pi?
-Any chance you could put some more photos up showing how everything connects? Or a slightly more detailed guide on how to hook it all up?
– The circuit diagram shows a breakout from the Pi using an Adafruit “Pi Cobbler” – this is exactly the same as the pinout on the pi.
– Those were just a couple of cheap male to female extensions, I believe they were both from Adafruit
– I don’t think photos will help really – mine looks like an absolute mess! The wiring diagram is about as simple as I can make it, hopefully you can figure it out from that!
I was going through this project. While I was trying to run the alarmgatherer.py. I always get the same error : unparsedFlagAccessError: Trying to access flag auth_local_webserver before flags were parsed. Enter verification code:
I tried to fix it using different ways but was not able to. Do you want what the problem is ? with this.
Liked your alarm clock so much I built one for myself. Some modifications, of course.
I added the Pi Touchscreen and eliminated all buttons and switches. Added support
for SDR radio in addition to streaming & MP3. Added a temperature sensor and thermometer
on the clock face. The wife vetoed a GPS, wifi lighting control and Google integration,
but it was still fun!
Thanks for the inspiration,
I like the sound of the Touchscreen integration was it easy to integrate if I may ask?
I am heading down the same path, but having some issues. Could you share info on your configuration and which utilities you used to drive the LCD?
Thanks very much!
I was having problem with mplayer so have swapped to vlc to see if I could make it work plus I have gone with the uses of using a json file for the authentication instead of the placing the details in the file. As the google, guys have done here: https://developers.google.com/gmail/api/quickstart/python
CLIENT_SECRET_FILE = ‘client_secret.json’
I am new at this. I have everything wired. How do I get the .py on the raspberry pi and how do I get them all running to make the finished project? I have no coding knowledge and I cannot figure out how to get it all running. I have tried it before. Should I reinstall the RPI software and start from scratch?
This has been a fun project but i have an issue.
i have everything working except the on screen menu as long as i comment out the imports of rotaryencoder and switch gaugettes in the InputWorker.py. if i don’t comment them out i get “wiringPiSetup*: You must only call this once per program run. This is a fatal error. Please fix your code.” any idea how to fix this error?
Pingback: Internet Clock radio - Options - Canadian TV, Computing and Home Theatre Forums
What brand and type of power supply do you use for feeding the alarmPi project?
Hi Ronald – it’s a standard USB power supply, wired into the case using this – https://www.adafruit.com/product/937
Is it possibil to realize the Alarmpi on a Raspberry Model 3B+? And how does it works?
Tanks for the answer.
Hi! Yes, this should be possible with any Raspberry Pi, the instructions above won’t be any different. Good luck!
I have some trouble with the file testEncoder.py. If I try to run the file the following error occurs:
Traceback (most recent call last):
File “/home/pi/alarmpi/testEncoder.py”, line 5, in
encoder = gaugette.rotary_encoder.RotaryEncoder(A_PIN, B_PIN)
TypeError: __init__() missing 1 required positional argument: ‘b_pin’
I do not know what the problem is. I hope you can help me with the solution.
Hey Matt! I love this idea, and am excited to get started on mine!
My question is this: How would I get the clock to play music for alarms exclusively from the SD card/USB instead of from an internet or radio station? I would prefer to strictly have it play music that I put onto my card.
Thanks in advance!
Hi Justin – this would definitely be possible with some modification of the code. There’s already code for playing media files within MediaPlayer.py, that’d be the best place to start. Good luck!