This package adds additional digital inputs and relay outputs for Venus OS running on Raspberry PI platforms. It is not suitable for other GX devices such as CCGX or Cerbo GX. The stock RPI Venus distribution there are NO relays or digital inputs defined. This script adds: 5 digital inputs makes additional digital inputs available makes all digital inputs behave the same: pull up so they are active low 6 relay outputs activates GPIO 16 (header pin 36) as a shutdown pin This requires ShutdownMonitor v2.0 or later The Raspberry PI default is for the first 8 GPIO pins to have pull UPs and the remaining have pull DOWNs. This makes some digital input pins behave differently This script installs a DT overlay that switches to pull UPs for all digital input pins Only the relay 1 can be assigned to a function: alarm, generator start/stop or pump. In addition, relay 2 can be assigned to temperature alarm The remaining 4 relays are only provided manual on/off control from the menu. Note that the Raspberry PI has no relays or isolated/filtered digital inputs on board. Relay outputs are 0 volts when inactive and 3.3 volts when active. Current sink and source is limited. Check Raspberry PI specifications for details. You must attach the GPIO pins to external relays. Relays should active on a high (3.3 volt) input. Relays that activate on a low signal are NOT COMPATIBLE since the relays would still close during Raspberry PI boot regardless of the logic provided by Venus OS. Digital inputs expect 0 volts for an inactive input and 3.3 volts for an active input. You must provide isolation for the digital inputs to avoid damage to the CPU chip!!! Venus OS does not provide native support for i2c relay boards and this package does not add any. ***********This script should be run manually, initially.*********** It will then called from reinstallMods to reinstall functionality after a Venus update GPIO conflicts: GPIO assignments for relays 5 and 6 may cause conflicts with hat board interrupts. This conflict may cause the system to not boot properly or be extremely sluggish. This script allows for two assignments for relays 5 and 6. gpio_list is the legacy one: GPIO 23 and 24, respectively gpio_listForCanHats provides compatibility with at least the two Waveshare 2-Channel Isolated CAN-bus hat's. The Non-FD version (ASIN B087RJ6XGG) using the MCP2515 CAN Controller that shares CAN_0 and CAN_1 on a single SPI. The FD variant (ASIN ‎B07YQTMQTR) that uses the MCP 2518FD controller. This version offers the ability to assign CAN_0 and CAN_1 to two separate SPI's or shared if so desired, external power, and a named brand DC-DC isolated power module. The non-FD version has a part that that I can't even find a data-sheet. Both work perfectly. Note in the US, the FD variant costs 53% more, and deservedly so. Using quality parts comes at a cost. GPIOs 12 and 4 are used for relays 5 and 6, respectively An option to select the legacy or compatible set is offered during manual setup. However, this option is considered optional and installation with the legacy set is allowed even if the setup script is not run manually first. Custom GPIO list: If /data/setupOptions/RpiGpioSetup/gpio_list exists it is used in place of the one in the package directory. This accommodates Relay HATs, etc. that use different GPIO pins. Installation: RpiGpioSetup requires that SetupHelper is installed first. The easiest way to install RpiGpioSetup is to do a "blind install" of SetupHelper and then add the RpiGpioSetup package via the PackageManager menus. Refer to the SetupHelper ReadMe for instructions and for other install options: https://github.com/kwindrem/SetupHelper ***************************************************************************** Manual Setup example using a Non-FD Waveshare 2-Channel Isolated CAN-bus hat. root@raspberrypi4:/data/RpiGpioSetup# ./setup --- starting setup script v4.7 action NONE This package makes the following modifications: Activates 6 relay outputs Activates 5 digital inputs Changes all digital inputs to have pull-ups in stead of a mix of pull up/down Available actions: Install and activate (i) Reinstall (r) based on options provided at last install Uninstall (u) and restores all files to stock Quit (q) without further action Display setup log (s) outputs the last 100 lines of the log Choose an action from the list above: i Legacy assignment for relays 5 and 6 may conflict with interrupts for some CANbus interface hat boards Conflicts WILL render the Raspberry PI at least partially unresponsive To avoid conflicts, an alternate set of GPIO assignments is available Do you wish to install the alternate set of GPIO assignments (y/n)?: y installing ALTERNATE gpio_list activating VenusGpioOverlayForCanHats installing files Reboot system now (y) or do it manually later (n): y rebooting ...