Yamahareceiver Binding has issue with Zone 2

This should be the file:

https://www.dropbox.com/s/0bj6hdaknn6ykso/Response.txt?dl=0

This file looks malformed - I was expecting a proper XML. Can you please try to save the response in a different way?
Maybe open the URL via Chrome and do file save as…

I’m not sure if this helps you, but after some Googling, I can control the power of Zone_B Ising the following URL:

To turn it on:

http://10.0.1.22/YamahaRemoteControl/ctrl:<YAMAHA_AV cmd=\"PUT\"><Main_Zone><Power_Control><Zone_B_Power>On</Zone_B_Power></Power_Control></Main_Zone></YAMAHA_AV>

To turn it off/standby:

http://10.0.1.22/YamahaRemoteControl/ctrl:<YAMAHA_AV cmd=\"PUT\"><Main_Zone><Power_Control><Zone_B_Power>Standby</Zone_B_Power></Power_Control></Main_Zone></YAMAHA_AV>

https://www.dropbox.com/s/lmugkyne8fzc2wp/10.0.1.22-YamahaRemoteControl-desc.xml.pdf?dl=0

I see that the HTR-xxx will require more changes to be supported by the binding. Somehow Yamaha did it differently from the other models. After quick analysis based on the provided XML:

  • The Zone_2 is actually called Zone_B. The weird thing is that it sits under Main_Zone element and has specific command (Zone_B_Power). This is way different than accounted in the binding - will require changes and some feature detection.
  • Zone_2 seems to only allow changing of power, mute, volume (input, surround not supported).

Given the above, I suggest to raise a feature request on github (or separate community topic) about adding support for HTR-xxxx to the binding. I am not sure this was ever working with this model family. I could help with the changes, but it will require you to test new JAR releases since I don’t have this model…

EDIT:
Jaco created an issue here:

Hi David,

thank you for the additional documentation but I still have questions and problems with using some channels of this binding.

I am new to openhab and wanted to use the Yamaha binding with my RX-V673 to learn some basics.

I am using OH 2.2.0-1 installed as openhabian on raspi 3 and I installed the yamaha binding from dropbox as explained here
I have been reading and searching through the documentation and the community but still can not find proper examples for my usecase.

Basic control is working like switching power and source(somehow working), volume and player stuff but I am struggling with menu navigation and presets.

Main question is now about item types for the definition and values for commands in my rules.

Items(just those with issue):
Right types used for navigation items? Could not find info on usage of UpDown Type.

Number      Yamaha_Preset               "Preset [%d]"               <video>
String      Yamaha_Tuner_Band           "Band [%s]"                 <video>
//String      Yamaha_Input_Ex

String	navigation_menu					"Menu [%s]"			<video>		//Select or display the full or relative path to an item.
Number	navigation_current_item			"Current [%s]"		<video>		//Get the current item of the current menu.
Number	navigation_total_items			"Total [%s]"		<video>		//Get the total count items in the current menu.
Number	navigation_level				"Level [%s]"		<video>		//Get the current menu level.
	
Number	navigation  					//for rule setting
String	navigation_updown				//Move the cursor up or down.
String	navigation_leftright			//Move the cursor to the left or right.
String	navigation_select				//Select the current item.
String	navigation_back					//Navigate to the parent menu.
String	navigation_backtoroot			//Navigate back to the root menu.

Sitemap:
For the Navigation part I am using stuff I found in the forum. I wonder why the Number type item navigation is filled with a string but it seems to work as the rule is triggered and commands send.

sitemap yamaha label="Yamaha RX-V673"
{
	Frame label="Steuerung" {
		Switch		item=Yamaha_Power
		Switch		item=Yamaha_Mute
		Slider		item=Yamaha_Volume
		Selection	item=Yamaha_Input       mappings=[HDMI1="BlueRay",HDMI2="Wii-u",HDMI3="XBOX ONE",AV1="Bluetooth",AV4="TV",TUNER="Tuner","NET RADIO"="NET RADIO"]
		Text		item=Yamaha_Tuner_Band	visibility=[Yamaha_Input=="TUNER"]
		Selection	item=Yamaha_Surround    mappings=["2ch Stereo"="2ch Stereo","7ch Stereo"="7ch Stereo","Surround Decoder"="Surround Decoder","Standard"="Standard","Straight"="Straight"]
	}
	Frame label="Wiedergabe" {
		Default     item=Yamaha_Playback	visibility=[Yamaha_Input=="BlueRay",Yamaha_Input=="Bluetooth",Yamaha_Input=="NET RADIO"]
		Selection   item=Yamaha_Preset		mappings=[1="NDR 2 (HH)",6="N-JOY"]		visibility=[Yamaha_Input=="NET RADIO"]
		Selection   item=Yamaha_Preset		mappings=[1="NDR Info",5="Radio HH"]			visibility=[Yamaha_Input=="TUNER"]
		Text 		item=Yamaha_Playback_Station	visibility=[Yamaha_Input=="NET RADIO",Yamaha_Input=="TUNER"]
		Text        item=Yamaha_Playback_Artist
		Text        item=Yamaha_Playback_Album
		Text        item=Yamaha_Playback_Song
		//Image       item=Yamaha_Playback_Song_Image	visibility=[Yamaha_Input=="Spotify"]
	}
	Frame label="Menu" {
		Text	item=navigation_menu
		Text	item=navigation_current_item	
		Text	item=navigation_total_items	
		Text	item=navigation_level		
	}
	Frame label="Navigation" {
		Switch item=navigation  mappings=["1"="_BACK_","2"="___⬆___","3"="_HOME_"]
		Switch item=navigation  mappings=["4"="__⬅__","5"="__OK__","6"="___➨___"]
		Switch item=navigation  mappings=["7"="_____","8"="___⬇___","9"="______"]	
	}
}

Rule:
I get warning message when saving (Configuration model ‘yamaha.rules’ is either empty or cannot be parsed correctly!) it but it seems to work. Tried without the double quotes eg. navigation_back.sendCommand(ON) with same results in log.
Commands are send but probably with wrong content and get ignored by the receiver.

rule "Yamaha Control"
when
    Item navigation received command
then
    switch (receivedCommand) {
        case  1:	navigation_back.sendCommand("ON")
        case  2:	navigation_updown.sendCommand("UP")
        case  3:	navigation_backtoroot.sendCommand("ON")
        case  4:	navigation_leftright.sendCommand("UP")
        case  5:	navigation_select.sendCommand("ON")
        case  6:	navigation_leftright.sendCommand("DOWN")
        case  8:	navigation_updown.sendCommand("DOWN")
}      
end

Any support would be appreciated.
Thanks,
Jean

rem: I am not sure where is the best place for my question as there are several threads around this binding and the navigation. If different place is better let me know.

Hi!
Thank you for this nice binding. I use it everyday. But I miss out two features: Party mode (swith) (same music in all zones) and Scene for the different zones. Would that be possible to add to the binding?

BR,
Joakim

Hi, Yes it is surely possible. I suggest to create a GitHub issue with a feature request. Put in as much details as you can. Someone will take a look.

Cheers

1 Like

I missed the party mode and the scenes also.
(In the morning-alarm-clock and as global announcements from openhab itself :wink: )

As workaround I used the http-binding.
Here the *.items file

// overall zones
Switch Yamaha_PartyMode_On "Yamaha Partymode Ein" <receiver> (gYamahaHTTP) { http=">[ON:POST:http://192.168.xxx.xxx/YamahaRemoteControl/ctrl:<YAMAHA_AV cmd=\"PUT\"><System><Party_Mode><Mode>On</Mode></Party_Mode></System></YAMAHA_AV>]", expire="2s,command=OFF"}
Switch Yamaha_PartyMode_Off "Yamaha Partymode Aus" <receiver> (gYamahaHTTP) { http=">[OFF:POST:http://192.168.xxx.xxx/YamahaRemoteControl/ctrl:<YAMAHA_AV cmd=\"PUT\"><System><Party_Mode><Mode>Off</Mode></Party_Mode></System></YAMAHA_AV>]", expire="2s,command=OFF"}

// load scenes on zone main
Switch Yamaha_MainScene_1 "Yamaha Szene 1" <receiver> (gYamahaHTTP) { http=">[ON:POST:http://192.168.xxx.xxx/YamahaRemoteControl/ctrl:<YAMAHA_AV cmd=\"PUT\"><Main_Zone><Scene><Scene_Load>Scene 1</Scene_Load></Scene></Main_Zone></YAMAHA_AV>]", expire="2s,command=OFF"}
Switch Yamaha_MainScene_2 "Yamaha Szene 2" <receiver> (gYamahaHTTP) { http=">[ON:POST:http://192.168.xxx.xxx/YamahaRemoteControl/ctrl:<YAMAHA_AV cmd=\"PUT\"><Main_Zone><Scene><Scene_Load>Scene 2</Scene_Load></Scene></Main_Zone></YAMAHA_AV>]", expire="2s,command=OFF"}
Switch Yamaha_MainScene_3 "Yamaha Szene 3" <receiver> (gYamahaHTTP) { http=">[ON:POST:http://192.168.xxx.xxx/YamahaRemoteControl/ctrl:<YAMAHA_AV cmd=\"PUT\"><Main_Zone><Scene><Scene_Load>Scene 3</Scene_Load></Scene></Main_Zone></YAMAHA_AV>]", expire="2s,command=OFF"}
Switch Yamaha_MainScene_4 "Yamaha Szene 4" <receiver> (gYamahaHTTP) { http=">[ON:POST:http://192.168.xxx.xxx/YamahaRemoteControl/ctrl:<YAMAHA_AV cmd=\"PUT\"><Main_Zone><Scene><Scene_Load>Scene 4</Scene_Load></Scene></Main_Zone></YAMAHA_AV>]", expire="2s,command=OFF"}

So far I didn’t manage to get feedback about the actual state - should be possible.

2 Likes

I added a request using an issue.

1 Like
rule "SetPartyModeON"
when 
	Item AV_WF_Yamaha_Party received command 
then
	if (receivedCommand == ON) {
	xml="<YAMAHA_AV cmd=\"PUT\"><System><Party_Mode><Mode>On</Mode></Party_Mode></System></YAMAHA_AV>"
	data = sendHttpPostRequest('http://your_ip/YamahaRemoteControl/ctrl', 'text/xml', xml);
	AV_WF_Yamaha_Party.postUpdate(ON);
	}
	else {
	xml="<YAMAHA_AV cmd=\"PUT\"><System><Party_Mode><Mode>Off</Mode></Party_Mode></System></YAMAHA_AV>"
	data = sendHttpPostRequest('http://your_ip/YamahaRemoteControl/ctrl', 'text/xml', xml);
	AV_WF_Yamaha_Party.postUpdate(OFF);
	}
end

Hi!
Thank’s for the help
How should the variabled be declared? Should “data” be sent using a command?
BR,
Joakim

the variable gets the response :

https://www.eclipse.org/smarthome/documentation/javadoc/org/eclipse/smarthome/model/script/actions/HTTP.html

Hi everybody,

Only in this thread find only just like of my issue, so I hope its not offtopic
I have a Yamaha htr-4066 AVR and everything working but one thing.
When I try Increase the volume works:

Item ‘Yamaha_Volume’ received command INCREASE
Yamaha_Volume changed from 17 to 18

But when try to Decrease, nothing happen:
Item ‘Yamaha_Volume’ received command DECREASE
Item ‘Yamaha_Volume’ received command DECREASE
Item ‘Yamaha_Volume’ received command DECREASE

Something happen, because the AVR screen change to volume, but show only the current value, not change.

Did you meet some king of issue, like this?

BR,
O.

Hi for me both increase and decrease volume works for this PR version: https://github.com/openhab/openhab2-addons/pull/3264 (it requires OH 2.3.0 snapshot). As far as I remember it also worked on previous version. It is weird why the decrease would not work if the increase works for you. You could post your sitemap/items fragment.

Hi,
Thank you for your answer :slight_smile:
item:
Dimmer Yamaha_Volume “AVR Volume [%d %%]” [“Switchable”] {channel=“yamahareceiver:zone:5f9ec1b3_ed59_1900_4530_00a0dea2b976:Main_Zone:zone_channels#volume” }
Sitemap:
Switch item=Yamaha_Volume label=“Volume” mappings=[DECREASE="-", INCREASE="+"]

O.

Hi @Gudszent_Otto,

My setup is 2.3.0-SNAPSHOT from the pull request I cited above and this works.
Switch item=Yamaha_Volume mappings=[DECREASE="-", INCREASE="+"]

Normally, I use a slider:
Slider item=Yamaha_Volume

Here is my item:
Dimmer Yamaha_Volume "Volume [%.1f %%]" <soundvolume> (Cinema) { channel="yamahareceiver:zone:db18edf8:Main_Zone:zone_channels#volume" }

I think this should also work on previous addon version. Which version do you use?

Another thing to check - go to your yamaha thing setting (in PaperUI) and ensure the volume relative change factor is greater than zero.

Cheers,

I will try the 2.3.0 version, but currently my openhabian-config not offer me the update, so I have to wait :slight_smile:
After the update, I will notice U

O.

Anyone interested in testing the party mode and scene support please join: https://github.com/openhab/openhab2-addons/issues/3393

CC: @teqnet, @AV_HomeAuto, @BigMountainSki

EDIT:

I ought to mention that after the upgrade you also need to adjust your thing settings because they are are now stored under a different name (see more info here). Because of that you need to set the IP/host address of your Yamaha on the Yamaha thing and assign the zone setting on each of the zone things.

If you configued via PaperUI go to > Configuration > Things > Yamaha Receiver > edit (pencil) > Address, and also Configuration > Things > Yamaha Main Zone > edit > Zone (set to ‘Main_Zone’). If you configured via the .thing file see the updated documentation here - note the host and zone are now all lower case.

In case you still have issues enable detailed logging and get back to me please.

1 Like

@tr1cks - SCENEs as I mentioned last night :slight_smile: