bkastner Posted September 5, 2014 Share Posted September 5, 2014 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? Quote Link to comment
megalodon Posted September 8, 2014 Share Posted September 8, 2014 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. Quote Link to comment
megalodon Posted September 8, 2014 Share Posted September 8, 2014 I don't know if this helps? http://openelec.tv/forum/124-raspberry-pi/51528-reboot-xbmc-from-ssh Quote Link to comment
bkastner Posted September 8, 2014 Author Share Posted September 8, 2014 I don't know if this helps? http://openelec.tv/forum/124-raspberry-pi/51528-reboot-xbmc-from-ssh Thanks, I will give that a try. Quote Link to comment
binhex Posted September 8, 2014 Share Posted September 8, 2014 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 Quote Link to comment
megalodon Posted September 8, 2014 Share Posted September 8, 2014 I think it was a post somewhere by you binhex. Im going to add that to my openELEC files. Thanks, really appreciate it. Quote Link to comment
binhex Posted September 8, 2014 Share Posted September 8, 2014 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 Quote Link to comment
megalodon Posted September 8, 2014 Share Posted September 8, 2014 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. Quote Link to comment
binhex Posted September 8, 2014 Share Posted September 8, 2014 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 Quote Link to comment
megalodon Posted September 8, 2014 Share Posted September 8, 2014 I will try it later, is the .lircrc file part of openELEC? Quote Link to comment
binhex Posted September 8, 2014 Share Posted September 8, 2014 I will try it later, is the .lircrc file part of openELEC? i dont think its included by default, no. Quote Link to comment
megalodon Posted September 8, 2014 Share Posted September 8, 2014 Can you post a copy of your .lircrc file as well please so we can use that. Thanks. Quote Link to comment
binhex Posted September 8, 2014 Share Posted September 8, 2014 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. Quote Link to comment
megalodon Posted September 8, 2014 Share Posted September 8, 2014 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? Quote Link to comment
binhex Posted September 8, 2014 Share Posted September 8, 2014 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. Quote Link to comment
megalodon Posted September 8, 2014 Share Posted September 8, 2014 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. Quote Link to comment
binhex Posted September 8, 2014 Share Posted September 8, 2014 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 Quote Link to comment
megalodon Posted September 8, 2014 Share Posted September 8, 2014 Thanks, There was only two files in the Zip, Autostart.sh and startXBMC Quote Link to comment
megalodon Posted September 8, 2014 Share Posted September 8, 2014 Yep I just downloaded it again, no .lircrc file just the other two. Quote Link to comment
binhex Posted September 8, 2014 Share Posted September 8, 2014 Hmm OK that's odd I will check the zip tomorrow, does it now work? Quote Link to comment
mr.sparkle Posted September 8, 2014 Share Posted September 8, 2014 works like a charm on 4.1.6, thanks Quote Link to comment
bkastner Posted September 8, 2014 Author Share Posted September 8, 2014 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. Quote Link to comment
megalodon Posted September 8, 2014 Share Posted September 8, 2014 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? Quote Link to comment
megalodon Posted September 9, 2014 Share Posted September 9, 2014 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. Quote Link to comment
binhex Posted September 9, 2014 Share Posted September 9, 2014 np :-), now all you gotta do is train up girlfriend/wife/kids to press red button if they get issues Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.