Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

HTTP Request Webhook (via Unifi)


Question

Posted

I want to run this webhook via Unifi to connect the G4 Doorbell Pro fingerprint sensor and open the front gate. But right now, nothing happens.
I have a scene (68) which opens the gate.

Webhook url: 

Please login or register to see this link.



This link opens the gate, but opens a username/password prompt, after filling in the username/password the gate opens (the scene runs). 
I tried filling in some headers in the Unifi UI and setting the method to 'POST' (see screenshot below).

Also tried this webhook url: 

Please login or register to see this link.


But it still shows the username/password window in the browser (and does not work in Unfi).
 

Please login or register to see this attachment.

4 answers to this question

Recommended Posts

  • 0
Posted

HI

 

try the to change execute to executeSync i url path

 

 

  • 0
Posted (edited)

@talkatoo did you manage to get this thing working?

Got It !

 

Only http . https is complaining, looking into it now but for test and internally http is fine .

Please login or register to see this attachment.

 

You need to encode your userid/password to Base64.

Go to:

Please login or register to see this link.

Type your user:password in the upper field and press Encode.

Now use that string in the Header 2 after Basic .

To execute a scene, you need to perform a GET.

Edited by GeeMoney
  • Like 1
  • Thanks 1
  • 0
Posted

Has anyone been able to get this working with HTTPS?

  • 0
Posted (edited)
On 4/29/2025 at 3:10 AM, Orbitel said:

Has anyone been able to get this working with HTTPS?

Yes! Finally, here is the trick.

 

Caution, you need to have basic Linux experience and know how to modify files and copy files into the Unifi Protect appliance.

First enable HTTPS only on your fibaro and write-down your exact Serial of the fibaro device (in capitals) in my example HC3-00202022 .

Download the certificate by pressing the button below the HTTP/HTTPS option and rename it to cacert.pem.

 

Now you need to create a CNAME dns record for this pointing to the IP of your fibaro device in your network with the exact Serial as that is registered as hostname inside the certificate.

Assuming you have Unifi as a network manage device you can simply add this DNS record and point it to the IP adres.

 

So in my case I created this DNS record pointing to 192.166.100.10

nslookup HC3-00202022 -> 192.166.100.10

 

Now we need to open up SSH access to the Unifi Protect appliance. In my case UCG-MAX device.

When SSH is opened up,  connect as root with the password you have set on opening up the SSH service and modify the following file (I use vi as editor):

 

vi /usr/share/unifi-protect/app/default

Add the following line at the bottom:

NODE_EXTRA_CA_CERTS=/usr/local/share/ca-certificates/cacert.pem

 

And copy the earlier downloaded cacert.pem file to the Unifi Protect appliance to the following location: /usr/local/share/ca-certificates/cacert.pem

(example: scp cacert.pem [email protected]:/usr/local/share/ca-certificates/cacert.pem

 

Now restart the Unifi Protect or the complete appliance.

 

When it’s started again configure the web hook by using the https and instead of the IP adres use your newly created DNS name example:

 

Please login or register to see this link.

 

Method GET

Authentication None


Header 1

Accept        application/json

 

Header 2

Authorization      Basic: <string>

Edited by GeeMoney

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...