Starting XBMC on hdmi access - Printable Version +- Forum (http://forum.xbian.org) +-- Forum: Software (/forum-6.html) +--- Forum: Others (/forum-24.html) +--- Thread: Starting XBMC on hdmi access (/thread-803.html) |
Starting XBMC on hdmi access - Fred - 17th Apr, 2013 07:18 PM Is it possible to get the status from the hdmi port from the commandline, so whether it is accessed by the tv or not? tvservice -s shows no difference in whether it's accessed or not. Edit: see http://forum.xbian.org/thread-803-post-9461.html#pid9461 for linux script RE: Get HDMI status from commandline. - rikardo1979 - 18th Apr, 2013 07:58 AM is your TV recognized ? Code: /opt/vc/bin/tvservice -n RE: Get HDMI status from commandline. - Fred - 18th Apr, 2013 08:02 PM Yes it returns: Code: device_name=SAM-SAMSUNG Re: Get HDMI status from commandline. - rikardo1979 - 18th Apr, 2013 08:17 PM OK so it is working fine. tbh Im not sure what you want to achieve RE: Get HDMI status from commandline. - Fred - 18th Apr, 2013 10:31 PM I want to start XBMC when the tv is turned to the hdmi channel and stop XBMC again when the channel is changed back again. So I thougt of building a script that periodically calls this tvservice -s and then starts or stops XBMC. I also tried doing this by running cec-client -m and running a script whenever the hdmi acces command comes along. But now suddenly when I run 'cec-client -m' in commandline it gives a segmentation fault after a while (I didn't make any changes to libcec or the cec-client). RE: Get HDMI status from commandline. - Fred - 19th Apr, 2013 02:58 AM Code: xbian@xbian ~ $ cec-client -m Is there a way to reinstall libcec without screwing things up for XBMC? RE: Get HDMI status from commandline. - Fred - 19th Apr, 2013 07:36 PM Okay I have build this script now as a work around. This script runs forever and should start XBMC on hdmi access and shut it down when the channel is changed away from the hdmi again. The code is below and this code doesn't start or stop anything yet but just prints stuff for debugging. I would like to get some advice on this, maybe you know a better solution. Code: #!/bin/bash I would also like to extend it with option to wait an x amount of time before shutting down, if hdmi is accessed within that time cancel shutdown. But for this I should be able to do actions while cec-client is still running, I don't know how to do that. RE: Starting XBMC on hdmi access - koper89 - 27th Jan, 2014 04:35 AM Is this still "under development" ? It could be really nice script, because xbmc uses a lot of resources in background, and i could use those f.e. for rtorrent. RE: Starting XBMC on hdmi access - mk01 - 27th Jan, 2014 09:36 PM @koper89 http://forum.xbian.org/thread-2040-post-20131.html#pid20131 |