Home Assistant Agent for Media Device Types?

Posted on
Mon Mar 11, 2024 2:14 pm
vtmikel offline
Posts: 645
Joined: Aug 31, 2012
Location: Boston, MA

Re: Home Assistant Agent for Media Device Types?

FlyingDiver wrote:
vtmikel wrote:


Yeah, but I already knew how to find the defs for that field. :D


Cool. My thought was that the presence of this attribute, or the value within, seems to imply the same as "device_class": "receiver",

Posted on
Mon Mar 11, 2024 2:20 pm
FlyingDiver offline
User avatar
Posts: 7226
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Home Assistant Agent for Media Device Types?

Which controls that show in HA are most important to implement first?

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Mar 11, 2024 2:31 pm
vtmikel offline
Posts: 645
Joined: Aug 31, 2012
Location: Boston, MA

Re: Home Assistant Agent for Media Device Types?

Just my opinion, here's how I'd prioritize the actions.

Highest:
turn_on, turn_off, volume_up, volume_down, volume_set, volume_mute, select_source

Medium:
toggle, media_play_pause, media_play, media_pause, media_stop, select_sound_mode

Low:
media_next_track, media_previous_track

Don't implement:
join, unjoin, play_media, clear_playlist, shuffle_set, repeat_set
Last edited by vtmikel on Mon Mar 11, 2024 2:32 pm, edited 1 time in total.

Posted on
Mon Mar 11, 2024 2:32 pm
FlyingDiver offline
User avatar
Posts: 7226
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Home Assistant Agent for Media Device Types?

OK, that gives me enough to get started.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed Mar 13, 2024 12:36 pm
FlyingDiver offline
User avatar
Posts: 7226
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Home Assistant Agent for Media Device Types?

Initial test pre-release with support for media_player entities available here (not in plugin store): https://github.com/FlyingDiver/Indigo-H ... g/2024.0.0

On/Off and all volume type controls work in my testing. Source selection and sound mode also seem to work. Play/Pause/Stop are giving me errors, even though the HA integration for my Denon AVR says it implements those commands. It might be because I'm not using a source that supports it. Or maybe something else is going on. Really not sure.

Please either start a new thread, or a GitHub issue, to report problems. Make sure you identify the model of device you're using. Also I need the entity info from the menu command entity listing, and the device details (right click menu) for the Indigo device that was created. And debug level log when the error occurred.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed Mar 13, 2024 1:58 pm
vtmikel offline
Posts: 645
Joined: Aug 31, 2012
Location: Boston, MA

Re: Home Assistant Agent for Media Device Types?

Thanks Joe - this is amazing progress and could end up saving my blocker for an upgrade path on Indigo. I'll test it thoroughly and report feedback and any issues via the mechanism you provided.

Something I'm already mindful of from a quick test -- I notice that for both my Denon and Onkyo AVR's (two different HA plugins), both have about a ~7 second latency in HA to receive state updates for changes that happen: External Control Device -> AVR -> HA. Your plugin seems to get the updated state immediately once HA reflects it, so almost no additional latency HA -> Indigo.

Are you seeing the same latency for your setup?

I have a number of triggers and custom python that reacts to changes to volume, changes to input state, etc. The 7 second delay is workable, but meaningful in those use cases which I'll need to consider.

Posted on
Wed Mar 13, 2024 2:08 pm
FlyingDiver offline
User avatar
Posts: 7226
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Home Assistant Agent for Media Device Types?

With my Denon, the time from changing something (like the volume) from the mobile app until it shows in Indigo is about 1 second. Certainly less than 2.

But the rPi running HA is very lightly loaded.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Thu Mar 14, 2024 6:05 am
vtmikel offline
Posts: 645
Joined: Aug 31, 2012
Location: Boston, MA

Re: Home Assistant Agent for Media Device Types?

FlyingDiver wrote:
With my Denon, the time from changing something (like the volume) from the mobile app until it shows in Indigo is about 1 second. Certainly less than 2.

But the rPi running HA is very lightly loaded.


Do you have "Use Telnet" enabled in: Settings -> Devices & Services -> Denon -> Configure?

Posted on
Thu Mar 14, 2024 7:21 am
FlyingDiver offline
User avatar
Posts: 7226
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Home Assistant Agent for Media Device Types?

vtmikel wrote:
FlyingDiver wrote:
With my Denon, the time from changing something (like the volume) from the mobile app until it shows in Indigo is about 1 second. Certainly less than 2.

But the rPi running HA is very lightly loaded.


Do you have "Use Telnet" enabled in: Settings -> Devices & Services -> Denon -> Configure?


I can't find that menu anywhere. Which UI is that?

On my Denon's setup menu, I do have "network control" set to "always on".

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Thu Mar 14, 2024 7:38 am
vtmikel offline
Posts: 645
Joined: Aug 31, 2012
Location: Boston, MA

Re: Home Assistant Agent for Media Device Types?

In HA UI. Here's screenshot.

From the docs it says that Use Telnet is now on by default, but was previously off. It makes for a real-time information flow between the AVR and HA, however it says you can only have one integration via Telnet.
Attachments
Screenshot 2024-03-14 at 9.36.12 AM.png
Screenshot 2024-03-14 at 9.36.12 AM.png (215.66 KiB) Viewed 828 times

Posted on
Thu Mar 14, 2024 7:55 am
FlyingDiver offline
User avatar
Posts: 7226
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Home Assistant Agent for Media Device Types?

Yes, that's on in HA. So it must be the default now since I never touched that settings dialog.

So that's on, and the mobile app works fine. And Indigo is going through HA so it doesn't need it's own connection.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Thu Mar 14, 2024 8:30 am
vtmikel offline
Posts: 645
Joined: Aug 31, 2012
Location: Boston, MA

Re: Home Assistant Agent for Media Device Types?

FlyingDiver wrote:
Yes, that's on in HA. So it must be the default now since I never touched that settings dialog.

So that's on, and the mobile app works fine. And Indigo is going through HA so it doesn't need its own connection.


This has always perplexed me as well. The Denon seems to support multiple connections, despite warnings that it doesn't. Maybe a model by model difference. I turned it on, and now HA / Indigo via your plugin updates in sub-2 seconds latency.

But, the Denon isn't my priority device anyhow, it's just a test device in addition to my Onkyo. The Cynical plugin works well so low priority to migrate that device to Home Assistant Agent.

I can see from the manifest for the Onkyo HA integration that it's set up as a "local_polling" IoT type. I don't see a way to decrease the polling frequency, so seems like I may have to live with the ~7 second latency I'm seeing.

Posted on
Fri Apr 05, 2024 7:52 am
vtmikel offline
Posts: 645
Joined: Aug 31, 2012
Location: Boston, MA

Re: Home Assistant Agent for Media Device Types?

Thanks again for the support for the media_device. I've been running it for some time with generally good results. I posted a few issues to GitHub when you have a moment.

Posted on
Fri Apr 05, 2024 8:21 am
FlyingDiver offline
User avatar
Posts: 7226
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Home Assistant Agent for Media Device Types?

I had GitHub misconfigured and didn't get notified of the issues you created. I'll look at them this afternoon, but probably won't be able to actually work on them for a week or so. Pretty busy until then.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Apr 14, 2024 10:26 am
vtmikel offline
Posts: 645
Joined: Aug 31, 2012
Location: Boston, MA

Re: Home Assistant Agent for Media Device Types?

I just want to say thank you to Joe for the great plugins and support, in particular adding the media_device type support from the HA object model. After figuring out the strange configuration of my Onkyo, it was a drop in replacement.

The HA Assistant plugin is a key bridge providing access to the HA plugin community that we need to cover devices where there is not a native plugin for Indigo. For me, I much prefer Indigo's structure of triggers, schedules, and action groups and this allows Indigo to remain my center for these automations.

Thanks Joe!

Who is online

Users browsing this forum: No registered users and 3 guests