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
Question
parper 0
Hello,
I'm trying to modify a already define global variable using the REST API for the HC2.
This is done from a ESP2866 (nodeMCU-isch) board.
I can do a http.get towards the HC" and I get the correct JSON information.
When I do http.put I seem not to be able to set the variable.
My message headers contains a basic auth, and I have payload that looks like this
{"value":"On"}
The address looks like this http://1.2.3.4/api/globalVariables/thevariable
According to the httpclient i'm using i seem to get return code 200 but no result and the variable is not changed.
Using the hc2ip/docs link I can test this out with the correct payload and it works fine.
However I'm logged in as an Admin then.
Trying to change the user from my ESP2866 I just got that the HC" banned me for 30 min.
So is there a problem using normal users when trying to modify a global variable ? Do I need to be admin ?
Or is there something else I need to check ?
Regards P
Link to comment
Share on other sites
16 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.