Page 1 of 1

what is wrong? username and password

Posted: Wednesday 17 May 2017 21:40
by tiga
what am i doing wrong?
i have a lua script running on my raspberry with this line in it:

commandArray['OpenURL']='192.168.0.123:8080/json.htm?type=command&param=updateuservariable&vname=deltaT&vtype=1&vvalue='..tostring(delta)

that works perfect, in my settings: i dont need to use a username and password when connected to my local network.
but i want to change this so i have to implement my username and password in this line.

so this is what i did:

commandArray['OpenURL']='http://USERNAME:[email protected] ... ing(delta)

i succesfully use this command with the username and password in "tasker" on my Phone but in lua it does not work.

or can it be done more easely?

this allso does not work :(

commandArray['OpenURL']='USERNAME:[email protected]:8080/json.htm?type=command&param=updateuservariable&vname=deltaT&vtype=1&vvalue='..tostring(delta)

Re: what is wrong? username and password

Posted: Wednesday 24 May 2017 20:49
by zicht
The format is wrong...
it should be like :

Code: Select all

https://IP:Port/json.htm?username=yourname==&password=yourpassword&type=command&param=updateuservariable&vname=IETS&vtype=2&vvalue=AnDERS
Be aware you have to encode your username and password in base64
https://www.domoticz.com/wiki/Domoticz_ ... horization


Hope this helps

Re: what is wrong? username and password

Posted: Wednesday 24 May 2017 21:01
by tiga
Ok thank you very much.i give IT a try!!