Can you script a OpenELEC connect and reboot?


bkastner

Recommended Posts

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?

Link to comment

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

Link to comment

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

Link to comment

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.

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.