JBL sound bars

Hey! I’ve found this thread (with no replies) regarding the same idea.

I’m able to have the basic media player interface with the JBL bar (e.g. I can toggle it and cast to it), but I was wondering if anyone is aware of any JBL integrations coming up?

Would be great to be able to select inputs, query the state, etc.

As a follow-up, I’ve found the following ports are at least open on the JBL Bar 9.1, though I’ve yet to find if they expose any kind of hidden API: 7000, 8008, 8009, 9000, 10001.

Any updates?

I ended up buying a Broadlink IR transmitter and control all the functionalities through that.

1 Like

Thanks for your response mate. I little off topic, if I may, but not much. Given that this bar needs some weird combos to get things done like: hold mute button for 3 seconds and then push the volume + button.

Do you find the broadling to be 100% reliable?

I used to use it with my bar and other stuff but I found it somewhat inconsistent. Maybe a 10% of the times it would fail to perfom complex sequences.

You’re welcome! You’re not off topic at all. I admit I have not tried these yet (I could report back in a week or so, when I have time to experiment with these myself).
A quick search online revealed to me that:

  • Boardlink products do not currently support the “long press” (or “hold”) function (see reddit)
  • There is no concept of “hold” in IR, it’s just multiple blocks sent over a period of time
  • As such, the common suggestion is to write scripts that send the instruction N times over M seconds, see e.g. here

I’ll try it out at some point and let you know :+1:

I managed to build a number of long press scripts for my Bar. I had one that turned the volume to whatever to 0 in a single command.

To do that, when in learning mode, just press the button the desired time and it’ll be stored.

Still, with single commands, do you find it 100% reliable? I’ve had problems with single commands too.

To do that, when in learning mode, just press the button the desired time and it’ll be stored.

Sweet! Have you had a chance to try and couple this with a button combo?

With single commands, I find it 100% reliable, given that there are no obstructions between the Broadlink and the bar.

I believe I did manage to build button combos with long presses, it was a long time ago though.

Sorry mate for so many questions, just one more. Do you have any reliability issues when you build button combos/sequences? I remember I had a 10% of fails more or less. If you have zero problems with sequences, how do you build them?

If I manage to get my broadlink to be 100% reliable I believe it’ll get out of the closet and go back to work again ^^

thanks again

I have not tried any button combos/sequences; any single press works flawlessly, so I can only assume any “normal” sequence (e.g. without those “press and hold X for 5 seconds or more then press Y”) would also work flawlessly.

If you have some specific combo in mind, I’ll be happy to check it out.

@obaldius
Sorry for the late reply.
I did not manage to hook up any button combos - sequences work fine though.

What’s the difference between a combo and a sequence?

Ah. A sequence being a series of instructions to the Broadlink (i.e. turn the speaker on, switch input, turn the volume all the way down, then turn the volume up to 5). The Broadlink did not miss a beat (relating to your question of reliability).

I did not manage to program/execute combos (hold mute for N seconds, then press volume+). I might’ve missed something though.

Could you provide a yaml example of both? Sorry mate, I still don’t get the difference…

Roughly something like this as scripts

  1. Trying combos
# Press and hold mute via the `hold_secs` or repeated presses
service: remote.send_command
data:
  command: mute
  device: JBL Bar 9.1
  # repeats with delays, i.e. 15 repeats with 0.2 delays ~ 3 seconds
  #num_repeats: 15
  #delay_secs: 0.2
  # Or this
  #hold_secs: 3
target:
  entity_id: remote.rm4_pro_remote

# Ensure remote execution finished
delay:
  hours: 0
  minutes: 0
  seconds: 3
  milliseconds: 0

# Volume up to finish the combo
service: remote.send_command
data:
  command: volume_up
  device: JBL Bar 9.1
target:
  entity_id: remote.rm4_pro_remote

This did not work, it ended up just muting (or muting and unmuting, depending on the combination I tried in the first step), and then volume up… which brought me to trying random sequences to test the reliability of more complicated sequences (that are not hold-and-release combos), such as:

  1. Sequences (e.g. set volume to 8)
# Set volume to 0 as a starting point
service: remote.send_command
data:
  command: volume_down
  device: JBL Bar 9.1
  # 20 volume_down will most likely set the volume to 0
  num_repeats: 20
  delay_secs: 0.1
target:
  entity_id: remote.rm4_pro_remote

# Wait for sequence to complete
delay:
  hours: 0
  minutes: 0
  seconds: 2
  milliseconds: 0

# Set volume to 8
service: remote.send_command
data:
  command: volume_up
  device: JBL Bar 9.1
  num_repeats: 8
  delay_secs: 0.1
target:
  entity_id: remote.rm4_pro_remote
1 Like

Hi @idantene, how did you setup thee basic media player integration with the bar?

Via Bluetooth or some other generic interface?

It’s been a while since I used that integration for the bar (since I got the Broadlink RM4), but I think it was via Google Cast.

I needed some functions so I decided to start searching after the API.
By sniffing the http requests that the app makes, it was possible make a full custom integration.
you can find it here: https://github.com/MrBearPresident/JBL_Soundbar .

You have to add it to the “custom integration” folder. This folder should be (created) in your config folder. Afterwards restart your home assistant and search for the integration.

Tried out your integration with my JBL Bar 9.1, but i am having troubles. Whenever tap a switch i get the following

Failed to perform the action switch/turn_off. Cannot connect to host 192.168.0.97:80 ssl:default [Connect call failed ('192.168.0.97', 80)]

ive confirmed this is the correct IP of the soundbar. Any ideas?

@MrBearPresident’s solution is for the JBL Bar 800 (which honestly looks like a new JBL Bar 9.1?). I guess that one exposes some API via WiFi. The JBL Bar 9.1 unfortunately does not.
The only way I’ve found around it is to use a IR controller (as mentioned, I’ve used the Broadlink RM4).