Has anyone successfully used the REST API with the new MyOpenHAB could service? I’m trying to use Tasker to trigger an item via the cloud service and I’m not having any luck. So far I’ve tried:
path = /rest/items/FrontPorchLight
https://myopenhab.org, same path
I can’t seem to figure this one out. Any help is appreciated.
I got this working with the following:
The trick was percent encoding the ‘@’ in my email address / username.
Did you also try a POST to toggle a light for example?
I use Postman to send a HTTP POST request but I only get this back without an update of my item:
"label": "Bed light",
When I send the same plain\text command “ON” to the local url “http://IP_ADDRESS:8080/rest/items/Z1_OO1_Heater_State” this works perfectly. Can someone tell me why and how to fix it?
@rlkoshak , I have a feeling that you could help me on this matter. If you have time, it would really be helpful!
You have to include basic auth in your URL. When going through
myopenhab.org you must provide your username and password or else it doesn’t even have a way to know what account you are trying to connect to let alone whether you are authorized.
Look at michaeldavie’s example URL above.
The general format is
I did use this basic auth as you mentioned. But the response with is just:
"label": "Bed light",
My content-type is text/plain and the body is ON. I tried to point out that it works like this with the local url but that I cannot get it working with the myopenhab url. Do you have any idea why?
Are you certain this is a POST? When I do a POST to command an item the response body is empty. That looks like a GET response body.
Can you bring up the REST API Docs through
myopenhab.org and make the call through the Docs?
You just made me solve my own question, thank you Rich!
I had to use
home.myopenhab.org and HTTPS instead of HTTP.
Another question, is myopenhab a reliable solution? If no, what are the alternatives and how to implement them?
myopenhab is just an running instance of
You can set up your own cloud instance instead of using the one hosted by the OH foundation.
A tutorial for this can be found here:
Because of the recent myopenhab outages I've decided it would be better in the long run if I ran my own instance of the openhab-cloud. I spent a couple of hours walking through the setup to get it working and recorded how I did it incase someone wants to do the same.
Requirements * A server or VPS somewhere exposed to the Internet that you can dedicate to running openhab-cloud. I’m using Linux and have no experience in Windows. * A domain name you can use (subdomain is fine) * Some knowledge o…
I use it to open my garage doors. In the past year or so I’ve never had a failure. There are occasional downtimes but thoes have become more and more rare over time.
If you don’t want to depend on the services, like Jerome mentions, you can set up your own instance.
I had some more downtimes in the last time,
but didn’t want to blame anyone or anything before investing eneough time in failure research.
Is it possible to register user through URL as you did above for user login ?
I do not think this is possible.
Verstuurd vanaf mijn iPhone