Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

Quit XBMC when TV is off
Thank you for your donation

Pages (3): « Previous 1 2 3
Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Quit XBMC when TV is off
19th Nov, 2013, 06:50 AM
Post: #31
peibol16 Offline
Registered
Posts: 11
Joined: Nov 2013
Reputation: 0
RE: Quit XBMC when TV is off
Yes, I had not realized of this point.

Is include this feature in the last beta2 release?
Find all posts by this user
Quote this message in a reply
25th Dec, 2013, 11:45 PM
Post: #32
Alex2108 Offline
Registered
Posts: 1
Joined: Dec 2013
Reputation: 0
RE: Quit XBMC when TV is off
I got a very simple script for closing/starting xbmc with the TV. The only requirement is that the TV has a network connnection and answers to a ping. Just replace the IP with that of your TV (configure your router to assign always the same IP to the TV or set a static IP on the TV).

Code:
#!/bin/sh

if ping -c 1 -W 1 192.168.1.55 > /dev/null; then #tv on?
    if !(pidof xbmc.bin > /dev/null); then #xbmc running?
       /etc/init.d/xbmc start
    fi
else
    if (pidof xbmc.bin > /dev/null); then
       /etc/init.d/xbmc stop
    fi
fi

exit 0
I call this script every minute with cron so i get a maximum delay of one minute until xbmc will get the signal to start, which is ok for me.
NOTE: i'm using raspbian, but it should probably work with xbian too.
Find all posts by this user
Quote this message in a reply
26th Dec, 2013, 12:51 AM
Post: #33
IriDium Offline
Inquisitor
******
Posts: 2,025
Joined: Jan 2013
Reputation: 170
RE: Quit XBMC when TV is off
(25th Dec, 2013 11:45 PM)Alex2108 Wrote:  I got a very simple script for closing/starting xbmc with the TV. The only requirement is that the TV has a network connnection and answers to a ping. Just replace the IP with that of your TV (configure your router to assign always the same IP to the TV or set a static IP on the TV).

Code:
#!/bin/sh

if ping -c 1 -W 1 192.168.1.55 > /dev/null; then #tv on?
    if !(pidof xbmc.bin > /dev/null); then #xbmc running?
       /etc/init.d/xbmc start
    fi
else
    if (pidof xbmc.bin > /dev/null); then
       /etc/init.d/xbmc stop
    fi
fi

exit 0
I call this script every minute with cron so i get a maximum delay of one minute until xbmc will get the signal to start, which is ok for me.
NOTE: i'm using raspbian, but it should probably work with xbian too.

Or if it is HDMI - you can do it via System -> System -> Input Devices -> Periperals -> CEC Adapter -> When TV is switched off and Devices to switch on

Please read before you post
How to post a log file

If you liked my help, click on "Thanks" to show your appreciation.
Find all posts by this user
Quote this message in a reply
14th Mar, 2014, 04:47 AM
Post: #34
LeoSum Offline
Registered
Posts: 10
Joined: Mar 2014
Reputation: 0
RE: Quit XBMC when TV is off
(10th May, 2013 03:17 PM)mihailescu2m Wrote:  modify the XBMC init.d script such that when XBMC exits it will start a libCEC program that monitors HDMI commands.

Wouldn't it be possible to have such a program running in the background all the time to handle the starting and stoping ob xbmc "externally" by just issuing "start xbmc" and "stop xbmc" commands? For users who don't use xmbc as a music renderer this would totally do the job. But what are the steps to do so? Smile
Find all posts by this user
Quote this message in a reply
16th Mar, 2014, 02:42 PM
Post: #35
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: Quit XBMC when TV is off
I just included this feature into XBian, it will come to devel repo after a bit more testing tomorrow .

Currently without GUI configuring interface, just /etc/default/xbmc

keywords FOLLOWTV =yes/no

TVSCREENOFF needs to be set to yes as well. normlaly TV would go OFF on screensaver, FOLLOWTV=yes will extend the workflow as follows:

XBMC hits screensaver - this turns off tv and triggers XBMC quit
next time TV will go ON. trigger will start XBMC

is this as expected ?

(16th Nov, 2013 06:32 AM)rikardo1979 Wrote:  not really. Like me listening music from local server or online radios or streams. so for this I dont need TV ON but I need XBMC running. so imagine you listen to music and than your XBMC goes OFF cos the TV is OFF Wink

this was a bug with first release of this functionality but then we added two layer testing for XBMC being idle on screensaver as

screensaver and idle
screensaver + playing

in 2nd case TV is not turned off with screensaver.

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
22nd Mar, 2014, 01:48 AM
Post: #36
LeoSum Offline
Registered
Posts: 10
Joined: Mar 2014
Reputation: 0
RE: Quit XBMC when TV is off
(16th Mar, 2014 02:42 PM)mk01 Wrote:  I just included this feature into XBian, it will come to devel repo after a bit more testing tomorrow .

So should this feature show up in my existing xbian automagically after running updates now?
Find all posts by this user
Quote this message in a reply
24th Mar, 2014, 07:00 AM
Post: #37
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: Quit XBMC when TV is off
(22nd Mar, 2014 01:48 AM)LeoSum Wrote:  So should this feature show up in my existing xbian automagically after running updates now?

not "now". but with next updates. today, tomorrow, day after tomorrow.

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
4th Apr, 2014, 11:08 AM
Post: #38
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: Quit XBMC when TV is off
@LeoSum

I posted xbian-package-xbmc-scripts in version 1.0.5 to devel repo.

there is new parameter in /etc/default/xbmc called XBMCOFF. by default is set to "no". set it to "yes" together with SCREENOFF=yes.

(SCREENOFF no/yes will not change any behaviour in that case but =yes is needed for some related processes to being able to operate on XBMC according to TV status).

for debugging, there should be file created /run/TV.log with logging message on TVoff and TVon. at the same time "start/stop xbmc" is issued.

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
13th Apr, 2014, 07:57 PM
Post: #39
LeoSum Offline
Registered
Posts: 10
Joined: Mar 2014
Reputation: 0
RE: Quit XBMC when TV is off
Thanks for the effort! Will try and report back. Sounds like exactly what I was looking for.
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Pages (3): « Previous 1 2 3
Post Reply 


  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 9th May, 2025, 06:57 PM Powered By MyBB, © 2002-2025 MyBB Group.