-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No Soundbar Pairing #4
Comments
The soundbar starts playing a sound so it's definitely in pairing mode and expecting a response. I've managed to get PAIRING_DENIED by assuming the pin is default 0s:
But it's inconsistent. Most of the time I get CHALLENGE_INCORRECT |
How does pairing work in the official app with a soundbar? Someone asked about soundbar pairing on the api docs and never responded. |
It plays a sound and then you press the volume up button on the sound bar to confirm. |
@arthurlt This is incorrect. Pushing volume up increases the volume of the pairing noise the soundbar starts to make. You need a pin to finish pairing using pyvizio. |
@arthurlt oh wow, my bad! Sorry about that |
I managed to figure this out from another post on GitHub, use the pin |
@paulcbetts What model soundbar are you using? I tried using zeroes as the pin previously and had no luck.
EDIT: Ignore that! Turns out you need to push the volume up button on the soundbar once after it starts beeping. Then you can run |
I don't have soundbar unfortunately, so can't test myself. |
@vkorn Can confirm. Begin the pairing process like normal, tap the physical Volume Up button on the soundbar, then use |
I can confirm that this method works for my soundbar as well. However, at least for the model soundbar that I have, an auth token is not required to control any function of the speaker. All of the functionality I need (power, volume/mute, source selection) works without supplying an auth token. In addition, most of the TV API endpoints and remote codes don't work for the SmartCast speakers. I created a separate library for them so I could integrate my soundbar into Home Assistant. This is still somewhat of a work in progress and I haven't quite figured out how direct volume selection works (partially works, but only accepts values up to 10), but most of the functionality is there and the hass component is working. |
@jeradM Maybe once you get this working we can just get this merged into pyvizio as a related API? Then move up the stack and fix up the Home Assistant integration to expose a separate component that uses the new pyvizio API. I'm also in this for the Home Assistant Integration (and specifically, the volume setting) |
I got success to obtain my access token using : https://github.com/exiva/Vizio_SmartCast_API |
I built this: https://github.com/raman325/pyviziosoundbar It's essentially a fork of pyvizio with auth removed and the key mappings updated. I made some small tweaks that didn't affect functionality as I was trying to reverse engineer the code. If we wanted to merge these changes into pyvizio as @paulcbetts suggested, here's how I was thinking it could be done:
For the vizio component in HA, we could do the same thing triggered by a new optional config parameter for device type. There may be some other changes there (I can't figure out how to skip forward or back so those commands would not be supported until someone finds the right keys, and in testing, the volume options go from 0-31 instead of 0-100 so may have to adjust the volume command). Thoughts? The alternative is to figure it out based on the model (mine is SmartCast Sound Bar 4031-D5) but I would need help verifying that "Sound Bar" is included in the model for all of their sound bars. @vkorn would like to hear your thoughts since you manage the package and would need to approve a PR with these changes. I'd be happy to do the work since I have most of the sound bar specific work done and have an idea in my head of what changes I'd need to make to build what I proposed |
Decided to give it a shot and submitted this draft PR: #18 Let me know if you have any feedback |
PR was approved so this shouldn't be an issue anymore if you specify the right device type. See the updated docs |
I successfully paired my Vizio TV, but can't seem to get my SmartCast Sound Bar 3821-D6. It has no display and no way to get a PIN.
The text was updated successfully, but these errors were encountered: