Page 1 of 1

Make raspberry pi board into alarm clock with mx linux

Posted: Sat Mar 13, 2021 4:57 pm
by don570

Make raspberry pi board into alarm clock

My project was to make a raspberry pi 3+ board into an alarm clock over a home network using an Intel computer running fatdog linux computer to give the commands.

Instructions : I connected cheap USB powered speakers to my raspberry pi for sound. The power for the speakers
had to come from a wall adapter because raspberry pi doesn't have enough power.

Installed mx linux on raspberry pi --->
because it has bluetooth installed as default -- very easy to set up.
Not that bluetooth has anything to do with shalarm :lol:
https://mxlinux.org/blog/fluxbox-raspbe ... gout-beta/
___________________________________________________________________
Download shalarm
https://github.com/jahendrie/shalarm
I installed sdhalarm --> It just requires the 'make' command in the terminal
I changed the alarm sound to be more distinct
using config file --> $HOME/.config/shalarm/shalarm.cfg or /etc/shalarm.cfg
______________________________________________________________

There is raspi config app that is useful in setting up ssh to launch automatically at boot time.
_______________________________________________________
From my fatdog linux computer --> in terminal

To start up the ssh server on the pi

# ssh -Y pi@192.168.1.110
pi@192.168.1.110's password:
Linux raspberrypi 5.10.11-v7+ #1399 SMP Thu Jan 28 12:06:05 GMT 2021 armv7l

Here are instructions for running shalarm

pi@raspberrypi:~ $ shalarm --help
Usage: shalarm TIME

TIME is a 24-hr formatted time string.
For example, ten PM may be formatted as follows:

22:00:00
22:00
22
22.00.00
2200
220000

As an aside, formatting it as '10:00' will get you ten AM, and
'10 pm' won't work.

Arguments:
-h or --help: Print this help screen
-v or --version: Print version and author info
-t or --test: Test alarm set to 5 seconds in the future
-d or --debug: Check out what's going wrong (or right)
--snooze N: Enable snooze, set interval to N seconds
--timeout N: Enable timeout, set limit to N seconds

Here is typical usage....
A short alarm at 1:30 pm

pi@raspberrypi:~ $ shalarm --timeout 7 1320

Alarm is ACTIVE and set to 13:20:00
45s left to sleep

(Alarm timeout: 7 seconds)
Use CTRL-C to quit

WAKE UP!
Alarm timeout reached (7 seconds)
Exiting

_________________________________________________

Unusual things about mx linux

-No Xdialog install
-gtkdialog scripts need to use bash shell rather than sh
Therefore just change first line of script.
________________________________________________


Re: Make raspberry pi board into alarm clock with mx linux

Posted: Sun Mar 14, 2021 1:15 am
by wiak

I'll send you an alarm clock that just needs an AA battery if you send me your raspberry pi in exchange.


Re: Make raspberry pi board into alarm clock with mx linux

Posted: Sun Mar 14, 2021 4:34 am
by bigpup

Does it adjust for Daylight Savings time?
When that goes into affect in a few hours.
Will it change into a PI 4? :lol:

I am with you!
You did it because you can :thumbup:


Re: Make raspberry pi board into alarm clock with mx linux

Posted: Tue Mar 16, 2021 7:22 pm
by don570

I'll send you an alarm clock that just needs an AA battery if you send me your raspberry pi in exchange.

The world's most expensive alarm clock, however I like using it because it's simple to set up and I have given it a loud ringtone.
I have it always connected to my network.

But playing music using bluetooth is what it's best at.
___________________________________________________________


Re: Make raspberry pi board into alarm clock with mx linux

Posted: Tue Mar 16, 2021 8:55 pm
by wiak
don570 wrote: Tue Mar 16, 2021 7:22 pm

I'll send you an alarm clock that just needs an AA battery if you send me your raspberry pi in exchange.

The world's most expensive alarm clock, however I like using it because it's simple to set up and I have given it a loud ringtone.
I have it always connected to my network.

But playing music using bluetooth is what it's best at.
___________________________________________________________

Good its also doing the bluetooth music bit. Anyway, truth is I once used an old BBC computer for nothing much more than a sophisticated alarm clock many years back... so I'm not actually criticising the usage. I was prouder with the rotating cube I got the BBC to draw on an old oscilloscope - daft thing about that was that the code for the rotating cube was all in 6502 cpu assembly language. I used the same algorithm for various much smaller micro-controller type boards (Z80 being the first cpu I wrote it for) - so used whole computer just to digital to analog convert (for inputs to the oscilloscope) just via 3 (binary-weighted) resistors (as the simplest ever three-bit DAC).


Re: Make raspberry pi board into alarm clock with mx linux

Posted: Thu Mar 18, 2021 7:44 pm
by don570

I was able to get OSMO to work on mx linux (raspberry pi)

Method :

I get deb packages from official raspbian repository
http://archive.raspbian.org/raspbian/

and download them and open them up in fatdog linux

In mx linux I use command in terminal..

sudo thunar

to get a filemanager that can drag files into /usr/bin/

_________________________________________________________

Also got mpscan compiled...
It can find addresses on network quickly.
https://dl.packetstormsecurity.net/UNIX ... 1.0.tar.gz
_____________________________________________________________


Re: Make raspberry pi board into alarm clock with mx linux

Posted: Sat Mar 20, 2021 6:21 pm
by don570

I was able to get Xdialog to work on mxlinux by grabbing the version out of micko's repository

https://distro.ibiblio.org/puppylinux/a ... l_rb81.pet

Permissions are important. I have to superuser to change /usr/bin/
_____________________________________________________________________________________