Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Can you script a OpenELEC connect and reboot?

Featured Replies

I have a couple of devices running OpenELEC, and while they usually run great, they do occasionally hang. Currently when that happens I have to go downstairs, unplug it, and plug it back in to restart it. I know in the past I've putty'd into them to reboot as well as the underlying OS is usually still working.

 

I was wondering if there was a way to script a telnet connection with credentials and issue a reboot. My wife has a PC upstairs and I was thinking it would be great if I had a batch file on her desktop I could just double-click and get it to reboot the OpenELEC client.

 

Does anyone know if this is possible?

I read somewhere that someone had setup a button on there remote to issue a killall command to openELEC and issue a reboot. This would be handy for me as well as I occasionally have to manually hold the power button in on my NUC when openELEC hangs. I will see if I can find it and if so post back.

I read somewhere that someone had setup a button on there remote to issue a killall command to openELEC and issue a reboot. This would be handy for me as well as I occasionally have to manually hold the power button in on my NUC when openELEC hangs. I will see if I can find it and if so post back.

 

this is exactly what im using, i have the microsoft mce remote which has the red button on it (teletext) and this is mapped to a systemctl restart command which then just restarts xbmc (not the system), this works REALLY well, check out the attachment (drop txt ext), unzip and place all files in /storage/.config/ in openelec and then reboot the system to activate.

 

this def increased the WAF for me, no more pressing the power button on the box when a dodgy addon plays up :-).

red_button.zip.txt

I think it was a post somewhere by you binhex. Im going to add that to my openELEC files. Thanks, really appreciate it.

I think it was a post somewhere by you binhex. Im going to add that to my openELEC files. Thanks, really appreciate it.

 

my pleasure!, ive been using this for around 2 years now and i seriously couldnt do without it

Im not to sure about this line in the autostart.sh

 

su -c '/usr/bin/irexec -d /storage/.config/.lircrc' -l root

 

Im using an Intel NUC with built in IR, what is the .lircrc for i.e. will it work with my NUC.

Im not to sure about this line in the autostart.sh

 

su -c '/usr/bin/irexec -d /storage/.config/.lircrc' -l root

 

Im using an Intel NUC with built in IR, what is the .lircrc for i.e. will it work with my NUC.

 

im not sure im afraid, im using the microsoft USB IR reciever, worth a go though, if it doesnt work im sure it cant be that hard to find out what to use to talk to the NUC IR, if you open the .lircrc file you will see it simply maps a button on the remote to a bash script to be executed when the button is pressed.

 

obviously for this all to work you need to restart your box, otherwise the autostart script wont kick in and load irexec

I will try it later, is the .lircrc file part of openELEC?

I will try it later, is the .lircrc file part of openELEC?

 

i dont think its included by default, no.

Can you post a copy of your .lircrc file as well please so we can use that. Thanks.

Can you post a copy of your .lircrc file as well please so we can use that. Thanks.

 

its all in the zip mate :-), just unzip file and place all files in /storage/.config/ in openelec and then reboot the system to activate.

No such luck with mine, it just wants to call the PVR client. Are you using this with openELEC as the only folder in openELEC is Configfiles and its calling the  /storage/.config/.lircrc file which I don't have in the Configfiles folder?

No such luck with mine, it just wants to call the PVR client. Are you using this with openELEC as the only folder in openELEC is Configfiles and its calling the  /storage/.config/.lircrc file which I don't have in the Configfiles folder?

 

Configfiles is just the share name for /storage/.config/ folder, do you have the microsoft mce remote, i.e. this one:- http://www.alexelec.ru/wp-content/uploads/image/2014/02/rc-01.jpg

 

reason i ask is that the .lircrc file maps to "button = KEY_RED", not sure what this would map to if you dont have that remote.

Yes I do have the same one, an original microsoft one, thats why are asked for your .lircrc file if possible. I use the built in NUC IR. I did have to put some extra lines in the autostart file when I first installed it to get it to work.

ok here is the contents of the .lircrc file (same as file included in the earlier attached zip):-

 

#Assigned button initiates a restart
begin
prog = irexec
button = KEY_RED 
config = /storage/.config/startXBMC.sh
end

Thanks, There was only two files in the Zip, Autostart.sh and startXBMC

Yep I just downloaded it again, no .lircrc file just the other two.

works like a charm on 4.1.6, thanks

  • Author

Thanks for the suggestions guys, and I am glad to see my wonderings helping others with similar requirements.

 

I will give this a try on my NUC and hope for the best. This would be a much better solution than having to walk down a flight of stairs and through the basement each time to reboot. :)

I haven't tried it yet, I don't know if the .lircrc file is just a .txt file or what extension it uses, .sh maybe?

Thanks bin hex the files was in the zip but because Im using a Mac it hides files starting with a . and thats why I couldn't see it. I unhid the files using terminal and copied them to the Configfiles folder on OpenELEC and sure enough it works fine. Thanks very much.

np :-), now all you gotta do is train up girlfriend/wife/kids to press red button if they get issues  8)

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.