[code]
urn:micasaverde-com:serviceId:DiscretePower1
Off
– Power off
sendCommand(“PWR00”)
<action>
<serviceId>urn:micasaverde-com:serviceId:DiscretePower1</serviceId>
<name>On</name>
<run>
-- Power on
sendCommand("PWR01")
</run>
</action>
-- Zone 2 Power
<action>
<serviceId>urn:micasaverde-com:serviceId:DiscretePower1</serviceId>
<name>Off</name> -- Would i just put Zone2Off here
<run>
-- Power off
sendCommand("ZPW00")
</run>
</action>
<action>
<serviceId>urn:micasaverde-com:serviceId:DiscretePower1</serviceId>
<name>On</name> -- Zone2On
<run>
-- Power on
sendCommand("ZPW01")
</run>
</action>[/code]
That’s item (a) and (d) in my earlier comments. When an On action comes in, for example, you’ll need conditional logic to determine which Device they came from (Master, Zone2 or Zone3)
Once you work out the target, you send the appropriate code.
Something similar is needed for all other multi zone commands.
Is there any tutorials out there and sample stuff.
I’m not a programmer, I thought it would be like scripting but it’s not so i will need to learn the language as i do not know how to set targets or anything like that. (Commodore 64 and turbo pascal is the only programming i did in the 80s)
It would have been more easier if the Denon and Onkyo etc, had comments, this way i could understand why the line of code was used and what it did.
Try these. I can’t test them right now, but they should create a secondary (“child”) device for the Receiver. In theory, it can take commands that you send to it (via declarative or coded scene).
It needs work, but it has the skeletal pieces that you need to get going. I haven’t bothered with a UI/JSON file for it, since it’s hard for me to rev & test at the moment.
I can tell you that volume up and down, power on and off, work and it did create a child device.
Thanks a lot for your time on this, hopefully I will be able to add back to the project once i’ve learned enough.
Once you’ve installed the plugin, you’ll be able to create scenes to trigger the various inputs to become active.
Under Automation → Create Scene → Advanced, you’ll be able to select the Onkyo, and then (from the pulldown) select which input you want to become active.
The same can be done programatically, in Lua, using [tt]luup.call_action(…)[/tt] with the same Name that’s presented in the Advanced Scene pulldown above.
[quote=“SanderL, post:74, topic:168197”]Input 8 it is… now it’s selecting “NET”. Next thing would be to play the “last selected” internet music stream… puzzle puzzle…
any hints?[/quote]
No idea. You’d basically need to know how it’s done off the remote control, then you could more-or-less replicate it via the commands exposed via the plugin.
I’m trying to install the plugin, but is not anymore in the library. So I tried:
1 - Download the files: D_OnkyoReceiverZone1.xml and I_OnkyoReceiver1.xml
2 - Upload the files in: APPS → Develop Apps → Luup Files
3 - APPS → Develop Apps → Create Device
4 - Put the name, make reference to that files in Develop and Implementation text boxes and finally put the IP of the onkyo receiver NR609
After that, SAVE and some time after, in the Devices Tab was created two new Devices (Zone 1 and 2), but I can’t control the receiver. I tried to verify the AV tab and it is showed the both devices, but when I try to click in the control icon, nothing happens.