Yamahareceiver binding on 1.8.3 for Yamaha crx-n560

I’m trying to control a Yamaha CRX-N560. I entered the IP address in openhab.cfg and I can ping the N560 interface from the raspberrypi cli. However, the debug states the following

2016-12-27 09:14:19.906 DEBUG o.o.b.y.i.YamahaReceiverActivator[:33]- YamahaReceiver binding has been started.
2016-12-27 09:14:20.291 DEBUG o.o.b.y.i.YamahaReceiverBinding[:290]- YamahaReceiverBinding activated
2016-12-27 09:14:20.297 DEBUG o.o.b.y.i.YamahaReceiverBinding[:256]- YamahaReceiverBinding updated
2016-12-27 09:14:20.458 WARN o.o.b.y.i.YamahaReceiverBinding[:118]- Cannot communicate with 12.18.18.19
2016-12-27 09:14:49.213 DEBUG o.o.b.y.i.YamahaReceiverBinding[:166]- YamahaReceiverBinding processing command ‘ON’ of type ‘OnOffType’ for item 'Yamaha_Power’
2016-12-27 09:14:49.253 WARN o.o.b.y.i.YamahaReceiverBinding[:222]- Cannot communicate with 12.18.18.19 (uid: kitchen)
2016-12-27 09:14:59.069 DEBUG o.o.b.y.i.YamahaReceiverBinding[:166]- YamahaReceiverBinding processing command ‘OFF’ of type ‘OnOffType’ for item 'Yamaha_Power’
2016-12-27 09:14:59.108 WARN o.o.b.y.i.YamahaReceiverBinding[:222]- Cannot communicate with 12.18.18.19 (uid: kitchen)
2016-12-27 09:15:20.499 WARN o.o.b.y.i.YamahaReceiverBinding[:118]- Cannot communicate with 12.18.18.19

How can I get more details?

Hi, did you find a solution yet? I have the same problem

No. I ended up using rules and python scripts to automate some of the functions. I reversed engineering the calls from the mobile app to get the correct syntax. If you’re interested, I can share my setup to get you started.

yeah that woudl be really nice. i only need to turn the receiver on and off.

Here are my entries. Turns out that I didn’t use python; just http PUTs. These entries are all in the rule, item, and sitemap respective files. Also, I’m able to control the radio via Alexa or Google. Take a look and let me know if you have any questions, suggestions, or improvements.

Rule Entries

// Kitchen Radio (Yamaha CRX-N560) Variables
var String URLCRXN560 = "http://X.X.X.X/YamahaRemoteControl/ctrl" // Replace X.X.X.X with the IP address of your unit
var String xmlheader = '{?xml version="1.0" encoding="utf-8"?}'
var String PowerOn = '{<YAMAHA_AV cmd="PUT"><System><Power_Control><Power>On</Power></Power_Control></System></YAMAHA_AV>}'
var String PowerOff = '{<YAMAHA_AV cmd="PUT"><System><Power_Control><Power>Standby</Power></Power_Control></System></YAMAHA_AV>}'
var String VollvlVar = '{<YAMAHA_AV cmd="PUT"><System><Volume><Lvl>%s</Lvl></Volume></System></YAMAHA_AV>}'
var String VollvlPre = '{<YAMAHA_AV cmd="PUT"><System><Volume><Lvl>'
var String VollvlSuf = '</Lvl></Volume></System></YAMAHA_AV>}'
var String VolLvlAM = '{<YAMAHA_AV cmd="PUT"><System><Volume><Lvl>4</Lvl></Volume></System></YAMAHA_AV>}'
var String VolLvlPM = '{<YAMAHA_AV cmd="PUT"><System><Volume><Lvl>9</Lvl></Volume></System></YAMAHA_AV>}'
var String TunerSel = '{<YAMAHA_AV cmd="PUT"><System><Input><Input_Sel>TUNER</Input_Sel></Input></System></YAMAHA_AV>}'
var String KRadioSelTV = '{<YAMAHA_AV cmd="PUT"><System><Input><Input_Sel>DIGITAL1</Input_Sel></Input></System></YAMAHA_AV>}'
var String InputPre = '{<YAMAHA_AV cmd="PUT"><System><Input><Input_Sel>'
var String InputSuf = '</Input_Sel></Input></System></YAMAHA_AV>}'
var String FMPreset = '{<YAMAHA_AV cmd="PUT"><Tuner><Play_Control><Preset><FM><Preset_Sel>22</Preset_Sel></FM></Preset></Play_Control></Tuner></YAMAHA_AV>}'

// Morning Radio Rule 
rule "Mon-Fri 5:30 AM Kitchen Rules"
when
	Time cron "0 30 05 ? * MON-FRI" //	Time cron "0 30 05 ? * MON-FRI"
then
	logInfo("RULE", "Sunrise_start rule triggered!")
	sendHttpPostRequest(URLCRXN560,xmlheader,PowerOn)
		Thread::sleep(750) // Add a sleep interval if you wish to change functions after powering on
    	sendHttpPostRequest(URLCRXN560,xmlheader,VolLvlAM)
    	sendHttpPostRequest(URLCRXN560,xmlheader,TunerSel)
    	sendHttpPostRequest(URLCRXN560,xmlheader,FMPreset)
end

/*  Yamaha Reciever Power */
rule "YamahaPwr"
when
	Item YamahaPwr received update
then
	if(YamahaPwr.state==ON){sendHttpPostRequest(URLCRXN560,xmlheader,PowerOn)}
else if(YamahaPwr.state==OFF){sendHttpPostRequest(URLCRXN560,xmlheader,PowerOff)}
end

/*  Yamaha Change Volume */
rule "Vol4Yamaha"
when
	Item Volyamaha received update
then
	Payload = VollvlPre + Volyamaha.state.toString + VollvlSuf
	sendHttpPostRequest(URLCRXN560,xmlheader,Payload)
end

/*  Yamaha Change Source */
rule "Inpyamaha"
when
	Item Inpyamaha received update
then
	Payload = InputPre + Inpyamaha.state.toString + InputSuf
	sendHttpPostRequest(URLCRXN560,xmlheader,Payload)
end

Item Entries

Switch YamahaPwr "Kitchen Radio" [ "Switchable" ]
Dimmer Volyamaha "Kitchen Speakers" [ "Switchable" ]
String Inpyamaha "Kitchen Source" [ "Switchable" ]

Sitemap Entries

    Frame label="Kitchen Radio" {
     Switch item=YamahaPwr
     Setpoint item=Volyamaha  label="Volume" icon="soundvolume" minValue=0 maxValue=30 step=1
     Switch item=Inpyamaha label="Source" mappings=[TUNER='TUNER',AUX2='Chromecast', DIGITAL1='TV', DIGITAL2='DIGITAL2'] icon="none"
     }
1 Like