Skip to content

Python Raspberry Pi Software to control coin operated lighting system

License

Notifications You must be signed in to change notification settings

tlherr/CH924-Lights

Repository files navigation

Lights

Python Raspberry Pi Software to control coin operated lighting system

Installation

Using Raspbian Jessie Lite (Kernel 4.1) Linux raspberrypi 4.1.13-v7+ #826 SMP PREEMPT Fri Nov 13 20:19:03 GMT 2015 armv7l GNU/Linux

Install git

sudo apt-get install git

Clone Source

git clone https://github.com/tlherr/CH924-Lights.git
cd CH924-Lights
chmod +x dependencies.sh
./dependencies.sh
python main.py

Usage

To run the application simply run:

python main.py

or use cron to automatically start on boot:

@reboot sh /home/pi/CH924-Lights/run.sh >/home/pi/logs/lights 2>&1

To View the WebUI simply visit:

http://raspberrypiipaddress:8000/admin

API endpoints can be called from

http://raspberrypiipaddress:8000/api

Run on startup

crontab -e

Insert the following:

@reboot sh /home/pi/CH924-Lights/run.sh >/home/pi/logs/lights 2>&1

This will run the script on system boot and log the output to /home/pi/logs/lights

Debugging

If for any reason the webserver crashes a debug log will be generated in the project directory

Wiring

Below is a diagram of the coin machine wiring:

10K resistor used

diagram

About

Python Raspberry Pi Software to control coin operated lighting system

Resources

License

Stars

Watchers

Forks

Packages

No packages published