Posts by Mario77
-
-
Not sure about this setup...should work fine for a light bulb but not for powering down a RPi..preferably you need some shutdown and startup solution similar to that of a power button..you are completely cutting off the current while your RPi is doing it's own things..
-
Ok. So I have been able to create the playlist perennialseries.m3u and moved it to the loaction /storage/.kodi/userdata/playlists/video
I then tried entering code into the Terminal but nothing happens. Do I need to then type something to call the function to run
If you saved the playlist from kodi ui there will be no need to move it as iy will e saved in the playlists folder by default.
Do you know which gpio you r using for motion detection?Did you change that in the script?
-
Preferably if you want video to loop you will have to add it to a playlist,you do that from kodi menu and then the path has to be that of the playlist..
SO you make a small playlist and move it to
Quote#EXTCPlayListM3U::M3U
#EXTINF:0,perennialseries.mp4
/var/media/T7/perennialseries.mp4
and name it perennialseries.m3u
then in the script line 24
-
Ah, really sorry have tried searching everywhere for this information - it's very basic, but how can I see the file path? My video is called "perennialseries.mp4" and is located on an external SSD called "T7" which is plugged into my Raspberry Pi. I can't seem to find the file path information anywhere.
Is it in a directory/folder on the ssd?
If not it should be
/var/media/T7/perennialseries.mp4
-
actually favorites work within kodi, they dont work only via yatse remote
Don't see this as a LibreElec issue but do you have the option in yatse to add to yatse favourites instead of kodi favourites?
-
Thanks so much Mario, will try this and see how it goes. Just checking - do I need to enter this code via SSH Terminal on my Mac?
Sorry never touched a mac in my life...but if you have access to your libreelec via ssh terminal just copy all the following code at once and paste it in your terminal...you might need to press enter more then once for all commands to run...
Dont forget to change MOTION_PIN = 11 to your motion detector pin you are using...
Code
Display Moreecho "Creating motion script and adding new entry to autostart" cat <<'EOT' >/storage/.config/motion.py #!/usr/bin/python3 import sys sys.path.append('/storage/.kodi/addons/virtual.rpi-tools/lib') import RPi.GPIO as GPIO import time import xbmc import logging logging.basicConfig(filename='/storage/.kodi/temp/motion.log', format='%(asctime)s - %(levelname)s - %(message)s', datefmt='%d %b %Y %T', level=logging.DEBUG) MOTION_PIN = 11 GPIO.setwarnings(False) GPIO.setmode(GPIO.BOARD) GPIO.setup(MOTION_PIN, GPIO.IN) while true: i = GPIO.input(MOTION_PIN) if i ==0: logging.debug("Stopping My Video %s", i) xbmc.executebuiltin("PlayerControl(Stop)") time.sleep(1) elif i ==1: logging.debug("Playing My Video %s", i) xbmc.executebuiltin("PlayMedia(/path/to/your_playlist/containing_your_video.m3u)") xbmc.executebuiltin("PlayerControl(Repeat)") time.sleep(30) EOT chmod ugo+rx /storage/.config/motion.py echo "/usr/bin/python3 /storage/.config/motion.py" >> /storage/.config/autostart.sh chmod ugo+rx /storage/.config/autostart.sh reboot
-
Something to start with...
Just to give you an idea what you need...
change pin 11 to your motion gpio pin...remove debugging when done if you don't want logging...
not tested..
Code
Display Moreimport sys sys.path.append('/storage/.kodi/addons/virtual.rpi-tools/lib') import RPi.GPIO as GPIO import time import xbmc import logging logging.basicConfig(filename='/storage/.kodi/temp/motion.log', format='%(asctime)s - %(levelname)s - %(message)s', datefmt='%d %b %Y %T', level=logging.DEBUG) GPIO.setwarnings(False) GPIO.setmode(GPIO.BOARD) GPIO.setup(11, GPIO.IN) while true: i = GPIO.input(11) if i ==0: logging.debug("Stopping My Video %s", i) xbmc.executebuiltin("PlayerControl(Stop)") time.sleep(1) elif i ==1: logging.debug("Playing My Video %s", i) xbmc.executebuiltin("PlayMedia(/path/to/your_playlist/containing_your_video.m3u)") xbmc.executebuiltin("PlayerControl(Repeat)") time.sleep(30)
Now I just seen that you wanted to pause and play not stop and play so you might need to change some of the script but at least try and see if it works this way..
-
I setted up the bluetooth connection in the described way but my sound is super distorted and cuts off, especially in the beginning after connecting. Anybody with the same problem or know a solution?
Try this:
First connect your bluetooth source from LE settings addon..then run this..
Bash#!/bin/sh systemctl stop kodi pactl load-module module-udev-detect 2>/dev/null sink=`pactl list short sinks | grep 'alsa' | awk '{print $2}' | grep 'hdmi'` source=`pactl list short sources | grep bluez | awk '{print $2}'` pactl set-default-sink $sink pactl set-default-source $source systemctl start kodi
-
Probably a corrupted profile.json of the Audio Profiles add-on
remove it's settings directory ,reboot and set it up again..
if that doesn't work
-
-
-
I know this is old but I have both those settings ticked and it still creates folders with : in, e.g. "new : xxxx" this is not compatible with windows. Filenames are ok but not the Folder names.
What is your setting in
Format string/Pathname specification:
-
What do you mean by disactivating and activating smb?what settings are you changing?
Are you using the Emby server addon?
-
yes, outside of my LAN ...
You might need to forward/open the relevant ports fron your router to be able to access remotely..
-
Hello,
anybody there ?
Can someone tell me at least if he has such a configuration working ? (ie on Rasp kodi : distant access OK while SMB activated on )
so I will know that it could work and I have a configuration problem.
thanks
Do you mean outside of your LAN (remotely) by distant?
-
Hi,
please is there any easy way how I can enable fan speed controlling for Raspberry Pi Compute Module 4? I tried to change config file but without success. Fan is still on 100%
Thanks,
Michal
You will need a npn transistor and use PWM..
-
yes works great cheers
And to add something...this will play directly from favourites no need of .sh or .py files