Harman Kardon - state unknown

Hi everyone,

I just started with Home Assistant some days ago. My 2nd project (after a simple WS2812 LED strip with an ESP8266) was to make my Harman Kardon AVR 151S a little smarter and automatically switch inputs when I start my Xbox and stuff like this.
I was suprised to see an integration for exactly my model and added it to my configuration.yaml with the following code:

media_player:
  - platform: harman_kardon_avr
    host: 172.16.0.28

After a reboot of my raspberry pi 3 B+ my system was showing up in the dashboard. The only issue was that I couldn’t perform any commands.
After a bit of searching around I found out that the entity has no entity_id which is why I can’t configure anything. But these configuration seemed more cosmetically than anythin else.
My next idea was that it could have something to do with the state. My entity has the state unknown. It doesn’t matter if I turn my AVR on or off or just put it in sleep mode. Only when I change the state manually I can barely see all the settings but within seconds the state changes back to unknown and the button is grey.

Probably I’m just dumb and didn’t read the interation description well enough: Harman Kardon Description

Please let me know if I did anything wrong with creating this topic.

Thanks for all your help and I hope to get it up and running soon :slight_smile:
David

I don’t believe there’s no entity ID. If that’s the case it might as well not exist. If there’s no entity I’d venture setup didn’t work correctly.

First look at your entities in settings and see if you have a media_player. Entity for the avr. (I have no idea what it would be called that integration is a little lean. )

If you don’t find one go look in the logs for errors setting it up and post it here.

Yep. As I said the entity exists and I’m able to change the state manually but the state get’s automatically reset to unknown again.

Here is a screenshot of the entity:

Here is a screenshot of the developer options state:

1 Like

Thats what the docs were saying. With the new firmware your avr times out after a certain time an d it’s state changes to unknown and it fails the turn on command. You won’t be able to get state information from the avr when it’s like that.

That’s a shame really, my denon (basically same company) avr gives all the data yours is missing…

But the way I read the docs about the integration, it’s because of how HK handles power save and I don’t think the integration author will be able to do much about it.

That is indeed a shame.

But in my case my AVR is turned on (and playing music) right now but nonetheless it is displayed as unknown in HA. It seems like the AVR is not sending any data to HA at all. But the docs don’t specify that I have to activate any specific settings in the AVR.

You shouldn’t.

You may still want to look in the log and see if it’s barfing on trying to get states. Also I only saw one HK model listed was that the same one you have? (they listed all others as… No guarantee best effort)

Mine is a Harman Kardon AVR 151S which is the one listed as supported.

The logs only show the following. The on state was triggered via the web gui from myself and it was reset within settings:

That’s the logbook it only shows status updates. Look under settings > system >logs. If you don’t see anything we can still turn on debug logging but I bet if it’s failing to collect status you’ll see something without debug.

Oh. There are the logs. Thanks for helping me finding them.

Just looked into them and only saw some errors from my FireTV via ADB. When I search for AVR or the IP I can’t find any logs.

1 Like

I’ll get you syntax to add debug logging for that as soon as I can or unless someone beats me to it.

Here’s instructions for enabling debug for an integration

The ‘name’ of the integration for debug purposes should be the same as you put in the configuration so:

harman_kardon_avr

Thank’s for all your replies.

I just restarted my raspberry and after the restart I saw an error regarding the AVR: 2023-10-31 00:45:14.609 WARNING (SyncWorker_7) [HkAVR] Connection error: [Errno 113] Host is unreachable

According to the Guide you sent me I should be able to enable the debug mode from the integrations tab. The only issue is that I added the integration via the configuration.yaml and the integration is not shown in the integrations tab.

When I go on the entity itself I get the error that the entity has no unique id:
image

Did you got to Resolve this?