Home Assistant Agent for Media Device Types?

Posted on
Mon Mar 11, 2024 6:00 am
vtmikel offline
Posts: 645
Joined: Aug 31, 2012
Location: Boston, MA

Home Assistant Agent for Media Device Types?

Moving from Indigo would be way too much of a disruption for me at this point. I'm banking on a strategy of using HA plugins with the Home Assistant Agent plugin that FlyingDiver built to bring those devices to Indigo. The problem is that strategy does not work for a non-standard device, like the Onkyo. We can bring the device over from HA, but the actions would be missing to control the AVR.

Posted on
Mon Mar 11, 2024 8:00 am
srkinard offline
Posts: 320
Joined: Apr 10, 2016
Location: Austin, Texas

Re: Upgrade to Python 3?

vtmikel wrote:
Moving from Indigo would be way too much of a disruption for me at this point. I'm banking on a strategy of using HA plugins with the Home Assistant Agent plugin that FlyingDiver built to bring those devices to Indigo. The problem is that strategy does not work for a non-standard device, like the Onkyo. We can bring the device over from HA, but the actions would be missing to control the AVR.


I tried this...and after a short time the HA Agent plugin would spike IndigoServer to the point of becoming unresponsive. The more HA devices added to Indigo, the faster it happened. I just didn't feel like troubleshooting.

But it took me a while to finally decide to just redo it all...I love Indigo in a lot of ways so it was a tough choice

Posted on
Mon Mar 11, 2024 8:17 am
FlyingDiver online
User avatar
Posts: 7226
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Upgrade to Python 3?

vtmikel wrote:
Moving from Indigo would be way too much of a disruption for me at this point. I'm banking on a strategy of using HA plugins with the Home Assistant Agent plugin that FlyingDiver built to bring those devices to Indigo. The problem is that strategy does not work for a non-standard device, like the Onkyo. We can bring the device over from HA, but the actions would be missing to control the AVR.


That's probably because I have not attempted to implement any kind of media device type from HA. What exactly is the Home Assistant device type for the AVR?

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

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

Re: Upgrade to Python 3?

FlyingDiver wrote:
vtmikel wrote:
Moving from Indigo would be way too much of a disruption for me at this point. I'm banking on a strategy of using HA plugins with the Home Assistant Agent plugin that FlyingDiver built to bring those devices to Indigo. The problem is that strategy does not work for a non-standard device, like the Onkyo. We can bring the device over from HA, but the actions would be missing to control the AVR.


That's probably because I have not attempted to implement any kind of media device type from HA. What exactly is the Home Assistant device type for the AVR?


I just assumed this would be a nightmare, but maybe it's not?

The HA type is a media_player (https://www.home-assistant.io/integrati ... ia_player/)
I noticed that the Onkyo integration creates an Entity, not a Device.

Posted on
Mon Mar 11, 2024 11:48 am
FlyingDiver online
User avatar
Posts: 7226
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Upgrade to Python 3?

vtmikel wrote:
I just assumed this would be a nightmare, but maybe it's not?

The HA type is a media_player (https://www.home-assistant.io/integrati ... ia_player/)
I noticed that the Onkyo integration creates an Entity, not a Device.


HA does multiple entities for any one physical device. Devices are physical, entities are the HA internal reference.

My initial implementation only did entity types that had a (more or less) one to one correlation with native Indigo device types. Indigo doesn't have a media-player device type.

Let me take a look at the media player entity type and see what I can do with it.

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

Posted on
Mon Mar 11, 2024 12:03 pm
FlyingDiver online
User avatar
Posts: 7226
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Upgrade to Python 3?

In your Indigo client, please use the menu command that writes the HA entity info to the log. Then search for the media_player section, and post that entire section to this thread.

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

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

Re: Upgrade to Python 3?

FlyingDiver wrote:
In your Indigo client, please use the menu command that writes the HA entity info to the log. Then search for the media_player section, and post that entire section to this thread.


I'm using v2023.3.2 of your plugin. When I click to write to log, nothing happens. Did this get fixed in your latest release? Unfortunately I'm stuck on Indigo 2022.2 because of the Onkyo integration.

If no other way, I can fire up the latest Indigo on a new config to get this log.

Posted on
Mon Mar 11, 2024 12:30 pm
FlyingDiver online
User avatar
Posts: 7226
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Upgrade to Python 3?

vtmikel wrote:
I'm using v2023.3.2 of your plugin. When I click to write to log, nothing happens. Did this get fixed in your latest release? Unfortunately I'm stuck on Indigo 2022.2 because of the Onkyo integration.

If no other way, I can fire up the latest Indigo on a new config to get this log.


I don't recall that any bugs with that function. It certainly works on the current release. If you can upgrade temporarily to get that info, I'd appreciate it.

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

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

Re: Upgrade to Python 3?

I've requested the Indigo team move the latest posts in this thread about using HAA to the HAA forum.

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

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

Re: Upgrade to Python 3?

FlyingDiver wrote:
vtmikel wrote:
I'm using v2023.3.2 of your plugin. When I click to write to log, nothing happens. Did this get fixed in your latest release? Unfortunately I'm stuck on Indigo 2022.2 because of the Onkyo integration.

If no other way, I can fire up the latest Indigo on a new config to get this log.


I don't recall that any bugs with that function. It certainly works on the current release. If you can upgrade temporarily to get that info, I'd appreciate it.


I was a dummy, I had the plugin config set to Error Messages only. Here's the log. Not that while you see only one source listed here, there will be multiple and user-specific. You can see how the HA plugin allows for configurable sources here: https://www.home-assistant.io/integrations/onkyo/


Code: Select all
        "receiver": {
            "attributes": {
                "friendly_name": "receiver",
                "source_list": [
                    "Playstation 3"
                ],
                "supported_features": 20364
            },
            "context": {
                "id": "01HRQA79J0V1PRQ0027SF008PJ",
                "parent_id": null,
                "user_id": null
            },
            "entity_id": "media_player.receiver",
            "last_changed": "2024-03-11T17:51:00.672765+00:00",
            "last_updated": "2024-03-11T17:51:00.672765+00:00",
            "state": "off"
        },
        "receiver_zone_2": {
            "attributes": {
                "friendly_name": "receiver Zone 2",
                "source_list": [
                    "Playstation 3"
                ],
                "supported_features": 20364
            },
            "context": {
                "id": "01HRQA79MNBYW8KQKF9XSNKND5",
                "parent_id": null,
                "user_id": null
            },
            "entity_id": "media_player.receiver_zone_2",
            "last_changed": "2024-03-11T17:51:00.757252+00:00",
            "last_updated": "2024-03-11T17:51:00.757252+00:00",
            "state": "off"
        },


Posted on
Mon Mar 11, 2024 1:18 pm
FlyingDiver online
User avatar
Posts: 7226
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Upgrade to Python 3?

That was all wrapped by the "media_player" section, right? Just those two entries in it? Bummer, apparently that integration doesn't include the "device_class" attribute, which is really useful.

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

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

Re: Upgrade to Python 3?

Correct, all in the media_player. I have a bunch of Sonos's and random devices I dont use in that section, which I didn't post.

Also, this is what it looks like when the device is on:

Code: Select all
        "receiver": {
            "attributes": {
                "audio_information": {
                    "format": "PCM",
                    "input_channels": "2.0 ch",
                    "input_frequency": "44.1 kHz",
                    "listening_mode": "All Ch Stereo",
                    "output_channels": "4.0 ch",
                    "output_frequency": ""
                },
                "friendly_name": "receiver",
                "is_volume_muted": false,
                "source": "cd_tv/cd",
                "source_list": [
                    "Playstation 3"
                ],
                "supported_features": 20364,
                "video_information": {
                    "input_color_depth": "24bit",
                    "input_color_schema": "",
                    "input_resolution": "Unknown",
                    "output_color_depth": "24bit",
                    "output_color_schema": "",
                    "output_resolution": "0 x 0p",
                    "picture_mode": ""
                },
                "video_out": "yes,out",
                "volume_level": 1.625
            },
            "context": {
                "id": "01HRQF5CZ30J9ZGBKYCKCTHJVR",
                "parent_id": null,
                "user_id": null
            },
            "entity_id": "media_player.receiver",
            "last_changed": "2024-03-11T19:17:09.358009+00:00",
            "last_updated": "2024-03-11T19:17:21.507038+00:00",
            "state": "on"
        },


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

Re: Upgrade to Python 3?

FlyingDiver wrote:
That was all wrapped by the "media_player" section, right? Just those two entries in it? Bummer, apparently that integration doesn't include the "device_class" attribute, which is really useful.


I see what you mean, because here is an example of my Denon AVR:

Code: Select all
        "denon_avr_x3700h": {
            "attributes": {
                "device_class": "receiver",
                "friendly_name": "Basement AVR - Denon AVR-X3700",
                "sound_mode_list": [
                    "MUSIC",
                    "MOVIE",
                    "GAME",
                    "AUTO",
                    "STANDARD",
                    "VIRTUAL",
                    "MATRIX",
                    "ROCK ARENA",
                    "JAZZ CLUB",
                    "VIDEO GAME",
                    "MONO MOVIE",
                    "DIRECT",
                    "PURE DIRECT",
                    "DOLBY DIGITAL",
                    "DTS SURROUND",
                    "AURO3D",
                    "AURO2DSURR",
                    "MCH STEREO",
                    "STEREO",
                    "ALL ZONE STEREO"
                ],
                "source_list": [
                    "Basement AppleTV",
                    "Basement Roku",
                    "Bluetooth",
                    "HEOS Music",
                    "Sonos",
                    "TV Audio",
                    "ZIDOO"
                ],
                "supported_features": 69004
            },
            "context": {
                "id": "01HRQ9798K1P320BCEPJWPHQWF",
                "parent_id": null,
                "user_id": null
            },
            "entity_id": "media_player.denon_avr_x3700h",
            "last_changed": "2024-03-11T17:33:31.795389+00:00",
            "last_updated": "2024-03-11T17:33:31.795389+00:00",
            "state": "off"
        },



And with the device on:

Code: Select all
        "denon_avr_x3700h": {
            "attributes": {
                "device_class": "receiver",
                "friendly_name": "Basement AVR - Denon AVR-X3700",
                "is_volume_muted": false,
                "media_content_type": "channel",
                "media_title": "Sonos",
                "sound_mode": "DTS SURROUND",
                "sound_mode_list": [
                    "MUSIC",
                    "MOVIE",
                    "GAME",
                    "AUTO",
                    "STANDARD",
                    "VIRTUAL",
                    "MATRIX",
                    "ROCK ARENA",
                    "JAZZ CLUB",
                    "VIDEO GAME",
                    "MONO MOVIE",
                    "DIRECT",
                    "PURE DIRECT",
                    "DOLBY DIGITAL",
                    "DTS SURROUND",
                    "AURO3D",
                    "AURO2DSURR",
                    "MCH STEREO",
                    "STEREO",
                    "ALL ZONE STEREO"
                ],
                "sound_mode_raw": "DTS Neural:X",
                "source": "Sonos",
                "source_list": [
                    "Basement AppleTV",
                    "Basement Roku",
                    "Bluetooth",
                    "HEOS Music",
                    "Sonos",
                    "TV Audio",
                    "ZIDOO"
                ],
                "supported_features": 69004,
                "volume_level": 0.74
            },
            "context": {
                "id": "01HRQFKZB2V0RB26KZSR7HR0KG",
                "parent_id": null,
                "user_id": "920aed0d63a44b8e8049fcfcc9c17115"
            },
            "entity_id": "media_player.denon_avr_x3700h",
            "last_changed": "2024-03-11T19:25:19.085451+00:00",
            "last_updated": "2024-03-11T19:25:19.085451+00:00",
            "state": "on"
        },
Attachments
Screenshot 2024-03-11 at 3.38.38 PM.png
Screenshot 2024-03-11 at 3.38.38 PM.png (64.44 KiB) Viewed 619 times
Last edited by vtmikel on Mon Mar 11, 2024 1:38 pm, edited 1 time in total.

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

Re: Upgrade to Python 3?


Posted on
Mon Mar 11, 2024 1:55 pm
FlyingDiver online
User avatar
Posts: 7226
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Upgrade to Python 3?

vtmikel wrote:


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

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

Who is online

Users browsing this forum: No registered users and 3 guests