Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieve image for MQTT when annotations are disabled #350

Closed
melvinraju opened this issue Jul 20, 2020 · 16 comments · Fixed by #352
Closed

Retrieve image for MQTT when annotations are disabled #350

melvinraju opened this issue Jul 20, 2020 · 16 comments · Fixed by #352
Assignees
Labels
enhancement New feature or request

Comments

@melvinraju
Copy link

I'm trying to send the detected image to a google home hub over MQTT/Node-Red but found that they can only be accessed if annotations are turned on? Can there be a separate web server for which non-annotated trigger images are sent?

@neilenns
Copy link
Owner

Set enableWebServer to true in settings.json (see https://github.com/danecreekphotography/node-deepstackai-trigger/wiki/Configuration#system-configuration).

Then the original images are available at http://machineaddress/snapshots/originalfilename.jpg.

@melvinraju
Copy link
Author

Thanks!

@neilenns
Copy link
Owner

Small correction: they're accessible at http://machineaddress:4242

@melvinraju
Copy link
Author

Having problems accessing this.

Using:
http://localhost:4242/FD_13-14-49_copy_8.jpg - Returns the annotated image
http://localhost:4242/annotations/FD_13-14-49_copy_8.jpg -Returns the annotated image
http://localhost:4242/snapshots/FD_13-14-49_copy_8.jpg -Returns Cannot GET /snapshots/FD_13-14-49_copy_8.jpg

@neilenns
Copy link
Owner

Mmmm, yeah. Looks like there's a bug. I'll get one open and fix it tonight.

@neilenns
Copy link
Owner

#351

@neilenns neilenns reopened this Jul 20, 2020
@neilenns
Copy link
Owner

Sooooooooooooooooooooo it's not really a bug. It's an "oh you dummy you never actually implemented that" 😂 Will close the bug and use this to track since it's an actual feature enhancement at this point.

@neilenns
Copy link
Owner

This is ready for you to try @melvinraju. Use danecreekphotography/node-deepstackai-trigger:issue350 for the Docker image and http://localhost:4242/originals/FD_13-14-49_copy_8.jpg for the image. Let me know if it works.

@melvinraju
Copy link
Author

This is working perfectly 🚀 Am I right in thinking these images are removed with the routine purge?

@neilenns
Copy link
Owner

Yep. You can control how often the purge runs and how old an image has to be before it is removed with the settings.json file. https://github.com/danecreekphotography/node-deepstackai-trigger/wiki/Configuration#system-configuration

@neilenns
Copy link
Owner

This is now released, you can switch back to using the latest image tag.

@melvinraju
Copy link
Author

hey @danecreekphotography can you check if this is working for you? i havent used it in a while and have tried recently and am getting a Cannot GET error again when using http://localhost:4242/originals/FD_1.jpg

@neilenns
Copy link
Owner

Mmm, weird. I'm getting a GET error too. I'll look later today!

@neilenns
Copy link
Owner

So I'm not entirely sure what's going on but can you try restarting the container and see if that makes future images show up? It's working for me now.

If you have the problem again try opening a terminal to the container using Docker and do ls /node-deepstackai-trigger/originals to see if the images are there.

@melvinraju
Copy link
Author

Tried restarting the container and error persists.
When I do just ls /node-deepstackai-trigger it comes up with two folders annotations and snapshots no originals folder.

@melvinraju
Copy link
Author

Just did a docker-compose pull and has now updated to have the originals folder. I can see the images now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants