From 57313796bb9ebaaa6a48173edd683a11b52fe94e Mon Sep 17 00:00:00 2001 From: Ben Nicholson Date: Mon, 15 Jun 2026 09:37:08 +1000 Subject: [PATCH] revert 2a664f3eed2f5213ed4a1306fc63109fa21b4e33 revert Upload files to "RRCS-Scripts" --- RRCS-Scripts/README.md | 23 --------- RRCS-Scripts/ras_pi_RRCS_BusyLight.py | 69 --------------------------- RRCS-Scripts/rrcs-trigger | 2 - RRCS-Scripts/rrcs-trigger.service | 18 ------- 4 files changed, 112 deletions(-) delete mode 100644 RRCS-Scripts/README.md delete mode 100644 RRCS-Scripts/ras_pi_RRCS_BusyLight.py delete mode 100644 RRCS-Scripts/rrcs-trigger delete mode 100644 RRCS-Scripts/rrcs-trigger.service diff --git a/RRCS-Scripts/README.md b/RRCS-Scripts/README.md deleted file mode 100644 index e02868e..0000000 --- a/RRCS-Scripts/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# RRCS Scripts - -## Dependancies - - RRCS Windows Client (Tested 8.9) - - An Artist frame - - Rasberry Pi (Tested on Ras Pi 1) - - Raspian/Debian - - Python 3 - - Python 3 Requets - - Python 3 RPi.GPIO - -## Install instructions - - - Downloand script into /usr/local/bin/ - - Download rrcs-trigger file and place into /usr/local/bin/ - - Download rrcs-trigger.service and place it into /etc/systemd/system/ - - Run the follwoing commands to enable the service on boot. ```sudo systemctl enable rrcs-trigger.service``` and ```sudo systemctl start rrcs-trigger.service``` - - Run the following command to see how its booting up. ```watch systemctl status rrcs-triggers.service``` - -- Modify the script to have your RRCS Server IP address and port. - -## Logging - - All logs are printed to journalctl, this includes when the button is pressed. \ No newline at end of file diff --git a/RRCS-Scripts/ras_pi_RRCS_BusyLight.py b/RRCS-Scripts/ras_pi_RRCS_BusyLight.py deleted file mode 100644 index 6e0500f..0000000 --- a/RRCS-Scripts/ras_pi_RRCS_BusyLight.py +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/python3 -import os -os.environ['RPI_LGPIO_REVISION'] = "800012" -import time -import requests -import RPi.GPIO as GPIO -import socket - - -RED = "\033[91m" -GREEN = "\033[92m" -RESET = "\033[0m" - - -PressVirtKey1OnBench = ''' - - PressKeyEx - - C0000000001 - 64 - 46 - 0 - 2 - 0 - 1 - 1 - 1 - 1 - - -''' - -ReleasePressVirtKey1OnBench = ''' - - PressKeyEx - - C0000000002 - 64 - 46 - 0 - 2 - 0 - 1 - 1 - 0 - 1 - - -''' - -def button_callback(channel): - if GPIO.input(channel): - print(f"{RED}Button pressed{RESET}") - r = requests.post('http://10.75.120.229:8193',headers={'content-type': 'text/xml'},data=PressVirtKey1OnBench) - time.sleep(0.05) - print(f"{GREEN}Button released{RESET}") - r = requests.post('http://10.75.120.229:8193',headers={'content-type': 'text/xml'},data=ReleasePressVirtKey1OnBench) -GPIO.setwarnings(False) -GPIO.setmode(GPIO.BOARD) -GPIO.setup(12, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) - -GPIO.add_event_detect(12, GPIO.RISING, callback=button_callback, bouncetime=200) - -print("RRCS-Trigger ready for input") -[sockA, sockB] = socket.socketpair() -junk = sockA.recv(1) # will never return since sockA will never receive any data - -print("This should never get printed") -GPIO.cleanup() \ No newline at end of file diff --git a/RRCS-Scripts/rrcs-trigger b/RRCS-Scripts/rrcs-trigger deleted file mode 100644 index edffc4c..0000000 --- a/RRCS-Scripts/rrcs-trigger +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -exec /usr/bin/python3 /usr/local/bin/ras_pi_RRCS_BusyLight.py \ No newline at end of file diff --git a/RRCS-Scripts/rrcs-trigger.service b/RRCS-Scripts/rrcs-trigger.service deleted file mode 100644 index 9af86a0..0000000 --- a/RRCS-Scripts/rrcs-trigger.service +++ /dev/null @@ -1,18 +0,0 @@ -[Unit] -Description=Runs the ras_pi_RRCS_BusyLight.py script at boot -After=network.target -#StartLimitIntervalSec=5 - -[Service] -Type=simple -Restart=always -RestartSec=5 -User=root -ExecStart=/usr/local/bin/rrcs-trigger /usr/local/bin/ras_pi_RRCS_BusyLight.py -WorkingDirectory=/tmp -StandardOutput=journal -StandardError=journal -Environment=PYTHONUNBUFFERED=1 - -[Install] -WantedBy=multi-user.target \ No newline at end of file