As far as I understand the api-explorer online documentation you would have to use “POST /rules”.
I didn’t find any example but these two threads:
Hi i just recently started playing with openhab2 and one thing that i’m missing is an easy way to do scenes.
So i was looking into creating a little web-app to help with that. So what i want to do is this:
get a list of all Items filtered by group and/or type
let the user select multiple items
let the user enter a name for the scene
create a Switch Item for the scene
create a rule that sets the state of all selected items to their current states
Now i have been playing with the REST-API and …
Hi all,
I have been experimenting with the python REST API https://pypi.org/project/python-openhab/ and it seems to be working well for basic commands and what I want it to do.
I was just wondering if there was any useful info/tips anyone has gained from using the REST API through python that they would like to share? Possibly even if anyone has had a better experience using the REST API with a different language other than python?
Thanks
Based on the first one I would suggest to create a rule manually via the UI and compare the parameter that you havein the code explorer via the code in your rule.