Its a long time ago now we looked into all this and wrote about it on the forum, so I forget a lot of it now.
But I think the reason why we initially needed that python script to get the token, was because at that time there was no way to turn OFF authentication for use with the Ezlo Controllers HTTP/S Server API.
On the Idiot’s Guide I wrote on the first post of that thread I talked about this Python script.
Once you have your token, I then created a file called “ezlo_plus_curl_auth” and added the token into it, something like this:
-H "Authorization: Basic FGYGHCE3NjAtYTdkZC0xMWU5LWJiOTYtNjdiZGM4MzAzYzBmOmhoX202OEdmQE4tVFBBUnNtIV9rMm0tMWVzZ2pYKlQ0ZUlQbmUNFCSzMERaJTZjWC1PViFHUTFMJVVRMmxNS2VBMWtmQl84RkE1WDkyazRXITN+LW0walVYWVFRb2VncHhvFJUBDWh3VmtJdDhSaWUjTy1YQVF1ejNwMHJpX3RxYWlWUkpaRm82UVlONnB2bG04TypZfnBUcXIxLTV5U21HT25aZiQ0UkF3Y3Zoc34yI2dsS1QjSiRCJDNlZyoycXIkNFF+a0NHcFljWG51b3lZM0ZMMSE1JXE5MUkyBVDSWTIyYy1kNTZlLTQyZWYtYmM3Ny05ZDhkZDNjODk2NTc="
--insecure
--http1.1
We could then use a local CURL command like this to query the Ezlo Controllers HTTP/S Server API.
Where the IP 192.168.0.40 was the IP address of the Ezlo controller (I used DHCP reservation on my router, to ensure that IP address would not change).
curl -K ezlo_plus_curl_auth https://192.168.0.40:17000/v1/method/hub/info/get
Later Ezlo added a way for us to turn OFF the authentication altogether, so we no longer needed any token. See the second post on that thread, where I talk about “offlineAnonymousAccess” and “offlineInsecureAccess” being set to false.
This was fine for me, for local LAN comms as long as we didn’t port forward port 17000 to the Internet.
I don’t believe at any point I ever attempted to use the Ezlo Controllers HTTP/S Server API remotely via the Internet and via some kind of Ezlo relay server. Or by just using my static ISP WAN IP address or a Dynamic DNS domain name service and port forwarding and sending commands directly to it that way.
Others may have done that and got it working?