Adding Coral TPU (USB) to frigate APP

li_chang

Dabbler
Joined
May 31, 2017
Messages
35
Guess you are running truecharts version then? Not possible to use privileged mode on truenas version
And have you installed the Coral USB drivers on the truenas server or how does it recognize the coral device otherwise?

Edit: I havent tried to do it via launch docker image, just through the normal app install. How do I do it through launch docker image? Is there some guide somewhere to find out how that works? And does that fix the Coral USB driver issue then?

Hi,

The USB version is compatible with the widest variety of hardware and does not require a driver on the host machine (unless you're using M.2 version).

I'm willing to provide a guide. Are you using any GPU for hardware decoding?
 
Joined
Mar 22, 2020
Messages
61
It looks like they renamed it as "Custom App" after pressing "Discover App" button in "Apps" tab.
View attachment 73431
ok, will try to install it via launch docker. which github repository are you using that works? is it the latest of https://github.com/blakeblackshear/frigate
and does that solve the coral driver for truenas?

when listing the usb in truenas scale I can only see the following and I gues USB 2-7 should be the coral usb device:

admin@truenasscale[~]$ sudo dmesg | grep -i usb
[ 1.860151] ACPI: bus type USB registered
[ 1.861279] usbcore: registered new interface driver usbfs
[ 1.862353] usbcore: registered new interface driver hub
[ 1.863384] usbcore: registered new device driver usb
[ 1.873654] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 1
[ 1.875822] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 2
[ 1.875824] xhci_hcd 0000:00:14.0: Host supports USB 3.0 SuperSpeed
[ 1.875879] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.15
[ 1.879573] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.880087] usb usb1: Product: xHCI Host Controller
[ 1.880601] usb usb1: Manufacturer: Linux 5.15.131+truenas xhci-hcd
[ 1.881114] usb usb1: SerialNumber: 0000:00:14.0
[ 1.882305] hub 1-0:1.0: USB hub found
[ 1.884975] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.15
[ 1.885549] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.886560] usb usb2: Product: xHCI Host Controller
[ 1.887071] usb usb2: Manufacturer: Linux 5.15.131+truenas xhci-hcd
[ 1.887586] usb usb2: SerialNumber: 0000:00:14.0
[ 1.888207] hub 2-0:1.0: USB hub found
[ 2.144672] usb 1-8: new full-speed USB device number 2 using xhci_hcd
[ 2.294334] usb 1-8: New USB device found, idVendor=10c4, idProduct=ea60, bcdDevice= 1.00
[ 2.294912] usb 1-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2.295463] usb 1-8: Product: SkyConnect v1.0
[ 2.296007] usb 1-8: Manufacturer: Nabu Casa
[ 2.296551] usb 1-8: SerialNumber: 4ccd0d4e1941ed11810885a7ccf2b06c
[ 2.424656] usb 2-7: new SuperSpeed USB device number 2 using xhci_hcd
[ 2.448848] usb 2-7: LPM exit latency is zeroed, disabling LPM.
[ 2.449996] usb 2-7: New USB device found, idVendor=18d1, idProduct=9302, bcdDevice= 1.00
[ 2.450944] usb 2-7: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 5.400473] usbcore: registered new interface driver usbserial_generic
[ 5.402044] usbserial: USB Serial support registered for generic
[ 5.421173] usbcore: registered new interface driver cp210x
[ 5.421993] usbserial: USB Serial support registered for cp210x
[ 5.444619] usb 1-8: cp210x converter now attached to ttyUSB0
[ 65.867272] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
[ 74.024837] usb 1-8: reset full-speed USB device number 2 using xhci_hcd
[ 302.660945] usb 1-8: reset full-speed USB device number 2 using xhci_hcd
[ 302.816691] usb 1-8: cp210x converter now attached to ttyUSB0
[ 309.375723] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
[ 315.840851] usb 1-8: reset full-speed USB device number 2 using xhci_hcd
 
Last edited:

li_chang

Dabbler
Joined
May 31, 2017
Messages
35
Hi,

The USB version is compatible with the widest variety of hardware and does not require a driver on the host machine (unless you're using M.2 version).

I'm willing to provide a guide. Are you using any GPU for hardware decoding?
Yes, you're correct. 18d1:9302 is Google Coral USB.

I am using the one provided in their docs:
ghcr.io/blakeblackshear/frigate

Depending on whether you're using NVIDIA GPU for object detection, image tag will be stable or stable-tensorrt

I didn't face any USB issue since I deployed a long time ago. You can also follow my guide (it's not in English, can be translated via google though). If you're not using Home Assistant, you can ignore MQTT and Home Assistant setups.
 
Last edited:

simdim

Explorer
Joined
Mar 12, 2019
Messages
75
For what it is worth, I am starting to have second thoughts about Frigate object detection with Coral. I am feeding the same Reolink E1 Pro into frigate and HomeKit via Scrypted, and Homekit/Scripted gives me much better object tagging with almost no false positives. I know this is wrong forum for this conversation - just wanted voice that all frustration of making USB Coral to work is not really paying off ....
 

li_chang

Dabbler
Joined
May 31, 2017
Messages
35
For what it is worth, I am starting to have second thoughts about Frigate object detection with Coral. I am feeding the same Reolink E1 Pro into frigate and HomeKit via Scrypted, and Homekit/Scripted gives me much better object tagging with almost no false positives. I know this is wrong forum for this conversation - just wanted voice that all frustration of making USB Coral to work is not really paying off ....
Hi, are you using any hardware for decoding/object detection in Scrypted?
 

Krebsy

Cadet
Joined
Oct 26, 2023
Messages
8
Thinking about getting a few of these modules to add supplimental ML processing to the Dell R410 server I use as a host and then to run ML based apps/functions. Might be best to run them all via a Linux VM....
 
Joined
Mar 22, 2020
Messages
61
Today I upgraded to the Cobia release of Truenas from Bluefin and installed the TrueNAS Frigate app and it immediately found the Coral USB when specifying TPU in the configuration. Now I will try to replace my other Frigate version in HomeAssistant in the VM that does not recognize the Coral USB yet with this.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
if its possible to use the go2rtc ports 8554 outside the frigate app container?
Do you mean you want to publish the port(s) 8554 with another app than frigate on the same host?

Yes, you can do that if Frigate doesn't publish that port (and uses it internally in the container only).
 
Joined
Mar 22, 2020
Messages
61
Do you mean you want to publish the port(s) 8554 with another app than frigate on the same host?

Yes, you can do that if Frigate doesn't publish that port (and uses it internally in the container only).
no, the frigate app from truenas contains go2rtc and nginx included. I havent seen a way to expose the ports for go2rtc in the edit fields of the frigate app, or am i thinking wrong?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Well, the version I'm looking at seems to offer that option here:
1706825583504.png
 
Joined
Mar 22, 2020
Messages
61
But as far as i understand thats rtsp for frigate, go2rtc uses another port by default and at the moment frigate communicates with go2rtc inside the container with 127.0.0.1:port
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
thats rtsp for frigate, go2rtc uses another port by default and at the moment frigate communicates with go2rtc inside the container with 127.0.0.1:port
I have no idea if that's the case or not... perhaps a question for the maintainer of the app.

All i can see is that if you want RTSP to be advertised outside the container, you can tick that box and set the port there.

You may also try using Host networking... that way, all ports used by the container are open on the host.
 
Joined
Mar 22, 2020
Messages
61
I have no idea if that's the case or not... perhaps a question for the maintainer of the app.

All i can see is that if you want RTSP to be advertised outside the container, you can tick that box and set the port there.

You may also try using Host networking... that way, all ports used by the container are open on the host.
Aha, so by ticking host networking all ports are open, didnt now that. Are there any other negatives about using host networking?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Are there any other negatives about using host networking?
There can be... if that container was using ports internally that you already use for some apps (maybe something like 443), then that's going to cause a conflict.

I guess it can't hurt to try it, you can always stop the app and change it back.
 
Top