SOLVED-Sonos Binding Problems

HI,

I have enabled the sonos binding in paper ui, I got :

I have gone through endless tries so I decided to do the examples at:
openhab2/addons/binding/org.openhab.binding.sonos/

When I define the thing

Thing sonos:zoneplayer:1 [ udn="RINCON_949F3E002DE401400", refresh=60]

I get :

2017-02-10 15:43:37.915 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'sonos.things'
2017-02-10 15:43:37.926 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'sonos.things' is either empty or cannot be parsed correctly!
2017-02-10 15:43:37.931 [ERROR] [.core.internal.folder.FolderObserver] - Error handling update of file '/etc/openhab2/things/sonos.things': null.
java.lang.NullPointerException
	at org.eclipse.smarthome.model.thing.internal.GenericThingProvider.getAllThingUIDs(GenericThingProvider.java:929)[135:org.eclipse.smarthome.model.thing:0.9.0.201702010824]
	at org.eclipse.smarthome.model.thing.internal.GenericThingProvider.modelChanged(GenericThingProvider.java:884)[135:org.eclipse.smarthome.model.thing:0.9.0.201702010824]
	at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.notifyListeners(ModelRepositoryImpl.java:281)[124:org.eclipse.smarthome.model.core:0.9.0.201702010824]
	at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.addOrRefreshModel(ModelRepositoryImpl.java:136)[124:org.eclipse.smarthome.model.core:0.9.0.201702010824]
	at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.checkFile(FolderObserver.java:272)[124:org.eclipse.smarthome.model.core:0.9.0.201702010824]
	at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.access$1(FolderObserver.java:265)[124:org.eclipse.smarthome.model.core:0.9.0.201702010824]
	at org.eclipse.smarthome.model.core.internal.folder.FolderObserver$WatchQueueReader.processWatchEvent(FolderObserver.java:146)[124:org.eclipse.smarthome.model.core:0.9.0.201702010824]
	at org.eclipse.smarthome.core.service.AbstractWatchQueueReader.run(AbstractWatchQueueReader.java:122)[100:org.eclipse.smarthome.core:0.9.0.201702010824]
	at java.lang.Thread.run(Thread.java:745)[:1.8.0_65]
2017-02-10 15:43:37.975 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'sonos.things'
2017-02-10 15:43:38.094 [WARN ] [mon.registry.AbstractManagedProvider] - Could not update element with key sonos:zoneplayer:1 in ManagedThingProvider, because it does not exists.

What am I doing wrong here?

If you use Paper UI you don’t need to create a thing file. By doing this you’re creating two things.

You can’t use the nickname in the channel but in Paper UI you can hit the little boxes next to the channel name and it copies it to your clipboard if you use text item files.

HWhen looking at the binding page, Zoneplayer isn’t listed in the supported hardware.

http://docs.openhab.org/addons/bindings/sonos/readme.html

It looks like it’s called a CONNECT now. You might want to try that.

Hi,

I removed the thing from paper ui and put sonos thing definition in a .thing file as described in the link

I have rebooted openhab and a new thing is visible in paperui additionally another instance of same thing is in the inbox?

what I am wondering is that the thing created does not have all the channels which are described in the link above, but the one I posted above.

How can I list all the channels the sonos thing supports?

I completed 1-2-1 the sample from the link and I can now control sonos. I am one bid step forward to my success.
Still not knowing why I was yesterday was failing all the way.

Thank you for the support.

My last question: is it possible in the console or somewhere else to query channels a thing supports?

I’m not sure about that.

In Paper UI, the system automatically detects things that bindings create and puts them in the Inbox. From there you can either add it to your system or ignore it (or leave it there for future consideration).

When you create the .thing file, PaperUI also detected that. That is how you ended up with two things.

Personally, I just use the one created automatically and didn’t create a .thing file. I just use the channels that are associated with my “PaperUI thing”.

BTW, above the channel list there is a “More” located by a carrot symbol. It’s hard to tell, but clicking this expands the channel list. There are a TON more channels for Sonos than the first 6 or so shown.