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

HC3 (maybe HCx) and Nodered


Guest kallecux

Question

Guest kallecux

When I call the HC3 api

http://192.168.3.116/api/customEvents/sunrise

to trigger the "sunrise" event, then this works via the SWAGGER console.

 

If I want to trigger the event via nodered, I can't do it.

 

Neither via the basic authentication built into, nor when I incorporate the user name and password in the URL.
I always get:

Error "405 not allowed".

 

What can be wrong here?
Best regards
Karl Heinz

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0
2 hours ago, kallecux said:

When I call the HC3 api

http://192.168.3.116/api/customEvents/sunrise

to trigger the "sunrise" event, then this works via the SWAGGER console.

 

If I want to trigger the event via nodered, I can't do it.

 

Neither via the basic authentication built into, nor when I incorporate the user name and password in the URL.
I always get:

Error "405 not allowed".

No problem posting from NR to HC2 (you do a POST do you?)

I would expect the problem being something in your NoderRed http node config...

Link to comment
Share on other sites

  • 0
Guest kallecux
  • Inquirer
  • Do you prefer Basicauthentication via the http Request node or inline authentication via URL?

    Link to comment
    Share on other sites

    • 0
    Guest kallecux
  • Inquirer
  • Please login or register to see this spoiler.

     

    Link to comment
    Share on other sites

    • 0
    Guest kallecux
  • Inquirer
  • GET works but not POST

     

    I did it this way:

     

    the URL is: http://admin:[email protected]/api/customEvents/sunrise

     

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    the NR response is: 

    Please login or register to see this image.

    /monthly_2020_02/image.png.8b64350bdadb3ab7c03d47b15568f034.png" />

     

    Greetings!

     

    Edited by kallecux
    Link to comment
    Share on other sites

    • 0

    If get works that mean your PUT have something wrong maybe your payload?

    Link to comment
    Share on other sites

    • 0
    On 2/11/2020 at 2:56 PM, kallecux said:

    GET works but not POST

    I did it this way:

    the URL is: http://admin:[email protected]/api/customEvents/sunrise

    Did you get it to work?

    It turned out that I needed to add the header "X-Fibaro-Version:  2" or the HC3 got into a catalytic shock and showed 504. Usually needed a reboot.

    Link to comment
    Share on other sites

    • 0
    Guest kallecux
  • Inquirer
  • Hello @jgab, no not yet - I put it aside. I will check the JSON content and follow your advice regarding the header.
    Thanks for the hints!

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