Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Release GPIO Monitor (Raspberry Pi)
#1
Heart 
Image
Image

Features
  • Monitor multiple GPIO buttons on your Raspberry Pi
  • Run KODI function(s) when that button is pressed, released or held
  • Supports LibreELEC / OSMC / Xbian on all Raspberry Pi boards

Install Instructions
https://www.matthuisman.nz/2018/10/gpio-...dd-on.html
Reply
#2
You are producing a lot of stuff lately Matt. Kudos.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#3
Have just updated this add-on to now allow multiple buttons and functions (separate with | pipe)
It also now can handle Pressed, Released & Held as it uses GPIO Zero behind the scenes.
Reply
#4
Hi,

thank you for this wonderful addon!
Thus i have two questions.

1.I have assigned  GPIO pin 26, when pressed, it should play video from specific folder and after video is finished playing it should show specific image in specified folder.

I tried like this : PlayMedia(path)|ShowPicture(path)

When i press the GPIO 26, the video does not play, instead it directly goes to Show picture. Where am i going wrong?

2. On GPIO pin 13  when I assign SlideShow(path) when pressed and then when i press GPIO 26  (for playing video) the video does not start. It stays on SlideShow..

Can you give me some directions what am i doing wrong? 

Thanks!
Reply
#5
Try editing this file / line on your install:
https://github.com/matthuisman/slyguy.ad...io.py#L121

Change that line to xbmc.executebuiltin(function.strip(), True)
Then restart kodi and try again


Have just pushed v0.1.6 which does the above.
So update to this and try. 

If that doesnt work, you want to check if PlayMedia in Kodi and actually blocks until the video is finished.
If it doesn't block, then ShowPicture will be getting called straight after the video starts

Youll need to look into the kodi built-in commands more
GPIO Monitor simple calls what you have put - doesnt do anything more fancy than that

Or, failing that - write your own script to do what you need and then make GPIO monitor call that script on button press
Reply

Logout Mark Read Team Forum Stats Members Help
GPIO Monitor (Raspberry Pi)0