To be able to control OpenHAB using widgets on my iOS devices i tried to make Workflow work. Since there is not a lot of documentation to work from i’m posting this.
To start off add a “Text” action, this is used to post the body of the API request. I mostly use TOGGLE here, but if you want a dedicated ON or OFF button that is possible as well, just put the respective value in the “Text” action.
After that add the “URL” action, here you can define the url according to the following parameters:
The last action you’ll have to add is the “Get Contents of URL” action and click on advanced, the following parameters are required:
Key: Content-Type Text:text/plain
Key: Accept Text: application/json
Request Body: File
Click to add file and than choose “Magic Variable” which makes you able to select the “Text” from the first step. Now the Workflow should work
The drawback is that with these settings it is only possible to use the workflow widget when using my home wifi. I have been trying to make it work using a remote connection, but that has not worked out yet…
If you have any questions or remarks feel free to reply!