Does anyone know the status of the HEOS pull request? I’m new to HA and I’m trying to figure out how to pull a current version.
The pull request has been merged: https://github.com/home-assistant/home-assistant/pull/21721
But I have no idea on when this will make it to the public releases…
Woohoo! So excited for this!
Just installed 0.92.0b1
and must say that it’s working very well! Still only support for the basic features, but those work great!
Very happy… Thanks @andrewsayre!
Credit goes to @easink for the initial work! Let me know what other features you’re looking for!
The features I’m mostly looking for (in order of importance - 1 is most important)
- Play URL
- Play favorites (aka “Preset station” in the CLI protocol specs)
- Grouping
- Play Quickselects
Thanks a lot for your hard work! Much appreciated
Is there also a good & consistent way to stop the music from playing? I would like to have 1 single command for when I leave the house for example to shut down all media players, but in case Spotify is playing, this command is Pause
, whereas for TuneIn, this command is Stop
. I couldn’t find a Turn off
command or anything like this in the CLI protocol specifications
Hi, thanks for the good work so far. I have an issue when I power down the Heos. When the power is back on again, the play and pauze still work, but the play info (artist/song) is missing.
I made a network trace and found out that after a power down, some commands needs to be resent.
The Heos send the actual play information to the media player after a register_for_change_events command. During the initial setup Home Assistant sends 3 commandos:
Heos://system/pretify_json_response?enable=off
Heos://system/register_for_change_events?enable=on
heos://system/get_players
(@asyncio.coroutine, def connect in aioheos.py)
And after these commands HA starts communicating with the heos’s pid.
After a power down and up, the register for change events command is no longer actual. The HA only sends a start command without the initial setup commands in a new TCP/IP session.
My proposal is to run the self.register_for_change_events before or after a start command. If the register_for_change_events is already active, the Heos wil ignore it. It is not the nicest solution but the alternative is checking if there is a TCP session active, and if not setup a new connection.
In my scripts to start/stop the heos I use heos://player/set_play_state?pid=XXXX&state=stop. Seems to be working,
How do you send these stop commands? What kind of scripting do you use?
A simpel bash scripts started from a HA automation:
#!/bin/sh
/home/homeassistant/.homeassistant/scripts/config.conf
echo “heos://player/set_play_state?pid=$PID&state=stop\r\n” | nc -N $HOST $PORT
#2 is in the current beta – it’s exposed in the source selection if your HEOS device is logged in (you’ll get a warning in the log upon startup if it’s not). I plan to also expose it as a service in the future.
Thanks for the other requests, those were all in the works already!
Is there also a good & consistent way to stop the music from playing?
It should be media_player.stop
with service data {"entity_id": "all"}
. Spotify should accept a stop command, but it’s not explicitly listed in the CLI documentation for service specific control support. If that doesn’t work, maybe doing a media_player.pause
first then stop
would cover them all.
@williamgeurts Are you having this issue with the HEOS currently in 0.92 beta? It’s not using the aioheos
library, but instead pyheos
.
@andrewsayre I installed Beta2 yesterday. After I shutdown the Heos and started it up a few hours later, I got an error message: Failed to call service media_player/media_play_pause. [Errno 60] Operation timed out.
@williamgeurts Can you open an issue and include things like how your device is connected to the network, are you using a static IP, etc…
media_player.media_stop
with service data {"entity_id": "all"}
works!
Thanks a lot!
I indeed get the warning in the log… how can I make sure it’s logged in?
@andrewsayre Can you pass the PID and GID as attributes in Home Assistant for the HEOS devices in a future release? This would allow me to play with some CLI commands within Node Red.
We’ve spoken in the past, but I really want to be able to control the power and grouping of HEOS devices. I understand power will need to be controlled by the DenonAVR commands.