You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 27, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on May 27, 2025. It is now read-only.
Im trying to set this up and I'm struggling with the following error:
2022-08-05T12:43:59-05:00 [Settings] Unable to read the secrets file: ENOENT: no such file or directory, open '/run/secrets/secrets'.
2022-08-05T12:43:59-05:00 [Settings] Loaded settings from /run/secrets/settings
I don't see anything happening in mqtt allthough i have it enabled (would have expected connect messages in log or in mqtt). I'm ultimately trying to determine if the docker setup is correct. the above message makes me think the settings file did not load correctly but i can console to the /run/secrets/ folder referenced above and viewing the files there, they appear to be my settings and triggers files. Any thoughts on the error or why i might not see mqtt message of any kind related to startup or any status?
strange thing is that it appears that its picking up those files and creating them in the run/secrets/ location. if i view them through console they appear correct. so maybe its working but not sure how to tell. nothing in mqtt to indicate any connection. so i'm wondering if something is wrong.
Also if they are shared to whatever machine is running Docker that might cause a problem? Not sure. In my case they are just local files in the same folder as my docker-compose.yml file.
unfortunately no difference. From this is seems like its at least picking up the settings file from where I put it. (i added a config subfolder on my share location). Is there more I should see here? Any way to tell if its running properly? I'm assuming that something is wrong because there are no entries at all in my MQTT host and i was expecting them from startup at least. No indication here in the log that its connected. no indication that triggers file was loaded either.
2022-08-08T10:30:06-05:00 [Main] ****************************************
2022-08-08T10:30:06-05:00 [Main] Starting up version 5.8.4
2022-08-08T10:30:06-05:00 [Main] Timezone offset is 300
2022-08-08T10:30:06-05:00 [Main] Current time is Mon Aug 08 2022 10:30:06 GMT-0500 (Central Daylight Time)
2022-08-08T10:30:06-05:00 [Settings] Unable to read the settings file: ENOENT: no such file or directory, open '/run/secrets/settings'.
2022-08-08T10:30:06-05:00 [Settings] Unable to load file /run/secrets/settings.
2022-08-08T10:30:06-05:00 [Settings] Unable to read the secrets file: ENOENT: no such file or directory, open '/config/secrets.json'.
as a follow-up, i modified the mqtt host as a test and immediately got an error in the log. So its clearly loading the settings file but no indication that it successfully connects to the mqtt server. is there a setting that forces it to publish a status message in mqtt that i'm missing? A way to confirm that the triggers file is being picked up? Testing triggers, there is no action in mqtt either which seems related. Thanks in advance for any ideas.
Verbose was already set to true. Should i have been seeing more than the above in the log as a result? it seems like its loading the settings file (which i reason by the fact that when i change the mqtt host to a bad port, i see an error on restart) but if its not picking up the verbose flag, I couldn't explain that either. Sorry for the trouble. This seems like an exceptionally useful tool. I appreciate you taking your time to share ideas here. -Mike
just checked that blue iris is dropping jpgs to the designated folder but no action in log. In fact, log is still just showing the three times I restarted it yesterday. (this is the log view from portainer for the trigger container. deepstack shows even less). You can see in the log where I changed the port on mqtt to see if i could force a failure.
2022-08-08T10:30:06-05:00 [Main] ****************************************
2022-08-08T10:30:06-05:00 [Main] Starting up version 5.8.4
2022-08-08T10:30:06-05:00 [Main] Timezone offset is 300
2022-08-08T10:30:06-05:00 [Main] Current time is Mon Aug 08 2022 10:30:06 GMT-0500 (Central Daylight Time)
2022-08-08T10:30:06-05:00 [Settings] Unable to read the settings file: ENOENT: no such file or directory, open '/run/secrets/settings'.
2022-08-08T10:30:06-05:00 [Settings] Unable to load file /run/secrets/settings.
2022-08-08T10:30:06-05:00 [Settings] Unable to read the secrets file: ENOENT: no such file or directory, open '/config/secrets.json'.
2022-08-08T10:30:06-05:00 [Settings] Loaded settings from /config/settings.json
2022-08-08T16:35:16-05:00 [Main] Shutting down.
2022-08-08T16:35:17-05:00 [Main] ****************************************
2022-08-08T16:35:17-05:00 [Main] Starting up version 5.8.4
2022-08-08T16:35:17-05:00 [Main] Timezone offset is 300
2022-08-08T16:35:17-05:00 [Main] Current time is Mon Aug 08 2022 16:35:17 GMT-0500 (Central Daylight Time)
2022-08-08T16:35:17-05:00 [Settings] Unable to read the settings file: ENOENT: no such file or directory, open '/run/secrets/settings'.
2022-08-08T16:35:17-05:00 [Settings] Unable to load file /run/secrets/settings.
2022-08-08T16:35:17-05:00 [Settings] Unable to read the secrets file: ENOENT: no such file or directory, open '/config/secrets.json'.
2022-08-08T16:35:17-05:00 [Settings] Loaded settings from /config/settings.json
2022-08-08T16:35:17-05:00 [Main] [MQTT] Unable to connect: connect ECONNREFUSED 192.168.0.14:1884
2022-08-08T16:35:17-05:00 [Main] ****************************************
2022-08-08T16:35:17-05:00 [Main] Startup failed due to errors. For troubleshooting assistance see https://github.com/danecreekphotography/node-deepstackai-trigger/wiki/Troubleshooting.
2022-08-08T16:35:17-05:00 [Main] Startup reattempt 1 of 5 in 30 seconds.
2022-08-08T16:35:47-05:00 [Main] ****************************************
2022-08-08T16:35:47-05:00 [Main] Starting up version 5.8.4
2022-08-08T16:35:47-05:00 [Main] Timezone offset is 300
2022-08-08T16:35:47-05:00 [Main] Current time is Mon Aug 08 2022 16:35:47 GMT-0500 (Central Daylight Time)
2022-08-08T16:35:47-05:00 [Settings] Unable to read the settings file: ENOENT: no such file or directory, open '/run/secrets/settings'.
2022-08-08T16:35:47-05:00 [Settings] Unable to load file /run/secrets/settings.
2022-08-08T16:35:47-05:00 [Settings] Unable to read the secrets file: ENOENT: no such file or directory, open '/config/secrets.json'.
2022-08-08T16:35:47-05:00 [Settings] Loaded settings from /config/settings.json
2022-08-08T16:36:19-05:00 [Main] Shutting down.
2022-08-08T16:36:20-05:00 [Main] ****************************************
2022-08-08T16:36:20-05:00 [Main] Starting up version 5.8.4
2022-08-08T16:36:20-05:00 [Main] Timezone offset is 300
2022-08-08T16:36:20-05:00 [Main] Current time is Mon Aug 08 2022 16:36:20 GMT-0500 (Central Daylight Time)
2022-08-08T16:36:20-05:00 [Settings] Unable to read the settings file: ENOENT: no such file or directory, open '/run/secrets/settings'.
2022-08-08T16:36:20-05:00 [Settings] Unable to load file /run/secrets/settings.
2022-08-08T16:36:20-05:00 [Settings] Unable to read the secrets file: ENOENT: no such file or directory, open '/config/secrets.json'.
2022-08-08T16:36:20-05:00 [Settings] Loaded settings from /config/settings.json
i had removed all the secrets references and went to your suggestion for a volume mount for /config. That didn't appear to make a difference. I don't know why there are still secret references here unless that's all just in the code. When I added a /config subfolder to my mount it changed the last line in the log, which i would have expected. that much seems ok.
Looks like it is up and running. It isn't seeing any images dropped for processing, you should see log entries for each image it tries to analyze.
I'm guessing your mount of the folder for images, or the config pointing to that folder, isn't correct.
i don't know. I've tried a myriad of things to troubleshoot the picture folder. The sample config files use a relative path in the mask ("/aiinput/Cat*.jpg). What is that relative of? My aiinput folder is almost identical to your example. settings file appears to be being picked up properly from a similar mount (similar to your example, with just an additional /config subfolder on the share). i've tried with the relative path in triggers and without. I tried moving my picture folder round. I'm not sure how to troubleshoot. Pictures are landing in the folder, and there is never any indication in the log that anything past start up has ever happened. is there any other way to validate things are running? Is there no mqtt status message in the log that should happen at startup? or any way to tell that triggers was loaded? (log shows settings being loaded, although some goofy message on that, but no mention of triggers). Verbose flag didn't make any difference in logging from what i can say. Sort of at a loss.
The triggers need to be the full path to the image folder, so they must be `/aiinput/GGsideDoor*.jpg` for example.
Also open a terminal to the docker container and make sure /aiinput has images in it that match your wild card.
You should also be seeing a log message saying it connected to the mqtt server, and status messages published to this topic:
node-deepstackai-trigger/status
________________________________
From: Neil Enns ***@***.***>
Sent: Tuesday, August 9, 2022 2:03:00 PM
To: neilenns/node-deepstackai-trigger ***@***.***>; neilenns/node-deepstackai-trigger ***@***.***>
Cc: Comment ***@***.***>
Subject: Re: [neilenns/node-deepstackai-trigger] Trouble validating settings and mqtt (Issue #456)
The triggers need to be the full path to the image folder, so they must be `/aiinput/GGsideDoor*.jpg` for example.
Also open a terminal to the docker container and make sure /aiinput has images in it that match your wild card.
That's one thing that has always been concerning. No mqtt connection status messages. but i can get the container log to throw an error when i change the port to a bad one. changing it back just allows it to start without an mqtt connection error but no actual connection validation message (and nothing of course in mqtt itself)
Activity
neilenns commentedon Aug 5, 2022
mikerenna commentedon Aug 5, 2022
here you go. trying to pull them off of a local folder. this is running QNAP container station for docker: copy/pasted flattened the formatting.
version: "3.8"
services:
trigger:
volumes:
- '/share/blue_iris/aiinput:/aiinput'
environment:
- TZ=America/Chicago
ports:
- 4242:4242
secrets:
- triggers
- settings
image: ghcr.io/neilenns/node-deepstackai-trigger:latest
restart: always
depends_on:
- deepstack-ai
deepstack-ai:
image: deepquestai/deepstack:latest
restart: always
volumes:
- localstorage:/datastore
environment:
- VISION-DETECTION=True
volumes:
localstorage:
secrets:
settings:
# This should point to the location of the settings.json configuration file
file: '/share/Container/deepstackai/settings.json'
triggers:
# This should point to the location of the triggers.json configuration file
file: '/share/Container/deepstackai/triggers.json'
mikerenna commentedon Aug 5, 2022
strange thing is that it appears that its picking up those files and creating them in the run/secrets/ location. if i view them through console they appear correct. so maybe its working but not sure how to tell. nothing in mqtt to indicate any connection. so i'm wondering if something is wrong.
neilenns commentedon Aug 5, 2022
Are you sure the paths to those files exist on your local machine? These two lines should be the local path:
Also if they are shared to whatever machine is running Docker that might cause a problem? Not sure. In my case they are just local files in the same folder as my
docker-compose.ymlfile.neilenns commentedon Aug 5, 2022
I looked at my config more closely and I don't think I'm even using the secrets, I just have a volume mounted. Try doing it that way instead:
mikerenna commentedon Aug 5, 2022
mikerenna commentedon Aug 8, 2022
unfortunately no difference. From this is seems like its at least picking up the settings file from where I put it. (i added a config subfolder on my share location). Is there more I should see here? Any way to tell if its running properly? I'm assuming that something is wrong because there are no entries at all in my MQTT host and i was expecting them from startup at least. No indication here in the log that its connected. no indication that triggers file was loaded either.
2022-08-08T10:30:06-05:00 [Main] ****************************************
2022-08-08T10:30:06-05:00 [Main] Starting up version 5.8.4
2022-08-08T10:30:06-05:00 [Main] Timezone offset is 300
2022-08-08T10:30:06-05:00 [Main] Current time is Mon Aug 08 2022 10:30:06 GMT-0500 (Central Daylight Time)
2022-08-08T10:30:06-05:00 [Settings] Unable to read the settings file: ENOENT: no such file or directory, open '/run/secrets/settings'.
2022-08-08T10:30:06-05:00 [Settings] Unable to load file /run/secrets/settings.
2022-08-08T10:30:06-05:00 [Settings] Unable to read the secrets file: ENOENT: no such file or directory, open '/config/secrets.json'.
mikerenna commentedon Aug 9, 2022
as a follow-up, i modified the mqtt host as a test and immediately got an error in the log. So its clearly loading the settings file but no indication that it successfully connects to the mqtt server. is there a setting that forces it to publish a status message in mqtt that i'm missing? A way to confirm that the triggers file is being picked up? Testing triggers, there is no action in mqtt either which seems related. Thanks in advance for any ideas.
neilenns commentedon Aug 9, 2022
mikerenna commentedon Aug 9, 2022
Verbose was already set to true. Should i have been seeing more than the above in the log as a result? it seems like its loading the settings file (which i reason by the fact that when i change the mqtt host to a bad port, i see an error on restart) but if its not picking up the verbose flag, I couldn't explain that either. Sorry for the trouble. This seems like an exceptionally useful tool. I appreciate you taking your time to share ideas here. -Mike
neilenns commentedon Aug 9, 2022
mikerenna commentedon Aug 9, 2022
just checked that blue iris is dropping jpgs to the designated folder but no action in log. In fact, log is still just showing the three times I restarted it yesterday. (this is the log view from portainer for the trigger container. deepstack shows even less). You can see in the log where I changed the port on mqtt to see if i could force a failure.
2022-08-08T10:30:06-05:00 [Main] ****************************************
2022-08-08T10:30:06-05:00 [Main] Starting up version 5.8.4
2022-08-08T10:30:06-05:00 [Main] Timezone offset is 300
2022-08-08T10:30:06-05:00 [Main] Current time is Mon Aug 08 2022 10:30:06 GMT-0500 (Central Daylight Time)
2022-08-08T10:30:06-05:00 [Settings] Unable to read the settings file: ENOENT: no such file or directory, open '/run/secrets/settings'.
2022-08-08T10:30:06-05:00 [Settings] Unable to load file /run/secrets/settings.
2022-08-08T10:30:06-05:00 [Settings] Unable to read the secrets file: ENOENT: no such file or directory, open '/config/secrets.json'.
2022-08-08T10:30:06-05:00 [Settings] Loaded settings from /config/settings.json
2022-08-08T16:35:16-05:00 [Main] Shutting down.
2022-08-08T16:35:17-05:00 [Main] ****************************************
2022-08-08T16:35:17-05:00 [Main] Starting up version 5.8.4
2022-08-08T16:35:17-05:00 [Main] Timezone offset is 300
2022-08-08T16:35:17-05:00 [Main] Current time is Mon Aug 08 2022 16:35:17 GMT-0500 (Central Daylight Time)
2022-08-08T16:35:17-05:00 [Settings] Unable to read the settings file: ENOENT: no such file or directory, open '/run/secrets/settings'.
2022-08-08T16:35:17-05:00 [Settings] Unable to load file /run/secrets/settings.
2022-08-08T16:35:17-05:00 [Settings] Unable to read the secrets file: ENOENT: no such file or directory, open '/config/secrets.json'.
2022-08-08T16:35:17-05:00 [Settings] Loaded settings from /config/settings.json
2022-08-08T16:35:17-05:00 [Main] [MQTT] Unable to connect: connect ECONNREFUSED 192.168.0.14:1884
2022-08-08T16:35:17-05:00 [Main] ****************************************
2022-08-08T16:35:17-05:00 [Main] Startup failed due to errors. For troubleshooting assistance see https://github.com/danecreekphotography/node-deepstackai-trigger/wiki/Troubleshooting.
2022-08-08T16:35:17-05:00 [Main] Startup reattempt 1 of 5 in 30 seconds.
2022-08-08T16:35:47-05:00 [Main] ****************************************
2022-08-08T16:35:47-05:00 [Main] Starting up version 5.8.4
2022-08-08T16:35:47-05:00 [Main] Timezone offset is 300
2022-08-08T16:35:47-05:00 [Main] Current time is Mon Aug 08 2022 16:35:47 GMT-0500 (Central Daylight Time)
2022-08-08T16:35:47-05:00 [Settings] Unable to read the settings file: ENOENT: no such file or directory, open '/run/secrets/settings'.
2022-08-08T16:35:47-05:00 [Settings] Unable to load file /run/secrets/settings.
2022-08-08T16:35:47-05:00 [Settings] Unable to read the secrets file: ENOENT: no such file or directory, open '/config/secrets.json'.
2022-08-08T16:35:47-05:00 [Settings] Loaded settings from /config/settings.json
2022-08-08T16:36:19-05:00 [Main] Shutting down.
2022-08-08T16:36:20-05:00 [Main] ****************************************
2022-08-08T16:36:20-05:00 [Main] Starting up version 5.8.4
2022-08-08T16:36:20-05:00 [Main] Timezone offset is 300
2022-08-08T16:36:20-05:00 [Main] Current time is Mon Aug 08 2022 16:36:20 GMT-0500 (Central Daylight Time)
2022-08-08T16:36:20-05:00 [Settings] Unable to read the settings file: ENOENT: no such file or directory, open '/run/secrets/settings'.
2022-08-08T16:36:20-05:00 [Settings] Unable to load file /run/secrets/settings.
2022-08-08T16:36:20-05:00 [Settings] Unable to read the secrets file: ENOENT: no such file or directory, open '/config/secrets.json'.
2022-08-08T16:36:20-05:00 [Settings] Loaded settings from /config/settings.json
mikerenna commentedon Aug 9, 2022
i had removed all the secrets references and went to your suggestion for a volume mount for /config. That didn't appear to make a difference. I don't know why there are still secret references here unless that's all just in the code. When I added a /config subfolder to my mount it changed the last line in the log, which i would have expected. that much seems ok.
neilenns commentedon Aug 9, 2022
mikerenna commentedon Aug 9, 2022
i don't know. I've tried a myriad of things to troubleshoot the picture folder. The sample config files use a relative path in the mask ("/aiinput/Cat*.jpg). What is that relative of? My aiinput folder is almost identical to your example. settings file appears to be being picked up properly from a similar mount (similar to your example, with just an additional /config subfolder on the share). i've tried with the relative path in triggers and without. I tried moving my picture folder round. I'm not sure how to troubleshoot. Pictures are landing in the folder, and there is never any indication in the log that anything past start up has ever happened. is there any other way to validate things are running? Is there no mqtt status message in the log that should happen at startup? or any way to tell that triggers was loaded? (log shows settings being loaded, although some goofy message on that, but no mention of triggers). Verbose flag didn't make any difference in logging from what i can say. Sort of at a loss.
neilenns commentedon Aug 9, 2022
mikerenna commentedon Aug 9, 2022
Settings:
{
"$schema": "https://raw.githubusercontent.com/danecreekphotography/node-deepstackai-trigger/main/src/schemas/settings.schema.json",
"deepstackUri": "http://deepstack-ai:5000/",
"enableAnnotations": false,
"enableWebServer": true,
"verbose": true,
"awaitWriteFinish": true,
"mqtt": {
"uri": "mqtt://192.168.0.14:1883",
"username": "#######",
"password": "#######",
"enabled": true
},
"telegram": {
"botToken": "insert bot token here",
"enabled": false
},
"pushbullet": {
"accessToken": "access token here",
"enabled": false
},
"pushover": {
"apiKey": "api key here",
"userKey": "user key here",
"enabled": false
}
}
Docker-compose:
version: "3.8"
services:
trigger:
volumes:
- '/share/Container/deepstackai/aiinput:/aiinput'
- '/share/Container/deepstackai/config:/config'
environment:
- TZ=America/Chicago
ports:
- 4242:4242
image: ghcr.io/neilenns/node-deepstackai-trigger:latest
restart: always
depends_on:
- deepstack-ai
deepstack-ai:
image: deepquestai/deepstack:latest
restart: always
volumes:
- localstorage:/datastore
environment:
- VISION-DETECTION=True
volumes:
localstorage:
neilenns commentedon Aug 9, 2022
mikerenna commentedon Aug 9, 2022
{
"$schema": "https://raw.githubusercontent.com/danecreekphotography/node-deepstackai-trigger/main/src/schemas/triggerConfiguration.schema.json",
"triggers": [
{
"name": "Driveway detector",
"watchPattern": "driveway*.jpg",
"enabled": true,
"threshold": {
"minimum": 0,
"maximum": 100
},
"handlers": {
"mqtt": {
"topic": "aimotion/triggers/driveway"
}
},
"watchObjects": ["car", "truck", "person"]
},
{
"name": "Doorbell detector",
"watchPattern": "doorbell*.jpg",
"enabled": true,
"threshold": {
"minimum": 0,
"maximum": 100
},
"handlers": {
"mqtt": {
"messages": [{ "topic": "aimotion/triggers/doorbell" }]
}
},
"watchObjects": ["person"]
},
{
"name": "Front Door detector",
"watchPattern": "/aiinput/FrontDoor*.jpg",
"enabled": true,
"threshold": {
"minimum": 0,
"maximum": 100
},
"handlers": {
"mqtt": {
"messages": [{ "topic": "aimotion/triggers/FrontDoor" }]
}
},
"watchObjects": ["person"]
},
{
"name": "Backyard detector",
"watchPattern": "/aiinput/BackYard*.jpg",
"enabled": true,
"threshold": {
"minimum": 0,
"maximum": 100
},
"handlers": {
"mqtt": {
"messages": [{ "topic": "aimotion/triggers/backyard" }]
}
},
"watchObjects": ["person"]
},
{
"name": "Side door detector",
"watchPattern": "GgSideDoor*.jpg",
"enabled": true,
"threshold": {
"minimum": 0,
"maximum": 100
},
"handlers": {
"mqtt": {
"messages": [{ "topic": "aimotion/triggers/side_door" }]
}
},
"watchObjects": ["person"]
}
]
}
neilenns commentedon Aug 9, 2022
neilenns commentedon Aug 9, 2022
mikerenna commentedon Aug 9, 2022
Appears so for images....
mikerenna commentedon Aug 9, 2022
That's one thing that has always been concerning. No mqtt connection status messages. but i can get the container log to throw an error when i change the port to a bad one. changing it back just allows it to start without an mqtt connection error but no actual connection validation message (and nothing of course in mqtt itself)
neilenns commentedon Aug 9, 2022
mikerenna commentedon Aug 9, 2022
thank you. feels challenging to me from a pc as well. :) Appreciate your help and please do so at your leisure.