So after watching ol' Linus on youtube he showed a really cool smart home setup idea. He setup a software called frigate which i see mentioned on this forum here and there a little. Now he integrates it with home assistant via MQTT so to me it should work for Hubitat.
I have a old pc that i am using as a headless server now. Using ubuntu server as the os and docker for management of services i setup an eclipse mqtt broker container and a frigate container. I then linked my home NVR cameras via RTSP to frigate and it works (just on one camera now since i dont have the damn coral accelerator that is backordered to next November) I go out side and it says there is a person out side. I toss the dog a treat and the camera identifies a dog. I then bumble around and finally get frigate to talk to the broker.
I am now working through trying to pass the mqtt stuff from frigate to the broker to hubitat.
End game would be to get notifications on my phone if a person is approaching my home at night when the security system is armed, but not set off the alarm.
I use blue iris to do this. The bonus is that I don't have to go through MQTT. While BI does have the ability to go through an MQTT broker I just have it communicate directly with the hub.
I did think about running it in a docker, but I have 10 cameras on it now and that would kill my server. So I repurposed an old i5 to handle it all. It stores up to 3 weeks of 24/7 recording and events.
You might have to look into doing something like that with Frigate too...as you add more cameras the cpu requirements go up. Its a rabbit hole. lol
Here's a post with some of the things I do with BI.
Yeah I looked into Blue Iris I just don't want to have to pay for a Windows OS license when I can get a free linux one. Plus I am hosting a lot of other stuff on my linux machine would like to keep it all on one server.
Thankyou very much sir. This is just the piece of code i was looking for. I was about to try mydevbox/hubitat-mqtt-link but i think i wont have to fumble with as much stuff with your code.
I'm assuming you want an image for a Hubitat dashboard. It can be done but it's not simple. Hubitat needs an http server to hold the image file. Frigate will write the snapshot image to an mqtt topic. I have a small process that listens for changes on that topic and and copies the image from mqtt to a file that a http server can load. Then a lighttpd server will deliver the picture. That code is not at github - contact me with a PM it you need it. It's hacky and I don't like some hardcoded paths and it's clunky to debug but it does work and the application doesn't really deserve an elegant solution.
The ultimate goal is to add MQTT natively to the container that does my mailing right now, but in meantime the flow is Frigate -> MQTT (Mosquito) -> Hubitat MQTT Frigate camera device that subscribes to /people -> Hubitat Notify -> node.js mail container .
If I can get image as a variable from /people/snapshot as well so it can be included in resulting notification. Will that require second subscription?