Posts by Mario77

    Da Flex

    Just been to the local shop to get the switch.

    So after some research managed to get it sorted..

    Led,Start,Restart and Shutdown all in one..

    short press is restart..long press is shutdown..press from off will switch on..

    Now gonna test it for a few days...happy to share script if anyone wanna test..

    If you connect the card to a PC, the "storage" folder (see instructions) will become the "STORAGE" partition.

    With the infos you gave so far, I can't provide a solution. I don't know whether you copied the script folder into the storage folder, nor do I know which pins are used by your hardware. A circuit diagram and / or an example script by the manufacturer would help.

    PS: If you can't access the "STORAGE" partition on PC (Windows), use the PC program PuTTY to copy from PC to RPi.

    I know it's not the point of this thread but all you can access from a windows PC is /flash directory..

    It works ...! I `m so stupid... I shouldn't be counting pins at 2am at night ... Since I connected a fan to pin 4 and pin 6, I didn't see that I didn't connect pin1 and pin2. So I tried to make the connection between pins 7-8 instead of 5-6

    Thx for your help !

    By the way ... is it possible to reconnect the fan to a other Pin which is shut down if I´m in the shutdown mode ? Maybe I have to add something in that script.

    Glad you r sorted...fan doesn't have to be full trottle...it should work fine on 3.3 just a little slower...or do what Da Flex recommended...you can also use same circuit for PWM Fan setup..works fine on RPI..

    satfan The code looks OK, I'm using the same import. Maybe you are using wrong apostrophe signs at the sys.path.append line.

    script seems to hang on line 4

    Code
    import RPi.GPIO as GPIO

    That shouldn t be on line 4 if you copied the script I showed you...looks like you r still loading your first script listen-for-shutdown.py without the rest

    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

    What error you get when you run script manually?..If I remember correctly you should connect pwm transistor base to gpio18 which is pin 12

    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