Bill, thanks for the suggestion…
This approach i am aware of, but i can’t get, how can this help to overcome the problem.
I know, we can send POST requests from plugins, and send some complex objects with values inside its body part.
The question is, how can we populate that body with values.
Like i have 80 variables that should be sent in a POST request back to Fibaro…
Now, when the user opens his dashboard in HR he can see those values on some buttonfaces, or labels or whatever, becuase I am reading those values by GET request and populate the controls on HR dashboard accordinlgy, so the user can see these values.
Then comes the interaction, when user changes these values on HR dahsboard.
How to do that? What should be done here? How can user change these values, and then when he finished, how can he send back that POST request? What values will be sent in its body?
Where will be that POST body get its values?
What controls can be used for changing values?
Slider is not really an option. It can be bound to some variable, but its not really usable for sending values in HTTP, becuase user can’t see the actual valu of the slider, so he doesn’t know what will be sent when its releases it. And anyway, we dont want to send any value separtely.
We ned to send a JSON object back with some updated values that come from HR.
I would try to go for some buttons, maybe create one for increasing and other one for decreasing.
But the problem is similar. When he presses the button, the value that is represented by this button should be changed in Fibaro, only when he presses another button, kinda “Save” button. Otherwise every single press of a button will perform a HTTP request, which is incredible slow solution if we consider that we can have like dozens of atrributes that need to be changed upon some button presses.
I am looking for some very simple solution that i used to use in other web based programs.
User makes the changes. Those updated values should be stored somewhere temporarily, and when
he presses a Save button, the body of a POST request should be populated by them, and be sent back to Fibaro.
I have checked i think every single plugin example that is available here, but i couldn’t find anything that can handle this simple situatioin.
Almost every plugin is sending data back upon a onChangedRequest what is bind to some button or other control, that is directly bound to some value on the server.
to be more simple
Here is a snippet from your FibaroGlobalVariable code
` http.put(baseURL + “/globalVariables/” + device.Id, { name: device.Id, value: value, readOnly: false, isEnum: false }, { auth: credentials });
If i want to change the values of value variable and name variable and only after i have done the changes, send back that put request…how to do it?
`