[mythtv-users] System Events

Johan Van der Kolk johan.vanderkolk at gmail.com
Sun Jan 1 16:05:34 UTC 2017


Hi,

I’m in the process of trying to get things a bit more energy efficient, so I decided that my slave backend can go to sleep if it is not required to do recording.
The slave also has the local recordings. My new master will have very little HD space, and no recorders.

So, my slave gets the sleep command, goes in suspend mode since power down mode will generate an immediate reboot. No way to avoid except switching off WOL.

Now when I want to view a recording from a frontend, or live tv, the slave with the tuners and recordings is asleep. The master is aware.
But the request to view a channel or recording to the master does not result in a wakeup call from the master to the slave. 

I made a simple script that wakes up the slave when any client is connected through the system events. The intention was to only wake up on some clients’ connection by filtering on the clients name by using %HOSTNAME% as a parameter.
 
Now the problem.
As long as the slave backend is up, the event “client connected” fires. When the slave BE is down I only see disconnects, and the script does not fire.
The lines in the log of the master for when the slave is up are these:

For asking live TV the “client connected" event does not fire:
Jan  1 15:49:47 Zolder-server mythbackend: mythbackend[5681]: I ProcessRequest mainserver.cpp:1436 (HandleAnnounce) MainServer::ANN Monitor
Jan  1 15:49:47 Zolder-server mythbackend: mythbackend[5681]: I ProcessRequest mainserver.cpp:1438 (HandleAnnounce) adding: Johans-MacBook-Pro.local as a client (events: 0)

And for asking to view a recording the “client connected" event fires:
Jan  1 15:51:54 Zolder-server mythbackend: mythbackend[5681]: I ProcessRequest mainserver.cpp:1436 (HandleAnnounce) MainServer::ANN Playback
Jan  1 15:51:54 Zolder-server mythbackend: mythbackend[5681]: I ProcessRequest mainserver.cpp:1438 (HandleAnnounce) adding: Johans-MacBook-Pro.local as a client (events: 0)
Jan  1 15:51:54 Zolder-server mythbackend: mythbackend[5681]: I ProcessRequest mainserver.cpp:1554 (HandleAnnounce) MainServer::HandleAnnounce FileTransfer
Jan  1 15:51:54 Zolder-server mythbackend: mythbackend[5681]: I ProcessRequest mainserver.cpp:1556 (HandleAnnounce) adding: Johans-MacBook-Pro.local as a remote file transfer
Jan  1 15:51:54 Zolder-server mythbackend: mythbackend[5681]: E ProcessRequest mainserver.cpp:6190 (LocalFilePath) ERROR: LocalFilePath unable to find local path for '9030_20161228183000.mpg', found 'myth://192.168.1.145:6543/9030_20161228183000.mpg' instead.
Jan  1 15:51:54 Zolder-server mythbackend: mythbackend[5681]: E ProcessRequest mainserver.cpp:1626 (HandleAnnounce) Empty filename, cowardly aborting!

When the slave is asleep, neither of the two will fire the event, so the slave is not woken up. Log files are identical.
I don’t get “client connected” events, but I do get the “client disconnect” events.

I don’t really want a master shutdown, that system runs processes that are 24/7 required. 

Is there a setting I missed that will make the master wake up the slave when a recording or live tv is requested.
Or is there a better system event that I can use?




More information about the mythtv-users mailing list