Home assistant yellow coral usb

Hi, anyone else with home assistant yellow having problems using frigate and google coral usb? I’m trying to decide if this is a hardware problem or software.

Hardware:
Home assistant Yellow Kit with Power Supply
1x Google coral usb
1x Sabrent USB 3.0 Hub Powered (model no. HB-UMP3 )

Other useful info
I’ve no other usb hardware attached. I transfered my installation from a backup but didn’t have frigate running previously. I installed the full access version of frigate with protection mode disabled.

I ran frigate on a backup raspberry pi 4 fresh install of home assistant and same google coral attached over night without any issues.

Thanks in advance for any help.

frigate log below:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[2022-11-03 19:08:32] frigate.app                    INFO    : Starting Frigate (0.11.1-2eada21)
[2022-11-03 19:08:32] frigate.app                    INFO    : Creating directory: /tmp/cache
Starting migrations
[2022-11-03 19:08:32] peewee_migrate                 INFO    : Starting migrations
There is nothing to migrate
[2022-11-03 19:08:32] peewee_migrate                 INFO    : There is nothing to migrate
[2022-11-03 19:08:32] detector.coral                 INFO    : Starting detection process: 216
[2022-11-03 19:08:32] ws4py                          INFO    : Using epoll
[2022-11-03 19:08:32] frigate.edgetpu                INFO    : Attempting to load TPU as usb
[2022-11-03 19:08:32] frigate.app                    INFO    : Output process started: 217
[2022-11-03 19:08:32] frigate.app                    INFO    : Camera processor started for front: 223
[2022-11-03 19:08:32] frigate.app                    INFO    : Capture process started for front: 225
[2022-11-03 19:08:33] ws4py                          INFO    : Using epoll
[2022-11-03 19:08:35] frigate.edgetpu                INFO    : TPU found
F driver/usb/usb_driver.cc:857] transfer on tag 2 failed. Abort. Deadline exceeded: USB transfer error 2 [LibUsbDataOutCallback]
Fatal Python error: Aborted
Thread 0x0000007fa7c801e0 (most recent call first):
  File "/usr/lib/python3.9/threading.py", line 312 in wait
  File "/usr/lib/python3.9/multiprocessing/queues.py", line 233 in _feed
  File "/usr/lib/python3.9/threading.py", line 892 in run
  File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner
  File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap
Thread 0x0000007fb424c010 (most recent call first):
  File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 833 in invoke
  File "/opt/frigate/frigate/edgetpu.py", line 83 in detect_raw
  File "/opt/frigate/frigate/edgetpu.py", line 159 in run_detector
  File "/usr/lib/python3.9/multiprocessing/process.py", line 108 in run
  File "/usr/lib/python3.9/multiprocessing/process.py", line 315 in _bootstrap
  File "/usr/lib/python3.9/multiprocessing/popen_fork.py", line 71 in _launch
  File "/usr/lib/python3.9/multiprocessing/popen_fork.py", line 19 in __init__
  File "/usr/lib/python3.9/multiprocessing/context.py", line 277 in _Popen
  File "/usr/lib/python3.9/multiprocessing/context.py", line 224 in _Popen
  File "/usr/lib/python3.9/multiprocessing/process.py", line 121 in start
  File "/opt/frigate/frigate/edgetpu.py", line 220 in start_or_restart
  File "/opt/frigate/frigate/edgetpu.py", line 189 in __init__
  File "/opt/frigate/frigate/app.py", line 217 in start_detectors
  File "/opt/frigate/frigate/app.py", line 360 in start
  File "/opt/frigate/frigate/__main__.py", line 16 in <module>
  File "/usr/lib/python3.9/runpy.py", line 87 in _run_code
  File "/usr/lib/python3.9/runpy.py", line 197 in _run_module_as_main
[2022-11-03 19:08:53] frigate.watchdog               INFO    : Detection appears to be stuck. Restarting detection process...
[2022-11-03 19:08:53] detector.coral                 INFO    : Starting detection process: 277
[2022-11-03 19:08:53] frigate.edgetpu                INFO    : Attempting to load TPU as usb
[2022-11-03 19:08:56] frigate.edgetpu                INFO    : TPU found
F driver/usb/usb_driver.cc:857] transfer on tag 2 failed. Abort. Deadline exceeded: USB transfer error 2 [LibUsbDataOutCallback]
Fatal Python error: Aborted
Thread 0x0000007f5ffff1e0 (most recent call first):
  File "/usr/lib/python3.9/threading.py", line 312 in wait
  File "/usr/lib/python3.9/multiprocessing/queues.py", line 233 in _feed
  File "/usr/lib/python3.9/threading.py", line 892 in run
  File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner
  File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap
Thread 0x0000007f7d7fa1e0 (most recent call first):
  File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 833 in invoke
  File "/opt/frigate/frigate/edgetpu.py", line 83 in detect_raw
  File "/opt/frigate/frigate/edgetpu.py", line 159 in run_detector
  File "/usr/lib/python3.9/multiprocessing/process.py", line 108 in run
  File "/usr/lib/python3.9/multiprocessing/process.py", line 315 in _bootstrap
  File "/usr/lib/python3.9/multiprocessing/popen_fork.py", line 71 in _launch
  File "/usr/lib/python3.9/multiprocessing/popen_fork.py", line 19 in __init__
  File "/usr/lib/python3.9/multiprocessing/context.py", line 277 in _Popen
  File "/usr/lib/python3.9/multiprocessing/context.py", line 224 in _Popen
  File "/usr/lib/python3.9/multiprocessing/process.py", line 121 in start
  File "/opt/frigate/frigate/edgetpu.py", line 220 in start_or_restart
  File "/opt/frigate/frigate/watchdog.py", line 34 in run
  File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner
  File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap
[2022-11-03 19:09:03] frigate.watchdog               INFO    : Detection appears to have stopped. Exiting frigate...
[2022-11-03 19:09:03] frigate.app                    INFO    : Stopping...
[2022-11-03 19:09:03] ws4py                          INFO    : Closing all websockets with [1001] 'Server is shutting down'
[2022-11-03 19:09:03] frigate.events                 INFO    : Exiting event cleanup...
[2022-11-03 19:09:03] frigate.record                 INFO    : Exiting recording cleanup...
[2022-11-03 19:09:03] frigate.watchdog               INFO    : Exiting watchdog...
[2022-11-03 19:09:03] frigate.stats                  INFO    : Exiting watchdog...
[2022-11-03 19:09:03] frigate.record                 INFO    : Exiting recording maintenance...
[2022-11-03 19:09:03] frigate.events                 INFO    : Exiting event processor...
[2022-11-03 19:09:04] frigate.object_processing      INFO    : Exiting object processor...
[2022-11-03 19:09:04] peewee.sqliteq                 INFO    : writer received shutdown request, exiting.
/usr/lib/python3.9/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 5 leaked shared_memory objects to clean up at shutdown
  warnings.warn('resource_tracker: There appear to be %d '
[cmd] python3 exited 0
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
1 Like

Does it need usb hub? Test without

EDIT

Definitely a power issue with Coral

Thanks for the reply. I’m not sure just assumed it does require powered hub. Tried your suggestion plugging it in direct no usb hub. It wasn’t found at first on restarting frigate so I rebooted home assistant and it picked it up. It ran ok for few minutes then stopped with the below log

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[2022-11-06 20:41:33] frigate.app                    INFO    : Starting Frigate (0.11.1-2eada21)
[2022-11-06 20:41:33] frigate.app                    INFO    : Creating directory: /tmp/cache
Starting migrations
[2022-11-06 20:41:33] peewee_migrate                 INFO    : Starting migrations
There is nothing to migrate
[2022-11-06 20:41:33] peewee_migrate                 INFO    : There is nothing to migrate
[2022-11-06 20:41:33] frigate.app                    INFO    : Output process started: 217
[2022-11-06 20:41:33] frigate.app                    INFO    : Camera processor started for front: 221
[2022-11-06 20:41:33] ws4py                          INFO    : Using epoll
[2022-11-06 20:41:33] frigate.app                    INFO    : Capture process started for front: 225
[2022-11-06 20:41:33] ws4py                          INFO    : Using epoll
[2022-11-06 20:41:33] detector.coral                 INFO    : Starting detection process: 216
[2022-11-06 20:41:33] frigate.edgetpu                INFO    : Attempting to load TPU as usb
[2022-11-06 20:41:36] frigate.edgetpu                INFO    : TPU found
F driver/usb/usb_driver.cc:857] transfer on tag 2 failed. Abort. Deadline exceeded: USB transfer error 2 [LibUsbDataOutCallback]
Fatal Python error: Aborted
Thread 0x0000007fa929d1e0 (most recent call first):
  File "/usr/lib/python3.9/threading.py", line 312 in wait
  File "/usr/lib/python3.9/multiprocessing/queues.py", line 233 in _feed
  File "/usr/lib/python3.9/threading.py", line 892 in run
  File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner
  File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap
Thread 0x0000007fb5869010 (most recent call first):
  File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 833 in invoke
  File "/opt/frigate/frigate/edgetpu.py", line 83 in detect_raw
  File "/opt/frigate/frigate/edgetpu.py", line 159 in run_detector
  File "/usr/lib/python3.9/multiprocessing/process.py", line 108 in run
  File "/usr/lib/python3.9/multiprocessing/process.py", line 315 in _bootstrap
  File "/usr/lib/python3.9/multiprocessing/popen_fork.py", line 71 in _launch
  File "/usr/lib/python3.9/multiprocessing/popen_fork.py", line 19 in __init__
  File "/usr/lib/python3.9/multiprocessing/context.py", line 277 in _Popen
  File "/usr/lib/python3.9/multiprocessing/context.py", line 224 in _Popen
  File "/usr/lib/python3.9/multiprocessing/process.py", line 121 in start
  File "/opt/frigate/frigate/edgetpu.py", line 220 in start_or_restart
  File "/opt/frigate/frigate/edgetpu.py", line 189 in __init__
  File "/opt/frigate/frigate/app.py", line 217 in start_detectors
  File "/opt/frigate/frigate/app.py", line 360 in start
  File "/opt/frigate/frigate/__main__.py", line 16 in <module>
  File "/usr/lib/python3.9/runpy.py", line 87 in _run_code
  File "/usr/lib/python3.9/runpy.py", line 197 in _run_module_as_main

Verify power to both pi and coral is good. Power supply may be providing too low current output creating this issue

Well the coral ran fine on a regular pi4 without usb hub so would say fault doesn’t lie there. I had a spare 12v DC 2A barrel jack plug but that’s same problem as before. I’ll need to look up how to safely test the power supply I’ve never done that before.

I’m not only person with this problem it seems. Found same fault being discussed on reddit [here] but no solution (https://www.reddit.com/r/homeassistant/comments/y0thjv/ha_yellow_users_any_luck_with_frigate_coral_usb/?sort=old)

1 Like

The HA Yellow likely doesn’t provide enough power via USB to run a Coral directly. Also, depending on the version of the CM4 you use with your Yellow, it could be interfering with the Coral as the Coral is susceptible to interference.
I have heard a few users having success with having the Coral 20 inches or so away from the Yellow, on a proper powered USB Hub with an extension cable back to the Yellow. Make sure your USB hub can supply the power though. Some cheap powered hubs don’t meet the USB specs and don’t give enough power. The Coral tends to like a bit of juice to run properly.
I would probably run Frigate and the Coral on a different device though. The CM4 is still just a Raspberry Pi device and not really recommended for Frigate. You can still use the Home Assistant integration and run Frigate stand alone on another machine.

@TomNook
i am currently also trying to get the coral usb to work on the home assistsant yellow in conjunction with frigate.
It is not even recognised in my case.
Do I have to install anything in advance, or is it enough to install the corresponding drivers with frigate?

I cannot install the libary the yellow say no such file or directory…

Is it finally working for you now?

What is the end verdict on this?
Is the Google Coral USB a dead cause on the HA Yellow even if you try and mitigate power via external usb hub or is it doable?

It seems I finally got my hands on a Coral but if this isn’t working I will have to return it (once I get it shipped)

I was about to test Coral USB on Yellow. Found this thread, then the next search was a blog from Nabu Casa stating that the M2 Coral was NOT compatible, but the USB was…

…However, if you still want to use the Coral accelerator, Home Assistant Yellow is compatible with the Coral USB accelerator stick, which requires a USB-C to USB Type A cable…

I got my coral the other day and I have been trying to run it via an powered usb hub and a extenstion cord to get it away from the Yellow since it apparantly gets intereference from it.

Currently, Frigate finds the TPU!

[2023-04-01 16:07:55] frigate.edgetpu INFO : TPU found

For that to work I need to run the “Frigate (Full Access)” and have “Protection Mode” turned off.
BUT, I am getting other crashes sadly:

[2023-04-01 16:14:04] frigate.edgetpu INFO : TPU found
F driver/usb/usb_driver.cc:857] transfer on tag 2 failed. Abort. Deadline exceeded: USB transfer error 2 [LibUsbDataOutCallback]
Fatal Python error: Aborted
Thread 0x0000007f577fe1e0 (most recent call first):
File “/usr/lib/python3.9/threading.py”, line 312 in wait
File “/usr/lib/python3.9/multiprocessing/queues.py”, line 233 in _feed
File “/usr/lib/python3.9/threading.py”, line 892 in run
File “/usr/lib/python3.9/threading.py”, line 954 in _bootstrap_inner
File “/usr/lib/python3.9/threading.py”, line 912 in _bootstrap
Thread 0x0000007f72ffd1e0 (most recent call first):
File “/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py”, line 833 in invoke
File “/opt/frigate/frigate/edgetpu.py”, line 83 in detect_raw
File “/opt/frigate/frigate/edgetpu.py”, line 159 in run_detector
File “/usr/lib/python3.9/multiprocessing/process.py”, line 108 in run
File “/usr/lib/python3.9/multiprocessing/process.py”, line 315 in _bootstrap
File “/usr/lib/python3.9/multiprocessing/popen_fork.py”, line 71 in _launch
File “/usr/lib/python3.9/multiprocessing/popen_fork.py”, line 19 in init
File “/usr/lib/python3.9/multiprocessing/context.py”, line 277 in _Popen
File “/usr/lib/python3.9/multiprocessing/context.py”, line 224 in _Popen
File “/usr/lib/python3.9/multiprocessing/process.py”, line 121 in start
File “/opt/frigate/frigate/edgetpu.py”, line 220 in start_or_restart
File “/opt/frigate/frigate/watchdog.py”, line 34 in run
File “/usr/lib/python3.9/threading.py”, line 954 in _bootstrap_inner
File “/usr/lib/python3.9/threading.py”, line 912 in _bootstrap
[2023-04-01 16:14:21] frigate.watchdog INFO : Detection appears to be stuck. Restarting detection process…
[2023-04-01 16:14:21] detector.coral INFO : Starting detection process: 471
[2023-04-01 16:14:21] frigate.edgetpu INFO : Attempting to load TPU as usb
[2023-04-01 16:14:24] frigate.edgetpu INFO : TPU found

Will see where I end up with this.

What are your frigate settings for detection?

Pretty basic.
Have tried the 0.12.0Beta version of frigate without any difference.
Initially I had five streams set up, all the same resolution, then it crashed more or less immediately on startup, if I run with one camera it manages for a couple of minutes (10+) before it gives up and throws the same error.

Have not increased the gpu_mem as recommended in the docs though ( Installation | Frigate ), havn’t found a way “in” with the Yellow to do that. Thinking of reinstalling the whole thing but I am not to keen on doing that.

Any advice/recommendations?

detectors:
coral:
type: edgetpu
device: usb
mqtt:
host: 192.0.0.1
user: mqtt-user
password: TopSecretPassword
cameras:
front:
ffmpeg:
global_args:
- -an
inputs:
- path: rtsp://192.0.0.2:7447/skjednAKJGYSE
roles:
- detect
- clips
detect:
width: 1024
height: 576
fps: 5
objects:
track:
- person
- car

any final verdict regarding hoas yellow and usb coral (w/ usb hub)?

1 Like

it doesn’t work. the PI4 simply doesn’t have enough power to run Frigate appropriately and the usb port doesn’t have enough juice to run it reliably. Avoid.

Prety sure its not a power issue but its a usb speed issue. HA yellow is usb 2.0