Giter Site home page Giter Site logo

arthurlutz / alarmpi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from guysoft/alarmpi

0.0 1.0 0.0 22 KB

A Raspberry Pi distribution that turns your Pi in to an IOT telegram-controlled alarm clock

License: GNU General Public License v3.0

Shell 61.58% Ruby 38.42%

alarmpi's Introduction

AlarmPi

A Raspberry Pi distribution to run AlarmBot out of the box and the scripts necessary to load it at boot. This repository contains the source script to generate the distribution out of an existing Raspbian distro image. You can download a built image here

AlarmPi is based on CustomPiOS

Where to get it?

Official mirror is here

How does it look?

Here is a blog post about this, with even more install and usage instructions.

How to use it?

  1. Unzip the image and install it to an SD card like any other Raspberry Pi image
  2. Configure your WiFi by editing alarmpi-network.txt or alarmpi-wpa-supplicant.txt on the root of the flashed card when using it like a flash drive
  3. Set a telegram bot token in config.ini
  4. Boot the Pi from the SD card

Requirements

  • Raspberrypi 1/zero and newser or device running Armbian and an internet connection.
  • 2A power supply
  • Speakers connected to the Pi.

Features

  • An IOT alarm that you can set and edit using Telegarm.

Developing

Requirements

  1. qemu-arm-static
  2. CustomPiOS
  3. Downloaded Raspbian image.
  4. root privileges for chroot
  5. Bash
  6. realpath
  7. sudo (the script itself calls it, running as root without sudo won't work)

Build AlarmPi From within Raspbian / Debian / Ubuntu

AlarmPi can be built from Debian, Ubuntu, Raspbian. Build requires about 2.5 GB of free space available. You can build it by issuing the following commands:

sudo apt-get install realpath p7zip-full qemu-user-static

git clone https://github.com/guysoft/CustomPiOS.git
git clone https://github.com/guysoft/AlarmPi.git
cd AlarmPi/src/image
wget -c --trust-server-names 'https://downloads.raspberrypi.org/raspbian_lite_latest'
cd ..
../../CustomPiOS/src/update-custompios-paths
sudo modprobe loop
sudo bash -x ./build_dist

Building AlarmPi Variants

AlarmPi supports building variants, which are builds with changes from the main release build. An example and other variants are available in the folder src/variants/example.

To build a variant use:

sudo bash -x ./build_dist [Variant]

Building Using Vagrant

There is a vagrant machine configuration to let build AlarmPi in case your build environment behaves differently. Unless you do extra configuration, vagrant must run as root to have nfs folder sync working.

To use it:

sudo apt-get install vagrant nfs-kernel-server
sudo vagrant plugin install vagrant-nfs_guest
sudo modprobe nfs
cd AlarmPi/src/vagrant
sudo vagrant up

After provisioning the machine, its also possible to run a nightly build which updates from devel using:

cd AlarmPi/src/vagrant
run_vagrant_build.sh

To build a variant on the machine simply run:

cd AlarmPi/src/vagrant
run_vagrant_build.sh [Variant]

Usage

  1. If needed, override existing config settings by creating a new file src/config.local. You can override all settings found in src/config. If you need to override the path to the Raspbian image to use for building AlarmPi, override the path to be used in ZIP_IMG. By default, the most recent file matching *-raspbian.zip found in src/image will be used.
  2. Run src/build_dist as root.
  3. The final image will be created in src/workspace

Code contribution would be appreciated!

alarmpi's People

Contributors

guysoft avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.