Yamaha Network Control Alias Plugin 2.0

[glow=red,2,300]I will no longer be maintaining this plugin. It was a fun little project but I’m moving to a different home automation platform now.[/glow]

I’ve been using the YNCA plugin with some success, it works great when used as part of a scene. The plugin was never really finished and has been worked on by a number of people. I’m going to continue working on the plugin myself. This is the first time I’m working on a Vera plugin so please be nice 8)

Original plugin: http://forum.micasaverde.com/index.php/topic,13735.0.html

I’ll keep track of my progress here, please let me know what you think.

Instructions
After installing the plugin a device will automatically be created. Go to the advanced tab of that device and add IP address of your receiver (I recommend setting a static IP address on your receiver). You will have basic control from the dashboard. And can now add actions to your scenes from the ‘advanced’ tab (see the attached example). You must have “network standby” enabled for this plugin to work.

12-16-13 - 2.0 Released
-FIXED overlapping dashboard display
-ADDED ability to launch Pandora as an input
-BROKEN volume slider is still broken, this is high priority for me to fix

12-17-13 - 2.1 Released
-ADDED Volume buttons, temporary until I fix the slider
-ADDED Status tab, very buggy WIP

12-19-13 - 2.2 Pending Approval
-FIXED Volume up button on dashboard

12-21-13 - 2.3 Pending Approval
-ADDED Function to prevent updating variables that have not changed, this should clean up the logs a bit (thanks a-lurker and garrettwp)
-ADDED Many new commands that can be used in scenes, more to come

12-23-13 - 2.4 Pending Approval
-ADDED New buttons, new layout for dashboard (screenshot attached)
-I’m attaching the files here for now since the MCV staff will not be approving plugins over the Christmas break

01-05-14 - 2.5 Released
-ADDED HDMI inputs to list of possible triggers
-ADDED Tuner actions to control AM/FM and Preset features

Wow, that’s awesome. I’ll check it out. Thanks for sharing!

Thanks for checking it out. I’ve posted an updated version above.

[quote=“joey52685, post:1, topic:178312”]12-17-13 - 2.1 Released
-ADDED Volume buttons, temporary until I fix the slider
-ADDED Status tab, very buggy WIP[/quote]

Just thought I would give you a tip on the volume control problem. Looking at your code I noticed a couple of things you need to add. Primarily it is micasaverde volume control upnp device properties. Then you must implement it for your device.

You need to add this code to your D_YamahaReceiver1.xml file.

<service>
	<serviceType>urn:micasaverde-com:service:Volume:1</serviceType>
	<serviceId>urn:micasaverde-com:serviceId:Volume1</serviceId>
	<SCPDURL>S_Volume1.xml</SCPDURL>
</service>

Then add an action in your S_YamahaReceiver1.xml files.

    <stateVariable sendEvents="no">
      <name>VolumeTarget</name>
      <datatype>string</datatype>
    </stateVariable>
 
    <stateVariable sendEvents="yes">
      <name>Volume</name>
      <datatype>string</datatype>
    </stateVariable>
</serviceStateTable>
<actionList>
   <action>
      <name>SetVolumeTarget</name>
      <argumentList>
        <argument>
          <name>newTargetValue</name>
          <direction>in</direction>
        </argument>
      </argumentList>
   </action>

Then you need to put the action SetVolumeTarget in your implementation file.

<action>
    <serviceId>urn:ynca-com:serviceId:Receiver1</serviceId>
    <name>SetVolumeTarget</name>
    <run>
        sendCommand({"MAIN", "VOL", lul_settings.newTargetValue ..".0"})
    </run>
</action>

Then put the slider in your json file

{
		"ControlGroup": "[yourcontrolgroup here]",
		"ControlType": "slider",
		"top": "[value here]",
		"Display": {
			"Service": "urn:micasaverde-com:serviceId:Volume1",
			"Variable": "Volume",
			"ID": "Volume",
			"MinValue": "00",
			"MaxValue": "98",
			"Top": 30,
			"Left": 10,
			"Width": 200,
			"Height": 20
		},
		"Command": {
			"Service": "urn:ynca-com:serviceId:Receiver1",
			"Action": "SetVolumeTarget",
			"Parameters": [{
				"Name": "newTargetValue",
				"ID": "Volume"
			}]
		}
}

Anyways thought that would give you an example that you could look off of.

I wanted to chime in and say that part of this is wrong. You should use the standard service types as much as possible. For the service id to set the volume it should be this:

<action>
<serviceId>urn:upnp-org:serviceId:RenderingControl</serviceId>
<name>SetVolume</name>
<run>
    sendCommand({"MAIN", "VOL", lul_settings.DesiredVolume ..".0"})
</run>
</action>

I suggest that you look at the Sonos or the Squeezebox plugin for some pointers on the service types for media / av control.

You’ll also want to add this to your xml:

<service>
    <serviceType>urn:schemas-upnp-org:service:RenderingControl:1</serviceType>
    <serviceId>urn:upnp-org:serviceId:RenderingControl</serviceId>
    <SCPDURL>S_RenderingControl1.xml</SCPDURL>
</service>
  • Garrett

Thank you for the help guys! The receiver is expecting volume as a dB value between -80 & 16. Does the mcv volume control provide that?

I would do a conversion from 0 - 100% to the appropriate db value and send that. The RenderingControl.xml also has SetVolumeDB, however I believe most apps would use the SetVolume service id. It is far easier to have 0 - 100% than to know what db value is needed especially for 3rd party app support.

  • Garrett

That’s what I thought, something like (95*x)/100-80. But then I also need to round to nearst half. Can I do the math right in the implementation file?

Yes, you can perform all lua code in the implementation file.

  • Garrett

Just wanted to report back to confirm yes, the volume is a bit buggy in 2.1 (volume up button doesn’t respond since only one pixel is clickable), but other than that, it’s working well so far. Already a substantial improvement over the base version.

Thanks!

[quote=“silencery, post:10, topic:178312”]Just wanted to report back to confirm yes, the volume is a bit buggy in 2.1 (volume up button doesn’t respond since only one pixel is clickable), but other than that, it’s working well so far. Already a substantial improvement over the base version.

Thanks![/quote]

Yeah I saw that, it’s only an issue on the dashboard. I’ll fix it shortly, and I’m going to add some buttons to change inputs too.

I got a yamaha RX-V771 and this works fine for me.

But i can’t i any way change input on the reciever?

Is it possible to get this to work even on mobile apps such as AuthomationHD, Vera Mobile etc?

Awesome!

Would it be possible to have the option in a scene>advanced and than have someting like a “save settings” and “reset settings” linke in the sonos plugin.

I use the Yamaha reciever together with a sonos connect and for my “security system”, doorbell for example plays a “dingdong”-sound via the sonos connect , this first saves the settings , play the sound and than reset to the previous settings. When I am for example watching a movie ,the Yamaha switches to AV1, a specific volume. But I manually have to go back to what I am listening at the moment.

Thanks,
Cor

[quote=“jolerius, post:12, topic:178312”]I got a yamaha RX-V771 and this works fine for me.

But i can’t i any way change input on the reciever?

Is it possible to get this to work even on mobile apps such as AuthomationHD, Vera Mobile etc?[/quote]

Currently you can change inputs from scenes->advanced. I’m still working on making it a bit more user friendly. I think app integration is up to each individual developer. I’ll reach out to them once the plugin is a bit more stable.

[quote=“Cor, post:13, topic:178312”]Awesome!

Would it be possible to have the option in a scene>advanced and than have someting like a “save settings” and “reset settings” linke in the sonos plugin.

I use the Yamaha reciever together with a sonos connect and for my “security system”, doorbell for example plays a “dingdong”-sound via the sonos connect , this first saves the settings , play the sound and than reset to the previous settings. When I am for example watching a movie ,the Yamaha switches to AV1, a specific volume. But I manually have to go back to what I am listening at the moment.

Thanks,
Cor[/quote]

I will look into that. What settings would you want it to remember? Just volume and input?

Great. Can’t wait for the volumeslider and input button/s.

By the way. Is it possible to rename the inputs so that it’s more easy to find a specific input? for example av1 - sonos, hdmi2 - tv, hdmi3 - xbox etc

Not dynamically. It would require modifying the D_xxx.json file and would effect all devices that use the plug-in.

  • Garrett

Glad to see some life back in YNCA!

Is there a place we can review the code? I’d like to confirm this is in it: http://forum.micasaverde.com/index.php/topic,13735.msg128286.html#msg128286

Or request that it be added if it is not already in the plugin.

Also, should I remove my old YNCA prior to installing this, or just install (and will it overwrite/upgrade my existing I, D, S and JSON files? Will I have to recreate my scenes, or do the scene commands all have the same names?

Thanks

[quote=“Ramias, post:18, topic:178312”]Glad to see some life back in YNCA!

Is there a place we can review the code? I’d like to confirm this is in it: http://forum.micasaverde.com/index.php/topic,13735.msg128286.html#msg128286

Or request that it be added if it is not already in the plugin.

Also, should I remove my old YNCA prior to installing this, or just install (and will it overwrite/upgrade my existing I, D, S and JSON files? Will I have to recreate my scenes, or do the scene commands all have the same names?

Thanks[/quote]

If it lets you overwrite the files that should be fine, that would save you from having to re create the scenes.

Which inputs do you need added to zone 2? I will make sure to include them in the next release.

The files are not encrypted or anything you can download them and look at the code.

[quote=“joey52685, post:19, topic:178312”]Which inputs do you need added to zone 2? I will make sure to include them in the next release.

The files are not encrypted or anything you can download them and look at the code.[/quote]

I need AV5 and AV6 for Zone 2 added.

Where can I view the files from without installing from the apps.mios.com store? I checked code.mios.com but did not see the files.

Best Home Automation shopping experience. Shop at getvera!

© 2021 Ezlo Innovation, All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules