Comments (6)
is_active_input
is a value that is returned by the Chromecast. It is my understanding that it is true
when the TV is turned on and tuned into the Chromecast channel.
I have had no problems with it in the past.
The current implementation of is_idle
is this:
@property
def is_idle(self):
""" Returns if there is currently an app running. """
return (self.status is None or not self.status.is_active_input or
self.app_id in (None, IDLE_APP_ID))
is_active_input
is one of the 3 checks to determine if the Chromecast is idle. We check:
- If we don't have an active status
- If we are not the active input
- If there is no app running or the backdrop app is running
I think that we need to do some more research on the reliability of is_active_input
. If it really is unstable we can remove the is_idle
dependency on it.
from pychromecast.
In my local copy, I've remove the "not self.status.is_active_input" check.
It gives me the expected behavior. On XDA Developers, there appears to be a
handful of people having CEC problems
https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=chromecast+cec+problems+site:forum.xda-developers.com.
It is hard to diagnose this issue specifically as I'm not sure anyone has
really looked into this value all that closely. It appears that it is
likely a firmware issue on my devices.
At either rate, this check for is_active_input is probably not necessary
since, if CEC is properly enabled and the active app is not Background, the
Chromecast should switch the input over automatically anyway. Another
option would be to create a global list in the pychromecast module called
something like DISABLE_CEC that can be populated with friendly names of
devices for which CEC related values should be ignored. It could even use
the fnmatch module https://docs.python.org/3/library/fnmatch.html to
allow for wildcards in friendly names. This feature could then be forwarded
to the Home Assistant config file. Just a thought.
Thanks,
Ryan Kraus
On Mon, Jul 6, 2015 at 4:06 PM, Paulus Schoutsen [email protected]
wrote:
is_active_input is a value that is returned by the Chromecast. It is my
understanding that it is true when the TV is turned on and tuned into the
Chromecast channel.I have had no problems with it in the past.
The current implementation of is_idle is this:
@property def is_idle(self): """ Returns if there is currently an app running. """ return (self.status is None or not self.status.is_active_input or self.app_id in (None, IDLE_APP_ID))
is_active_input is one of the 3 checks to determine if the Chromecast is
idle. We check:
- If we don't have an active status
- If we are not the active input
- If there is no app running or the backdrop app is running
I think that we need to do some more research on the reliability of
is_active_input. If it really is unstable we can remove the is_idle
dependency on it.—
Reply to this email directly or view it on GitHub
#50 (comment)
.
from pychromecast.
There is the case where you may have started an app, the CC switched input
with CEC, and then you switched manually away via buttons on the TV, the
remote etc...
It would be nice to be able to know this case. I like your idea of having
some kind of quirks setting that has default behavior but lets you
override...
Fred Clift
On Tue, Jul 7, 2015 at 4:26 PM, Ryan Kraus [email protected] wrote:
In my local copy, I've remove the "not self.status.is_active_input" check.
It gives me the expected behavior. On XDA Developers, there appears to be a
handful of people having CEC problems
<
https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=chromecast+cec+problems+site:forum.xda-developers.com.
It is hard to diagnose this issue specifically as I'm not sure anyone has
really looked into this value all that closely. It appears that it is
likely a firmware issue on my devices.At either rate, this check for is_active_input is probably not necessary
since, if CEC is properly enabled and the active app is not Background, the
Chromecast should switch the input over automatically anyway. Another
option would be to create a global list in the pychromecast module called
something like DISABLE_CEC that can be populated with friendly names of
devices for which CEC related values should be ignored. It could even use
the fnmatch module https://docs.python.org/3/library/fnmatch.html to
allow for wildcards in friendly names. This feature could then be forwarded
to the Home Assistant config file. Just a thought.Thanks,
Ryan Kraus
On Mon, Jul 6, 2015 at 4:06 PM, Paulus Schoutsen <[email protected]
wrote:
is_active_input is a value that is returned by the Chromecast. It is my
understanding that it is true when the TV is turned on and tuned into the
Chromecast channel.I have had no problems with it in the past.
The current implementation of is_idle is this:
@Property
def is_idle(self):
""" Returns if there is currently an app running. """
return (self.status is None or not self.status.is_active_input or
self.app_id in (None, IDLE_APP_ID))is_active_input is one of the 3 checks to determine if the Chromecast is
idle. We check:
- If we don't have an active status
- If we are not the active input
- If there is no app running or the backdrop app is running
I think that we need to do some more research on the reliability of
is_active_input. If it really is unstable we can remove the is_idle
dependency on it.—
Reply to this email directly or view it on GitHub
<
https://github.com/balloob/pychromecast/issues/50#issuecomment-118980297>.
—
Reply to this email directly or view it on GitHub
#50 (comment)
.
from pychromecast.
So we can choose between:
- Keep is_active_input and have it work at some TVs and not work at some other TVs
- Remove is_active_input, lose the ability to detect if the Chromecast stream is visible but have consistent behavior.
- Go hybrid and do one by default and allow switching to the other if needed.
If we go for 3, which one should be active by default, 1 or 2? I think it would make sense to keep 1 as default because it provides the most comprehensive test.
from pychromecast.
I agree. Simce there is interest in keeping the current functionality, then
a hybrid approach would probably be best. If something changes, keeping the
current behavior as default makes the most sense to me too. If you'd like,
I can put in some PRs to apply these updates. I don't want to distract you
from HA.
On Wednesday, July 8, 2015, Paulus Schoutsen [email protected]
wrote:
So we can choose between:
- Keep is_active_input and have it work at some TVs and not work at some
other TVs- Remove is_active_input, lose the ability to detect if the Chromecast
stream is visible but have consistent behavior.- Go hybrid and do one by default and allow switching to the other if
needed.If we go for 3, which one should be active by default, 1 or 2? I think it
would make sense to keep 1 as default because it provides the most
comprehensive test.—
Reply to this email directly or view it on GitHub
#50 (comment)
.
Thanks,
Ryan Kraus
from pychromecast.
Done.
from pychromecast.
Related Issues (20)
- GoogleAssistant
- chromecast.wait() never returns HOT 1
- ValueError: too many values to unpack (expected 5)
- Discovery doesn't work in an async context HOT 5
- Data difference when using GoogleTV Youtube vs Casting
- Custom http headers
- Idle chromecast custom screen example
- Command feedback
- Detect tv is on or off
- SiriusXM/Chromecast Casting Issue HOT 9
- Cannot initialize 'Chromecast' class HOT 2
- Not working with updated modules ('str' object has no attribute 'cast_type') HOT 1
- How to know if a specific connected TV is compatible ? HOT 1
- BBC Sounds conroller stopped working HOT 3
- Python 3.10 Depreciation Warning ssl.SSLContext()
- How to work with spotify HOT 5
- BBC iPlayer Live Stream - unable to get working
- Join existing chromecast session without interrupting it?
- pychromecast entering spin loop when a cast device reboots [if browser.stop_discovery() was called] HOT 2
- Mocking Chromecast?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pychromecast.