home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.86k stars 28.96k forks source link

Unifi Protect doorbell camera speaker plays audio sped up #111226

Open jaykm opened 4 months ago

jaykm commented 4 months ago

The problem

I have a UVC-G4 Doorbell Pro hooked up to Home Assistant, and when I play audio through it, it plays the file partially sped up. It seems to be kind of random which parts it speeds up, but this happens with both text to speech and prerecorded audio files uploaded to Home Assistant.

What version of Home Assistant Core has the issue?

core-2024.2.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Unifi Protect

Link to integration documentation on our website

https://www.home-assistant.io/integrations/unifiprotect/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 4 months ago

Hey there @angellusmortis, @bdraco, mind taking a look at this issue as it has been labeled with an integration (unifiprotect) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `unifiprotect` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign unifiprotect` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


unifiprotect documentation unifiprotect source (message by IssueLinks)

jaykm commented 4 months ago

https://github.com/home-assistant/core/assets/15637824/38b8bd6a-b8e8-47fc-9d31-ee493fade11f

There's an example

github-ha-team43-2024 commented 4 months ago

I have similar issues with G4 instant Cameras where I use the TTS output also.
I'm still investigating but it seems that a recent camera firmware update is the culprit. For me, the G4 instant firmware Version: UVC.v4.69.55.67.M_0bd144e.231222.1256 started outputting the bad audio. Downgrading to an older camera firmware, via the web interface of the camera, fixes the issue. I suggest you also open a case with Ubiquiti because my support case is not moving anywhere. It a bit difficult to troubleshoot because:

The Protect update (Protect 2.11.21)with the troublesome firmware was pushed out somewhere in Feb 2024. According to the release notes at https://community.ui.com/releases/UniFi-Protect-Application-2-11-21/f8d9a68e-0835-4453-b8b4-bb0a0748339d a number of "audio" improvements have been included in this release.

So, if you can, try with an older camera firmware and see if it fixes your problem

jaykm commented 4 months ago

I have similar issues with G4 instant Cameras where I use the TTS output also. I'm still investigating but it seems that a recent camera firmware update is the culprit. For me, the G4 instant firmware Version: UVC.v4.69.55.67.M_0bd144e.231222.1256 started outputting the bad audio. Downgrading to an older camera firmware, via the web interface of the camera, fixes the issue. I suggest you also open a case with Ubiquiti because my support case is not moving anywhere. It a bit difficult to troubleshoot because:

* ubiquiti does no longer publishes / releases separate firmware files but rather pushes them via the protect update

* my Protect auto-updates the camera firmware, even with all the settings to do that in a disabled state

* old firmware updates are discarded from the protect server, latest versions are automatically downloaded

The Protect update (Protect 2.11.21)with the troublesome firmware was pushed out somewhere in Feb 2024. According to the release notes at https://community.ui.com/releases/UniFi-Protect-Application-2-11-21/f8d9a68e-0835-4453-b8b4-bb0a0748339d a number of "audio" improvements have been included in this release.

So, if you can, try with an older camera firmware and see if it fixes your problem

Interesting, where can I get the firmware file so I can downgrade?

jaykm commented 4 months ago

Crap I keep accidentally closing it

github-ha-team43-2024 commented 4 months ago

Ubiquiti no longer publishes separate firmware files. Officially they are bundled with the Protect Updates. However, you may still find them on your Protect server/cloudkey if you are lucky. I got mine via a tip on reddit : https://www.reddit.com/r/Ubiquiti/comments/19c3kxu/unifi_protect_g4_instant_not_updating_firmware/

The camera firmware's are still somewhat downloadable if you know or can get help with the FIRMARENAME via https://fw-download.ubnt.com/data/uvc/FIRMWARENAME.bin

bradennapier commented 3 months ago

This appears to be related to the following note from Frigate/go2rtc: https://docs.frigate.video/configuration/camera_specific/#unifi-protect-cameras

In the Unifi 2.0 update Unifi Protect Cameras had a change in audio sample rate which causes issues for ffmpeg. The input rate needs to be set for record and rtmp if used directly with unifi protect.

spmfox commented 2 months ago

@github-ha-team43-2024 did your support case ever go anywhere? I finally got media setup and was excited to use this feature and boom hit this same problem.

I tested regular audio through the camera via the protect app - its pretty normal. So I'm not sure what I can even ask Ubiquiti if I open a ticket.

github-ha-team43-2024 commented 2 months ago

@spmfox Sending your own audio prompts from HA to the Protect Cameras is not a supported use case according to support.

Do not expect any action from Unifi until they have lots of similar unhappy customers complaining.

I'm currently staying on the last camera firmware that works, if you have already upgraded the protect application that comes with the breaking camera firmware then:

The cameras will automatically get the older firmware and media playback from HA will work again.

tmeekes commented 1 month ago

That's a frustrating solution. Came here after months of just dealing with the problem, just to find this. Unfortunate there doesn't seem to be much we can do about it, but definitely impeding some automations I setup cause all the audio comes out garbled 🤦‍♂️

github-ha-team43-2024 commented 1 month ago

That's a frustrating solution. Came here after months of just dealing with the problem, just to find this. Unfortunate there doesn't seem to be much we can do about it, but definitely impeding some automations I setup cause all the audio comes out garbled 🤦‍♂️

You can and probably should open a case with ubiquiti. Because as of last week only 2 people opened an incident with them, so the priority to do anything about the problem is low.

For the moment you can downgrade the firmware on the Cloudkey and thus the camera firmware to the last known working version via ssh.

apt install unifi-protect=2.10.11

and everything works again.