Yamaha MusicCast binding revival

Thanks for your work, works fine so far :slight_smile:
I added the “receiving” commands, otherwise openhab would not be updated if something got changed on for example the remote control of the av.
Added Inputselection aswell.

UID: http:url:d6bc1c61f7
label: Yamaha Receiver R-N303D
thingTypeUID: http:url
configuration:
  authMode: BASIC
  ignoreSSLErrors: false
  baseURL: http://<YOURMUSICCASTDEVICE>/YamahaExtendedControl/v1/main/
  refresh: 30
  commandMethod: GET
  contentType: application/json
  timeout: 3000
  bufferSize: 2048
channels:
  - id: Volume
    channelTypeUID: http:dimmer
    label: Volume
    description: null
    configuration:
      mode: READWRITE
      stateExtension: getStatus
      commandExtension: setVolume?volume=%2$s
      stateTransformation: JSONPATH:$.volume
  - id: Power
    channelTypeUID: http:switch
    label: Power
    description: null
    configuration:
      onValue: on
      mode: READWRITE
      offValue: standby
      stateExtension: getStatus
      commandExtension: setPower?power=%2$s
      stateTransformation: JSONPATH:$.power
  - id: Input
    channelTypeUID: http:string
    label: Input
    description: null
    configuration:
      mode: READWRITE
      stateExtension: getStatus
      commandExtension: setInput?input=%2$s
      stateTransformation: JSONPATH:$.input

Hi @BeanzBE,
first of all many many thanks for your work :slight_smile: Last weekend i tested the last beta with openhab 3.0.1, but the addons isnt recognized by openhab. It’s neither shown in the webfrontend nor with bundle:list.
Are there any news about this problem or can i support with any logfiles / further data?
Thank you very much

@martiniman Thanks for the feedback. As my things/Items were created via the UI, let me check it what it gives when creating them via files.
@chris3 How did you created bridge/items? And it might be related to what @martiniman explained.

Anyway, for my project for work, I reached first milestone. Hopefully this should give me some room to pick this up again. The Pull Request for OH3 has also been paused for a while now.
First try should be to create a separate branch for audio sink and perhaps the problem with OH3

1 Like

Hi @BeanzBE,
Yes i tested to create things as @martiniman explained, but i did not work for me.
As i already mentioned, my openhab instance did not discover the addon (v0.81). So it’s not possible for me to create Things or the Bridge Form the webfrontend.
With v0.79 it’s shown in the console with bundle:list, with 0.81 nothing is shown.
Is it right, that v0.81 has only a size of ~20kb and v0.79 ~40kb?

@BeanzBE I have the exact same issue as @chris3. The latest version doesn’t work on my oh3 either

OK. Will recompile it and update my VM with OH3. This is the biggest issue for you guys at the moment. Let me see how far I get.

The new uploaded version is now detected by openhab 3.
thank you very much :slight_smile:

Confirmed :grinning:

You’re fast!
It was the size which gave me the hint!
Need to start moving to OH3 :slight_smile: So I can better see what is going on/wrong.

I can recommend to switch to OH3, i’m really happy with it :slight_smile:

Yesterday i was trying to use the new channel “mclinkStatus” to activate / deactive Musiccast, but it seems not to work correctly yet. If I set any value (“standalone”, “server” or “client”), it’s reset to the current state from the device. Furthermore “standalone” is represented by “” or NULL.

Snippet from the OH3 console:

11:54:56.351 [INFO ] [openhab.event.ItemCommandEvent ] - Item ‘YamahaMusiccast20_StatusMusicCast’ received command server
11:54:56.354 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item ‘YamahaMusiccast20_StatusMusicCast’ predicted to become server
11:54:56.356 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘YamahaMusiccast20_StatusMusicCast’ changed from to server
11:54:56.368 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘YamahaMusiccast20_StatusMusicCast’ changed from server to




11:55:09.801 [INFO ] [openhab.event.ItemCommandEvent ] - Item ‘YamahaMusiccast20_StatusMusicCast’ received command standalone
11:55:09.803 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item ‘YamahaMusiccast20_StatusMusicCast’ predicted to become standalone
11:55:09.805 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘YamahaMusiccast20_StatusMusicCast’ changed from to standalone
11:55:09.818 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘YamahaMusiccast20_StatusMusicCast’ changed from standalone to

Hi Chris, yes, it is not fully functional.
The API is not really behaving as expected. I need to find a workaround for it.
If I do the same via the app, I get the same result back in OH. That’s why I need the workaround or I’m missing something completely.
Hopefully soon.

Hi all

I’m trying to install this binding in my openhabian OH 3.1 system running on linux RPI but I can’t get it to load on system restart.

I have downloaded the jar file using wget YamahaMusicCast/org.openhab.binding.yamahamusiccast-3.1.0-v0.81-beta.jar at master · coop-git/YamahaMusicCast · GitHub and copying that to /usr/share/openhab/addons

and then changed owner to openhab:openhab should that be openhabian?

I’ve tested differnet permissions 666 776 775 but nothings seems to make it load. What am I doing wrong?

Normally a binding is not starting on system start or so, why are you heading in this direction? Any logs that can be shared?

Please note that bindings installed via the addons folder don’t show up in the installed bindings. Just continue straight to adding Things

I thought It maybe reloaded the addons folder on restart, but the binding will not showup under budnle:list or bundle:start, when I add things via .things file it says it has validation error as below

2021-05-14 09:44:16.562 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model ‘musiccast.things’, using it anyway:
Provide a thing type ID and a thing ID in this format:


<thingTypeId> <thingId>

musiccast.things file

//Yamaha Musiccast thing configuration

Bridge yamahamusiccast:bridge:bridge “YMC Bridge” {

Thing yamahamusiccast:device:Kitchen “YMC Kitchen” [host=“xxx.xxx.x.xxx”]

}

Good morning,
I tried to switch from Yamahareceiver to musiccast binding yesterday, got it runing finally, it doesnt show up in the bindings list but with bundle:list you see that it is loaded. In the begining I made the mistake to copy it from github with Save as
 in the context menu, there I received a 104KB file. After pressing download I received a file with 44KB and that worked after copying it to addons.

What I also did was renaming the bridge to yamahamusiccast:bridge:d1c39b2466 in the things file.
I also get the error message from the things file but the things show up at the configuration page as online.

But then my issues start, I am using a items file with 9 Musiccast devices which worked fine in OH2.5 with musiccast binding. So I adapted it to the new syntax, but most of the items don’t work.
It starts with the power item, i can power on my device but not power of and when I check the visibility in my sitemap it thows lots of errors in the log.

Cannot retrieve visibility item Yamaha_LivingRoom_Power for widget org.openhab.core.model.sitemap.sitemap.Selection

The mute button works fine, also the preset DLNA, Radio, Net changes.

Anyone an idea what could be wrong?

br Leo

Hi thats obvious my issue also wget did just get 100byte filesuize but downloading save as made 44k, so now the binding kicked in.

You’re welcome, meet you at the next level ;-).

br Leo

I’ve added volumecontrol and power control, now working on selectpreset I have my radiostations preset in all my musiccast units, WXAD10 streaming device. Just need to figure out wath to send to the string item, It do no list anything there.

I was just having a bad persitance hence switching from squeelite server to musiccast listed my squeezebox favorites. To the string just send the number in of your favorite to play 1 or 2 or 3 et.c Binding yet working as a charm for like 30 minutes now. I will report progress when I’m more experienced.

What are using as frontend: sitemaps or the new UI?
In the last days I created a new fork of OH3 addons as my previous was messed up. There are a lot of enhancements regarding development. So I’m kinda doubting to switch to OH3 for DEV and port it backwards to OH2.5.
Which also means for me to start working with OH3 :slight_smile: