[SOLVED] Yamaha binding - manual thing config does not work

I have a problem to get the textual config in a .thing to run. Auto discovery runs fine.

  • I use the 2.2.0 SNAPSHOT Build #1035
  • Receiver is a RX-A2060

I started with two things definitions for the yamahaAV and the Main_Zone:

Thing yamahareceiver:yamahaAV:rx-a2060 [ HOST="RX-A2060.fritz.box" ]
Thing yamahareceiver:zone:rx-a2060:Main_Zone [ HOST="RX-A2060.fritz.box"]

The Receiver got online and worked well. The Thing for Main_Zone alway had the status ‘UNINITIALIZED’ in the PaperUI. To compare the differences between the manual and the discovered items are, I jumped to the Karaf Console

yamahareceiver:yamahaAV:9ab0c000_f668_11de_9976_00a0dedcff7e (Type=Bridge, Status=ONLINE, Label=Yamaha Receiver RX-A2060, Bridge=null)
yamahareceiver:zone:9ab0c000_f668_11de_9976_00a0dedcff7e:Main_Zone (Type=Thing, Status=ONLINE, Label=RX-A2060 Main_Zone Discover, Bridge=yamahareceiver:yamahaAV:9ab0c000_f668_11de_9976_00a0dedcff7e)

yamahareceiver:yamahaAV:rx-a2060 (Type=Bridge, Status=ONLINE, Label=Yamaha Receiver, Bridge=null)
yamahareceiver:zone:rx-a2060:Main_Zone (Type=Thing, Status=UNINITIALIZED (HANDLER_CONFIGURATION_PENDING), Label=Yamaha Receiver Zone, Bridge=null)

As you see the discovered Main_Zone thing has the yamahaAV thing as a bridge assigned, the manual not. And if I look in the PaperUI, there is no Zone assigned for the manual configured Thing.

After figuring this out I tried to define the yamahaAV as the bridge for the Main_Zone like

Bridge yamahareceiver:yamahaAV:rx-a2060 [ HOST="RX-A2060.fritz.box" ]
{
  Thing yamahareceiver:zone:rx-a2060:Main_Zone [ HOST="RX-A2060.fritz.box"]
}

Now I get warnings in the log

Provide a thing type ID and a thing ID in this format:
 <thingTypeId> <thingId>

but the bridge is assigned.

receiver:zone:rx-a2060:Main_Zone (Type=Thing, Status=UNINITIALIZED (HANDLER_CONFIGURATION_PENDING), Label=Yamaha Receiver Zone, Bridge=yamahareceiver:yamahaAV:rx-a2060)

I still does not work and in the PaperUI is no zone assigned to the Main_Zone Thing.

Can anyone please send an example for a working .thing file.

Thanks a lot!

I have no idea about the thing syntax to be honest. But the thing doesn’t need a host configuration parameter but a “zone” instead. Main_Zone is the value in this case if I’m not mistaken.

Cheers David

Thanks David,

you are right …

Thing yamahareceiver:zone:rx-a2060:Zone_2 [ ZONE="Zone_2"]

applies e.g. the Zone_2 to the Thing. But it still has no Bridge assigned

yamahareceiver:zone:rx-a2060:Zone_2 (Type=Thing, Status=INITIALIZING, Label=Yamaha Receiver Zone, Bridge=null)

In YamahaReceiverBindingConstants.java i found those Config Parameters, that do not include BRIDGE:

    public static final String CONFIG_REFRESH = "REFRESH_IN_SEC";
    public static final String CONFIG_HOST_NAME = "HOST";
    public static final String CONFIG_HOST_PORT = "PORT";
    public static final String CONFIG_ZONE = "ZONE";
    public static final String CONFIG_RELVOLUMECHANGE = "RELVOLUMECHANGE";

How can I assign the receiverAV as the Bridge?

Thanks!

That didn’t look too bad actually:

Bridge yamahareceiver:yamahaAV:rx-a2060 [ HOST="RX-A2060.fritz.box" ]
{
  Thing yamahareceiver:zone:rx-a2060:Main_Zone [ ZONE="Main_Zone"]
}

but again the syntax should be explained somewhere. Is your fritzbox working as a dns resolver? Try to make it work with an IP first and then try a udn.

Cheers, David

Hi David,

it seems to work after restart. I get this message in the log, but it works …

18:41:43.068 [INFO ] [del.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model 'gaertner.things', using it anyway:
Provide a thing type ID and a thing ID in this format:
 <thingTypeId> <thingId>

I haven’t found a description of the right syntax. So if someone has a hint for me I really would appreciate it.

Many thanks!

Try a white space for the thing. Mainzone, spelling is not important, is the thing name in this case

Hey David,

same effect. For

Bridge yamahareceiver:yamahaAV:rx-a2060 [HOST="RX-A2060.fritz.box" ]
{
  yamahareceiver:zone:rx-a2060:Main_Zone [ZONE="Main_Zone"]
  yamahareceiver:zone:rx-a2060:Zone_2 [ZONE="Zone_2"]
  yamahareceiver:zone:rx-a2060:Zone_3 [ZONE="Zone_3"]
  yamahareceiver:zone:rx-a2060:Zone_4 [ZONE="Zone_4"]
}

I get this

23:51:47.415 [INFO ] [del.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model 'xxxxxx.things', using it anyway:
Provide a thing type ID and a thing ID in this format:
 <thingTypeId> <thingId>
Provide a thing type ID and a thing ID in this format:
 <thingTypeId> <thingId>
Provide a thing type ID and a thing ID in this format:
 <thingTypeId> <thingId>
Provide a thing type ID and a thing ID in this format:
 <thingTypeId> <thingId>

But it still works.

Thanks for your advices!

Best, Budo

I think they want you to leave out the last colons. You shouldn’t ignore the warning, because Openhab got stricter and stricter with parsing the user files with every version (which is a good think of course).

Cheers David

Bridge yamahareceiver:yamahaAV:wozi "Yamaha Receiver RX-V575" [HOST="my.yamaha.ip"] {
	Thing zone MainZone "Main Zone" [ZONE="Main_Zone"]
}

results in a bridge:
bridge
and a thing:
zone

2 Likes

Hey Udo,

amazing! This really works like a charm. Thank you so much! But where did you find the syntax. Did I oversaw it in the binding docs?

Best, Budo

Was kinda trial and error :slight_smile: but I already have another bridge/thing, so it was not too hard to guess :wink:

Again: Thanks @David_Graeff and @Udo_Hartmann for your help!