Page 1 of 1

How to update a variable via json on a remote domoticz

Posted: Thursday 14 January 2021 13:46
by aleph0
Hi All !

I'm in need to update a variable on a remote domoticz via json & curl :
- remote domoticz is IP accessible on port 8080
- a dedicated user exists, with "user" rights on a remote domoticz and a few devices authorised
- this user can be successfuly used to update remotely that devices via json & curl
- but If I try to update a variable with curl "http://user:pass@ip:port/json.htm?type=command&param=updateuservariable&vname=SunRayDirect&vtype=1&vvalue=106.0" I always get a 403 Forbidden answer and can't figure out how to autorize my user to update a var :?:

Of course a workaround can be to use a device instead, but it's overkill for my need :-/

I'm I missing something ?

Re: How to update a variable via json on a remote domoticz

Posted: Saturday 16 January 2021 21:52
by aleph0
Nobody ?

Envoyé de mon moto g(6) en utilisant Tapatalk


Re: How to update a variable via json on a remote domoticz

Posted: Saturday 16 January 2021 22:51
by felix63
Hi,

Try using the username, Password from Settings / Website Protection instead of those of one of the Domoticz users.

Bon chance

Re: How to update a variable via json on a remote domoticz

Posted: Sunday 17 January 2021 0:33
by HvdW
In case you have a Raspberrypi I suggest you'd start by installing PiVPN using wireguard.
Your startpoint then will be a secure encrypted connecting.
Once connected it will be as if your inside your device running Domoticz.
All the freedom with a secure connection.

Re: How to update a variable via json on a remote domoticz

Posted: Sunday 17 January 2021 0:35
by waaren
aleph0 wrote: Thursday 14 January 2021 13:46 I'm I missing something ?
You need admin rights to update a uservariable

See this github issue

Re: How to update a variable via json on a remote domoticz

Posted: Monday 18 January 2021 21:19
by aleph0
waaren wrote: Sunday 17 January 2021 0:35 You need admin rights to update a uservariable
It works :-) Thanks for pointing this out :-)