Hello, i wonder if there is a way to make Kodi to shut down at LAN lost? I have plenty of HDD that suffers when the power losts, so i have a UPS that save it right now. But if the power not come back it will happen again. So i think a solution would be a command/addon that turn it off when LAN goes down when the router also shutsdown at powerbreak. I have a PC with Libreelec 10.0.2 Generic installed on it. Best regards Thore from Sweden
libreelec auto shutdown at LAN lost?
-
2469 -
August 2, 2023 at 8:05 AM -
Thread is Unresolved
-
-
Yes, use curl for a remote shutdown: Click!
-
Although it is not exactly what you are looking for, it may help you find the solution. I try to reboot a remote TV Box when it loses internet connection in the following way:
cron command:
# check every hour
10 */1 * * * /storage/.config/reboot_noip.sh
script /storage/.config/reboot_noip.sh:
#!/usr/bin/env sh
IP=$(curl -s checkip.amazonaws.com)
A=`echo "$IP" | awk '/^([0-9]{1,3}[.]){3}([0-9]{1,3})$/{print $1}'`
if [ -z $A ]
then
# echo "not ok"
reboot
sleep 15s
exit 1
fi
# echo "okay"
exit 0
maybe some expert can give us better alternatives
-
Ahaa... Thanks for the help, will make it a try when i come home
-
Yes, use curl for a remote shutdown: Click!
Thanks for your reply, but the solution is to a PC that runs Windows. I use Libreelec on my PC.. Is there a similar solution as that one you think?
-
Thanks for your reply, but the solution is to a PC that runs Windows. I use Libreelec on my PC.. Is there a similar solution as that one you think?
Did you read the right post at the link? it's post #4.
Curl works on Linux. Which OS do you want to use to control LE?
-
Did you read the right post at the link? it's post #4.
Curl works on Linux. Which OS do you want to use to control LE?
Hello again and thanks for your reply. I am not that good at Linux/LE, and the few changes i have done is through SSH. Today i have Generic AMD/Intel/NVIDIA (x86_64) installed on a PC, and it is connected to a UPS that support it at a power break. My idea was to make a script or so like: "if LAN/ethernet goes down start shutdown.sh" or something like that. I don't know anything about programming, so the "curl" you mention is like hebrew to me . Thought there was an "power manager addon" that has a function for my idea, but can not find any. Best regards from Thore in Sweden
-
Ah, now I understand. Then you have to write a cron script, which runs inside LE. elonesna has already described the idea. You definitely need basic programming skills to do that. To my knowledge, there is no plug-in for that purpose.
-
Ah, now I understand. Then you have to write a cron script, which runs inside LE. elonesna has already described the idea. You definitely need basic programming skills to do that. To my knowledge, there is no plug-in for that purpose.
Ok... Thanks for the tip. I will contact elonesna and see if i can get any help.. take care