Describe the problem you are having
Can't access WebUI - 502 bad gateway error
Repository has been added, and add-on installed. I have also installed the HACS integration. I tried to setup the normal integration (which is now showing up) but wasn't sure if I'm pointing to the right URL as I'm getting an error back on that.
Bigger issue seems to be with getting into the WebUI
Version
3.0.2
Swatch config file
# REQUIRED: Define a list of objects that are expected to be seen. These can be specific
# to one camera or common between many / all cameras
objects:
# REQUIRED: Name of the object
trash_can:
# REQUIRED: the list of color variants that this object can be detected as. Useful for
# different lighting conditions
color_variants:
# REQUIRED: the name of the color variant
default:
# REQUIRED: the lower R, G, B values that are considered a potential match for the
# color variant of the object.
color_lower: 70, 70, 0
# REQUIRED: the upper R, G, B values that are considered a potential match for the
# color variant of the object.
color_upper: 110, 100, 50
# OPTIONAL: the time range for when this color variant is allowed
# NOTE: make sure that /etc/localtime is passed to the container so it has valid time
time_range:
# OPTIONAL: Color variant is valid if current time is > this 24H time (Default: shown below).
after: "00:00"
# OPTIONAL: Color variant is valid if current time is < this 24H time (Default: shown below).
before: "24:00"
# OPTIONAL: the min number of pixels with R, G, B values within the bounds to be
# considered a true positive. This is recommended to be set as a super small amount
# could be a false positive. (Default: shown below)
min_area: 1000
# OPTIONAL: the max number of pixels with R, G, B values within the bounds to be
# considered a true positive (Default: shown below).
max_area: 100000
# REQUIRED: Define list of cameras that will be used for color detection.
cameras:
# REQUIRED: Name of the camera
GR:
# OPTIONAL: Frequency in seconds to run detection on the camera.
# a value of 0 disables auto detection (Default: shown below).
auto_detect: 0
# OPTIONAL: Configure the url and retention of snapshots. (Default: Shown Below)
snapshot_config:
# OPTIONAL: but highly recommended, setting the default url for a snapshot to be
# processed by this camera. This is required for auto detection (Default: none).
url: "http://ip.ad.dr.ess/jpg"
# OPTIONAL: Whether or not to draw bounding boxes for confirmed objects in the snapshots (Default: shown below).
bounding_box: true
# OPTIONAL: Whether or not to save a clean png of the snapshot along with the annotated jpg (Default: shown below).
clean_snapshot: true
# OPTIONAL: Whether or not to save the snapshots of confirmed detections (Default: shown below).
save_detections: true
# OPTIONAL: Whether or not to save the snapshots of missed detections (Default: shown below).
save_misses: false
# OPTIONAL: Variations of snapshots to keep. Options are all, mask, crop (Default: shown below).
mode: "all"
# OPTIONAL: Number of days of snapshots to keep (Default: shown below).
retain_days: 7
# REQUIRED: Zones are cropped areas where the object can be expected to be.
# This makes searching / matches for efficient and more predictable than searching
# the entire image.
zones:
# REQUIRED: Name of the zone.
street:
# REQUIRED: Coordinates to crop the zone by.
# NOTE: The order of the coordinates are: x, y, x+w, y+h starting in the top left corner as 0, 0.
coordinates: 225, 540, 350, 620
# REQUIRED: List of objects that may be in this zone. These correspond to
# the objects list defined previously and are matched by name.
objects:
- trash_can
Relevant log output
[2022-06-08 14:13:47,455]: INFO - Starting SwatchApp
[2022-06-08 14:13:47,464]: INFO - Importing SwatchApp Config
[2022-06-08 14:13:47,464]: INFO - Verified SwatchApp Config
Starting migrations
[2022-06-08 14:13:47,480]: INFO - Starting migrations
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/peewee.py", line 3113, in connect
self._state.set_connection(self._connect())
File "/usr/local/lib/python3.10/site-packages/peewee.py", line 3453, in _connect
conn = sqlite3.connect(self.database, timeout=self._timeout,
sqlite3.OperationalError: unable to open database file
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/peewee.py", line 3175, in execute_sql
cursor = self.cursor(commit)
File "/usr/local/lib/python3.10/site-packages/peewee.py", line 3159, in cursor
self.connect()
File "/usr/local/lib/python3.10/site-packages/peewee.py", line 3112, in connect
with __exception_wrapper__:
File "/usr/local/lib/python3.10/site-packages/peewee.py", line 2950, in __exit__
reraise(new_type, new_type(exc_value, *exc_args), traceback)
File "/usr/local/lib/python3.10/site-packages/peewee.py", line 191, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.10/site-packages/peewee.py", line 3113, in connect
self._state.set_connection(self._connect())
File "/usr/local/lib/python3.10/site-packages/peewee.py", line 3453, in _connect
conn = sqlite3.connect(self.database, timeout=self._timeout,
peewee.OperationalError: unable to open database file
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/opt/swatch/swatch/__main__.py", line 14, in <module>
swatch_app = SwatchApp()
File "/opt/swatch/swatch/app.py", line 44, in __init__
self.__init_db__()
File "/opt/swatch/swatch/app.py", line 74, in __init_db__
router.run()
File "/usr/local/lib/python3.10/site-packages/peewee_migrate/router.py", line 201, in run
diff = self.diff
File "/usr/local/lib/python3.10/site-packages/peewee_migrate/router.py", line 75, in diff
done = set(self.done)
File "/usr/local/lib/python3.10/site-packages/peewee_migrate/router.py", line 70, in done
return [mm.name for mm in self.model.select().order_by(self.model.id)]
File "/usr/local/lib/python3.10/functools.py", line 981, in __get__
val = self.func(instance)
File "/usr/local/lib/python3.10/site-packages/peewee_migrate/router.py", line 59, in model
MigrateHistory.create_table(True)
File "/usr/local/lib/python3.10/site-packages/peewee.py", line 6758, in create_table
cls._schema.create_all(safe, **options)
File "/usr/local/lib/python3.10/site-packages/peewee.py", line 5861, in create_all
self.create_table(safe, **table_options)
File "/usr/local/lib/python3.10/site-packages/peewee.py", line 5716, in create_table
self.database.execute(self._create_table(safe=safe, **options))
File "/usr/local/lib/python3.10/site-packages/peewee.py", line 3190, in execute
return self.execute_sql(sql, params, commit=commit)
File "/usr/local/lib/python3.10/site-packages/peewee.py", line 3174, in execute_sql
with __exception_wrapper__:
File "/usr/local/lib/python3.10/site-packages/peewee.py", line 2950, in __exit__
reraise(new_type, new_type(exc_value, *exc_args), traceback)
File "/usr/local/lib/python3.10/site-packages/peewee.py", line 191, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.10/site-packages/peewee.py", line 3175, in execute_sql
cursor = self.cursor(commit)
File "/usr/local/lib/python3.10/site-packages/peewee.py", line 3159, in cursor
self.connect()
File "/usr/local/lib/python3.10/site-packages/peewee.py", line 3112, in connect
with __exception_wrapper__:
File "/usr/local/lib/python3.10/site-packages/peewee.py", line 2950, in __exit__
reraise(new_type, new_type(exc_value, *exc_args), traceback)
File "/usr/local/lib/python3.10/site-packages/peewee.py", line 191, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.10/site-packages/peewee.py", line 3113, in connect
self._state.set_connection(self._connect())
File "/usr/local/lib/python3.10/site-packages/peewee.py", line 3453, in _connect
conn = sqlite3.connect(self.database, timeout=self._timeout,
peewee.OperationalError: unable to open database file
Any other information that may be helpful
No response
support config