Closed MrLuis closed 3 years ago
Are you using an external USB hub with it's own power supply?
It's own power supply... I forgot to mention that Raspberry is booting from USB (Sata) drive... So I have 2 USB connection, one for the boot, one for the Coral TPU.
See unreleased docs update here: https://github.com/blakeblackshear/frigate/blob/release-0.9.0/docs/docs/installation.md#raspberry-pi-34
Oh Snap!!! I'll order the USB hub tonite!
One quick question, the link on the documentation points to a USB Hub that connects to the Host with a USB-C connection. Will that power my Raspberry too? Or should I order the one that connects to the host thru a USB-3.0)?
or
Any suggestion on the USB connection? (previous post)
You will connect to the USB3 port on the Pi and plug the power in separately. I would keep powering the Pi with it's own power supply.
I finally got around to place the order. Should we close this issue, or wait until I test with the USB Hub? I'm open to either one!
Just set up the USB Hub, and reboot without a problem. Boot fine (from external USB-SATA drive, and TPU found with no modifications need it... now it's a matter of waiting...
* Starting nginx nginx
...done.
frigate.app INFO : Creating directory: /tmp/cache
Starting migrations
peewee_migrate INFO : Starting migrations
There is nothing to migrate
peewee_migrate INFO : There is nothing to migrate
frigate.mqtt INFO : MQTT connected
detector.coral INFO : Starting detection process: 37
frigate.edgetpu INFO : Attempting to load TPU as usb
frigate.app INFO : Camera processor started for door_cam: 40
frigate.app INFO : Camera processor started for garage_cam: 42
frigate.app INFO : Camera processor started for front_cam: 43
frigate.app INFO : Capture process started for door_cam: 44
frigate.app INFO : Capture process started for garage_cam: 47
frigate.app INFO : Capture process started for front_cam: 48
frigate.edgetpu INFO : TPU found
Just for reference, this is the hub I got.
https://www.amazon.com/gp/product/B0838STJDJ/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1
Unfortunately, it happened again... This time I couldn't get the log, since the full system was unresponsive. I checked the CPU history, and this seems to happened w around 5 am (eastern time). But since I had to restart the system the log on Frigate was reset. :(
Be aware that I couldn't make the memory modification because Hassio does not provide direct access to the config file... I'm considering to change home assistant to a Supervise version. But not sure if it will have any impact on this issue. It will suc$s if I go thru that process to end up in the same place.
You can take the sd card out and modify it with a card reader.
Got it again. This time I was able to get the log...
rv = self.preprocess_request()
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2242, in preprocess_request
rv = func()
File "/opt/frigate/frigate/http.py", line 89, in _db_connect
database.connect()
File "/usr/local/lib/python3.8/dist-packages/peewee.py", line 3061, in connect
raise OperationalError('Connection already opened.')
peewee.OperationalError: Connection already opened.
2021-09-18T00:05:44Z {'REMOTE_ADDR': '127.0.0.1', 'REMOTE_PORT': '45646', 'HTTP_HOST': 'ccab4aaf-frigate', (hidden keys: 24)} failed with OperationalError
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/flask_sockets.py", line 40, in __call__
handler, values = adapter.match()
File "/usr/local/lib/python3.8/dist-packages/werkzeug/routing.py", line 1945, in match
raise NotFound()
werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/gevent/pywsgi.py", line 999, in handle_one_response
self.run_application()
File "/usr/local/lib/python3.8/dist-packages/geventwebsocket/handler.py", line 87, in run_application
return super(WebSocketHandler, self).run_application()
File "/usr/local/lib/python3.8/dist-packages/gevent/pywsgi.py", line 945, in run_application
self.result = self.application(self.environ, self.start_response)
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2464, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python3.8/dist-packages/flask_sockets.py", line 48, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2450, in wsgi_app
response = self.handle_exception(e)
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1867, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.8/dist-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.8/dist-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1948, in full_dispatch_request
rv = self.preprocess_request()
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2242, in preprocess_request
rv = func()
File "/opt/frigate/frigate/http.py", line 89, in _db_connect
database.connect()
File "/usr/local/lib/python3.8/dist-packages/peewee.py", line 3061, in connect
raise OperationalError('Connection already opened.')
peewee.OperationalError: Connection already opened.
2021-09-18T00:05:49Z {'REMOTE_ADDR': '127.0.0.1', 'REMOTE_PORT': '45678', 'HTTP_HOST': 'ccab4aaf-frigate', (hidden keys: 24)} failed with OperationalError
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/flask_sockets.py", line 40, in __call__
handler, values = adapter.match()
File "/usr/local/lib/python3.8/dist-packages/werkzeug/routing.py", line 1945, in match
raise NotFound()
werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/gevent/pywsgi.py", line 999, in handle_one_response
self.run_application()
File "/usr/local/lib/python3.8/dist-packages/geventwebsocket/handler.py", line 87, in run_application
return super(WebSocketHandler, self).run_application()
File "/usr/local/lib/python3.8/dist-packages/gevent/pywsgi.py", line 945, in run_application
self.result = self.application(self.environ, self.start_response)
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2464, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python3.8/dist-packages/flask_sockets.py", line 48, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2450, in wsgi_app
response = self.handle_exception(e)
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1867, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.8/dist-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.8/dist-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1948, in full_dispatch_request
rv = self.preprocess_request()
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2242, in preprocess_request
rv = func()
File "/opt/frigate/frigate/http.py", line 89, in _db_connect
database.connect()
File "/usr/local/lib/python3.8/dist-packages/peewee.py", line 3061, in connect
raise OperationalError('Connection already opened.')
peewee.OperationalError: Connection already opened.
2021-09-18T00:05:54Z {'REMOTE_ADDR': '127.0.0.1', 'REMOTE_PORT': '45690', 'HTTP_HOST': 'ccab4aaf-frigate', (hidden keys: 24)} failed with OperationalError
This is fixed in the upcoming 0.9.0 release.
Update. Since I added the hub, Hassio no longer crashes... Frigate still gives me the error, but stability definitely improved. I'm planning to move to a Supeised version of hassio sometime next week. I feel (personal opinion) it's easy to update OS setting, plus I can use the hardware a bit more. Right now, the CPU usage is around 25%, Memory is 20%, and disk usage around 5%... I'm planning to setup nextcloud around it later on (after moving to Supervised).
Luis
Update... After the update for 2.0 HassIO has not frozen. I had to restart the Frigate service a few times, but I was messing with the configuration (learning the changes on the config). Once everything is set up, it seems stable.
Note: I was able to finally change the gpu_mem by using an alternate sd card temporarily, and once is done, the CPU average usage goes down from 35 to around 22%.
Thanks!
Describe the bug At least once a day, Frigate becomes unresponsive... If I restart it within a certain time, it works fine... If I don't, then HASSIO becomes unresponsive too... when this happens, I end up doing a hard restart (unplug the power).
If I stop the Frigate service, HASSIO runs fine for days.
Be aware that I have NodeRed doing notifications that request snapshots (to be displayed in notifications). The configuration is at the bottom.
Thanks, Luis
Version of frigate Output from
/api/version
0.8.4-5043040Config file
Frigate container logs
Frigate stats Internal Server Error (when crash).... after I restarted it was...
FFprobe from your camera
Run the following command and paste output below
Screenshots If applicable, add screenshots to help explain your problem.
Computer Hardware
OS: HASSIO
Install method: Addon
Virtualization: NA
Coral Version: USB
Network Setup: Wired to my network (cameras are wifi)
Manufacturer: Amcrest Pro (2 cameras)
Model: Pro 1080
Resolution: 1080P (however detection is using 640 stream)
FPS: 5 (both sides camera and Frigate)
Manufacturer: Amcrest 1080P Video Doorbell
Model: 1080P Video Doorbell
Resolution: 1080P
FPS: 5 on Frigate, but don't know how to change on camera
Additional context Add any other context about the problem here. I have a few NodeRed flows that sends me notification and that makes URL reference to the API for snapshot.jpg