Bose SoundTouch API Integration

Hi Everybody,

I’m trying to get the Bose API integrated into my Vera… unfortunately without any luck…I was hoping if you guys could help me with this.

I’ve attached the Bose documentation

Hi,
something new on your project?
i would like to integrate it too :slight_smile:

greetings
martin

ok,
i found this code for the fibaro. but i still don`t know what to change that it is working with vera?

{“name”:“Bose”,“type”:“virtual_device”,“properties”:{“deviceIcon”:209,“currentIcon”:“209”,“log”:“”,“logTemp”:“”,“mainLoop”:“”,“visible”:“true”,“rows”:[{“type”:“button”,“elements”:[{“id”:1,“lua”:true,“waitForResponse”:false,“caption”:“Power”,“name”:“Button1”,“empty”:false,“msg”:“IP = fibaro:get(fibaro:getSelfId(), "IPAddress")\nTCP = fibaro:get(fibaro:getSelfId(), "TCPPort")\n\nBOSE = Net.FHttp(IP,TCP)-- mettre l’adresse ip de son soundtouch\nfibaro:log(‘POWER’)\n \n– method for key_value\npress = ‘<key state="press" sender="Gabbo">POWER’\nrelease = ‘<key state="release" sender="Gabbo">POWER’\nresponse ,status, errorCode = BOSE:POST(‘/key’, press)\nresponse ,status, errorCode = BOSE:POST(‘/key’, release)”,“buttonIcon”:209,“favourite”:false,“main”:true},{“id”:2,“lua”:true,“waitForResponse”:false,“caption”:“Mute”,“name”:“Button2”,“empty”:false,“msg”:“IP = fibaro:get(fibaro:getSelfId(), "IPAddress")\nTCP = fibaro:get(fibaro:getSelfId(), "TCPPort")\n\nBOSE = Net.FHttp(IP,TCP)-- mettre l’adresse ip de son soundtouch\nfibaro:log(‘MUTE’)\n \n– method for key_value\npress = ‘<key state="press" sender="Gabbo">MUTE’\nrelease = ‘<key state="release" sender="Gabbo">MUTE’\nresponse ,status, errorCode = BOSE:POST(‘/key’, press)\nresponse ,status, errorCode = BOSE:POST(‘/key’, release)”,“buttonIcon”:209,“favourite”:false,“main”:false}]},{“type”:“button”,“elements”:[{“id”:3,“lua”:true,“waitForResponse”:false,“caption”:“<”,“name”:“Button51”,“empty”:false,“msg”:“IP = fibaro:get(fibaro:getSelfId(), "IPAddress")\nTCP = fibaro:get(fibaro:getSelfId(), "TCPPort")\n\nBOSE = Net.FHttp(IP,TCP)-- mettre l’adresse ip de son soundtouch\nfibaro:log(‘PREV_TRACK’)\n \n– method for key_value\npress = ‘<key state="press" sender="Gabbo">PREV_TRACK’\nrelease = ‘<key state="release" sender="Gabbo">PREV_TRACK’\nresponse ,status, errorCode = BOSE:POST(‘/key’, press)\nresponse ,status, errorCode = BOSE:POST(‘/key’, release)”,“buttonIcon”:209,“favourite”:false,“main”:false},{“id”:4,“lua”:true,“waitForResponse”:false,“caption”:“>”,“name”:“Button52”,“empty”:false,“msg”:“IP = fibaro:get(fibaro:getSelfId(), "IPAddress")\nTCP = fibaro:get(fibaro:getSelfId(), "TCPPort")\n\nBOSE = Net.FHttp(IP,TCP)-- mettre l’adresse ip de son soundtouch\nfibaro:log(‘NEXT_TRACK’)\n \n– method for key_value\npress = ‘<key state="press" sender="Gabbo">NEXT_TRACK’\nrelease = ‘<key state="release" sender="Gabbo">NEXT_TRACK’\nresponse ,status, errorCode = BOSE:POST(‘/key’, press)\nresponse ,status, errorCode = BOSE:POST(‘/key’, release)”,“buttonIcon”:209,“favourite”:false,“main”:false},{“id”:5,“lua”:true,“waitForResponse”:false,“caption”:“-”,“name”:“Button53”,“empty”:false,“msg”:“IP = fibaro:get(fibaro:getSelfId(), "IPAddress")\nTCP = fibaro:get(fibaro:getSelfId(), "TCPPort")\n\nBOSE = Net.FHttp(IP,TCP)-- mettre l’adresse ip de son soundtouch\nfibaro:log(‘VOLUME_DOWN’)\n \n– method for key_value\npress = ‘<key state="press" sender="Gabbo">VOLUME_DOWN’\nrelease = ‘<key state="release" sender="Gabbo">VOLUME_DOWN’\nresponse ,status, errorCode = BOSE:POST(‘/key’, press)\nresponse ,status, errorCode = BOSE:POST(‘/key’, release)”,“buttonIcon”:209,“favourite”:false,“main”:false},{“id”:6,“lua”:true,“waitForResponse”:false,“caption”:“+”,“name”:“Button54”,“empty”:false,“msg”:“IP = fibaro:get(fibaro:getSelfId(), "IPAddress")\nTCP = fibaro:get(fibaro:getSelfId(), "TCPPort")\n\nBOSE = Net.FHttp(IP,TCP)-- mettre l’adresse ip de son soundtouch\nfibaro:log(‘VOLUME_UP’)\n \n– method for key_value\npress = ‘<key state="press" sender="Gabbo">VOLUME_UP’\nrelease = ‘<key state="release" sender="Gabbo">VOLUME_UP’\nresponse ,status, errorCode = BOSE:POST(‘/key’, press)\nresponse ,status, errorCode = BOSE:POST(‘/key’, release)”,“buttonIcon”:209,“favourite”:false,“main”:false}]},{“type”:“button”,“elements”:[{“id”:7,“lua”:true,“waitForResponse”:false,“caption”:“♬ Play/Pause ♬”,“name”:“Button55”,“empty”:false,“msg”:“IP = fibaro:get(fibaro:getSelfId(), "IPAddress")\nTCP = fibaro:get(fibaro:getSelfId(), "TCPPort")\n\nBOSE = Net.FHttp(IP,TCP)-- mettre l’adresse ip de son soundtouch\nfibaro:log(‘PLAY_PAUSE’)\n \n– method for key_value\npress = ‘<key state="press" sender="Gabbo">PLAY_PAUSE’\nrelease = ‘<key state="release" sender="Gabbo">PLAY_PAUSE’\nresponse ,status, errorCode = BOSE:POST(‘/key’, press)\nresponse ,status, errorCode = BOSE:POST(‘/key’, release)”,“buttonIcon”:209,“favourite”:false,“main”:false}]},{“type”:“button”,“elements”:[{“id”:8,“lua”:true,“waitForResponse”:false,“caption”:“1”,“name”:“Button31”,“empty”:false,“msg”:“IP = fibaro:get(fibaro:getSelfId(), "IPAddress")\nTCP = fibaro:get(fibaro:getSelfId(), "TCPPort")\n\nBOSE = Net.FHttp(IP,TCP)-- mettre l’adresse ip de son soundtouch\nfibaro:log(‘PRESET_1’)\n \n– method for key_value\npress = ‘<key state="press" sender="Gabbo">PRESET_1’\nrelease = ‘<key state="release" sender="Gabbo">PRESET_1’\nresponse ,status, errorCode = BOSE:POST(‘/key’, press)\nresponse ,status, errorCode = BOSE:POST(‘/key’, release)”,“buttonIcon”:209,“favourite”:false,“main”:false},{“id”:9,“lua”:true,“waitForResponse”:false,“caption”:“2”,“name”:“Button32”,“empty”:false,“msg”:“IP = fibaro:get(fibaro:getSelfId(), "IPAddress")\nTCP = fibaro:get(fibaro:getSelfId(), "TCPPort")\n\nBOSE = Net.FHttp(IP,TCP)-- mettre l’adresse ip de son soundtouch\nfibaro:log(‘PRESET_2’)\n \n– method for key_value\npress = ‘<key state="press" sender="Gabbo">PRESET_2’\nrelease = ‘<key state="release" sender="Gabbo">PRESET_2’\nresponse ,status, errorCode = BOSE:POST(‘/key’, press)\nresponse ,status, errorCode = BOSE:POST(‘/key’, release)”,“buttonIcon”:209,“favourite”:false,“main”:false},{“id”:10,“lua”:true,“waitForResponse”:false,“caption”:“3”,“name”:“Button33”,“empty”:false,“msg”:“IP = fibaro:get(fibaro:getSelfId(), "IPAddress")\nTCP = fibaro:get(fibaro:getSelfId(), "TCPPort")\n\nBOSE = Net.FHttp(IP,TCP)-- mettre l’adresse ip de son soundtouch\nfibaro:log(‘PRESET_3’)\n \n– method for key_value\npress = ‘<key state="press" sender="Gabbo">PRESET_3’\nrelease = ‘<key state="release" sender="Gabbo">PRESET_3’\nresponse ,status, errorCode = BOSE:POST(‘/key’, press)\nresponse ,status, errorCode = BOSE:POST(‘/key’, release)”,“buttonIcon”:209,“favourite”:false,“main”:false}]},{“type”:“button”,“elements”:[{“id”:11,“lua”:true,“waitForResponse”:false,“caption”:“4”,“name”:“Button41”,“empty”:false,“msg”:“IP = fibaro:get(fibaro:getSelfId(), "IPAddress")\nTCP = fibaro:get(fibaro:getSelfId(), "TCPPort")\n\nBOSE = Net.FHttp(IP,TCP)-- mettre l’adresse ip de son soundtouch\nfibaro:log(‘PRESET_4’)\n \n– method for key_value\npress = ‘<key state="press" sender="Gabbo">PRESET_4’\nrelease = ‘<key state="release" sender="Gabbo">PRESET_4’\nresponse ,status, errorCode = BOSE:POST(‘/key’, press)\nresponse ,status, errorCode = BOSE:POST(‘/key’, release)”,“buttonIcon”:209,“favourite”:false,“main”:false},{“id”:12,“lua”:true,“waitForResponse”:false,“caption”:“5”,“name”:“Button42”,“empty”:false,“msg”:“IP = fibaro:get(fibaro:getSelfId(), "IPAddress")\nTCP = fibaro:get(fibaro:getSelfId(), "TCPPort")\n\nBOSE = Net.FHttp(IP,TCP)-- mettre l’adresse ip de son soundtouch\nfibaro:log(‘PRESET_5’)\n \n– method for key_value\npress = ‘<key state="press" sender="Gabbo">PRESET_5’\nrelease = ‘<key state="release" sender="Gabbo">PRESET_5’\nresponse ,status, errorCode = BOSE:POST(‘/key’, press)\nresponse ,status, errorCode = BOSE:POST(‘/key’, release)”,“buttonIcon”:209,“favourite”:false,“main”:false},{“id”:13,“lua”:true,“waitForResponse”:false,“caption”:“6”,“name”:“Button43”,“empty”:false,“msg”:“IP = fibaro:get(fibaro:getSelfId(), "IPAddress")\nTCP = fibaro:get(fibaro:getSelfId(), "TCPPort")\n\nBOSE = Net.FHttp(IP,TCP)-- mettre l’adresse ip de son soundtouch\nfibaro:log(‘PRESET_6’)\n \n– method for key_value\npress = ‘<key state="press" sender="Gabbo">PRESET_6’\nrelease = ‘<key state="release" sender="Gabbo">PRESET_6’\nresponse ,status, errorCode = BOSE:POST(‘/key’, press)\nresponse ,status, errorCode = BOSE:POST(‘/key’, release)”,“buttonIcon”:209,“favourite”:false,“main”:false}]},{“type”:“button”,“elements”:[{“id”:14,“lua”:true,“waitForResponse”:false,“caption”:“Aux”,“name”:“Button61”,“empty”:false,“msg”:“IP = fibaro:get(fibaro:getSelfId(), "IPAddress")\nTCP = fibaro:get(fibaro:getSelfId(), "TCPPort")\n\nBOSE = Net.FHttp(IP,TCP)-- mettre l’adresse ip de son soundtouch\nfibaro:log(‘AUX_INPUT’)\n \n– method for key_value\npress = ‘<key state="press" sender="Gabbo">AUX_INPUT’\nrelease = ‘<key state="release" sender="Gabbo">AUX_INPUT’\nresponse ,status, errorCode = BOSE:POST(‘/key’, press)\nresponse ,status, errorCode = BOSE:POST(‘/key’, release)”,“buttonIcon”:209,“favourite”:false,“main”:false}]}]},“actions”:{“pressButton”:1,“setSlider”:2,“setProperty”:2}}

Well, its a start. Do you have clean code? or code files? this is just a text dump (unreadable) ???

Attached a more readable file. I’ve tried to figure out on how to get this into a virtual device in Vera. But simply don’t got the coding skills

Hopefully somebody here at the forum can help us? ??

ive found it on this page: https://forum.fibaro.com/index.php?/topic/20752-bose-virtual-device-onoff-button/#comment-83394 ive tried to attache the file from there, but the type is not allowed here…

would be great for use with echo dot :slight_smile:

I got the following XML from my Bose using the Vera UPNP.

Ok, did some coding based on some examples. Its not the most clean code, but it works within my Vera (within scenes only)

Its not much, but at least you can get the “Now Playing” XML in to variable. This is for me handy to run within scenes. Feel free to extend with additional GET information and maybe even POST commands.

Creating a full plugin within Vera is in my opinion to complex, I just don’t get :slight_smile:

Hopefully somebody can pick it up and help us with this to extend and create a plugin

hi. i am waiting for vera to support this. this is already supported by smart things hub, any chance that vera can put more effort here