What I could fabricate is a python script that will generate a curl config file so you can use curl commands. See attached.Ezlo_create_curl_config.zip (2.2 KB)
So, it can be made to work, but quite cumbersome to access my controller on my local network. Settings like on the Vera FW should be added to allow direct access if I choose o want so.
I entered the local IP of the Ezlo Atom the serial number of the Atom and my Vera account username and password. I hit enter in the command prompt and it just returned to the prompt on the next line no output was shown.
I have an @ in my password if that maybe related? Just a guess.
OK I’ve installed Python 3 on to my Windows 10 laptop and now the command runs but I see this output returned.
Traceback (most recent call last):
File “C:\Users\username\AppData\Local\Programs\Python\Python38\Ezlo_create_curl_config.py”, line 12, in
import requests
ModuleNotFoundError: No module named ‘requests’
I followed this install guide here for both Python and Pip. I also added the path to C:\Users\username\AppData\Local\Programs\Python\Python38 in to the Windows Environment Path System Variable and rebooted.
However I still get the same error even though PIP is now installed as confirmed by a command pip --version
C:\WINDOWS\system32>Ezlo_create_curl_config.py 192.168.1.240 72260304 username password
Traceback (most recent call last):
File “C:\Users\username\AppData\Local\Programs\Python\Python38\Scripts\Ezlo_create_curl_config.py”, line 12, in
import requests
ModuleNotFoundError: No module named ‘requests’
C:\WINDOWS\system32>pip --version
pip 20.2.1 from c:\users\username\appdata\local\programs\python\python38\lib\site-packages\pip (python 3.8)
Maybe I should make a Lua version you can run on a Vera? I have nearly all code from the EzloBridge plugin so it should be doable. It is just that python has much better (read up to date) network function support so i use that to figure out the correct requests and then try to do that in Lua so i do not get stuck because of the poor Lua network modules.
But, I am not a python expert by any means, so installing in on Windows I cannot help you with. I would advice my standard consultant: google search
I use Oracle VirtualBox and created a Pi like VM running openLuup and all for development. Makes it simple to restore or restart from scratch if i mess up. Many ways to skin a cat.
Warning: error trying read config from the ‘ezlo_curl_auth’ file
curl: (77) schannel: next InitializeSecurityContext failed: SEC_E_UNTRUSTED_ROOT (0x80090325) - The certificate chain was issued by an authority that is not trusted.
I placed that ‘ezlo_curl_auth’ file in my C:\curl folder wasn’t sure how it would find it.
No. You want to put all the lines output by @reneboer’s script into the ezlo_curl_auth file. You should have 3 lines total. curl will read the file specified by the -K argument and use the lines as if you had typed them on the command-line to curl.