2012-11-01, 09:23
Hi,
I have 2x RPI's at present. 1 is a NAS PI running all my media harddrives. 2 is XBMC PI running XBMC and HDMI'd to my TV.
Both Pi's need to be running all the time.
This is because I want the NAS pi to tell the XBMC pi to update library everyday at a certain time etc etc
& I don't like waiting for it to boot up when TV turned on.
I can easily listen to JSON notifications on the NAS pi to detect what the XBMC pi is doing and can also make calls to it using JSON
(so I can force update then wait for update complete notification - the turn off harddrives)
However, I want to detect when the TV is turned off, so I can power down harddrives immediateley.
They are in my room and if I turn off the TV - usually means sleep time.
I can not figure out how to catch the TV off command.
If I set LIBCEC to shutdown, I get a notifcation at the other pi. But the XBMC pi shutdowns and needs power down/on to get XBMC back.
In RASPBMC there is no standby - so this LIBCEC command does nothing and can not be caught.
Appears LIBCEC does not send out any JSON notifications or anything... Even if I could change what LIBCEC does when TV off to "Exit XBMC" or "Restart XBMC"
I could catch this then...
Any ideas how to tell if my TV has been turned off? Even if it has to be a service on the XBMC Pi that then sends a notifciation to the 2nd Pi.
I have 2x RPI's at present. 1 is a NAS PI running all my media harddrives. 2 is XBMC PI running XBMC and HDMI'd to my TV.
Both Pi's need to be running all the time.
This is because I want the NAS pi to tell the XBMC pi to update library everyday at a certain time etc etc
& I don't like waiting for it to boot up when TV turned on.
I can easily listen to JSON notifications on the NAS pi to detect what the XBMC pi is doing and can also make calls to it using JSON
(so I can force update then wait for update complete notification - the turn off harddrives)
However, I want to detect when the TV is turned off, so I can power down harddrives immediateley.
They are in my room and if I turn off the TV - usually means sleep time.
I can not figure out how to catch the TV off command.
If I set LIBCEC to shutdown, I get a notifcation at the other pi. But the XBMC pi shutdowns and needs power down/on to get XBMC back.
In RASPBMC there is no standby - so this LIBCEC command does nothing and can not be caught.
Appears LIBCEC does not send out any JSON notifications or anything... Even if I could change what LIBCEC does when TV off to "Exit XBMC" or "Restart XBMC"
I could catch this then...
Any ideas how to tell if my TV has been turned off? Even if it has to be a service on the XBMC Pi that then sends a notifciation to the 2nd Pi.