Use MSR with Vera

Well, if there’s a WebSocket open, it’s either (a) not on the version of Atoms that I have, or (b) on a port other than 17000 (as the WebSocket API is for Plus), because that location isn’t open on the Atom I have up right now. So I guess I’m going WireSharking/NMAPing to find it, unless you can get an answer…

Edit: for clarity, the socket is open and connectable, but the endpoint (Atom) doesn’t respond to hub.offline.login.ui. There’s no documentation as to any specific requirements for the Atom elsewhere, so we need engineering ( @Oleh ? ) to answer, and document the process.

And, ideally, we should also get documentation for connecting via remote access. This post had some information, but the way to get the relay server is a bit ropey (the host/domain on the second request is questionable). It seems the correct mechanism is to make the initial cloud auth request, which returns a structure that includes Identity, IdentitySignature and Server_Account. One can then request /device/device/device/NNN (where NNN is the serial number of the controller) from the host named in Server_Account, passing the Identity and IdentitySignature in the HTTP(S) headers MMSAuth and MMSAuthSig, respectively, and this will return a JSON structure that includes Server_Relay, which is a WebSocket endpoint to which you can connect for API access. So far, that seems like it has potential to be a stable process, but it isn’t official until it’s documented, and it isn’t that I can see. To go on, you then have to log in on the WebSocket connection, which requires that you send method userLoginMios with parameters MMSAuth and MMSAuthSig as before (same values as previous HTTPS request headers), and this gets you logged in locally, up and running with the API on the WebSocket. Just the name of this method (not patterned after all other API methods) makes me nervous that it’s an internal mechanism and subject to change, and again, unless and until it’s documented, it isn’t usable for production code.

As I said, I can’t find any documentation for hub login, locally or remote, from eZLO. All I’ve seen are your guide (CW’s Idiot’s Guide), and sample code from other users in both Lua and Python, but no official documentation from eZLO. Yet the API itself has official documentation. It seems a good bit “cart before the horse” to document the API officially in detail, yet have no documentation for the official mechanisms for logging in to the API, both locally and remotely. Maybe it does exist somewhere, but I haven’t found it, and if it exists, it should be the top/pinned post in the Ezlo Library category.

2 Likes