As we discussed before, here is the API description for:
Enable or disable insecure access (WS and HTTP as opposed to secure WSS and HTTPS).
You may want to enable it if self-signed certificates used on controller are not supported in your client software.
Enable or disable anonymous access (without authentication via hub.offline.login.ui for requests via WS API or HTTP basic authentication for requests via HTTP API)
Notify controller about new local access data availability.
Login to Controller via direct connection as user
Login to Controller via direct connection as controller
It will be possible to enable/disable basic auth and remove all security by own choice and have the same simple one line commands how it works now on Vera hubs.
If you need security, it will be possible to enable it through api request.
It will be available in our next Thursday’s release
You have to use the API Tool https://apitool.ezlo.com/, select your Ezlo Plus hub, click Connect, then API Calls “Not Listed” and enter the below in the Textbox.
Yes the id is useful for websocket communication with the hub as the reply will include the same id. As websockets are asynchronous the replies may be received out of order. The id will tell the receiver what the reply is for if order is relevant.
The curl options should be specified before the url argument. Also, you can use the --verbose option to see what is happening under the hood. I also see that you are trying standard http vs https presumably because you are trying to set the hub to insecure local mode. What happens if you use the following?
I think you have to use https but since you enabled anonymous acces you don’t need to use an auth token. You won’t get any feedback in a browser, just a blank page or in some cases “the page can’t be reached” but if you have the MiOS app open you can see that the scene runs instantly when called from a browser with https. Quite impressive that the app is updating live!
that’s because they’re using websockets. that’s a bi-directional socket connection between clients and servers. So, servers can push update to the client without polling. Less memory, less CPU and better UX for apps. That’s a right approach, kudos to the team for that.
So why isn’t it working and why am I seeing this error ?
HTTP/1.1 500 Internal Server Error
content-type: application/json
connection: close
{
"error": {
"code": -32602,
"data": "rpc.params.wrong_field",
"message": "Wrong field of object",
"reason": "Item not found by id: 5f4e5871120bab1069c13c49"
},
"id": "5f54bcf1120bab191bf1dbe7",
"result": {}
}
If I try it using Curl instead I see the same thing: