Bose SoundTouch Binding

hi @tiknx

One thing still, when I restart Openhab, the following error appears in the log:

[ERROR] [dtouch.handler.BoseSoundTouchHandler] - SoundTouch 300: Error during websocket communication: Cannot append to finished buffer
java.io.IOException: Cannot append to finished buffer
        at org.eclipse.jetty.websocket.common.message.SimpleTextMessage.appendFrame(SimpleTextMessage.java:47)[90:org.eclipse.jetty.websocket.common:9.2.19.v20160908]
        at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.appendMessage(AbstractEventDriver.java:61)[90:org.eclipse.jetty.websocket.common:9.2.19.v20160908]
        at org.eclipse.jetty.websocket.common.events.JettyListenerEventDriver.onTextFrame(JettyListenerEventDriver.java:122)[90:org.eclipse.jetty.websocket.common:9.2.19.v20160908]
        at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.incomingFrame(AbstractEventDriver.java:161)[90:org.eclipse.jetty.websocket.common:9.2.19.v20160908]
        at org.eclipse.jetty.websocket.common.WebSocketSession.incomingFrame(WebSocketSession.java:309)[90:org.eclipse.jetty.websocket.common:9.2.19.v20160908]
        at org.eclipse.jetty.websocket.common.extensions.ExtensionStack.incomingFrame(ExtensionStack.java:214)[90:org.eclipse.jetty.websocket.common:9.2.19.v20160908]
        at org.eclipse.jetty.websocket.common.Parser.notifyFrame(Parser.java:220)[90:org.eclipse.jetty.websocket.common:9.2.19.v20160908]
        at org.eclipse.jetty.websocket.common.Parser.parse(Parser.java:258)[90:org.eclipse.jetty.websocket.common:9.2.19.v20160908]
        at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.readParse(AbstractWebSocketConnection.java:632)[90:org.eclipse.jetty.websocket.common:9.2.19.v20160908]
        at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:480)[90:org.eclipse.jetty.websocket.common:9.2.19.v20160908]
        at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)[74:org.eclipse.jetty.io:9.2.19.v20160908]
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[85:org.eclipse.jetty.util:9.2.19.v20160908]
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[85:org.eclipse.jetty.util:9.2.19.v20160908]
        at java.lang.Thread.run(Thread.java:748)[:1.8.0_131]

hi @crax

You sending a String to the channel. But it must be an Integer

the other error. I have seen this in the other forum. I’ll have a look on it

Hi there,

I am trying to change the zone via HABPanel, using the item “Zone Control”. When using “Master; Members:MAC-Adress” I get the following error: “Got command “Master; Members:MAC-Adress” for channel zone control which is unhandled!” How do I have to set up the command?

Thanks for help!

I have updated the *.jar
There is now a channel to add and an other to remove

Hello everyone,

thank you for the great work with the binding and all the effort you put into it.
I am facing an issue with the implementation and maybe you guys can help out:
Everything worked out perfectly fine when I installed it a while ago. Suddenly it stopped working properly and I reinstalled the whole binding. My SoundTouch 130 was auto-discovered by the binding so I added it. Testing in PaperUI I am able to skip songs, pause and play and also change the volume. However, it will not deliver any track or artist information anymore, does not recognize any of the presets (neither can I save new ones on 7+), no Cover Image. Not even the Power Button will stay on “ON” and jump back to “OFF” although it’s playing music.

Some strange events from the log:

> 19:59:09.547 [INFO ] [marthome.event.ItemStateChangedEvent] - Bose130_Power changed from OFF to ON
> 19:59:12.663 [ERROR] [dtouch.handler.BoseSoundTouchHandler] - SoundTouch 130: Error during websocket communication: Keine Route zum Zielrechner
> java.net.NoRouteToHostException: Keine Route zum Zielrechner
> 19:59:12.680 [INFO ] [marthome.event.ItemStateChangedEvent] - Bose130_Power changed from ON to OFF
> 19:59:15.523 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'Bose130_Control' received command PLAY
> 19:59:15.541 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occured while calling handler: java.lang.NullPointerException
> java.util.concurrent.ExecutionException: java.lang.NullPointerException
> 20:06:48.788 [ERROR] [dtouch.handler.BoseSoundTouchHandler] - SoundTouch 130: Could not parse XML from string '<?xml version="1.0" encoding="UTF-8" ?><msg><header deviceID="689E195FE35B" url="presets" method="GET"><request requestID="0" msgType="RESPONSE"><info type="new" /></request></header><body><presets><preset id="1" createdOn="1486958050" updatedOn="1486958050"><ContentItem source="INTERNET_RADIO" location="531" sourceAccount="" isPresetable="true"><itemName>1LIVE</itemName><containerArt>http://item.radio456.com/007452/logo/logo-531.jpg</containerArt></ContentItem></preset><preset id="2" createdOn="1486958070" updatedOn="1486958070"><ContentItem source="INTERNET_RADIO" location="21907" sourceAccount="" isPresetable="true"><itemName>Radio 90.1 FM</itemName><containerArt>http://item.radio456.com/007452/logo/logo-21907.jpg</containerArt></ContentItem></preset><preset id="3" createdOn="1486960439" updatedOn="1486960439"><ContentItem source="SPOTIFY" type="uri" location="spotify:user:spotify:playlist:5FJXhjdILmRA2z5bvz4nzf" sourceAccount="**********" isPresetable="true"><itemName>Today&apos;s Top Hits</itemName><containerArt>https://u.scdn.co/images/pl/default/2a47bf7927ed1e14c9443d663281c6ce7c42ab9a</containerArt></ContentItem></preset><preset id="4" createdOn="1486960429" updatedOn="1486960429"><ContentItem source="SPOTIFY" type="uri" location="spotify:user:spotify_germany:playlist:53l91fS28MlRcdy1stqpum" sourceAccount="**********" isPresetable="true"><itemName>Covers Unplugged</itemName><containerArt>https://u.scdn.co/images/pl/default/1b1220d7de334f3521c8eb8b3558b47423cdacf7</containerArt></ContentItem></preset><preset id="5" createdOn="1486960421" updatedOn="1486960421"><ContentItem source="SPOTIFY" type="uri" location="spotify:user:spotify_germany:playlist:2vJPOFapYKv9AAdDgyjVRr" sourceAccount="**********" isPresetable="true"><itemName>Chillout Lounge</itemName><containerArt>https://u.scdn.co/images/pl/default/7cd8ecf2c8f639569b471ea0d9ca4a0ad749ea6b</containerArt></ContentItem></preset><preset id="6" createdOn="1486958191" updatedOn="1486960413"><ContentItem source="SPOTIFY" type="uri" location="spotify:user:spotify_germany:playlist:6EZHvQ4yH9TkUjHiOZsdOj" sourceAccount="**********" isPresetable="true"><itemName>Club Café</itemName><containerArt>https://u.scdn.co/images/pl/default/574ea43c8f5e1b57e82472b4af3f4d3bc3c60430</containerArt></ContentItem></preset></presets></body></msg>'; exception is: 
> 20:22:03.483 [ERROR] [dtouch.handler.BoseSoundTouchHandler] - SoundTouch 130: Could not parse XML from string '<updates deviceID="689E195FE35B"><nowPlayingUpdated><nowPlaying deviceID="689E195FE35B" source="SPOTIFY" sourceAccount="**********"><ContentItem source="SPOTIFY" type="uri" location="spotify:user:spotify:playlist:37i9dQZF1DX2rBR3X9E86S" sourceAccount="**********" isPresetable="true"><itemName>This Is: The Black Keys</itemName><containerArt>https://i.scdn.co/image/1d9366c906f55052bdd0755d8b9da1787b7e15b6</containerArt></ContentItem><track>Lonely Boy</track><artist>The Black Keys</artist><album>Lonely Boy</album><stationName></stationName><art artImageStatus="IMAGE_PRESENT">http://i.scdn.co/image/13c6daeb49d70c804351bd7a3e4d9b1fb1abd441</art><time total="193">0</time><skipEnabled /><playStatus>PLAY_STATE</playStatus><shuffleSetting>SHUFFLE_OFF</shuffleSetting><repeatSetting>REPEAT_OFF</repeatSetting><skipPreviousEnabled /><streamType>TRACK_ONDEMAND</streamType><trackID>spotify:track:3dOAXUx7I1qnzWzxdnsyB8</trackID></nowPlaying></nowPlayingUpdated></updates>'; exception is: 
> java.lang.NumberFormatException: null
1 Like

I noticed some problems after the last firmware update of my bst. I’ll have a look on it when i find some free time. Currrently i’m very busy

Hello,

sorry, but I’m totally new to the Bose SoundTouch stuff and I’m looking to get one of those speakers as they seem cheaper than Sonos (as far as I’ve seen).

Regarding the binding and interoperability with OpenHAB, if I understand correct, the binding works principally, but I’m unsure which speaker I should get for it. Is there any recommendation what to buy to have little hassle with it? Does a Bose SoundTouch10, e.g, work with it?

Thanks a lot.

Currently there is a problem with the binding. But in general SoundTouch10 works with the binding

1 Like

Hi @tiknx

as far as I understand it’s anyhow not yet available in the stable 2.1.0 OpenHAB but will be in 2.2.0. correct? Since I run the stable version of OpenHAB on my system I will anyhow have to wait for the 2.2.0 version and hopefully with that get the working binding.

Another question I have with it is: does it actually work as speaker for OpenHAB (i.e., can I also play sound files directly from, e.g., rules) or does OpenHAB only tell it “play on Spotify”?

Thanks a lot for your great work and effort on this.

The binding is not official at the moment, and it is not clear if it gets official anytime. But you can use it with OH2.1.0

To the other question. This is currently not possible, but it is on the TODO-List

1 Like

Thanks a lot @tiknx

→ I have similar issues.
I am using openHAB 2.1.0-1 (Release Build), and can control my bose ( sound touch 10 and SoundTouch Wireless Link Adapter), but Power button and volume just jumps back to “OFF” while music is still playing.

BR,
Michael

Need your help for an issue. I use Sound Touch Binding for basic speaker control (on-off, mute, volume, Preset). It works pretty well except for the bunch of error I get in the log every time I send a command.
First question: Is the information on that link is still accurate?

org.openhab.binding.bosesoundtouch/addons/binding/org.openhab.binding.bosesoundtouch at bosesoundtouch-master · marvkis/org.openhab.binding.bosesoundtouch · GitHub

For example, Player Control is defined as type String, but in my configuration I have to define it as type Player. If all this information is not accurate, I will need more info to fix the following error log:

2017-10-08 07:57:22.669 [ERROR] [dtouch.handler.BoseSoundTouchHandler] - SoundTouch 10: Could not parse XML from string ‘1.fm Bay Smooth Jazzhttp://item.radio456.com/007452/logo/logo-18318.jpg1.fm Bay Smooth Jazzhttp://item.radio456.com/007452/logo/logo-18318.jpgBUFFERING_STATEMP3 128 kbps Internet Only, The Bay's Smooth JazzInternet Only’; exception is:
java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:542) [?:?]
at java.lang.Integer.parseInt(Integer.java:615) [?:?]
at org.openhab.binding.bosesoundtouch.internal.XMLResponseHandler.startElement(XMLResponseHandler.java:342) [10:org.openhab.binding.bosesoundtouch:2.1.0.SNAPSHOT]
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509) [?:?]
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:374) [?:?]
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2784) [?:?]
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602) [?:?]
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112) [?:?]
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505) [?:?]
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841) [?:?]
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770) [?:?]
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) [?:?]
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213) [?:?]
at org.openhab.binding.bosesoundtouch.internal.XMLResponseProcessor.handleMessage(XMLResponseProcessor.java:41) [10:org.openhab.binding.bosesoundtouch:2.1.0.SNAPSHOT]
at org.openhab.binding.bosesoundtouch.handler.BoseSoundTouchHandler.onWebSocketText(BoseSoundTouchHandler.java:401) [10:org.openhab.binding.bosesoundtouch:2.1.0.SNAPSHOT]
at org.eclipse.jetty.websocket.common.events.JettyListenerEventDriver.onTextMessage(JettyListenerEventDriver.java:189) [94:org.eclipse.jetty.websocket.common:9.3.14.v20161028]
at org.eclipse.jetty.websocket.common.message.SimpleTextMessage.messageComplete(SimpleTextMessage.java:69) [94:org.eclipse.jetty.websocket.common:9.3.14.v20161028]
at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.appendMessage(AbstractEventDriver.java:66) [94:org.eclipse.jetty.websocket.common:9.3.14.v20161028]
at org.eclipse.jetty.websocket.common.events.JettyListenerEventDriver.onTextFrame(JettyListenerEventDriver.java:158) [94:org.eclipse.jetty.websocket.common:9.3.14.v20161028]
at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.incomingFrame(AbstractEventDriver.java:162) [94:org.eclipse.jetty.websocket.common:9.3.14.v20161028]
at org.eclipse.jetty.websocket.common.WebSocketSession.incomingFrame(WebSocketSession.java:376) [94:org.eclipse.jetty.websocket.common:9.3.14.v20161028]
at org.eclipse.jetty.websocket.common.extensions.ExtensionStack.incomingFrame(ExtensionStack.java:220) [94:org.eclipse.jetty.websocket.common:9.3.14.v20161028]
at org.eclipse.jetty.websocket.common.Parser.notifyFrame(Parser.java:220) [94:org.eclipse.jetty.websocket.common:9.3.14.v20161028]
at org.eclipse.jetty.websocket.common.Parser.parse(Parser.java:256) [94:org.eclipse.jetty.websocket.common:9.3.14.v20161028]
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.readParse(AbstractWebSocketConnection.java:679) [94:org.eclipse.jetty.websocket.common:9.3.14.v20161028]
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:511) [94:org.eclipse.jetty.websocket.common:9.3.14.v20161028]
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273) [78:org.eclipse.jetty.io:9.3.14.v20161028]
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) [78:org.eclipse.jetty.io:9.3.14.v20161028]
at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) [78:org.eclipse.jetty.io:9.3.14.v20161028]
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) [89:org.eclipse.jetty.util:9.3.14.v20161028]
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) [89:org.eclipse.jetty.util:9.3.14.v20161028]
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) [89:org.eclipse.jetty.util:9.3.14.v20161028]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) [89:org.eclipse.jetty.util:9.3.14.v20161028]
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) [89:org.eclipse.jetty.util:9.3.14.v20161028]
at java.lang.Thread.run(Thread.java:745) [?:?]

What should I do to fix : COULD NOT PARSE XML FROM STRING? My items are defined like this:

Switch Power_FF_living_Bose_10 “Power:” { channel=“bosesoundtouch:device:506583DC1B48:power” }
Dimmer Volume_FF_living_Bose_10 “Volume:” { channel=“bosesoundtouch:device:506583DC1B48:volume” }
Switch Mute_FF_living_Bose_10 “Mute:” <soundvolume_mute> { channel=“bosesoundtouch:device:506583DC1B48:mute” }
String OperationMode_FF_living_Bose_10 “OperationMode:” { channel=“bosesoundtouch:device:506583DC1B48:operationMode” }
Player PlayerControl_FF_living_Bose_10 “Player Control:” { channel=“bosesoundtouch:device:506583DC1B48:playerControl” }
Number Preset_FF_living_Bose_10 “Preset:” { channel=“bosesoundtouch:device:506583DC1B48:preset” }

Hi @tizaf / @cokefridge,

sorry for taking so long, im currently very busy. But never the less i’ve updated my soundtouch speakers today and resolved the issue with the “jumping” power button. Now it also displays and updates lots of status information again.

The lastest version is again available on https://github.com/marvkis/org.openhab.binding.bosesoundtouch-dist - give it a try.

Cheers,
Chris

2 Likes

HI @cailleute,

Thanks for the detailed feedback. The “COULD NOT PARSE XML FROM STRING” was related to some changes in the XML structure brought by the latest firmware update. The basic things should be fixed in the latest version. (see previous post) Please give it a try.

Never the less i’m not 100% sure if everything works correct now
 Feedback is appreciated :wink:

Cheers,
Chris

1 Like

Thank you for providing a solution although you are busy :slight_smile:
I will test it and provide feedback.

Best regards

Thanks @marvkis. Works well. No more garbage in the log and “jumping” power is fix. Currently I can’t change Preset anymore but I think it’s related to a number vs PRESET_x I must past to preset link. I will take a look at it, but for the moment, I’m very happy with this version.

hi @cailleute,

I just pushed a new version. Beside the “preset” thing there was a bug in xml generation that preventing the selected preset from coming active. It should work now with the latest version when sending a number to the “preset” channel. Depending on what version you had installed, it could be that the channels / things are in the old format (i.e. preset is defined as string) - the easiest would be to drop / delete the thing and rediscover it


On the openhab cli a smarthome send bosesoundtouch_device_<deviceId>_preset 2 should activate the stored preset


Cheers,
Chris

Thanks for the new version! Unfortunately, the ZoneAdd and ZoneRemove items I had in a previous version don’t appear anymore when discovering the speakers as new thing. Also manual configuration in item file failed. However, I can find again the ZoneControl item, but it didn’t work, though. See the following log snippet

21:13:18.729 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'Bose_WoZi_ZoneControl' received command Master; Members: WoZi, Kueche
21:13:18.735 [WARN ] [dtouch.handler.BoseSoundTouchHandler] - WoZi: Invalid / unknown device: "members:" in command Master; Members: WoZi, Kueche

@marvkis Am I using it wrong or is ZoneControl not supported yet? Thank you!

Hi @morizm,

there should be ZoneAdd and ZoneRemove with the latest version. ZoneControl is old and no longer supported.
I just double checked it here and it is working for me


Please double check the installed version and that there is no old version somewhere else:

sha256sum addons/org.openhab.binding.bosesoundtouch-2.1.0-SNAPSHOT.jar
93e92be6261df2882c7ae1c1812b58073b92c3afa8d00715bd2f4e64c63e306b

ZoneControl versions might have a -2.0.0-SNAPSHOT.jar


Cheers,
Chris