Posts by Mario77

    shutdown.sh can't see anything strange..

    Remove all the sudo commands from install.sh script..

    You need to install rpi tools addon from libreelec repo..

    I m not really good with python but try this it should work.. for shutdown.py

    You can set GPIO and Frequence variables here

    Code
    # Configuration
    FAN_PIN = 18  # BCM pin used to drive transistor's base
    WAIT_TIME = 10  # [s] Time to wait between each refresh
    FAN_MIN = 30  # [%] Fan minimum speed.
    PWM_FREQ = 25000  # [Hz] 25kHz for Noctua PWM control

    and leave this as is

    Code
    fan = GPIO.PWM(FAN_PIN, PWM_FREQ)

    You can also play with the temp and speed you need...

    Code
    # Configurable temperature and fan speed steps
    tempSteps = [30, 40, 45, 50, 55, 60, 65, 70, 75]  # [°C]
    speedSteps = [0, 30, 35, 40, 60, 70, 80, 90, 100]  # [%]

    this is what I m using

    My fan only starts at 30% so anything lower then that it won't start

    This is a small tool to change speed from SSH for testing before you set lowest speed in script..It lets you input different speed from SSH till your fan starts..

    calibrate.py.txt

    Взаимодействие с другими людьми

    It worked with the script from post #12.

    Thank you.

    Post #12 that is the service script...to start fan on boot...

    So you still using the pwm script from latest post?


    Hi

    The wiring is understood, no need for a Transistor or similar. The question is the 25 kHz. If I understood correctly, the 25 in the post you mentioned is Hz, not kHz.

    Roland

    It s hz not khz..that s what you need

    Dear Mario77,

    I did everything as written in post # 58, but it gives me this error:

    Code
    ● run-fan.service - to control the fan based on temperature.   Loaded: loaded (/storage/.config/system.d/run-fan.service; enabled; vendor preset: disabled)   Active: activating (auto-restart) (Result: exit-code) since Sun 2021-01-03 20:43:25 UTC; 13s ago  Process: 842 ExecStart=/usr/bin/python /storage/.kodi/userdata/fan/run-fan.py (code=exited, status=1/FAILURE) Main PID: 842 (code=exited, status=1/FAILURE)

    What have I done wrong?

    Thank you!

    Make sure

    you installed raspberry pi tools addon from libreelec repo

    chmod 777 the run-fan.py script

    run dos2unix command on script

    you can run script from ssh directly to test...fan should start

    Hi,

    I would like to use a 4 wire fan (NF-A4x10 5V PWM) with pwm control. Do you think, the PWM frequency in the script could be set to 25kHz, which ist the required frequency for the PWM control?

    Cheers

    Roland

    It's already set to 25 if you look at line 15 of last script in post #60..

    Regarding your fan..I m not sure how you could connect it but having a look at it you might not need a transistor...

    Might work if you connect black to ground,yellow to power and blue for PWM to GPIO here and here

    Not tested so make your own research before you try ;)

    I m just using 2 wired 5v fans and controlled from a transistor..

    I have installed LE 9.2.3 on my RPi4 4GB and have added TVH server and Client. I've installed sd4tvh addon for Schedules Direct EPG.

    I'm able to record programs from my HDHomerun Connect and the commercials are being flagged fine.

    However, when I use the Kodi frontend to delete a recording, only the .ts file gets deleted. I'm left with the unneeded .txt, *.edl, *.vdr, *.log, and *.logo.txt.

    Is there a way to have Kodi/TVH delete this files when the .ts file is deleted?

    You can disable all that from your comskip.ini..

    or you can create a post-remove command script and run when you delete a recording..

    st

    Advanced Emulator Launcher and Retroarch from this Repo does what you want....

    The fans should just switch on when your Pi is booted up...if they didn't they might be faulty..assuming that they are just normal fans with no circuit...

    If you want to trigger the fans from script you ll need a transistor either way you go..both PWM or just ON/OFF depending on Temp...otherwise your other option is always ON..

    It's not hard really to wire them..you don t even need solder if you r not good in soldering..just use DuPont connectors..

    Here is all you need

    Mario77

    I've obviously read post #12 and I've also explained the reasons why I don't think it applies to my case. Thanks anyway.

    EDIT: I need to apologize both with Mario77 and gedakc. Going into details, I've missed the most obvious thing: deinterlacing always happens, no matter if the contents are locally stored, internet based or broadcasted on DVB-T! Stupid me! Indeed I've choosen MMAL - BOB as the default deinterlacing method for all kind of videos selecting the gear icon from the OSD and now (but my testing has been very limited, only one minute of viewing; I would come back with the results of a more thorough use) HD contents seem fine with no need for buying any codec or else. Usually, they began to stutter immediately so it is at least a good sign!

    Yeah that should solve your issue...I v been there few years ago playing around with BOB and same trick applies today :)

    Thanks for your quick help..

    That trick worked nicely and autostart works fine now..

    Regarding the mount I have tried before to mount it via system.d but was having no success whatsoever and just gave up and went down the easy way..

    This is not a normal mount but an sshfs mount which is 2500km away...saying that it works fine through autosatart..so maybe I was doing something wrong although I was following a thread here and there where other people having issues..

    It is indeed used for tvheadend recordings but not directly...

    Recordings go on the server just in case there is a problem with the network...so if I loose connection for some reason to the box in the middle of a recording it wont be lost..after a recording is finished I made a script which runs comskip and then rsync recording to my country..after that the mount is used for TvHeadend api/dvr/entry/filemoved to edit TvH recordings logs to point to local hdd where the recordings are being moved..

    So i m trying to setup a command with autostart.sh

    command works fine..

    autostart.sh works fine...command executed..

    Command is for mounting an sshfs share remotely for recordings which also works fine..

    My issue is that this Rpi is only used as a TvHeadend server and had kodi always disabled and do everything I need trough SSH..

    Kodi is disabled by the kodi.service in .config system.d

    Problem is that when kodi is disabled,autostart won't work/start...

    Is there any way I can make autostart.sh work without kodi running...

    Or does it makes sense if I let kodi start normally...autostart.sh executed and add stop kodi to autostart after my mount command?

    Thanks


    Well I answered my own question...so let kodi start and run autostart and then stop kodi works fine..

    Still can't understand why autostart.sh needs kodi.service to work...

    Maybe someone can shed some light?