onlyoneme / home-assistant-custom-components-wiim

WiiM devices integration for Home Assistant.
69 stars 9 forks source link

Idle even when playing #11

Open UglyBob79 opened 1 year ago

UglyBob79 commented 1 year ago

I tried this integration out, because I have a problem I need to solve. My AVR doesn't have a trigger in, so I can't wake it when playing music on the Wiim Pro. So I thought, maybe I can use this integration to trigger on when the player is playing instead. But if I play music from Alexa (spotify), the media player created by this integration still is in idle state. I don't know if its a bug or not, but if it isn't, I would like a feature where you can actually get notified when the player is playing music.

onlyoneme commented 1 year ago

Can you show me states of your device during the playback, taken from Developer Tools?

UglyBob79 commented 1 year ago

I will see what I can extract later today...

UglyBob79 commented 1 year ago

entity: media_player.wiim_pro state: idle

State attributes:

source_list:
  - Analog
  - Toslink
volume_level: 1
is_volume_muted: false
media_content_type: music
shuffle: false
repeat: all
uuid: FF98F09C973F78CF246819AC
debug_info: ''
firmware: Linkplay.4.8.524431
device_model: WiiM Pro
device_class: speaker
icon: mdi:speaker
friendly_name: WiiM Pro-A6DC
supported_features: 134156
fixed_vol: '0'
slave: '0'

I have never seen it change state from idle. Note that I use the WiiM Pro in a group with Amazon Echo devices and play Spotify from Alexa if that matters. I just need a way to know that this player is actually playing... :/

onlyoneme commented 1 year ago

All these things matter probably as there is no such issue when Spotify Connect is used.

Can you also provide the output of this command during a playback

https:///httpapi.asp?command=getPlayerStatus

executed in the web browser, for example?

UglyBob79 commented 1 year ago

Hmm yeah, it doesn't seem to update, its the same when stopped or when playing :/

{"type":"0","ch":"0","mode":"4","loop":"0","eq":"0","vendor":"Amazon Music","status":"stop","curpos":"0","offset_pts":"0","totlen":"0","Title":"4661737420436172","Artist":"4C756B6520436F6D6273","Album":"4E69616C6C20486F72616E","Vendor":"unknown","alarmflag":"0","plicount":"0","plicurr":"0","vol":"86","mute":"0"}

onlyoneme commented 1 year ago

Can you try with the latest beta build?

https://github.com/onlyoneme/home-assistant-custom-components-wiim/tree/beta

UglyBob79 commented 1 year ago

Yes, but I think it has to be on Monday, got no time now. I'll get back to you and thanks for your support with this.

UglyBob79 commented 1 year ago

Sorry, didn't have time yet, busy week. But just wanted to add that it is not only this integration that doesn't seem to update, I'm also trying the Alexa media player integration and it never updates player states either. Driving me crazy, because I really need this to implement an important use case. So might be some more generic problem, but I don't know what...

UglyBob79 commented 1 year ago

Really don't get this. It worked for a few minutes now, so I thought I fixed it somehow. Added an automation to trigger on media_player playing, never worked again. Always idle. UGH!

Which one is the latest beta build? I don't find anything newer than v0.3.6 and that's what HACS have as well?

dablanco83 commented 1 year ago

I use the HA DLNA integration to track the idle status of my WiiM Pro. So far it has worked flawlessly with an automation to bring my old Roksan K2 amplifier to “on” mode as soon as there is something played via the WiiM Pro.

the trigger for the automation is actually wiim status pause/play (not idle) as that is working the best for me.

I have set an Automation to turn off the amplifier after 15 minutes wiim in pause mode.

it works very well for several weeks now.

for everything else I use this great integration.