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


A way to handle integrations that utilise oAuth 2


Scott

Recommended Posts

Hi There,

With quite a few vendors (ie security cameras, weather, air conditioners) moving to oAuth it would be great if Fibaro could incorporate this.

Thanks,

Scott

Link to comment
Share on other sites

oAuth2 works with a caveat. If the server sends a 302 redirect back the HTTP lua implementation can't handle it. I think I did a feature request for it 1,5 years ago. Also if there is a callback url needed then it's not working as the HC3 is not a HTTP server that can recieve those calls at your public facing Internet connection.

 

So... I implemented oAuth2 with my Somfy and Home Connect QA's and these vendors implemetations are working.

 

I'm curious what your question is based on. Are you missing integrations? Or are you building it yourself and it doesn't work? Then you can also ask for help on this forum.

Link to comment
Share on other sites

  • Topic Author
  • Hi @Joep,

    Thank you for sharing your insight! Much appreciated! Good to know it might be possible. Is what you've done with Somfy/Home Connect around online somewhere?

     

    I'm looking at integrating with the

    Please login or register to see this link.

    to the HC3. From what I've researched (ie 

    Please login or register to see this link.

     and others) people have a round about way of integrating the weather modules (but thats not the security).

    What I'm hoping to do is looking at the

    Please login or register to see this link.

      it can identify if its a human. So my ideal would be if motion detected that is a human and after sunset then turn on outside lights. And if Alarm is armed then to ping me a notification (and play dogs barking over sonos hahaa).

     

    Link to comment
    Share on other sites

    1 hour ago, Scott said:

    Is what you've done with Somfy/Home Connect around online somewhere?

    Yes, my Home Connect QA is open source, see: 

    Please login or register to see this link.

    .

     

    But the events where you talk about had nothing to do with oAuth2. oAuth2 is the authentication and when you are authenticated and have a token you can fetch the events. ;)

    Link to comment
    Share on other sites

    On 2/10/2024 at 9:07 AM, Scott said:

    'm looking at integrating with the

    Please login or register to see this link.

    to the HC3. From what I've researched (ie 

    Please login or register to see this link.

     and others) people have a round about way of integrating the weather modules (but thats not the security).

     

    Please check:

    It is open source so you can check and play with my code. There is nothing in that QA that is using roundabout ways. This QA is using Netatmo official oAuth2 authentication. You need to add app on the Netatmo connect site under your account and then generate tokens that you can use in QA. Since HC3 can't handle redirection url, first part with token generation you have to do on Netatmo site and you have to approve generation of tokens. It is just the way Netatmo make it to be more secure and QA is not using your account username and password, just your app client ID and client secret which are still required for proper authentication and to get refresh token.

     

     

    • Like 1
    Link to comment
    Share on other sites

  • Topic Author
  • You guys are THE BEST! Thank you for that! I'll work my way through it.

    Link to comment
    Share on other sites

    Join the conversation

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

    Guest
    Reply to this topic...

    ×   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...