LinHES Forums
http://forum.linhes.org/

[solved] Howto wakeup SBE to play recorded programs?
http://forum.linhes.org/viewtopic.php?f=25&t=21167
Page 1 of 1

Author:  dfdario [ Wed Jun 23, 2010 3:56 am ]
Post subject:  [solved] Howto wakeup SBE to play recorded programs?

Both my MBE and SBE have recording capabilities and HDDs hence programs are recorded according to the schedule on each BE local HDD unit.

When MBE starts it wakes up SBE but after a few minutes it sends it to sleep.
In this condition if I try to play on the MBE a recorded program which is stored on the SBE HDD I get an error back.
Is there any way to get rid of this problem?

Author:  dfdario [ Thu Jun 24, 2010 2:14 am ]
Post subject: 

It was easier than expected.
I created a script which send magic packet to every Back End and telnet the command to mythtv.
Then I modified /usr/share/mythtv/themes/defaultmenu/library.xml in order to call the script by EXECuting "wake4watch.sh <command>" (e.g. for the "Watch Recordings" button the command has modified with: <action>EXEC /home/mythtv/bin/wake4watch.sh playbackrecordings</action>)

The wake4watch.sh content is:
Code:
#!/bin/bash
#
#########################################
# The script wake up slaves when needed #
#########################################
#
#
macaddr=( 00:1C:C0:D0:1F:XX 00:1C:C0:DA:F9:XX )
localaddr=( pvr-0 )
for ((l=1; l < 3 ; l++)); do
        for i in ${!macaddr[@]} ; do
                sudo wol -i 192.168.1.255 ${macaddr[i]}
                sleep 0.3
        done
done

echo "jump $1" | telnet localhost 6546

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/