[mythtv-users] SBE is "currently not connected instead" of "currently asleep"

Michael Watson michael at thewatsonfamily.id.au
Sun Jan 15 02:35:32 UTC 2012

On 9/01/2012 8:57 AM, Herman Gerritsen wrote:
> Hi All,
> I am trying to create a mythtv setup with some energy conservation in
> mind, but I trip over an disconnecting slave backend.
> Setup:
> I have two systems: (A) the HTPC next to the television and (B) the
> recording server in the shed.
> System A has the Masterbackend, mysql, and the Mythfrontend installed
> (mythbuntu package mythtv-backend-master and mythtv-frontend)
> System B is a slave backend (mythbuntu package mythtv-backend)
> System A is used to view recorder videos from (the local) harddisk and
> play optical disks without the need to power on all the dvb cards from
> the recording slave backend. When livetv is selected from the frontend
> the slave backend is supposed to boot (wol). When a scheduled
> recording is about to start this system (A) should start using the
> bios alarm.
> System B is used to record livetv and should only be powered on when
> needed, the remaining time is should be asleep.
> Versions:
> System A runs Ubuntu 10.04 (64-bit Desktop), System B runs Ubuntu
> 10.04 (64-bit Server)
> Both systems have this myth version (Mythbuntu):
> MythTV Version   : v0.24.1-114-g4125a40
> MythTV Branch    : fixes/0.24
> Network Protocol : 63
> Library API      : 0.24.20110505-1
> QT Version       : 4.6.2
> Options compiled in:
>   linux profile using_alsa using_oss using_pulse using_pulseoutput
> using_backend using_bindings_perl using_bindings_python
> using_crystalhd using_directfb using_dvb using_firewire using_frontend
> using_hdhomerun using_hdpvr using_iptv using_ivtv using_joystick_menu
> using_lirc using_mheg using_opengl_video using_opengl_vsync
> using_qtdbus using_qtwebkit using_v4l using_x11 using_xrandr using_xv
> using_bindings_perl using_bindings_python using_mythtranscode
> using_opengl using_vdpau using_ffmpeg_threads using_live using_mheg
> Current progress:
> When I manually boot both systems everything works (watching live
> television and scheduled recordings).
> My next step was to have booting and shutting down of system B (the
> slave backend) controlled by MythTV.
> Therefore I have set the following shutdown/wakeup settings:
> Idle timeout to 300 seconds
> Startup before recording 1200 seconds
> Command to set wakeuptime (left it blank because I want the slave
> backend to start when the MBE or FE wants to, for as far as I
> understand this setting is only for the MBE)
> And the following Wake on lan settings for the SBE (setup from the
> mythtv-setup on system B (the slave backend)):
> wake command:  wakeonlan {MAC from system B}
> Sleep command: sudo /sbin/halt -p
> Problem:
> When all systems are down and I only power on System A. The MBE sends
> the magic packet to the broadcast address (WOL) which boots the Slave
> backend.
> The slave backend actually boots and concluding from the MBE logs the
> SBE actually announces its availablility. The MBE discovers that the
> SBE is not required at the moment and reacts within halve a second
> with the goto sleep for the SBE. The SBE (concluding from the SBE
> logs) runs it sleep command and powers down. When I look in mythweb
> the SBE is "Currently disconnected" instead of the expected "Currently
> asleep". Therefore the SBE is never switched on again. How can I get
> the SBE in a "currently asleep" status?
> Thanks for reading, I hope some one can give me a pointer to make this
> work, since information about this seems sparse.
> Greetings,
> Herman
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2012.0.1901 / Virus Database: 2109/4741 - Release Date: 01/13/12

     I have a similar setup using WOL, that mostly works ok.  Sometimes 
the SBE's status, for reasons unknown will change from asleep to 
disconnected, but mostly it works as expected.
     I had difficulty setting it up due to sparse documentation on what 
the shutdown, wake, sleep commands actually do.
     I ended up using a wrapper script for the wake command, mainly to 
diagnose what was actually going on, and once I got it working, I left 
it as is.  So I have:

         wake command:  /usr/bin/wake_tv02.sh

     logger -t "wake_tv02.sh" "Waking TV02"
     wakeonlan <tv02 mac address>

Michael Watson

More information about the mythtv-users mailing list