ChriD / node-raumkernel

A nodeJs lib for controlling the raumfeld multiroom system
MIT License
17 stars 7 forks source link

Add ability to change modes of the soundbar #26

Closed ChriD closed 7 years ago

ChriD commented 7 years ago

I do not owe a soundbar so i can not investigate this. I have to ask the RF developers or someone else has to tell me!

psandtner commented 7 years ago

Hello Christian, just stumbled across your work. I’m only an owner of a soundbar (and no RF developer) and I’m curious if I could help.

ChriD commented 7 years ago

Hi @psandtner. Thank you for your contribution. Maybe you can check if the mode/inputType of the soundbar can be switched via the Raumfeld App. (Android or IOS) If this is the case it should be possible for me to implement this in the kernel too.

Second I'd have to know which commands are beeing sent by the Raumfeld App to achieve the change of the modes. This is a tricky one because this would have to be sniffed via the network traffic. If you know how to sniff packets then i would appreciate if you can take a look. But if not, it's no problem because i have raised this question to a Raumfeld Developer. So maybe i will get answer soon.

psandtner commented 7 years ago

Hello Christan, I just played around with Charles and recorded switching of modes. (Arena, Stereo etc.) I’m a Charles newbie but I could send you some recordings. What do you think?

ChriD commented 7 years ago

Would be great! But are you sure "Charles" records communication between your phone and the soundbar? ( I think its only recording traffic from the PC where it runs on but i may be wrong)

psandtner commented 7 years ago

It definitively works. :-) I configured the network settings on my iPad to use my computer as a proxy. Then I configured Charles to only record http-communication with the IP of my soundbar. I opened the Settings of the Raumfeld-App, navigated to the speaker and switched several settings. I think the Charles-Log speaks for itself.

The "SoundbarDetails"-get methods return a HTML-Document that seems interesting to me...

SwitchSeveralSoundbarSettings.chls.zip

ChriD commented 7 years ago

Perfect! I'll investigate the log when im at home. But i already have seen some request which can be directly made to the raumfeld host. It's the "SetPlayerSetting" command. This helps me a lot. Thanks!

ChriD commented 7 years ago

i got some more informations:

Du kannst das via upnp umschalten. Es gibt im RenderingControlService der Soundbar (nicht der Zone) die Kommandos GetDeviceSetting und SetDeviceSetting. Mit GetDeviceSetting bekommst Du die aktuelle Einstellung (LineIn, OpticalIn, TV_ARC, Raumfeld) Der Name des Parameters ist immer “Source Select”

I'l try to implement the Get and SetDeviceSettings on the weekend to the kernel and create a request for the node-raumserver.

ChriD commented 7 years ago

@psandtner I am not sure if you use either the raumkernel or the raumserver ore none of them, but i now have implemented the SetDeviceSetting and GetDeviceSetting method on the renderer object.

So to switch the Input mode of the soundbar you may use the raumserver with a request. Here some samples with all the values i know:

10.0.0.10:8080/raumserver/controller/setDeviceSetting?id=Kitchen&key=Source Select&value=LineIn
10.0.0.10:8080/raumserver/controller/setDeviceSetting?id=Kitchen&key=Source Select&value=OpticalIn
10.0.0.10:8080/raumserver/controller/setDeviceSetting?id=Kitchen&key=Source Select&value=TV_ARC
10.0.0.10:8080/raumserver/controller/setDeviceSetting?id=Kitchen&key=Source Select&value=Raumfeld

10.0.0.10:8080/raumserver/controller/getDeviceSetting?id=Kitchen&key=Source Select
10.0.0.10:8080/raumserver/controller/getDeviceSetting?id=Kitchen&key=Audio Mode
...

You may event set other settings as the source with this request. e.g:

10.0.0.10:8080/raumserver/controller/setDeviceSetting?id=Kitchen&key=Audio Mode&value=Arena
10.0.0.10:8080/raumserver/controller/setDeviceSetting?id=Kitchen&key=Audio Mode&value=Voice
10.0.0.10:8080/raumserver/controller/setDeviceSetting?id=Kitchen&key=Audio Mode&value=Theater

or 10.0.0.10:8080/raumserver/controller/setDeviceSetting?id=Kitchen&key=Subwoofer X-Over&value=??? or 10.0.0.10:8080/raumserver/controller/setDeviceSetting?id=Kitchen&key=Subwoofer Playback Volume&value=???

If you do use the raumserver or the kernel itself i would appreciate if you can test this new requests or the methods on the renderer object. I am not able to do this because i do not have a soundbar.

psandtner commented 7 years ago

@ChriD Just tested all of the above. Seems to work perfectly. :1st_place_medal:

ChriD commented 7 years ago

Okay thats sounds good. I will have a look if the problem of the floating point is within the raumkernel. Not sure about that.

ChriD commented 7 years ago

It may be a bug but as the GetDeviceSettingis returning a string it may be on the rf side as well. Therfore i'll close this issue for now.