All Projects → petrockblog → PowerBlock

petrockblog / PowerBlock

Licence: other
Driver for petrockblock.com PowerBlock

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to PowerBlock

ControlBlockService2
This is the driver for the ControlBlock re.v 2.X, a power switch and input/output/gameapd gadget for the Raspberry Pi
Stars: ✭ 18 (-51.35%)
Mutual labels:  raspberrypi, petrockblock, power-switch
Realtek-USB-Wireless-Adapter-Drivers
Realtek USB Wireless Adapter Drivers [0bda:f179] (Kernel 4.15.x ~ 5.9.x)
Stars: ✭ 34 (-8.11%)
Mutual labels:  raspberrypi
ConsolePi
Raspberry Pi Based Serial Console Server, with PushBullet Notification of IP changes, Automatic VPN termination, custom menu, Power Outlet Control, and a lot more
Stars: ✭ 109 (+194.59%)
Mutual labels:  raspberrypi
wiringpi-tft-tool
TFT Command Line Tool for Raspberry Pi
Stars: ✭ 35 (-5.41%)
Mutual labels:  raspberrypi
octoscreen
A touchscreen client for Octoprint
Stars: ✭ 26 (-29.73%)
Mutual labels:  raspberrypi
Pigrow
Raspberry Pi Grow Box Control Software
Stars: ✭ 98 (+164.86%)
Mutual labels:  raspberrypi
homify
🏡 Open-source home automation / smarthome platform running on PHP (Laravel).
Stars: ✭ 45 (+21.62%)
Mutual labels:  raspberrypi
genie-server
The home server version of Almond
Stars: ✭ 237 (+540.54%)
Mutual labels:  raspberrypi
WebGPIO
A simple web UI for controlling the GPIO pins on a Raspberry Pi
Stars: ✭ 69 (+86.49%)
Mutual labels:  raspberrypi
motor-hat
Node Module to control Adafruits MotorHAT for the RaspberryPi
Stars: ✭ 28 (-24.32%)
Mutual labels:  raspberrypi
balena-plant-saver
We're building a plant monitor (and saver) - this is the early stage
Stars: ✭ 68 (+83.78%)
Mutual labels:  raspberrypi
TeslondaServer
The back-end, server app for the Teslonda Dashboard on Raspberry Pi.
Stars: ✭ 20 (-45.95%)
Mutual labels:  raspberrypi
comi
ComiGO:Simple, cross-platform manga reader。简单、跨平台的漫画阅读器。シンプルな漫画リーダー。
Stars: ✭ 34 (-8.11%)
Mutual labels:  raspberrypi
aprenda-python
Aprendizado, dicas e projetos sobre Python
Stars: ✭ 22 (-40.54%)
Mutual labels:  raspberrypi
background-radiation-monitor
Monitor and record background radiation levels with a cheap detector and a Raspberry Pi.
Stars: ✭ 25 (-32.43%)
Mutual labels:  raspberrypi
balena-wpe
Fullscreen WebKit browser with hardware accelerated CSS, WebGL, and HTML5 video for the RaspberryPi 3.
Stars: ✭ 372 (+905.41%)
Mutual labels:  raspberrypi
Raspberry-W25Q64
SPI Flash Memory W25Q64 Access Library for RaspberryPi
Stars: ✭ 37 (+0%)
Mutual labels:  raspberrypi
Poke-Pi-Dex
Our deep learning for computer vision related project for nostalgic poke weebs (Sistemi digitali, Unibo).
Stars: ✭ 18 (-51.35%)
Mutual labels:  raspberrypi
packages
PiKVM Packages
Stars: ✭ 18 (-51.35%)
Mutual labels:  raspberrypi
Report-IP-hourly
📬 Report Linux IP by email hourly.
Stars: ✭ 43 (+16.22%)
Mutual labels:  raspberrypi

PowerBlock Driver

This is the driver for the petrockblock.com PowerBlock, which is an extension board for the Raspberry Pi (TM). The driver itself is denoted as powerblock in the following. The driver provides a service for interacting with the power button signal as well as driving the optionally attached LED.

The following description is intended to be used in combination with a Raspberry Pi and a Linux-based operating system running on the Raspberry Pi. There is a driver for Windows 10 IoT Core that can be found at https://github.com/petrockblog/PowerBlockWinIoT/releases

Installation

There comes an installation script with this reposity that does all the steps described below: install.sh This script compiles the driver, installs the binary and configuration files, and installs the PowerBlock service.

To run the quick installation, you just need to call this one line from the Raspbian console

wget -O - https://raw.githubusercontent.com/petrockblog/PowerBlock/master/install.sh | sudo bash

To uninstall the service you can simply call sudo ./uninstall.sh from within the PowerBlock directory.

Configuration

The configuration file of powerblock is located at /etc/powerblockconfig.cfg. It uses simple .ini file syntax = for setting the the values of its configuration parameters.

The parameters are explained in detail in the following:

  • activated: Can be set to
    • 1: Activates the handling of the power switch signals of the PowerBlock.
    • 0: Deactivates the handling of the power switch signals of the PowerBlock.
  • statuspin: Raspberry BCM pin used for status signaling (default: 17) connects to S2 on PowerBlock
  • shutdownpin: Raspberry BCM pin used for shutdown signaling (default: 18) connects to S1 on Powerblock
  • logging: Enables or disables logging via syslog to /var/log/syslog. The logging is enabled if set to 1.

Logging

The PowerBlock driver logs certain events in the file /var/log/syslog.

Shutdown Script

When the driver observes a shutdown signal from the PowerBlock, a shutdown Bash script is called. You can find and edit it at /etc/powerblockswitchoff.sh.

LibreELEC Installation

This section is about installing the PowerBlock service on LibreELEC. In the following, it is assumed that we install the driver on a fresh, unmodified LibreELEC installation.

First, use SSH to log into the running LibreELEC instance. This can be done, e.g., with the command ssh root@IP_OF_LIBREELEC. The default password is libreelec.

Being logged in, the actual driver installation is done with this command:

wget -O - https://raw.githubusercontent.com/petrockblog/PowerBlock/master/install_libreelec.sh | bash

And that's it!



Have fun!

-Florian petrockblock.com

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].