From 527dd34f47219446923c8df7b46719b9f553564f Mon Sep 17 00:00:00 2001 From: Curious James <18385102+CuriousJames@users.noreply.github.com> Date: Sun, 10 Mar 2024 17:38:02 +0000 Subject: [PATCH 1/3] Update README.md --- README.md | 50 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index a1f2c6b..63f2335 100644 --- a/README.md +++ b/README.md @@ -27,17 +27,32 @@ Also included in 'Extras' is the [Fritzing](https://fritzing.org/) pcb/breadboar - Hardware - Raspberry Pi (ideally 2 or up) - Software + - This repository + ``` + sudo apt install git && git clone https://github.com/CuriousJames/DIYAC.git + ``` - Wiegand.py put in the project directory (as obtained from: [Abyz.me.uk](http://abyz.me.uk/rpi/pigpio/code/wiegand_py.zip)) - - `wget http://abyz.me.uk/rpi/pigpio/code/wiegand_py.zip` - - `unzip wiegand_py.zip` + ``` + wget http://abyz.me.uk/rpi/pigpio/code/wiegand_py.zip && unzip wiegand_py.zip && rm -rf wiegand_py.zip + ``` - Enable PiGPIO on the Pi (just do this once and it will start automatically on boot) - - `sudo systemctl enable pigpiod` + ``` + sudo apt-get update && sudo apt-get install pigpio python-pigpio python3-pigpio && sudo systemctl enable pigpiod + ``` - SD Notify - with pip3 - - install pip3 `sudo apt-get update && sudo apt-get install python3-pip` - - install python sdnotify `pip3 install sdnotify` + - install pip3 + ``` + sudo apt-get update && sudo apt-get install python3-pip + ``` + - install python sdnotify + ``` + pip3 install sdnotify + ``` - with apt - - `sudo apt install python3-sdnotify` + ``` + sudo apt install python3-sdnotify + ``` - Config - allow sudo group to run systemctl start pigpiod without password @@ -46,13 +61,24 @@ Also included in 'Extras' is the [Fritzing](https://fritzing.org/) pcb/breadboar The hard way (hopefully there will be a script to do this and more soon!) 1. If '/home/pi/diyac' IS your diyac folder location: - 1. `sudo systemctl link /home/pi/diyac/diyac.service` -2. If '/home/pi/diyac' is NOT your diyac folder location: + ``` + cp /home/pi/DIYAC/diyac.service_example /home/pi/DIYAC/diyac.service && sudo systemctl link /home/pi/DIYAC/diyac.service && sudo systemctl enable diyac.service + ``` +1. If '/home/pi/diyac' is NOT your diyac folder location: 1. change the 'ExecStart' line in 'diyac.service' to 'ExecStart=/usr/bin/python3 /your/diyac/folder/location/main.py' - 2. `sudo systemctl link /your/diyac/folder/location/diyac.service` -4. `sudo systemctl enable diyac.service` -5. `sudo reboot` -6. Done - The service will now run on startup of the Pi + 2. + ``` + sudo systemctl link /your/diyac/folder/location/diyac.service + ``` +2. + ``` + sudo systemctl enable diyac.service + ``` +3. + ``` + sudo reboot + ``` +4. Done - The service will now run on startup of the Pi ## Settings ## From bd75a060ce2e000aa9d5494ac86aa01003d6551a Mon Sep 17 00:00:00 2001 From: Curious James <18385102+CuriousJames@users.noreply.github.com> Date: Mon, 11 Mar 2024 07:16:29 +0000 Subject: [PATCH 2/3] Update README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 63f2335..04a5ab4 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,11 @@ Also included in 'Extras' is the [Fritzing](https://fritzing.org/) pcb/breadboar - Hardware - Raspberry Pi (ideally 2 or up) - Software + - Install raspbian legacy 64bit lite (as you don't need a desktop env) with the raspberry pi imager + - Update your pi + ``` + sudo apt update && sudo apt dist-upgrade + ``` - This repository ``` sudo apt install git && git clone https://github.com/CuriousJames/DIYAC.git From 57ad22f1d394579835d9a75555853b8266ed55e1 Mon Sep 17 00:00:00 2001 From: Curious James <18385102+CuriousJames@users.noreply.github.com> Date: Mon, 11 Mar 2024 07:56:40 +0000 Subject: [PATCH 3/3] Update README.md --- README.md | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 04a5ab4..94580f9 100644 --- a/README.md +++ b/README.md @@ -34,11 +34,11 @@ Also included in 'Extras' is the [Fritzing](https://fritzing.org/) pcb/breadboar ``` - This repository ``` - sudo apt install git && git clone https://github.com/CuriousJames/DIYAC.git + sudo apt install git && git clone https://github.com/CuriousJames/DIYAC.git && cd DIYAC ``` - Wiegand.py put in the project directory (as obtained from: [Abyz.me.uk](http://abyz.me.uk/rpi/pigpio/code/wiegand_py.zip)) ``` - wget http://abyz.me.uk/rpi/pigpio/code/wiegand_py.zip && unzip wiegand_py.zip && rm -rf wiegand_py.zip + wget http://abyz.me.uk/rpi/pigpio/code/wiegand_py.zip && unzip wiegand_py.zip && rm -rf wiegand_py.zip && rm -rf wiegand_old.py ``` - Enable PiGPIO on the Pi (just do this once and it will start automatically on boot) ``` @@ -46,20 +46,18 @@ Also included in 'Extras' is the [Fritzing](https://fritzing.org/) pcb/breadboar ``` - SD Notify - with pip3 - - install pip3 - ``` - sudo apt-get update && sudo apt-get install python3-pip - ``` - - install python sdnotify - ``` - pip3 install sdnotify - ``` + ``` + sudo apt-get update && sudo apt-get install python3-pip && sudo pip3 install sdnotify + ``` - with apt ``` sudo apt install python3-sdnotify ``` - Config - - allow sudo group to run systemctl start pigpiod without password + - Create DIYAC user, diable login and add to sudoers group + ``` + sudo useradd -M diyac && sudo usermod -L diyac + ``` ## Installing the service ##