From magic-tune

I found this cool python script from miracle2k to control a onkyo receiver in the shell.

Install the onkyo package…

sudo apt-get install python-setuptools
onkyo --discover

now we can control the receiver by “onkyo command”

onkyo PWR00 //sets System Standby
onkyo PWR01 //sets System On
onkyo MVLUP //sets Volume Level Up
onkyo MVLDOWN //sets Volume Level Down
onkyo SLI01 //sets Input to Sat/TV
onkyo SLI10 //sets Input to BD/DVD
onkyo SLI2B //sets Input to NET

supportet devices and more ISCP-commands

Pimatic Onkyo ShellSwitch

      "id": "onkyopower",
      "name": "OnkyoPower",
      "class": "ShellSwitch",
      "onCommand": "onkyo PWR01",
      "offCommand": "onkyo PWR00"

create some Onkyo Buttons in the config…

      "id": "onkyo-buttons",
      "name": "Onkyo Buttons",
      "class": "ButtonsDevice",
      "buttons": [
          "id": "sat_button",
          "text": "SAT"
          "id": "ps3_button",
          "text": "PS3"
          "id": "net_button",
          "text": "NET"
          "id": "vol_up_button",
          "text": "lauter"
          "id": "vol_down_button",
          "text": "leiser"

and some rules…

"if sat_button pressed then execute \"onkyo SLI01\" and set $onkyo_status = \"SAT\""
"if ps3_button pressed then execute \"onkyo SLI10\" and set $onkyo_status = \"PS3\""
"if net_button pressed then execute \"onkyo SLI2B\" and set $onkyo_status = \"NET\""
"if vol_up_button is pressed then execute \"onkyo MVLUP\""
"if vol_down_button pressed then execute \"onkyo MVLDOWN\""

"if SAT_Wohnzimmer is present for 10 seconds then turn on OnkyoPower and after 5 seconds execute \"onkyo MVL28\" and set $onkyo_status = \"SAT\" and after 8 seconds execute \"onkyo SLI01\"

I have an Onkyo NR626, wich supports ZONE2. Just playng around and all works fine. With a PIR and a simple rule, the :notes: will follow me to the kitchen.
pimatic makes it possible :smiley: