You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to get her to talk to my API (Fibaro HC2 home automation)...
The Fibaro API wants a POST to be made on a resource instance with an an action name to have that resource execute a command. Have not found a way to create a custom instance method that sends a POST with the id. Any suggestions?
Solved this with (instance method) self.class.post_raw("devices/#{id}/action/#{action}")
Not a solution I'm proud of but seems to do the job. Probably the API that should have a better wat to express "actions" on resources....
Trying to get her to talk to my API (Fibaro HC2 home automation)...
The Fibaro API wants a POST to be made on a resource instance with an an action name to have that resource execute a command. Have not found a way to create a custom instance method that sends a POST with the id. Any suggestions?
Eg. POST http://my.ip:80/api/devices/205/action/turnOff with empty body
The text was updated successfully, but these errors were encountered: