Yamaha musiccast binding

Hey Thomas,

Typically a binding in many contexts refers to setting up a listener at a higher level, but in this context I think refers to binding to a specific port - so if HTTP, it is binding to port 80 or port 443 for https. Seeing as the API is REST based, thus creating an HTTP service still makes sense and I do have experience setting this up.

Based on the openHABJVM compatible construct it does mean that they should be able to work well together.

Perhaps the easiest for now is to focus on what you would like to use the API for. What are you trying to accomplish for now?

So as a standard HTTP binding - https://github.com/openhab/openhab/wiki/Http-Binding

I think this is what you meant.

Depending on what you want to use this for - the Yamaha binding might already have what you need - https://github.com/openhab/openhab/wiki/Yamahareceiver-Bin

Hi,

I don’t think the Yamaha binding is currently compatible with MusicCast. I was thinking to develop a binding which can control what you play, control sound, … In a next step, I would like to go to system with automation, like when the soundbar’s input is HDMI, it switches from the music profile to ‘movie’ or something.

Filip, I don’t completely understand the use case of your code, but it seems you already did some interesting musiccast development. That could of course help a lot. I also have some equipment to test and play with. Just need to reserve some time for it :wink:

My idea was to add devices - like in the current Yamaha API, or automatically detect them, because they announce themselves very clearly.
After that, we could register for retrieving events.
Then start with changing volume, source, …
It is also possible to retrieve the artwork for the current song. That would be nice to integrate in openhab, but not sure if that would be possible.
If we could register for the events, it should be possible to use other bindings in openhab for further automation.

1 Like

Hi together,

I was looking through the Api Specification yesterday and found this Thread while searching for the Advanced docs.
I started playing Around with OpenHab some Weeks ago and i am interested in helping out here too.
I have got a Yamaha A/V Receiver and a MusicCast Radio to Play around and test.
I have some knowledge and experience in programming in general.
I have no expierence in creating bindings, but i am interested in digging into OpenHab Contributing anyways.

Seems like we have plenty of testers already now we just need somebody experienced in binding development :smiley:

1 Like

Api is crystal clear and works pretty well on my HTR-4069. I wondering about security, since there is no authentication scheme !

I’m very intrestet in an Yamaha binding too, but as i’m a beginner in Openhab it’s a little to early to do it on my own :frowning:
If anyone already startet - i would love to help if needed.

My equipment:
1x RX-V481
1x R-N402D
2x WX-030 (stereo linked)
1x WX-010

At the moment the RX-V481 works pretty well with the existing YamahaReceiver Binding (Inputs, Volume, Power, …). But all other devices are always shown as offline.

What i do at the moment is to work with custom items and rules, for example to set the volume when the slider is changed:

rule "Yamaha402Volume"
when
    Item YamahaReceiverRN402D_Volume changed
then
	logInfo("rules","YamahaReceiverRN402D_Volume changed to " + YamahaReceiverRN402D_Volume.state)
	sendHttpGetRequest("http://192.168.178.75/YamahaExtendedControl/v1/main/setVolume?volume=" + YamahaReceiverRN402D_Volume.state)
end

or my alarm clock script:

logInfo('scripts', "Script alarm1 started")
var curVol = 2;
sendHttpGetRequest("http://192.168.178.78/YamahaExtendedControl/v1/main/setInput?input=net_radio")
sendHttpGetRequest("http://192.168.178.78/YamahaExtendedControl/v1/main/setVolume?volume=" + curVol)
for (var i = 0; i <= 11; i++) {
	curVol++;
	Thread::sleep(5000);
	sendHttpGetRequest("http://192.168.178.78/YamahaExtendedControl/v1/main/setVolume?volume=" + curVol)
}

This works pretty well, but is a little complicated and not how openhab should be used…

All I need would be a binding wich handels following Musiccast-URLs, or at least the most important of them:

/MediaRenderer/desc.xml
/MusicCastNetwork/InitialJoinComplete
/YamahaExtendedControl/secure/v1/netusb/getAccountStatus
/YamahaExtendedControl/secure/v1/system/getNetworkStatus
/YamahaExtendedControl/v1/dist/getDistributionInfo
/YamahaExtendedControl/v1/main/getSignalInfo
/YamahaExtendedControl/v1/main/getStatus
/YamahaExtendedControl/v1/main/prepareInputChange?input=airplay
/YamahaExtendedControl/v1/main/setInput?input=airplay
/YamahaExtendedControl/v1/netusb/getPlayInfo
/YamahaExtendedControl/v1/netusb/getPresetInfo
/YamahaExtendedControl/v1/system/getDeviceInfo
/YamahaExtendedControl/v1/system/getFeatures
/YamahaExtendedControl/v1/system/getFuncStatus
/YamahaExtendedControl/v1/system/getLocationInfo
/YamahaExtendedControl/v1/system/getNameText
/YamahaExtendedControl/v1/system/getNameText?id=main
/YamahaExtendedControl/v1/system/getNetworkStandby
/YamahaExtendedControl/v1/system/getTag
/YamahaExtendedControl/v1/system/getTag?id=main
/YamahaExtendedControl/v1/system/isNewFirmwareAvailable?type=network
/YamahaExtendedControl/v1/system/setLocationId
/YamahaExtendedControl/v1/system/setLocationName
/YamahaExtendedControl/v1/system/setNameText
/YamahaExtendedControl/v1/system/setTag?id=main&tag=3
/YamahaExtendedControl/v1/system/stopInitialJoin

Best Regards,
Martin

Hi,

I’m also very interested in a musiccast binding to integrate my WX speakers with my home automation system.
But it seems like the link to the API is dead.

Anybody knows where to find the API documentation?

Thanks,
Sebastian

I’ll send it to you in a private message!

BR,
Martin

Oh, and here is a working PHP Wrapper Class for Musiccast:

(if anyone needs it)

Also interested in the advanced api, @badsl and also interested in binding, but also no experience with creating. Maybe we can modify or expand the existing yamaha if it is indeed semi-compatible ?

Yes, the existing yamaha binding, or maybe the sonos binding could be a good point to start.

I will have a deeper look on it comin weekend (girlfrind is not at home :heart_eyes::tada::confetti_ball:). With enough time it should be no big problem… I hope i will find a way into it, and then share it on github so that you guys can help and improve.

@badsl , do you have a copy of the advanced API? if so could i have it?

thanks in advance

You got mail :slight_smile:

Thanks!!

Hey Guys,

see attached the Basic and the Advanced API documentation in the current revision. The Yamaha UK Support provided them to me and asked me to mention that it is only intended to be used by AV Professionals if i share it. DONE

I really hope that we get that ball rolling now. Using the API calls via HTTP Binding and parsing via JSONPATH works like a charm. However a centralised Binding would be way nicer especially when looking at the Advanced API.

YXC_API_Spec_Basic.pdf (987.4 KB)

YXC_API_Spec_Advanced.pdf (561.7 KB)

3 Likes

:heart_eyes: Excellent @Tomibeck ! and thanks also to @badsl

Ah nice something going forward here.
I wasnt in the community for some time now.
Thanks for sharing the advanced spec, that was missing in my documents.

I am really excited about the ongoing process.
If there is a well starting point on github i hope that i am able to help you out not only with testing. :slight_smile:

I work on Python implementation of Yamaha Extended Control API:

1 Like

Could you post your own implementations with the http binding in this Thread?
I am playing around with the http binding and jsonpath myself for my isx-80 radio, but when you already got some solutions it would be nice to share them.