Onkyo receiver <--> Domoticz

Compatibility (hardware, devices and OS)
User avatar
Keptenkurk
Posts: 440
Joined: Wednesday 21 August 2013 17:24
Target OS: -
Domoticz version:
Location: Waalre, The Netherlands
Contact:

Onkyo receiver <--> Domoticz

Post by Keptenkurk » Tuesday 21 January 2014 22:51

Connected my Onkyo receiver through a Python library on the Rasp (<- cool, switching it on and off through LUA)
@safi78 do you mind sharing how that's done? I now switch off my entire onkyo receiver with a KAKU switch...
/paul

User avatar
safi78
Posts: 460
Joined: Thursday 05 September 2013 15:39
Target OS: Linux
Domoticz version: LastBeta
Location: Alkmaar, NL
Contact:

Re: Onkyo receiver <--> Domoticz

Post by safi78 » Tuesday 21 January 2014 23:10

Hi sure,

There are several python libraries available to do this you can use on your Rasp.

I used to do it your way, but that didn't 'sound' right, right ;)

Anyway, with the library you have full control over your Onkyo, so you can change the inputs, volume, zones, etc.

I'm just about to install a new Rasp with it, so I'll let you know in a minute how it's done.
I don't know if you noticed or not, but I'm an extremely arrogant man who tends to think all of his plans will work ...

https://safiweb.nl

homebridge, rfxcom, zwave, nest, applamp, hue, debian, apple, mysensors, netatmo, fibaro, synology, foscam, otherz

User avatar
safi78
Posts: 460
Joined: Thursday 05 September 2013 15:39
Target OS: Linux
Domoticz version: LastBeta
Location: Alkmaar, NL
Contact:

Re: Onkyo receiver <--> Domoticz

Post by safi78 » Tuesday 21 January 2014 23:56

if you followed the wiki you need to install python-setuptools first, seemed to be missing in my setup:

Code: Select all

sudo apt-get install python-setuptools
then do:

Code: Select all

sudo easy_install onkyo-eiscp
then you have a new command for use in terminal, for example:

Code: Select all

onkyo system-power:on
or

Code: Select all

onkyo system-power:standby

it will discover your onkyo in your local network automagically

see https://github.com/miracle2k/onkyo-eiscp for some more examples / functions.

after that you can use it in LUA for example:

Code: Select all

if (devicechanged['FakeOnkyoSwitch']="Off") then
os.execute('/usr/local/bin/onkyo blablabla)
end
Other cool thingy: I'm also using this to let my home 'talk' to me ;) work in progress, but it's pretty fun ...
for instance, on alarm, turn to the right input/output on your receiver, put volume high and talk to your burgler ... or sound alarm through your speakers
or on doorbell, idem.
or when the bluetooth adresses of my familiy is detected, tell me,
weather status, suggestions, reports, etc.
Last edited by safi78 on Wednesday 22 January 2014 19:47, edited 3 times in total.
I don't know if you noticed or not, but I'm an extremely arrogant man who tends to think all of his plans will work ...

https://safiweb.nl

homebridge, rfxcom, zwave, nest, applamp, hue, debian, apple, mysensors, netatmo, fibaro, synology, foscam, otherz

User avatar
safi78
Posts: 460
Joined: Thursday 05 September 2013 15:39
Target OS: Linux
Domoticz version: LastBeta
Location: Alkmaar, NL
Contact:

Re: Onkyo receiver <--> Domoticz

Post by safi78 » Wednesday 22 January 2014 0:06

Oh btw, that also works on Apple. I think I used Brew for all the python stuff, but works like a charm (didn't get the autodiscover working, but you can also specify the hostname when issuing the command!)

happy hacking :)
I don't know if you noticed or not, but I'm an extremely arrogant man who tends to think all of his plans will work ...

https://safiweb.nl

homebridge, rfxcom, zwave, nest, applamp, hue, debian, apple, mysensors, netatmo, fibaro, synology, foscam, otherz

User avatar
Keptenkurk
Posts: 440
Joined: Wednesday 21 August 2013 17:24
Target OS: -
Domoticz version:
Location: Waalre, The Netherlands
Contact:

Re: Onkyo receiver <--> Domoticz

Post by Keptenkurk » Wednesday 22 January 2014 9:14

Thanks Sander!
You're right about the Onkyo: the "Ahummmm" when switched on doesn't sound right!
That doesn't look too complicated and will try it this evening. I noticed Onkyo's commandset but couldn't figure out how to send these in TCP to the receiver.
Somebody already did the hard work :P
Will report back
/paul

User avatar
safi78
Posts: 460
Joined: Thursday 05 September 2013 15:39
Target OS: Linux
Domoticz version: LastBeta
Location: Alkmaar, NL
Contact:

Re: Onkyo receiver <--> Domoticz

Post by safi78 » Wednesday 22 January 2014 11:33

Do you mean you found that excelsheet with all Onkyo receivers / possible commands? If not, I'll post that here as well, very useful
I don't know if you noticed or not, but I'm an extremely arrogant man who tends to think all of his plans will work ...

https://safiweb.nl

homebridge, rfxcom, zwave, nest, applamp, hue, debian, apple, mysensors, netatmo, fibaro, synology, foscam, otherz

User avatar
Keptenkurk
Posts: 440
Joined: Wednesday 21 August 2013 17:24
Target OS: -
Domoticz version:
Location: Waalre, The Netherlands
Contact:

Re: Onkyo receiver <--> Domoticz

Post by Keptenkurk » Wednesday 22 January 2014 14:28

I did find that earlier and also the protocol description.
Did put it on my to do list to investigate further until i read your comment :-)
/paul

User avatar
safi78
Posts: 460
Joined: Thursday 05 September 2013 15:39
Target OS: Linux
Domoticz version: LastBeta
Location: Alkmaar, NL
Contact:

Re: Onkyo receiver <--> Domoticz

Post by safi78 » Wednesday 22 January 2014 17:57

Hehe. This actually was my reason to leave HomeWizard and move to Domoticz.

I'm really curious what you're gonna use / commands you implement! Let me know :)
I don't know if you noticed or not, but I'm an extremely arrogant man who tends to think all of his plans will work ...

https://safiweb.nl

homebridge, rfxcom, zwave, nest, applamp, hue, debian, apple, mysensors, netatmo, fibaro, synology, foscam, otherz

l0gic
Posts: 139
Joined: Tuesday 08 October 2013 9:35
Target OS: Linux
Domoticz version: Latest
Contact:

Re: Onkyo receiver <--> Domoticz

Post by l0gic » Thursday 23 January 2014 22:06

I've just seen this thread and as I have an Onkyo......
I had to make the Onkyo network setting to enable network on standby but I've had some success!

I've used the command line to discover and then fire up my Onkyo, excellent.
Volume control works but I've not had any success putting the system back into standby.
Power:on works but power:off just gives an error even though it is an example in the documentation.

I've not had any real time to devote to it at the moment but it looks like it has some potential.

Cheers

Kevin
Non credus crepitus

User avatar
safi78
Posts: 460
Joined: Thursday 05 September 2013 15:39
Target OS: Linux
Domoticz version: LastBeta
Location: Alkmaar, NL
Contact:

Re: Onkyo receiver <--> Domoticz

Post by safi78 » Thursday 23 January 2014 22:10

Code: Select all

onkyo system-power:standby
shows all available commands for zone "main":

Code: Select all

onkyo --help-commands main
output:

Code: Select all

[email protected] ~ $ onkyo --help-commands main system-power
Possible values for this command:
  standby - sets System Standby
  on - sets System On
  query - gets the System Power Status
that'll get you started ;)
Last edited by safi78 on Thursday 23 January 2014 22:38, edited 1 time in total.
I don't know if you noticed or not, but I'm an extremely arrogant man who tends to think all of his plans will work ...

https://safiweb.nl

homebridge, rfxcom, zwave, nest, applamp, hue, debian, apple, mysensors, netatmo, fibaro, synology, foscam, otherz

l0gic
Posts: 139
Joined: Tuesday 08 October 2013 9:35
Target OS: Linux
Domoticz version: Latest
Contact:

Re: Onkyo receiver <--> Domoticz

Post by l0gic » Thursday 23 January 2014 22:29

Nice one!
I'll have a play tomorrow if I get a quiet minute.

Thanks

Kevin
Non credus crepitus

User avatar
mongoose
Posts: 88
Joined: Friday 22 November 2013 11:43
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Onkyo receiver <--> Domoticz

Post by mongoose » Thursday 23 January 2014 23:27

Notes on Power On
For the power on command to work while the device is in standby, make sure you turn on the obtusely named Setup -> Hardware -> Network -> Network Control option.

Without it, you can only connect to your receiver while it is already turned on.
--------------
Ahhhh was wondering about that. :D
Really cool all working!
Can't wait to play with it more!

User avatar
Keptenkurk
Posts: 440
Joined: Wednesday 21 August 2013 17:24
Target OS: -
Domoticz version:
Location: Waalre, The Netherlands
Contact:

Re: Onkyo receiver <--> Domoticz

Post by Keptenkurk » Thursday 23 January 2014 23:32

Magic!
Works right out of the box.
The power:standby needs a device setting on the receiver to work. It helped reading the notes on that :roll:
For the power on command to work while the device is in standby, make sure you turn on the obtusely named Setup -> Hardware -> Network -> Network Control option. Without it, you can only connect to your receiver while it is already turned on.
Not only will it give tracebacks due to a timeout while waiting for a response of a switched off receiver, but you will also not be able to put it on again through the network...
Thanks Sander!
/paul

User avatar
Keptenkurk
Posts: 440
Joined: Wednesday 21 August 2013 17:24
Target OS: -
Domoticz version:
Location: Waalre, The Netherlands
Contact:

Re: Onkyo receiver <--> Domoticz

Post by Keptenkurk » Thursday 23 January 2014 23:33

:lol: not the only one ...

User avatar
mongoose
Posts: 88
Joined: Friday 22 November 2013 11:43
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Onkyo receiver <--> Domoticz

Post by mongoose » Friday 24 January 2014 11:15

Bit new my self to LUA so cheers for posting the code above... for any one like me that is no programmer :) the exact code below to put on the pi (it works, might have stuff it doesn't need... lol)

Code: Select all


commandArray = {}
if (devicechanged['Dummy_onkyo_switch'] == "On") then
os.execute('/usr/local/bin/onkyo system-power:on')
commandArray['Dummy_onkyo_switch'] = on

end
return commandArray

right now to turn zone 2 on to a certain internet station at a certain sound level.

and still to figure out how to play an mp3 welcome msg when I enter the house... any idea how to do that one, commands to use etc?

User avatar
safi78
Posts: 460
Joined: Thursday 05 September 2013 15:39
Target OS: Linux
Domoticz version: LastBeta
Location: Alkmaar, NL
Contact:

Re: Onkyo receiver <--> Domoticz

Post by safi78 » Friday 24 January 2014 12:07

Hi Mongoose,

You'll have to hookup your Rasp to your receiver for that, but you surely can influence the inputs/outputs through code now, so that's easy ;)

1. Check condition (Door open, Motion, whatever);
2. put Onkyo in the right state;
3. Play Sound or speak

There are two 'speech' libraries i know off that work on Raspberry:
espeak (apt-get install espeak)
flite (apt-get install flite)

I'm playing around with it, but for some reason it crashes my Raspberry after a few 'sentences' (full halt, needs reboot).

To play a .wav or .mp3 (barking dog for burglars that triggers event when in alarm 'state' was my idea ;) ) you can google around. Or just 'cat' it to your /dev/audio device, that'll probably work too. (I'm not there yet, trying to figure out the crashing with speech first)...

regards,
I don't know if you noticed or not, but I'm an extremely arrogant man who tends to think all of his plans will work ...

https://safiweb.nl

homebridge, rfxcom, zwave, nest, applamp, hue, debian, apple, mysensors, netatmo, fibaro, synology, foscam, otherz

User avatar
safi78
Posts: 460
Joined: Thursday 05 September 2013 15:39
Target OS: Linux
Domoticz version: LastBeta
Location: Alkmaar, NL
Contact:

Re: Onkyo receiver <--> Domoticz

Post by safi78 » Saturday 25 January 2014 2:57

If anyone is playing around with Raps and speech stuff as well: I can't seen to figure out why my Rasp keeps crashing after using the speech packages (flite, espeak) ... putting this one in the fridge for a while :P
I don't know if you noticed or not, but I'm an extremely arrogant man who tends to think all of his plans will work ...

https://safiweb.nl

homebridge, rfxcom, zwave, nest, applamp, hue, debian, apple, mysensors, netatmo, fibaro, synology, foscam, otherz

User avatar
mongoose
Posts: 88
Joined: Friday 22 November 2013 11:43
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Onkyo receiver <--> Domoticz

Post by mongoose » Saturday 25 January 2014 3:58

safi78: are you using a powerful enough power supply with your pi... I am using a crappy low 500mA one, which worked good until I wanted to put XBMC on the Pi and it didn't let me use a usb keyboard, hunted around for a solution, and found that... so now if I want to play around with XMBC I use my 2A phone one :)
could be a similar thing...

User avatar
safi78
Posts: 460
Joined: Thursday 05 September 2013 15:39
Target OS: Linux
Domoticz version: LastBeta
Location: Alkmaar, NL
Contact:

Re: Onkyo receiver <--> Domoticz

Post by safi78 » Saturday 25 January 2014 4:03

Hi mongoose,

yeah, thought of that, tried a 'decent' adapter, and several other stuff (plugged it into my synology, mac mini, etc to rule out the power issues) it's really 'audio device related'. Found several reports on the rasp-forums (older, but similar problems) as well. Not sure, but I don't think it's power related. Oh well, lot's of stuff to do, this just went at the end of my wish list ;) I might do the feedback / speech handling on a decent debian server then :)
I don't know if you noticed or not, but I'm an extremely arrogant man who tends to think all of his plans will work ...

https://safiweb.nl

homebridge, rfxcom, zwave, nest, applamp, hue, debian, apple, mysensors, netatmo, fibaro, synology, foscam, otherz

User avatar
mongoose
Posts: 88
Joined: Friday 22 November 2013 11:43
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Onkyo receiver <--> Domoticz

Post by mongoose » Thursday 27 February 2014 2:06

Safi78: any progress with the speech? I just came across this: http://www.rmnd.net/speech-recognition- ... d-arduino/

Also back on topic, with the Onkyo receiver, do you have multiple zones? As with Zone 1, I can switch it on and back to being on standby, but Zone 2 I can only switch it on only, but not off/or back to standby... bit strange :)

cheers

Larry

Post Reply

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot] and 10 guests