From 0be3ff050330f7e36774b38e0fbe9467796b1507 Mon Sep 17 00:00:00 2001 From: kwindrem <58538395+kwindrem@users.noreply.github.com> Date: Wed, 15 Dec 2021 18:05:52 -0800 Subject: [PATCH] ass support for SetupHelper v4 --- .DS_Store | Bin 10244 -> 6148 bytes FileSets/.DS_Store | Bin 6148 -> 6148 bytes FileSets/VenusGpioOverlay.dtb | Bin 633 -> 637 bytes FileSets/gpio_list | 5 +++ FileSets/{v2.40 => v2.42}/.DS_Store | Bin FileSets/{v2.40 => v2.42}/relaystate.py | 0 FileSets/{v2.40 => v2.42}/relaystate.py.orig | 0 FileSets/{v2.65 => v2.66}/.DS_Store | Bin FileSets/{v2.65 => v2.66}/relaystate.py | 0 FileSets/{v2.65 => v2.66}/relaystate.py.orig | 0 FileSets/{v2.80~11 => v2.80~19}/.DS_Store | Bin FileSets/{v2.80~11 => v2.80~19}/relaystate.py | 0 .../{v2.80~11 => v2.80~19}/relaystate.py.orig | 0 ReadMe | 32 ++---------------- VenusGpioOverlay.dts | 2 +- changes | 6 ++++ raspberryPiOnly | 0 setup | 5 +-- timeStamp | 2 +- version | 2 +- 20 files changed, 19 insertions(+), 35 deletions(-) rename FileSets/{v2.40 => v2.42}/.DS_Store (100%) rename FileSets/{v2.40 => v2.42}/relaystate.py (100%) rename FileSets/{v2.40 => v2.42}/relaystate.py.orig (100%) rename FileSets/{v2.65 => v2.66}/.DS_Store (100%) rename FileSets/{v2.65 => v2.66}/relaystate.py (100%) rename FileSets/{v2.65 => v2.66}/relaystate.py.orig (100%) rename FileSets/{v2.80~11 => v2.80~19}/.DS_Store (100%) rename FileSets/{v2.80~11 => v2.80~19}/relaystate.py (100%) rename FileSets/{v2.80~11 => v2.80~19}/relaystate.py.orig (100%) create mode 100644 changes create mode 100644 raspberryPiOnly diff --git a/.DS_Store b/.DS_Store index d9193cc3450334baa267475c7bba123505dade51..6166e94ead0606d8e9b6b032200ae696091b5020 100644 GIT binary patch delta 195 zcmZn(XfcprU|?W$DortD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$KfQLf+vvMPs20tEIbG2;5@tx zufVJD8oUD^A;Z6fZ?E9*_9An+gzu)}@5B!??Ai8cBmXd$@H}Jx`+>ezzeyiz{&Tuy ztU@wpnYJ~6>nXA7IxUB{#JuH&)6uH(Hc2Gsd?3Z7pK^~`^i eORQn~@Ba*#aOr3U=l|jjS#bWpK>jc1|9=2?CGofb diff --git a/FileSets/.DS_Store b/FileSets/.DS_Store index 761f2501505dd5f78c5d43f3549e72572d2624b6..c4470a6cd95e9f6be0f1d111f89e7afe764efd94 100644 GIT binary patch delta 369 zcmZoMXfc=&$!N4OYCkih(PSx>C-p`t#mPBI`T04F3=9mc3}p;P40;SE3`RNWhQZ1C zxdlK`ATTHf5=gSS`7SO=Ir&LIQ4SzpK5_D4M|2e_1XL7c0Bx9D%PL`HR2E#6my@5D z4m1MU8Dw kA%o@QEH-6fOEk+qPMAD-0h=gD9K{N#IHTp}du(cg0A*KG@&Et; delta 369 zcmZoMXfc=&$!M@KYCkih!DK0xC-nv?#mPBI`T02vK)}jS#$d#t$6&%>kdtm0oSdIq z01{?kFenBRNV2*4E-pzq`AI-g4j}$(*nHR#T}2836$KeU8z$GXN*EcG1sCPzpn+h)V8Bqv mV8~!NIg3qM*bvpShUYsQCofQ(l diff --git a/FileSets/VenusGpioOverlay.dtb b/FileSets/VenusGpioOverlay.dtb index dd3995a30aa772a877f7496f3ff0aef5b0ea7834..af86cfc17d5146bbc3f6fb9515fc30a71f8eacc9 100644 GIT binary patch delta 55 zcmey#@|Q*60`I@K3=B-Q3=9kwKw4&^fH>omi5ka6C4eGYK+FonY(UHl!~&ZbD;WWS C9tw2; delta 52 zcmey%@{>j20`I@K3=B+_3=9kwKw4s=fH>oWi5kZRMSvn&K+FonY(UJrnT4^E5ddSg B3RVCB diff --git a/FileSets/gpio_list b/FileSets/gpio_list index c5e8487..655bde5 100644 --- a/FileSets/gpio_list +++ b/FileSets/gpio_list @@ -38,3 +38,8 @@ # Digital input 5 Pin 37 / GPIO 26 26 in digital_input_5 +#### Gracefull shutdown input +#### Note this input is NOT added to the available I/O used by Venus OS !!!! +# Pin 36 / GPIO 16 +16 in digital_input_6 + diff --git a/FileSets/v2.40/.DS_Store b/FileSets/v2.42/.DS_Store similarity index 100% rename from FileSets/v2.40/.DS_Store rename to FileSets/v2.42/.DS_Store diff --git a/FileSets/v2.40/relaystate.py b/FileSets/v2.42/relaystate.py similarity index 100% rename from FileSets/v2.40/relaystate.py rename to FileSets/v2.42/relaystate.py diff --git a/FileSets/v2.40/relaystate.py.orig b/FileSets/v2.42/relaystate.py.orig similarity index 100% rename from FileSets/v2.40/relaystate.py.orig rename to FileSets/v2.42/relaystate.py.orig diff --git a/FileSets/v2.65/.DS_Store b/FileSets/v2.66/.DS_Store similarity index 100% rename from FileSets/v2.65/.DS_Store rename to FileSets/v2.66/.DS_Store diff --git a/FileSets/v2.65/relaystate.py b/FileSets/v2.66/relaystate.py similarity index 100% rename from FileSets/v2.65/relaystate.py rename to FileSets/v2.66/relaystate.py diff --git a/FileSets/v2.65/relaystate.py.orig b/FileSets/v2.66/relaystate.py.orig similarity index 100% rename from FileSets/v2.65/relaystate.py.orig rename to FileSets/v2.66/relaystate.py.orig diff --git a/FileSets/v2.80~11/.DS_Store b/FileSets/v2.80~19/.DS_Store similarity index 100% rename from FileSets/v2.80~11/.DS_Store rename to FileSets/v2.80~19/.DS_Store diff --git a/FileSets/v2.80~11/relaystate.py b/FileSets/v2.80~19/relaystate.py similarity index 100% rename from FileSets/v2.80~11/relaystate.py rename to FileSets/v2.80~19/relaystate.py diff --git a/FileSets/v2.80~11/relaystate.py.orig b/FileSets/v2.80~19/relaystate.py.orig similarity index 100% rename from FileSets/v2.80~11/relaystate.py.orig rename to FileSets/v2.80~19/relaystate.py.orig diff --git a/ReadMe b/ReadMe index c49f211..1e1af56 100644 --- a/ReadMe +++ b/ReadMe @@ -23,36 +23,8 @@ It will then called from reinstallMods to reinstall functionality after a Venus Setup: -The easiest way to install this or other of my packages is to first install SetupHelper, +The easiest way to install this or other of my packages is to first install SetupHelper +which you need to do anyway, then use its package install tool. Refer to the SetupHelper ReadMe for instructions. -There are two other methods to fetch a package archive. - -IF the Venus device has internet access is to run the following command: - -wget -qO - https://github.com/kwindrem/RpiGpioSetup/archive/current.tar.gz | tar -xzf - -C /data - -If the Venus device does not have internet access, you will need to fetch the archive using a computer that does have internet access: - -click on this link in a web browser: -https://github.com/kwindrem/RpiGpioSetup/archive/current.tar.gz - -rename the resulting .tar.gz file to venus-data.tar.gz -copy the venus-data.tar.gz to a USB stick, -put the stick in the Venus device and reboot. -When Venus boots, it will unarchive the file to /data/RpiGpioSetup-current - -Move the directory into it's active locaiton: -rm -rf /data/RpiGpioSetup -mv /data/RpiGpioSetup-current /data/RpiGpioSetup - -Repeat the above for SetupHelper if you haven't done so for another package. - -Finally, run the setup script to complete the installation -/data/RpiGpioSetup/setup - -You will need root access to the Venus device. Instructions can be found here: -https://www.victronenergy.com/live/ccgx:root_access -The root password needs to be reentered following a Venus update. -Setting up an authorization key (see documentation referenced above) will save time and avoid having to reset the root password after each update. diff --git a/VenusGpioOverlay.dts b/VenusGpioOverlay.dts index 6da5e2d..c272c7f 100644 --- a/VenusGpioOverlay.dts +++ b/VenusGpioOverlay.dts @@ -17,7 +17,7 @@ pinctrl-0 = <&my_pins>; my_pins: my_pins { - brcm,pins = <5 6 13 19 26>; /* gpio no. */ + brcm,pins = <5 6 13 16 19 26>; /* gpio no. */ brcm,function = <0>; /* 0:in, 1:out */ brcm,pull = <2>; /* 2:up 1:down 0:none */ }; diff --git a/changes b/changes new file mode 100644 index 0000000..da78e42 --- /dev/null +++ b/changes @@ -0,0 +1,6 @@ +v3.4 + added raspberryPiOnly flag file + add graceful shutdown GPIO pin - used by ShutdownMonitor v2.0 or later + add exit codes + this supports SetupHelper v4 + removed manual download/install instructions from the ReadMe diff --git a/raspberryPiOnly b/raspberryPiOnly new file mode 100644 index 0000000..e69de29 diff --git a/setup b/setup index db9514e..cb240bc 100755 --- a/setup +++ b/setup @@ -36,6 +36,7 @@ source "/data/SetupHelper/CommonResources" #### end of lines to include SetupHelper +####### this is duplicate to code in CommonResources -- keep in case SetupHelepr has not been updated # prevent installing if not a Raspberry Pi if [ -f /etc/venus/machine ]; then machine=$(cat /etc/venus/machine) @@ -46,7 +47,7 @@ if [ -z $machine ]; then scriptAction='UNINSTALL' else logMessage "can't determine Venus device type - exiting" - exit + exit $INCOMPATIBLE_PLATFORM fi elif [ $machine != "raspberrypi2" ] && [ $machine != "raspberrypi4" ]; then if [ -f "$installedFlag" ]; then @@ -54,7 +55,7 @@ elif [ $machine != "raspberrypi2" ] && [ $machine != "raspberrypi4" ]; then scriptAction='UNINSTALL' else logMessage "$packageName not compatible with $machine - exiting" - exit + exit $INCOMPATIBLE_PLATFORM fi fi diff --git a/timeStamp b/timeStamp index a353ef4..a96dc77 100644 --- a/timeStamp +++ b/timeStamp @@ -1 +1 @@ -1633068625 +1635100489 diff --git a/version b/version index 4d5034c..7945083 100644 --- a/version +++ b/version @@ -1 +1 @@ -v3.2 +v3.4