Skip to content

Commit 8a0978b

Browse files
authored
Alarm updates (#71)
* Allow users to add their own alarm tones. * More built-in alarm tones.
1 parent 84a7111 commit 8a0978b

30 files changed

Lines changed: 164 additions & 79 deletions

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ testem.log
3838
/typings
3939
.first-time-install
4040
node_path.txt
41+
/src/assets/audio/user
42+
/src/assets/audio/user/
4143

4244
# e2e
4345
/e2e/*.js

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 3.1.0
2+
3+
* Allow users to add their own alarm tones.
4+
* More built-in alarm tones.
5+
16
## 3.0.0
27

38
* Added optional sky maps, allowing the clock face to be replaced with a map of the planets, stars, and constellations as they appear in your local sky.

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,14 @@ A touchscreen is the most practical way to use the alarm features of this clock,
124124

125125
As an alternative to silencing and snoozing alarms with a touchscreen, there are also keypress values associated with these actions. While you probably wouldn’t want a full-size keyboard attached to your clock all the time, a small set of programmable USB keys, or even a single key, could be used to provide a more tactile yet compact way of controlling alarms.
126126

127+
A Bluetooth numeric keypad, while not exactly the ideal form factor, can provide a convenient and inexpensive means of remotely silencing and snoozing alarms.
128+
127129
Stop alarm: &lt;space&gt; *or* Enter<br>Snooze 5 minutes: 5<br>Snooze 10 minutes: 0 *or* S<br>Snooze 15 minutes: . *(period)*<br>
128130

131+
### Custom alarm tones
132+
133+
When you perform the standard dedicated device installation, a folder will be created for your own alarm tones at `/home/pi/awc-alarm-tones`. Simply add MP3, MP4, or OGG audio files to this folder to make them available for alarms.
134+
129135
### Wind speed
130136

131137
<img src="https://shetline.com/readme/aw-clock/3.0.0/wind_barbs.png" width=820 height=55 alt="wind barbs">
@@ -308,7 +314,7 @@ The following environment variables affect how the server part of this software
308314
* `AWC_ALLOW_CORS`: CORS stands for “Cross-Origin Resource Sharing”, and is an HTTP security feature. Most HTTP servers disable CORS by default. This software, however, turns CORS on by default (by setting this environment variable to `true`) to allow data sharing when the server is running on port 4201 and the client on port 4200 during development testing. When running the clock as a deployed service, however, you can disable CORS by deleting `AWC_ALLOW_CORS` from the `/etc/defaults/weatherService` file, or by setting it to `false`.
309315
* `AWC_GIT_REPO_PATH`: The path to your aw-clock Git repository.
310316
* `AWC_GOOGLE_API_KEY`: An API key for Google geocoding, used to convert GPS latitude/longitude into city and place names. As an alternative, or in addition, you can set up `AWC_WEATHERBIT_API_KEY` for both geocoding and weather data.
311-
* `AWC_KIOSK_MODE`: `true` or `false` for whether or not the dedicated-device web browser is launched in kiosk mode (the default) or not.
317+
* `AWC_KIOSK_MODE`: `true` or `false` for whether or not the dedicated-device web browser is launched in kiosk mode (the default) or not. *(Note: Changing this setting alone will not change kiosk behavior. If you want to change kiosk mode without running `build.sh` again, you must edit the file `/home/pi/.config/lxsession/LXDE-pi/autostart` to add or remove the `--kiosk` parameter from the `chromium-browser` command.)*
312318
* `AWC_LOG_CACHE_ACTIVITY`: As a debugging/development aid, set to `true` to enable additional logging of the server’s web cache behavior.
313319
* `AWC_NTP_SERVERS`: Optional alternate NTP servers used by this software, as a comma-separated list of domain names. (See previous comments about selecting alternate servers.)
314320
* `AWC_PORT`: By default the deployed server runs on localhost port 8080, but you can use a different port if you prefer.

build.js

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/// <reference path="./ambient.d.ts" />
12
import * as Chalk from 'chalk';
23
import { exec } from 'child_process';
34
import * as fs from 'fs';
@@ -1216,6 +1217,9 @@ async function doServiceDeployment(): Promise<void> {
12161217
showStep();
12171218
write('Moving server to ~/weather directory' + trailingSpace);
12181219

1220+
if (!fs.existsSync(userHome + '/awc-alarm-tones'))
1221+
fs.mkdirSync(userHome + '/awc-alarm-tones');
1222+
12191223
if (!fs.existsSync(userHome + '/weather'))
12201224
await monitorProcess(spawn('mkdir', [userHome + '/weather']), spin);
12211225
else

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aw-clock",
3-
"version": "3.0.0",
3+
"version": "3.1.0",
44
"license": "MIT",
55
"author": "Kerry Shetline <kerry@shetline.com>",
66
"scripts": {

sass/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sass/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aw-clock-sass",
3-
"version": "3.0.0",
3+
"version": "3.1.0",
44
"description": "SASS builder for aw-clock",
55
"keywords": [
66
"sass"

0 commit comments

Comments
 (0)