Solved Wake on Lan not working
#1
hello, 
Kodi is working well with my mythtv backend, with exception that wake-on-lan is not working.
I can wake the backend from my phone using a magic packet, so backend configuration does not seem to be the issue. 
The Kodi myth add-on settings, AFAICT take a setting for IP address but not MAC address. I have tried using 192.168.1.253 (backend's IP) as well as 192.168.1.255 (broadcast address that works better when I wake with my phone) for the setting on the kodi side.

Is there something I'm missing, like maybe a place that I should be entering the mac address?
Thanks in advance.
Reply
#2
Not sure if you've seen this but it might be worth a read if not. https://kodi.wiki/view/Wake_on_lan
Learning Linux the hard way !!
Reply
#3
(2020-11-03, 20:17)black_eagle Wrote: Not sure if you've seen this but it might be worth a read if not. https://kodi.wiki/view/Wake_on_lan

Thanks - I had not seen it. It says the method does not work to wake PVRs, but maybe that information is out of date. It does have a place to put in your MAC address, which seems useful.
 
I've created the xml file as described in the wiki. Now I'm having trouble getting the backend machine to go to sleep (separate issue), so once that gets sorted out, I will test this and report back ....
Reply
#4
(2020-11-03, 20:17)black_eagle Wrote: Not sure if you've seen this but it might be worth a read if not. https://kodi.wiki/view/Wake_on_lan

Thanks again. It's working! I followed the instructions to create the xml file in the location indicated. It now wakes the PVR, even though the doc said it might not.  Yay.
Reply
#5
Thread marked solved.
Learning Linux the hard way !!
Reply
#6
Well, bad news. It’s not actually working for the pvr after all, or if it did, it only worked once and then quit. I can wake the server by accessing music files, since that uses smb, and then switch over to the pvr. But if I start from the pvr it just displays a message of “starting up PVR” and never actually starts.
I think I’ve done what the wiki says. Is there anything else I can try?
Reply
#7
I guess you could write a small python script / shell script to broadcast the magic packet and then trigger that with an <onload> condition in the MyPVRfoo.xml files in the skin.  It would mean that if you update the skin that you would have to re-do the mods each time but it would also mean that the packet would be triggered whenever you enter a PVR related screen.

xml:

<onload>System.Exec(/full/path/to/script/</onload>

If you put that at the top of the xml definition for a skin window (inside the opening <window> tag) it will execute the script whenever the window loads.  Not an ideal solution I know, but I can't see why it wouldn't work.
Learning Linux the hard way !!
Reply
#8
(2020-11-14, 10:58)black_eagle Wrote: I guess you could write a small python script / shell script to broadcast the magic packet and then trigger that with an <onload> condition in the MyPVRfoo.xml files in the skin.  It would mean that if you update the skin that you would have to re-do the mods each time but it would also mean that the packet would be triggered whenever you enter a PVR related screen.

xml:

<onload>System.Exec(/full/path/to/script/</onload>

If you put that at the top of the xml definition for a skin window (inside the opening <window> tag) it will execute the script whenever the window loads.  Not an ideal solution I know, but I can't see why it wouldn't work.
Sorry to be dense, but I am not able to find an appropriate file to put the on load condition in. I’m in .kodi/userdata/addon_data, and each skin folder has only one settings.xml file. The pvr.mythtv folder also only has the single settings file, and these do not seem to be the right place to put it. Where should I look?
Reply
#9
(2020-11-19, 13:25)linuxgrrl Wrote:
(2020-11-14, 10:58)black_eagle Wrote: I guess you could write a small python script / shell script to broadcast the magic packet and then trigger that with an <onload> condition in the MyPVRfoo.xml files in the skin.  It would mean that if you update the skin that you would have to re-do the mods each time but it would also mean that the packet would be triggered whenever you enter a PVR related screen.

xml:

<onload>System.Exec(/full/path/to/script/</onload>

If you put that at the top of the xml definition for a skin window (inside the opening <window> tag) it will execute the script whenever the window loads.  Not an ideal solution I know, but I can't see why it wouldn't work.
Sorry to be dense, but I am not able to find an appropriate file to put the on load condition in. I’m in .kodi/userdata/addon_data, and each skin folder has only one settings.xml file. The pvr.mythtv folder also only has the single settings file, and these do not seem to be the right place to put it. Where should I look?
UPDATE: I think I found the right place. It is under "addon" not "addon_data". To be more specific, based on the skin I use, I think the file I want to edit is ".kodi/addons/skin.xperience1080/1080i/MyPVRRecordings.xml".
Now I will have to figure out how to copy my magic packet script from my PC to my TV and choose a place for it.  Life is a journey Smile
Assuming (as is often the case) that the script doesn't work correctly the first time, does anyone know where I would look for the output from it?
Reply
#10
(2020-11-20, 18:04)linuxgrrl Wrote: Assuming (as is often the case) that the script doesn't work correctly the first time, does anyone know where I would look for the output from it?

Just write some logging into your script that logs to a file in the same directory.  That way you can just read the contents of the file and see if/how far the script executed.
Learning Linux the hard way !!
Reply
#11
(2020-11-22, 17:50)black_eagle Wrote:
(2020-11-20, 18:04)linuxgrrl Wrote: Assuming (as is often the case) that the script doesn't work correctly the first time, does anyone know where I would look for the output from it?

Just write some logging into your script that logs to a file in the same directory.  That way you can just read the contents of the file and see if/how far the script executed.

Ok, thanks. Here i am again with the basic questions. I was able to download a command line utility called "wol" that runs from the command line in Termux (i believe wol is a linux utility). I want to write a shell script that invokes wol with my mac address.  *However,* the script that I write will be running in the background (triggered by the Mypvr screen), not running in Termux, correct?  I have searched for a CLI way to run Termux commands but come up empty. Does Android have its own shell interpreter, and if so, what is it? Will a script written for that shell interpreter be able to run the wol utility that I installed, given that I installed it via Termux?
Apologies if these are obvious questions, I am completely new at Android.
Reply

Logout Mark Read Team Forum Stats Members Help
Wake on Lan not working0