Shell command to control onkyo via eiscp

Hello,

I’m new to HA and am considering replacing my current home automation with HA.
To make sure I can do all that I need, I am currently playing around with hass.io and, despite looking quite a bit on the forum, I could not find how to do the following:

I want to send command to my onkyo receiver via eiscp. This is possible with a full fledged HA installation as detailed in this post:

https://community.home-assistant.io/t/onkyo-component-controls/17020

However in the case of hassio, I don’t know which path to use to call the onkyo component (basically what should I use instead of “/srv/homeassistant/homeassistant_venv/bin/onkyo” ).

I’ve tried various path but could not figure out the correct one.

Note: I know I can install custom components in hassio, but since the onkyo component is already integrated in HA, I don’t want to install a new component, I just want to be able to call the existing one.
PS: I tried to search for the component using SSH (connecting to the hassio machine), but since hassio runs inside a docker, I don’t know how to search for the path inside that docker …

Thanks a lot for your help :slight_smile:

I’m not using hassio but I’m running HA using the “regular” Docker image.
The onkyo command in that one is at /usr/local/bin/onkyo.

You can get a shell inside a running Docker container by typing “docker exec -ti <container> /bin/bash”.
From there, a simple “find / -name onkyo” will show you where the file is located.

Sebastian

Thanks a lot for the answer. It seems however that hassio does not behave the same way. The path you mentioned does not work for me and “docker” is not recognized as a valid command in the SSH command line of hassio. I guess hassos is quite restricted in terms of commands.

Any other hints welcome :wink:

out of interest, why are you not using HA’s built in Onkyo component? I use it and it works great…

I am actually using the HA built in Onkyo component for controlling the volume and input sources. However, as far as I have seen, the built in component does not enable to start web radios or control other network sources which the Onkyo can do. For this I have read on the forum that I need to send the commands via the eiscp command line. That’s why I need the path of the built in Onkyo component so I can send commands using a command line script… Am I going at it the wrong way, or should I install a full fledged version of Home Assistant instead of hassio ?

Ah OK. Then yes you’d need the shell commands for this. Personally I’ve not give down that road I use the chromecast feature to send online audio to my onkyo
Check this post for more info

Sorry for pasting this in many different conversations, but it seems it may be useful to other users like myself who are relatively new to hassio and may have a hard time finding the info in different conversations, I think this summarizes all I found in an afternoon of research (and finally I got it working!)

what I found on https://github.com/home-assistant/core/issues/1578 is that by modifying the configuration.yaml adding the following lines, it is possible to activate and turn off the onkyo:

  - platform: command_line
    switches:
      onkyo_test:
        command_on: "/usr/local/bin/onkyo system-power=on SLI23"
        command_off: "/usr/local/bin/onkyo system-power=standby"

for that to work in gui: you go on lovelace, and add a button called -in my example- onkyo_test.

This worked.

following the above, there are a ton of commands that should be usable and they are documented here:

in particular, once you understand the logic, the file
https://github.com/miracle2k/onkyo-eiscp/blob/b27e8158c09b04a2160e395d9710f6748f431bf5/eiscp-commands.yaml
is particularly rich of information , for example there are commands to setup listening-mode (stereo, direct, etc), audyssey-dynamic-eq, late-night, music-optimizer-sound-retriever, audyssey-dynamic-volume, preset-memory / preset / internet-radio-preset (1-40 for network radios eg), etc etc etc

hope this helps :slight_smile:

1 Like

find / -name onkyo returns nothing after latest upgrade…

anyone knows what happened / how to fix?

Broken here as well…

I’d been searching for so long trying to figure out how to do this! I combined it with a Sensor so that I get get all the sources for my Onkyo receiver.

For those that find this coming from the Onkyo - Home Assistant page this is how I achieved it:

Add this to configuration.yml (replacing the IP with that of your Onkyo receiver).

sensor:
  - platform: command_line
    name: onkyo_test
    command: "/usr/local/bin/onkyo --host 192.168.1.231 source=query"

And add a glance card to the dashboard for the sensor. It will update after every input change!

1 Like

Hello,

I tried use sensor:

  • platform: command_line
    name: onkyo input state
    scan_interval: 3
    command: “/usr/local/bin/onkyo --host 192.168.xx.x SLIQSTN”

but looks like this is not possible if in configuration.yaml I have turn on media player

media_player:

  • platform: onkyo

someone know solution? I need this sensor method to read input state data when onkyo is turn off.

Brilliant! I made a HDMI selector from a binary_sensor, much easier than using automation/script.