How to update a variable via json on a remote domoticz Topic is solved

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
aleph0
Posts: 85
Joined: Thursday 12 May 2016 15:47
Target OS: Linux
Domoticz version: 11838
Location: South of France
Contact:

How to update a variable via json on a remote domoticz

Post 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 ?
aleph0
Posts: 85
Joined: Thursday 12 May 2016 15:47
Target OS: Linux
Domoticz version: 11838
Location: South of France
Contact:

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

Post by aleph0 »

Nobody ?

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

User avatar
felix63
Posts: 244
Joined: Monday 07 December 2015 9:30
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Location: Gouda
Contact:

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

Post by felix63 »

Hi,

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

Bon chance
HvdW
Posts: 612
Joined: Sunday 01 November 2015 22:45
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Twente
Contact:

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

Post 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.
Bugs bug me.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

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

Post 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
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
aleph0
Posts: 85
Joined: Thursday 12 May 2016 15:47
Target OS: Linux
Domoticz version: 11838
Location: South of France
Contact:

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

Post 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 :-)
Post Reply

Who is online

Users browsing this forum: Amazon [Bot] and 1 guest