Quantcast
Channel: Matt Huisman
Viewing all articles
Browse latest Browse all 192

KODI GPIO Monitor Service Addon

$
0
0


Here is a quick add-on I created to monitor a GPIO pin.
Once the pin is pulled high or low, a function is called.
The pin, edge and function can all be set in the add-on settings.


The Pin can be anything from 1 to 40 (default is 5)
It uses the board pin numbering (Gray numbers below)


The edge can be Falling (default) or Rising.

Falling will trigger when the pin goes from High to Low.
Rising will trigger when the pin goes from Low to High.

Note: Some pins have built-in pull up resistors so it's best to use Falling with these pins.

The Function can be any of the KODI build-in functions:
http://kodi.wiki/view/list_of_built-in_functions

The default is "ShutDown"
Other handy functions are "Reboot"& "RunAddon(id)".

No Notifications simply hides the toast pop-ups (like below) when the function is run.



Note:
Once you change settings, you either need to reboot or Disable and Enable the addon for the changes to take affect (due to it being a service)

You can download the add-on below

LibreELEC
or
OSMC

Note about the OSMC add-on.
The first time it runs it needs to build the RPi-GPIO library.
This takes about 2-5 mins depending on internet connection.
It will show a progress dialog during this time so you know when it's done.

I hope this comes in handy for some!

Viewing all articles
Browse latest Browse all 192

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>