New comprehensive Frigate binding

Thanks for this, I appreciate you taking the time to do this/

However, I believe it’s not working properly with OH4.3 because the first link you placed in the post is towards the Frigate website (in the description), and there are two links to two different JAR versions.

From what I understand of the process, there needs to be one post in the marketplace per supported version, with a version marker in the title.
And the first link in the whole post must be to the associated JAR file.

So for instance, you would have one post with [4.3.0;5.0.0) in its title for OH4.3 support and another post with [5.0.0;6.0.0) in its title for OH5+
And then, each of of those post would have its first link point to the associated JAR file.

Not so easy to replicate. It happens only sometimes and not everytime the server binding goes offline. I’m trying to find something that creates this situation.

Is there a known issue with the binding from the marketplace? I installed it but nothing is discovered and there are no channels or options.

Sorry - I may have messed up the marketplace entry such that you have installed the incorrect version - there is one for 4.3.x and one for 5.0.0. I’m going to pull the marketplace entry and correct it in a couple of hours. In the meantime if you install the one from Github for your version of OH this should work fine.

Thanks - the title format didn’t seem to be well documented. I think I have corrected this now - please let me know if there are any issues remaining with the marketplace entry.

The entry looks good now, and I have it installed, but sadly I can’t add any “thing”, all I get is this:

image

Which version - 4.3.x or 5.0.0?

Ah sorry, it’s with 4.3.0 as I’m not up to speed on the future version

Ok. I will check with a different OH version 4.3.0. I am running the same .jar here with OH 4.3.5 and all seems ok.

Confirmed - there does seem to be an issue with the current build and version 4.3.0. Version 4.3.5 does appear to work. I will attempt to build the binding against 4.3.0 - this may resolve the issue.

Building the latest tree against 4.3.0 does result in a non-working binary. For now I have updated the Marketplace entry to minimum version 4.3.5 while I track down the problem. Earlier versions on the binding Github page built against 4.3.0 should still work. (EDIT: this turned out to be a local issue with insuffiicent shared threads for the web client, easily fixed by changing the values in runtime.cfg). The binaries are actually ok.

Can I just confirm you have a configured MQTT broker? The Frigate binding sits on top of an MQTT bridge. If you configure an MQTT broker, then, when clicking on Add Thing->MQTT Binding, you should see the ‘frigateSVR server’ and ‘frigateSVR client’ things. From there, you should be able to instantiate a ‘frigateSVR server’ thing.

Aha !
That’s the information I was missing, I was expecting to create things from the binding itself, not as a child of the MQTT binding.
But because I already have mosquitto running for zigbee2mqtt and frigate, it was indeed easy to add a “server” and a “camera” thing.
Sorry to have wasted your time

In case you are using file based configuration, check out the docs - includes an example of the mqtt things, items and rules

Can anyone guide me? I have the frigate server with the message “configuration_pending” and I’m unsure what is missing.
I saw a couple of others having the same issue but it was not clear to me how it was addressed. I have these messages in the log:

16:46:17.737 [INFO] [org.openhab.binding.mqtt.frigatesvr.internal.handlers.frigateSVRServerHandler] -  - Frigate server is offline
16:46:17.743 [ERROR] [org.openhab.binding.mqtt.frigatesvr.internal.helpers.frigateSVRHTTPHelper] - ExecutionException: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
16:46:17.744 [WARN] [org.openhab.binding.mqtt.frigatesvr.internal.handlers.frigateSVRServerHandler] - unable to get version string
16:46:22.744 [INFO] [org.openhab.binding.mqtt.frigatesvr.internal.handlers.frigateSVRServerHandler] -  - Frigate server is offline
16:46:22.750 [ERROR] [org.openhab.binding.mqtt.frigatesvr.internal.helpers.frigateSVRHTTPHelper] - ExecutionException: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
16:46:22.751 [WARN] [org.openhab.binding.mqtt.frigatesvr.internal.handlers.frigateSVRServerHandler] - unable to get version string
16:46:27.751 [INFO] [org.openhab.binding.mqtt.frigatesvr.internal.handlers.frigateSVRServerHandler] -  - Frigate server is offline
16:46:27.758 [ERROR] [org.openhab.binding.mqtt.frigatesvr.internal.helpers.frigateSVRHTTPHelper] - ExecutionException: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
16:46:27.758 [WARN] [org.openhab.binding.mqtt.frigatesvr.internal.handlers.frigateSVRServerHandler] - unable to get version string
16:46:32.758 [INFO] [org.openhab.binding.mqtt.frigatesvr.internal.handlers.frigateSVRServerHandler] -  - Frigate server is offline
16:46:32.766 [ERROR] [org.openhab.binding.mqtt.frigatesvr.internal.helpers.frigateSVRHTTPHelper] - ExecutionException: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
16:46:32.766 [WARN] [org.openhab.binding.mqtt.frigatesvr.internal.handlers.frigateSVRServerHandler] - unable to get version string
16:46:37.767 [INFO] [org.openhab.binding.mqtt.frigatesvr.internal.handlers.frigateSVRServerHandler] -  - Frigate server is offline
16:46:37.775 [ERROR] [org.openhab.binding.mqtt.frigatesvr.internal.helpers.frigateSVRHTTPHelper] - ExecutionException: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
16:46:37.775 [WARN] [org.openhab.binding.mqtt.frigatesvr.internal.handlers.frigateSVRServerHandler] - unable to get version string

I can ping the frigate server container from my OpenHAB container, the mqtt server is up and I was able to manually create things in OpenHAB as well that pull information from it (snapshots and people detected.)

I’m a bit lost here, any help is greatly appreciated.

Edit: Jesus Christ I’m dumb. I was pointing to the web ui port instead of the api port, 5000… sorted…

Edit2: I guess tonight I don’t get to sleep :rofl: I’m good with the snapshot and detections, things look nice. I’m just very confused with the streams, I don’t seem to get urls that work. I added a video card to one of my pages and linked the item with the url but I get nothing, just an error saying that it’s not compatible. How are you guys doing this bit?

I’ve been testing this binding out and things are working great. But a question on the API port - is it necessary to use port 5000? From the frigate docs, it seems to imply it’s mainly for local container to container comms, and has no authentication. Therefore the port should be opened carefully, probably where you can limit what accesses that port.

Even though 8971 is the web ui, it looks like it also does API access, just using authentication (your frigate username and pw I guess)

I didn’t see anything in the binding documentation about this, or configuring a username and pw login to interact with the frigate container. Is there any discussion on implementing authorised access?

Sorry to ask that here- where do I find the jar which has been built? Looking for the one for OH 5.0

I didn’t find a link here neither on the GitHub page :frowning:

Just go to the Releases on Github:

Great binding, thanks a lot. :slight_smile: I got the configuration etc working.

The documentation mentions one Rule DSL-example, but I wonder: Can anyone share his downstream implementation, e.g.

  • how to build an alarm-rule (in Javascript or Blockly) incl. snapshots of the event
  • how to integrate the stream into the openHAB UI
  • …?

The binding documentation gives an idea on these things, but instead of having to “reinvent the wheel” by building things from scratch, it would be nice if someone would share what he or she has built.

I’m making rules using the basic OpenHAB ifttt format just fine… but the showing stream in OpenHAB I could definitely use some help there. Also with audio. Seems like even with go2rtc OpenHAB doesn’t cope well.