Skip to content

Latest commit

 

History

History

DigitalNightstand.tingapp

Digital Nightstand

Digital Nightstand for the Tingbot/Raspberry Pi.

Features includes:

  • Weather Forecast
  • Digital Clock
  • Alarm Clock
  • Web Frontend
  • Translated into:
    • English (en)
    • Norwegian Bokmal (nb)
    • Norwegian Nynorsk (nn)

Button shortcuts

Button Action
midright Snooze current alarm
midright (hold) Stop current alarm
right (hold) Take screenshot

Weather Forecast

Get weather forecast for a place on Earth.

Currently supports:

  • Display current weather conditions on the Clock page - summary, temperature and icon
  • Displaying the summary in different languages
  • Display the temperature by different units - location dependent or user set

Powered by Dark Sky

Digital Clock

Shows the current time and date. The time is shown big, and the date medium size but still readable.

The time and date is formatted based on the locale of the computer.

Also shows the next scheduled alarm (if any).

Alarms

Supports configurable alarms from a JSON file.

The alarms can have a customized title, time, repeat, and days.

Easily set-up from the Web Frontend.

Web Frontend

The Web Frontend provides configuration and control of the Nightstand from a web browser.

Accepts connections default on port 8000.

Supports:

  • Setting up the alarms (total 5)
  • Setting up the weather forecast (including latitude/longitude coordinates, desired language and units)

Configuration and Data Files

The configuration and data files are stored within a specific folder path unique for each platform.

  • config.json - contains all user configured settings. This includes all settings configured with the Web Frontend (excluding the Dark Sky API Key)
  • weather/private.json - contains private user data that should not be shared. This includes the Dark Sky API Key set from the Web Frontend

Dark Sky API Key

When downloaded weather data using the weather forecast service, a Dark Sky API Key must be provided.

This can be set from the Web Frontend.

When the value of Dark Sky API Key field is changed the API Key is automatically saved to weather/private.json. If successful the field is cleared to prevent reading of the API key.

The Dark Sky API Key is never loaded to the configuration page.


Acknowledgements

This application has been inspired, and contains/uses other projects.

Python libraries

This project uses the following Python libraries:

Alarm

Uses Material alarm sounds from the platforms_frameworks_base repository by The Android Open Source Project.

The Web Frontend

Built with jQuery Mobile by jQuery Foundation, Inc. released under the MIT license.

Uses the nativeDroid2 template by Raphael Wildhaber, Godesign Webpublishing GmbH released under the MIT license.

Also uses the DateBox JavaScript library by J.T. Sage released under the MIT license.