Author Topic: Onkyo Receiver Plugin  (Read 68200 times)

Offline alansmithee

  • Jr. Member
  • **
  • Posts: 70
  • Karma: +1/-0
Re: Onkyo Receiver Plugin
« Reply #270 on: August 09, 2016, 10:41:36 am »
I'm have the ios App homewave which sees the volume slider as a dimmer. When I use the slider in the app the volume doesn't go up or down.

This is the LuaUpnp.log when I use the slider in the Vera UI:
Code: [Select]
JobHandler_LuaUPnP::HandleActionRequest device: 386 service: urn:onkyo-com:serviceId:Receiver1 action: SetVolumeTarget <0x71a76520>
JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=386 <0x71a76520>
JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:onkyo-com:serviceId:Receiver1 <0x71a76520>
JobHandler_LuaUPnP::HandleActionRequest argument action=SetVolumeTarget <0x71a76520>
JobHandler_LuaUPnP::HandleActionRequest argument newTargetValue=28 <0x71a76520>
Device_Variable::m_szValue_set device: 386 service: urn:micasaverde-com:serviceId:Volume1 variable: Volume was: 17 now: 28 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x72276520>
Device_Variable::m_szValue_set device: 386 service: urn:upnp-org:serviceId:RenderingControl1 variable: Volume was: 17 now: 28 #hooks: 0 upnp: 0 skip: 0 v:0xdc3008/NONE duplicate:0 <0x72276520>

This is the LuaUpnp.log when I use the slider in the HomeWave App:
Code: [Select]
JobHandler_LuaUPnP::HandleActionRequest device: 386 service: urn:upnp-org:serviceId:RenderingControl1 action: SetVolume <0x71e76520>
JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=386 <0x71e76520>
JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:upnp-org:serviceId:RenderingControl1 <0x71e76520>
JobHandler_LuaUPnP::HandleActionRequest argument action=SetVolume <0x71e76520>
JobHandler_LuaUPnP::HandleActionRequest argument DesiredVolume=21 <0x71e76520>
0Device_LuaUPnP::HandleActionRequest 386 none of the 1 implementations handled it <0x71e76520>
JobHandler_LuaUPnP::RunAction device 386 action urn:upnp-org:serviceId:RenderingControl1/SetVolume failed with 501/No implementation <0x71e76520>

It seems that the Vera UI uses the service: urn:onkyo-com:serviceId:Receiver1 with function SetVolumeTarget
and the IOS App uses urn:upnp-org:serviceId:RenderingControl1 with function SetVolume

Is there a way I can adjust the volume with the IOS app and still use the Vera UI to?

Offline alansmithee

  • Jr. Member
  • **
  • Posts: 70
  • Karma: +1/-0
Re: Onkyo Receiver Plugin
« Reply #271 on: August 12, 2016, 09:59:45 am »

Offline alansmithee

  • Jr. Member
  • **
  • Posts: 70
  • Karma: +1/-0
Re: Onkyo Receiver Plugin
« Reply #272 on: August 20, 2016, 11:33:59 am »
For anyone who wants to control their volume with the slider in the Homewave App (ios) you need to fix this line

File: I_OnkyoReceiver1.xml
Line: 703
This line
Code: [Select]
            <serviceId>urn:upnp-org:serviceId:RenderingControl</serviceId>

Should be
Code: [Select]
            <serviceId>urn:upnp-org:serviceId:RenderingControl1</serviceId>

Offline futurescape

  • Sr. Newbie
  • *
  • Posts: 26
  • Karma: +1/-0
Re: Onkyo Receiver Plugin
« Reply #273 on: August 25, 2016, 02:33:25 pm »
I have a Sony XBR65X850C smart TV (android OS) and onkyo tx-nr545 receiver and based on the old topic below, am I able to turn on the TV via the hdmi cable and this onkyo plugin when I switch to that input or via some other method?  If so, what exactly do I need to do?  I am a newbie so please be very specific.

I am able to get my onkyo to work with this plugin but havent tested all the functions (just power/volume) for now.

Is creating a macro viable?

Thanks!
Steve

The Onkyo receiver has the capability to control the tv through an hdmi cable.  The Onkyo receiver calls it RIHD and at least my TV (Visio Mseries) calls it CEC.  My TV can turn on and off my Onkyo receiver through CEC.  I saw the option in the Onkyo App to turn off the TV from the receiver.  Has anyone got this to work?  Onkyo says it is possible.

If you would like I can add a command in the Onkyo Plugin to turn the tv off or on.  I just need testers to try it out.  I wanted to add this functionality but I could never get my TV to turn off from the Onkyo App.
« Last Edit: August 25, 2016, 02:35:30 pm by futurescape »

Offline alansmithee

  • Jr. Member
  • **
  • Posts: 70
  • Karma: +1/-0
Re: Onkyo Receiver Plugin
« Reply #274 on: August 25, 2016, 04:09:24 pm »
I have a Sony XBR65X850C smart TV (android OS) and onkyo tx-nr545 receiver and based on the old topic below, am I able to turn on the TV via the hdmi cable and this onkyo plugin when I switch to that input or via some other method?  If so, what exactly do I need to do?  I am a newbie so please be very specific.

I am able to get my onkyo to work with this plugin but havent tested all the functions (just power/volume) for now.

Is creating a macro viable?

Thanks!
Steve

The Onkyo receiver has the capability to control the tv through an hdmi cable.  The Onkyo receiver calls it RIHD and at least my TV (Visio Mseries) calls it CEC.  My TV can turn on and off my Onkyo receiver through CEC.  I saw the option in the Onkyo App to turn off the TV from the receiver.  Has anyone got this to work?  Onkyo says it is possible.

If you would like I can add a command in the Onkyo Plugin to turn the tv off or on.  I just need testers to try it out.  I wanted to add this functionality but I could never get my TV to turn off from the Onkyo App.

Maybe you don't necessarily need this plugin. I think both devices support ARC
http://www.cnet.com/news/what-is-audio-return-channel-arc/

If they don't maybe you could use the ping plugin to check if the TV is switched on. But some tv always respond to a ping request even when off because the network card is always on.

I haven't seen a possibility for the Android app 'Tasker' to be installed on a tv but I could be wrong.

Offline futurescape

  • Sr. Newbie
  • *
  • Posts: 26
  • Karma: +1/-0
Re: Onkyo Receiver Plugin
« Reply #275 on: August 26, 2016, 08:40:15 pm »
Thanks for your advice. I tried that but it's flaky with my setup.

Another question:

I can turn my receiver on and off with Alexa but am I able to switch inputs, lower the volume or other commands through alexa and this plug-in?  If so, how do I do that? Please be very specific as I'm a newbie and don't know anything about pleg/luup/lua but I'm an IT consultant so I learn quickly.

Thanks!
« Last Edit: August 26, 2016, 08:42:08 pm by futurescape »

Offline alansmithee

  • Jr. Member
  • **
  • Posts: 70
  • Karma: +1/-0
Re: Onkyo Receiver Plugin
« Reply #276 on: September 05, 2016, 04:21:48 am »
Thanks for your advice. I tried that but it's flaky with my setup.

Another question:

I can turn my receiver on and off with Alexa but am I able to switch inputs, lower the volume or other commands through alexa and this plug-in?  If so, how do I do that? Please be very specific as I'm a newbie and don't know anything about pleg/luup/lua but I'm an IT consultant so I learn quickly.

Thanks!

My guess is that you turn your receiver on and off with Alexa using an URL.
http://wiki.micasaverde.com/index.php/UI_Simple
The same way you can change te channel and volume.

I always use this method:

Go to this url
http://[YOUR VERA IP]:3480/data_request?id=invoke

select the Onkyo device and you should see this list:

Code: [Select]
urn:micasaverde-com:serviceId:DiscretePower1
*Off
*On

urn:upnp-org:serviceId:SwitchPower1
*SetTarget (newTargetValue)
*GetTarget
GetStatus
   -Status

urn:micasaverde-com:serviceId:InputSelection1
*DiscreteinputCable
*DiscreteinputCD1
DiscreteinputCD2
DiscreteinputCDR
DiscreteinputDAT
*DiscreteinputDVD
*DiscreteinputDVI
*DiscreteinputHDTV
DiscreteinputLD
DiscreteinputMD
*DiscreteinputPC
DiscreteinputPVR
*DiscreteinputTV
DiscreteinputTV/VCR
*DiscreteinputVCR
*Input1
*Input10
*Input2
*Input3
*Input4
*Input5
*Input6
*Input7
*Input8
*Input9
*Source
ToggleInput
   -Surround
   -Input
   -NetService
   -Video
   -InputName

urn:micasaverde-com:serviceId:Volume1
*Down
*Mute
*Up
   -Volume

urn:upnp-org:serviceId:RenderingControl1
ListPresets (InstanceID)
SelectPreset (InstanceID,PresetName)
GetBrightness (InstanceID)
SetBrightness (InstanceID,DesiredBrightness)
GetContrast (InstanceID)
SetContrast (InstanceID,DesiredContrast)
GetSharpness (InstanceID)
SetSharpness (InstanceID,DesiredSharpness)
GetRedVideoGain (InstanceID)
SetRedVideoGain (InstanceID,DesiredRedVideoGain)
GetGreenVideoGain (InstanceID)
SetGreenVideoGain (InstanceID,DesiredGreenVideoGain)
GetBlueVideoGain (InstanceID)
SetBlueVideoGain (InstanceID,DesiredBlueVideoGain)
GetRedVideoBlackLevel (InstanceID)
SetRedVideoBlackLevel (InstanceID,DesiredRedVideoBlackLevel)
GetGreenVideoBlackLevel (InstanceID)
SetGreenVideoBlackLevel (InstanceID,DesiredGreenVideoBlackLevel)
GetBlueVideoBlackLevel (InstanceID)
SetBlueVideoBlackLevel (InstanceID,DesiredBlueVideoBlackLevel)
GetColorTemperature (InstanceID)
SetColorTemperature (InstanceID,DesiredColorTemperature)
GetHorizontalKeystone (InstanceID)
SetHorizontalKeystone (InstanceID,DesiredHorizontalKeystone)
GetVerticalKeystone (InstanceID)
SetVerticalKeystone (InstanceID,DesiredVerticalKeystone)
*GetMute (InstanceID,Channel)
*SetMute (InstanceID,Channel,DesiredMute)
GetVolume (InstanceID,Channel)
*SetVolume (InstanceID,Channel,DesiredVolume)
*GetVolumeDB (InstanceID,Channel)
*SetVolumeDB (InstanceID,Channel,DesiredVolume)
GetVolumeDBRange (InstanceID,Channel)
GetLoudness (InstanceID,Channel)
SetLoudness (InstanceID,Channel,DesiredLoudness)
   -Mute
   -Volume
   -VolumeDB
   -A_ARG_TYPE_Channel
   -A_ARG_TYPE_PresetName
   -A_ARG_TYPE_InstanceID
   -PresetNameList
   -Loudness

urn:upnp-org:serviceId:AVTransport1
*SetAVTransportURI (InstanceID,CurrentURI,CurrentURIMetaData)
*SetNextAVTransportURI (InstanceID,NextURI,NextURIMetaData)
*GetMediaInfo (InstanceID)
*GetTransportInfo (InstanceID)
*GetPositionInfo (InstanceID)
*GetDeviceCapabilities (InstanceID)
GetTransportSettings (InstanceID)
*Stop (InstanceID)
*Play (InstanceID,Speed)
*Pause (InstanceID)
Record (InstanceID)
*Seek (InstanceID,Unit,Target)
*Next (InstanceID)
*Previous (InstanceID)
*SetPlayMode (InstanceID,NewPlayMode)
*SetRecordQualityMode (InstanceID,NewRecordQualityMode)
GetCurrentTransportActions (InstanceID)
   -LastChange
   -PossiblePlaybackStorageMedia
   -PossibleRecordStorageMedia
   -PossibleRecordQualityModes
   -NumberOfTracks
   -CurrentMediaDuration
   -AVTransportURI
   -AVTransportURIMetaData
   -NextAVTransportURI
   -NextAVTransportURIMetaData
   -PlaybackStorageMedium
   -RecordStorageMedium
   -RecordMediumWriteStatus
   -CurrentRecordQualityMode
   -CurrentTrackMetaData
   -CurrentTrackURI
   -CurrentTrack
   -CurrentTrackDuration
   -TransportState
   -TransportStatus
   -TransportPlaySpeed
   -CurrentPlayMode
   -CurrentTransportActions
   -A_ARG_TYPE_InstanceID
   -A_ARG_TYPE_SeekMode
   -A_ARG_TYPE_SeekTarget
   -AbsoluteTimePosition
   -RelativeTimePosition

urn:micasaverde-com:serviceId:MenuNavigation1
*Back
*Clear
*Down
*Exit
*Left
*Menu
*MenuAlt
*PageDown
*PageUp
*Right
*Select
*Up

urn:micasaverde-com:serviceId:HaDevice1
Reconfigure
StressTest
Remove
*Poll
*ToggleState
SetPollFrequency (PollingEnabled,PollMinDelay)
AllowPairing (Seconds)
   -CommFailure
   -ChildrenSameRoom
   -CommFailureTime
   -LastUpdate
   -Configured

urn:onkyo-com:serviceId:Receiver1
*SetVolumeTarget (newTargetValue)
SetInputTarget (newTargetValue)
*InputFM
*InputAM
*InputDLNA
*InputRadioFav
*InputFav1
*InputUSBFront
*InputUSBRear
InputUSBToggle
*InputNET
*InputAirplay
*Macro1
*Macro2
*ToggleMute
*TVOn
*TVOff
*TVInput
*SetNetServiceTarget (newTargetValue)
*SetSurroundTarget (newTargetValue)
*SetHDMIOutTarget (newTargetValue)
   -UI7Check
   -InputName
   -NetServiceName
   -HDMIOut
   -HDMIOutTarget
   -LastChange
   -ModelNum
   -LOGLEVEL
   -DEBUGMODE
   -MacroInput1
   -MuteTarget
   -MacroNetIndex1
   -MacroInput2
   -MacroNetservice2
   -MacroNetIndex2
   -NetService
   -NetServiceTarget
   -ArtistName
   -AlbumName
   -TitleName
   -TrackInfo
   -PlayStatus
   -RepeatStatus
   -ShuffleStatus
   -MacroNetservice1

urn:micasaverde-com:serviceId:MediaNavigation1

If you click on one of these actions you get redirected to an url. When you clicked on one of the actions and the action works on the device you can copy paste the url to Alexa.

Offline futurescape

  • Sr. Newbie
  • *
  • Posts: 26
  • Karma: +1/-0
Re: Onkyo Receiver Plugin
« Reply #277 on: September 08, 2016, 01:45:07 pm »
OK awesome.  Thanks for that info.  So I chose Mute from the list and got the text below.

<u:MuteResponse xmlns:u="urn:micasaverde-com:service:Volume:1">
<OK>OK</OK>
</u:MuteResponse>

Do I just use the bold text below? 

See the attachment for manually adding something to the HA bridge.  Is that where I add it?

Here is a url example of me running a scene to switch inputs, but do I need to create a scene to Mute the receiver?  If I just want to make use the switch dropdown field, what should my url be to mute?

http://192.168.1.249:3480/data_request?id=action&output_format=json&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=20
« Last Edit: September 08, 2016, 01:55:20 pm by futurescape »

Offline alansmithee

  • Jr. Member
  • **
  • Posts: 70
  • Karma: +1/-0
Re: Onkyo Receiver Plugin
« Reply #278 on: September 08, 2016, 04:02:11 pm »
OK awesome.  Thanks for that info.  So I chose Mute from the list and got the text below.

<u:MuteResponse xmlns:u="urn:micasaverde-com:service:Volume:1">
<OK>OK</OK>
</u:MuteResponse>

Do I just use the bold text below? 

See the attachment for manually adding something to the HA bridge.  Is that where I add it?

Here is a url example of me running a scene to switch inputs, but do I need to create a scene to Mute the receiver?  If I just want to make use the switch dropdown field, what should my url be to mute?

http://192.168.1.249:3480/data_request?id=action&output_format=json&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=20

No that's not the URL. The URL that mutes the Onkyo in your case would be:
http://192.168.1.249:3480/data_request?id=action&DeviceNum=386&serviceId=urn:micasaverde-com:serviceId:Volume1&action=Mute

I'm looking at your screenshot but I don't understand the dim url. The Onkyo plugin doesn't have the dim service or is device 34 not your Onkyo?

Offline dramaking9

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: Onkyo Receiver Plugin
« Reply #279 on: September 11, 2016, 12:49:52 am »
Hi, I am a newbie to Vera (UI17) and am trying to get the Onkyo plugin sorted. It's working but most of the input parameters are wrong (ie Tuner in Vera switches receiver to CD) so wondering which file I should edit to correct. Also how to add others and where I can locate the correct input numbers for my receiver.

I have an Onkyo TX-NR646 and have loaded the following files
device_file: D_OnkyoReceiver1.xml
Impl_file: I_OnkyoReceiver1.xml
device_json: D_OnkyoReceiver1_UI7.json

Thank you,
dramaking9

Offline conchordian

  • Sr. Member
  • ****
  • Posts: 304
  • Karma: +4/-1
Re: Onkyo Receiver Plugin
« Reply #280 on: September 13, 2016, 08:11:24 pm »
I'm looking at your screenshot but I don't understand the dim url. The Onkyo plugin doesn't have the dim service or is device 34 not your Onkyo?

Dimming is part of the Echo bridge.  It should be blank unless you're passing it % parameters for volume control, for example. 

Offline alansmithee

  • Jr. Member
  • **
  • Posts: 70
  • Karma: +1/-0
Re: Onkyo Receiver Plugin
« Reply #281 on: September 14, 2016, 04:54:55 am »
I'm looking at your screenshot but I don't understand the dim url. The Onkyo plugin doesn't have the dim service or is device 34 not your Onkyo?

Dimming is part of the Echo bridge.  It should be blank unless you're passing it % parameters for volume control, for example.

Ok so it automatically adds these parameters when you create a device? Also if you want to use this for volume control the url should look like
http://[VERA_IP]:3480/data_request?id=action&DeviceNum=386&serviceId=urn:onkyo-com:serviceId:Receiver1&action=SetVolumeTarget&newTargetValue=

Hi, I am a newbie to Vera (UI17) and am trying to get the Onkyo plugin sorted. It's working but most of the input parameters are wrong (ie Tuner in Vera switches receiver to CD) so wondering which file I should edit to correct. Also how to add others and where I can locate the correct input numbers for my receiver.

I have an Onkyo TX-NR646 and have loaded the following files
device_file: D_OnkyoReceiver1.xml
Impl_file: I_OnkyoReceiver1.xml
device_json: D_OnkyoReceiver1_UI7.json

Thank you,
dramaking9

I think the easiest way is to edit the D_OnkyoReceiver1_UI7.json if you using the Vera UI to control the Onkyo.

Code: [Select]
                    "Command": {
                            "Service": "urn:micasaverde-com:serviceId:InputSelection1",
                            "Action": "DiscreteinputHDTV",
                            "Parameters": []
                    }

Switch the Action parameters with the correct ones.

Offline admanb

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: Onkyo Receiver Plugin
« Reply #282 on: November 13, 2016, 11:05:36 pm »
As alansmithee noted, the easiest way to control this receiver using Amazon Echo is using Luup Requests (http://wiki.micasaverde.com/index.php/Luup_Requests).

I have this software (https://github.com/bwssytems/ha-bridge) running on my NAS server (although you could put it on any computer in your network), to listen for Alexa commands and forward them to your Vera.

In the ha-bridge software interface, you can set up Vera devices by ID, for example my Onkyo TX-NR646 is device ID 18 in the Vera UI. So I simply need to set up a device in the ha-bridge UI, with an "On" URL as follows:
http://{VERA_IP}:{VERA_PORT}/data_request?id=lu_action&output_format=json&DeviceNum=18&serviceId=urn:micasaverde-com:serviceId:InputSelection1&action=DiscreteinputDVI
Just be sure to change the IP and port to your Vera IP/Port (default port is 3480) and the device from 18 to your device ID.

The easiest way to get the correct URL to switch receiver inputs is to install the Onkyo app in the Vera UI, open the control panel, open your browser's network inspector, and copy the URL that is sent when you click on the buttons in the browser. Paste that URL into the On button configuration for a device in the ha-bridge interface, and then use the Alexa app to search for new Smart Home devices.

As long as your ha-bridge is up and running, with the devices correctly configured in it, you should be able to detect the device and be off and running!

In my setup, I have an Atari 2600 connected to the Onkyo receiver modulated using a VCR, connected to a receiver input I labeled "Atari". I set up a device in the bridge called Atari, and now I can say "Alexa, turn on Atari", and the echo will switch the receiver input to the one my VCR is on, and I'm a kid again!  :P HTH!

Offline Jammer

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: Onkyo Receiver Plugin
« Reply #283 on: December 11, 2016, 09:59:23 am »
Any update on the Onkyo Can't detect device issue?


Offline walshchristopherj

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: Onkyo Receiver Plugin
« Reply #284 on: December 27, 2016, 12:20:10 pm »
The plugin doesn't seem to work with the TX-8160  :'(

Who can I bribe to get it to work?