Skip to content

Commit

Permalink
Autodeletion of saved images/videos, various bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MrSleeps committed Feb 16, 2024
1 parent 5c59d68 commit 9e54959
Show file tree
Hide file tree
Showing 21 changed files with 3,198 additions and 2,922 deletions.
10 changes: 0 additions & 10 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,3 @@
# No / at the end please!
timelapseURL = "http://your.host"
timelapsePort = "8500"
# Comma seperated list of your cameras, no spaces please!
cameras = "camera1,camera2,camera3"
# The URL of your frigate install
frigateBaseURL = "https://your.frigate.url"
setLapseSeconds = 30
# The URL of your Home Assistant
homeAssistantURL = "https://your.homeassistant.url"
# Your Home Assistant Webook
homeAssistantToken = "Your Home Asssitant API Token"
postToHomeAssistant = 1;
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,28 @@ If you are using the Home Assistant post back doobrie you will need to fill out

Click save and off you go!

If you don't trust a web interface to set it up and prefer to do it the old school way by editing a text file you can also do that. Fire up your trusty text editor, copy and paste in the following and edit it to suit your needs.

```
{
"needsSetup": 0,
"frigateURL": "https://your.frigate.host",
"frigateCameras": "camera1,camera2,camera3",
"hassURL": "https://your.hass.host",
"hassWebhook": "",
"usingHomeAssistant": 0,
"timeLapseSeconds": 16,
"keepImagesMinutes":60,
"keepVideosDays":1
}
```

Edit docker-compose.yml and add the following line to the **volumes** section:

```
- /path/to/the/config.json:/app/data/config.json
```

## Generating a timelapse

If you want to generate a timelapse you need to call (via a GET call) the url **/:camera/timelapse/:hass/:json** with the variables changed. What you set will generate different views.
Expand All @@ -136,4 +158,4 @@ And finally, if you wanted to return a json which you can use in some other webp

Generating the timelapse takes some time, it's not an instant thing. Obviously the faster the host system is the quicker it will be.

It's very much written for my needs and as such will have bugs (and zero error checking), suggestions/problems in "Issues" here on Github.
It's very much written for my needs and as such will have bugs (and very little error checking), suggestions/problems in "Issues" here on Github.
2 changes: 1 addition & 1 deletion data/config.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"needsSetup":1,"frigateURL":"https://your.frigate.host","frigateCameras":"camera1,camera2,camera3","hassURL":"https://your.hass.host","hassWebhookInput":"","usingHomeAssistant":0}
{"needsSetup":1,"frigateURL":"https://your.frigate.host","frigateCameras":"camera1,camera2,camera3","hassURL":"https://your.hass.host","hassWebhook":"","usingHomeAssistant":0,"timeLapseSeconds":16,"keepImagesDays":"1","keepVideosDays":"1"}
2 changes: 1 addition & 1 deletion data/config.json.sample
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"needsSetup":1,"frigateURL":"https://your.frigate.host","frigateCameras":"camera1,camera2,camera3","hassURL":"https://your.hass.host","hassWebhookInput":"","usingHomeAssistant":0}
{"needsSetup":1,"frigateURL":"https://your.frigate.host","frigateCameras":"camera1,camera2,camera3","hassURL":"https://your.hass.host","hassWebhook":"","usingHomeAssistant":0,"timeLapseSeconds":16,"keepImagesDays":"1","keepVideosDays":"1"}
Loading

0 comments on commit 9e54959

Please sign in to comment.