question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to help with state detection!

See original GitHub issue

State detection diagnostics

Assuming you’re using the Home Assistant Android TV component, here’s how you can help improve state detection.

This package determines the state in the AndroidTV.update / FireTV.update methods using a collection of properties and reports that state to Home Assistant. You can see what those properties are by using the HA service androidtv.adb_command with "GET_PROPERTIES" as the command argument – they will be logged at the INFO level and they will be stored in the media player’s adb_response attribute (HA 0.94+), which can easily be viewed on the States tab. You can read more about the androidtv.adb_command service at the bottom of the Android TV documentation.

The state detection logic will differ depending on the app. So open an app, send the "GET_PROPERTIES" command a few times while it’s idle / on standby, playing, and paused, and try to figure out a better way to determine the state. Pull requests are welcome!

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:19 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
JeffLIrioncommented, Mar 22, 2019

state off is now working well when device is turned off it does shows off for few seconds and after after that it shows unavailable. Is it behavior correct? should it be shown as off

‘Unavailable’ means that the ADB connection is not intact. Since HA can’t turn the device on, I think unavailable is the appropriate state. But that has to do with the Home Assistant component, not this package.

0reactions
JeffLIrioncommented, Sep 12, 2021

This issue needs to be done first: https://github.com/JeffLIrion/python-androidtv/issues/255

After that’s done, it shouldn’t be too hard to customize the command used the get the HDMI input and the code that processes the result.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[2204.00710] Improving quantum state detection with adaptive ...
Improving quantum state detection with adaptive sequential observations. Authors:Shawn Geller (1 and 2), Daniel C. Cole (1), Scott Glancy (1), ...
Read more >
Idle-state detection | ESET Endpoint Security
Idle state detection settings can be configured in Advanced setup under Detection engine > Malware scans > Idle-state scanning > Idle state detection....
Read more >
Stateful detection engineering | Elastic
Detection states. The quickest way to get started may not always be the best, and new analysts tend to jump right into the...
Read more >
A Driver State Detection System—Combining a Capacitive ...
In this paper, a driver state detection system based on cellular neural networks (CNNs) to monitor the driver's stress level is presented.
Read more >
Using Driver State Detection in Automated Vehicles - ROSA P
One method provided feedback throughout the drive when drivers were classified as distracted (i.e., attentional maintenance). The other method utilized state- ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found