Fibaro HC3 - Scene activate

Please try this command instead. I think we need double quotes around the data.

curl --verbose --header “Content-Type: application/json” --request POST --data “{}” -u yourusername:yourpassword http://192.168.1.222/api/scenes/14/execute

Also, can you please send me your HRP file that was generating the error in this post?

I have sent you the hrp file and the plugin back after my manipulations.
All sent to support email.

I stepped through the TestScene2.hrp you sent & everything looks good. So every time you run it you see the 405 error when you click the button?

Correct error 405.
Here we have a screen shoot of the config of the button. ( to be sure that it is correctly done )

I have a suspicion it may have to do with authorization. I sent you a revised file that forces Basic authorization. Can you let me know if that works?

It is working.
No error.

This was the answer from Fibaro Support btw (got it just now):
Please try to do it like that:
• curl -X POST “http://10.2.3.43/api/scenes/17/execute” -H “accept: /” -H “Content-Type: application/json” -H “X-Fibaro-Version: 2” -H “Accept-language: en” -H “Authorization: Basic YWRtaW46YWRtaW4=” -d “{}”`

• Authorization has to be coded in base64. You can use https://www.base64decode.org/ this site to do this.

• Hope you will find that helpful!

1 Like

Can you please test the attached file in the Designer Simulator?
Roger_HC3_Scene.hrp (81.7 KB)

You’ll need to update the username & password in the Script. This worked for @hrannar.

Now I am completely confused but I might have to take that to Fibaro support (happy to do if you want me to):
With the admin account it worked like a charm! So, I almost wanted to write COOL, GREAT!
But then I tested with two non-admin account which have access to everything in my HC3 but are non-admin. And there I get a 403. I guess this is time for Fibaro support, right? Will keep you posted

No, hold on minute. Let me post another file to test.

Will do but there is another issue anyway: When I log on as the user (rather than the admin) I do not even see scenes in the UI. Needs to be fixed anyway :wink:

Here, try this & let me know if it works.

Roger_HC3_Scene_V2.hrp (81.7 KB)

Same. Get a 403 with any non-admin user. I guess this is a Fibaro problem. Let me work with them to get it fixed (hopefully)

Was that CURL command they sent you earlier for a non-admin account?

If it was, then there really isn’t anything else Fibaro can do.

If it works in CURL then this is a Home Remote issue, you shouldn’t need to get Fibaro involved again.

Well, it never worked in CURL for me and I refuse using the admin in such a scenario. It feels to me like an underlying access control issue. The pwd is way more complex for the admin than for my test account. So I do not see that it could be an encoding. It works for the admin but not for my test account.
I cannot see that this is your side.
I asked this already on the other thread regarding the QA/Virtual Device: Does the simulator write a log I can see what it sends towards Fibaro? This would help tremendously

There’s a Log window in the bottom left corner but only some operations are written to it. That’s currently really only used by JavaScript Plugins & a few other areas. For troubleshooting with Fibaro, CURL is going to be your best option for the time being.

I can try this with my system - will try with CURL and other user than Admin just so we are sure it is Fibaro…

Yes, please.
When it comes to logging, I saw the log window but would I would love to see is the command sent to the Fibaro HC without having to sniff the network…

I have just tried by changing the user from Admin to another, and I get 403 error.
Notice if I log in to HC3 with the my new user and all other users I do not have access to the scene or any of settings part in the HC3,
Here is the screenshot of the access that this user has.


And here is a screenshot if I log in to the web access as same user.

If I use the Fibaro app I can see the scenes and run them.