How to change state Heos

My Denon-receiver is on, but my HEOS on that receiver is not playing. (media_player.denon_avr_x2500h_heos: state = idle)
How can i check that state = “idle” (= no music) and change it to state = “playing” (= i hear music) ?


Here’s my flow, but it is not working

[{"id":"feb7de91.27dd7","type":"api-current-state","z":"9c5a98e7.cb7138","name":"","server":"779d12e2.03b0bc","version":1,"outputs":2,"halt_if":"idle","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"media_player.denon_avr_x2500h_heos","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":720,"y":680,"wires":[["7906de3b.1da64","4b75ac8b.c59644"],["7906de3b.1da64"]]},{"id":"4ff619f.3515ce8","type":"inject","z":"9c5a98e7.cb7138","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"str","x":410,"y":660,"wires":[["feb7de91.27dd7"]]},{"id":"7906de3b.1da64","type":"debug","z":"9c5a98e7.cb7138","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1070,"y":720,"wires":[]},{"id":"4b75ac8b.c59644","type":"ha-fire-event","z":"9c5a98e7.cb7138","name":"","server":"779d12e2.03b0bc","event":"media_player.denon_avr_x2500h_heos","data":"{\"state\":\"playing\"}","dataType":"json","x":1130,"y":580,"wires":[["8e285163.74bad"]]},{"id":"8e285163.74bad","type":"debug","z":"9c5a98e7.cb7138","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1410,"y":580,"wires":[]},{"id":"779d12e2.03b0bc","type":"server","z":"","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false,"cacheJson":true}]

Use a current-state node and a call-service node:

image

If I understand you correctly you want to set the state of the media player yourself? This is not possible, you can’t change the state of a media player

Okay. I can’t change te state.
But how can i sart HEOS so i can hear music?
On my harmony remote is press de PLAY-button to start (and stop) music.

That is what the call-service node does I posted above. It calls the media_play service and will start playing.

Found the answer myself.
Here it is.

[{"id":"feb7de91.27dd7","type":"api-current-state","z":"9c5a98e7.cb7138","name":"","server":"779d12e2.03b0bc","version":1,"outputs":2,"halt_if":"idle","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"media_player.denon_avr_x2500h_heos","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":460,"y":660,"wires":[["7906de3b.1da64","69f760a1.85829"],["7906de3b.1da64"]]},{"id":"4ff619f.3515ce8","type":"inject","z":"9c5a98e7.cb7138","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"str","x":150,"y":640,"wires":[["feb7de91.27dd7"]]},{"id":"7906de3b.1da64","type":"debug","z":"9c5a98e7.cb7138","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":810,"y":700,"wires":[]},{"id":"8e285163.74bad","type":"debug","z":"9c5a98e7.cb7138","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1010,"y":600,"wires":[]},{"id":"69f760a1.85829","type":"harmonyws-command","z":"9c5a98e7.cb7138","name":"","server":"767fabaa.1b7124","activity":"58171250","command":"58171250:Play","hold":"0","repeat":"1","delay":"0","x":850,"y":600,"wires":[["8e285163.74bad"]]},{"id":"779d12e2.03b0bc","type":"server","z":"","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false,"cacheJson":true},{"id":"767fabaa.1b7124","type":"harmonyws-server","z":"","name":"","ip":"192.168.200.7","debug":true}]

Thank you for your help. :grinning: