chore: no need for timezone in config, just set in ENV; update sample files and README

pull/106/head
Jeff Culverhouse 3 months ago
parent 9856760cd4
commit 40e235c2df

@ -44,7 +44,6 @@ It supports the following environment variables:
- `MEDIA_PATH` (optional) - path to store motion recordings (mp4) files
- `MEDIA_SOURCE` (optional) - HomeAssistant url for accessing those recordings (see config.yaml.sample)
- `TZ` (required, timezone identifier, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)
- `STORAGE_UPDATE_INTERVAL` (optional, default = 900) - how often to fetch storage stats (in seconds)
- `SNAPSHOT_UPDATE_INTERVAL` (optional, default = 60) - how often to fetch camera snapshot (in seconds)
@ -114,6 +113,13 @@ drwxrwxrwx 1 appuser appuser ... /media
Once configured correctly, you should see new recordings appear in your mounted folder with ownership 1000:1000 and a symlink to the latest file.
Also, make sure you have
```
environment:
- TZ=America/New_York
```
in your docker-compose if you want the recording filenames to by local time and not UTC.
## Out of Scope
### Non-Docker Environments

@ -34,6 +34,3 @@ amcrest:
media:
path: /media
media_source: media-source://media_source/local/videos
timezone: America/New_York
hide_ts: False

@ -9,8 +9,7 @@ services:
volumes:
- ./config:/config
environment:
- TZ=${TZ:-UTC}
- CONFIG_PATH=/config/config.yaml
- TZ=America/New_York
healthcheck:
test: ["CMD", "python3", "/app/src/healthcheck.py"]
interval: 60s

@ -59,8 +59,6 @@ class Base:
self.device_interval = self.config["amcrest"].get("device_interval", 30)
self.device_list_interval = self.config["amcrest"].get("device_list_interval", 300)
self.timezone = self.config["timezone"]
self.api_calls = 0
self.last_call_date = ""
self.rate_limited = False

@ -212,7 +212,6 @@ class HelpersMixin:
"amcrest": amcrest,
"debug": bool(config.get("debug", os.getenv("DEBUG", "").lower() == "true")),
"hide_ts": bool(config.get("hide_ts", os.getenv("HIDE_TS", "").lower() == "true")),
"timezone": str(config.get("timezone", os.getenv("TZ", "UTC"))),
"media": media,
"config_from": config_from,
"config_path": config_path,

Loading…
Cancel
Save