Set TimeOut Variable

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
User avatar
Ascari
Posts: 30
Joined: Thursday 28 September 2017 21:35
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.9
Location: Belgium
Contact:

Set TimeOut Variable

Post by Ascari »

Hello,

I want to set the variable (JSON) - "HaveTimeout" but I don't find the correct parameters for the URL.

I check the Wiki and try some parameter but not working, if you can help me please

Thx
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Set TimeOut Variable

Post by jvdz »

What URL have you tried that isn't working?
What did it return when you tried?

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
User avatar
Ascari
Posts: 30
Joined: Thursday 28 September 2017 21:35
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.9
Location: Belgium
Contact:

Re: Set TimeOut Variable

Post by Ascari »

User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Set TimeOut Variable

Post by waaren »

look here
for the right syntax.

http://IPDOMOTICZ:PORTDOMOTICZ/json.htm?type=command&param=updateuservariable&vname=HaveTimeout&vtype=2&vvalue=false

vtype 2 is string ; domoticz does not support boolean type user-variables
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
Ascari
Posts: 30
Joined: Thursday 28 September 2017 21:35
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.9
Location: Belgium
Contact:

Re: Set TimeOut Variable

Post by Ascari »

@Waaren,

Thank for you help but it's not a uservariable.

I do a :
http://ip:port/json.htm?type=devices&rid=58

Code: Select all

{
   "ActTime" : 1537523460,
   ....
   "result" : [
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "18.7 C",
         "Description" : "",
         "Favorite" : 0,
[b]         "HaveTimeout" : true,[/b]
         "ID" : "1401",
         "LastUpdate" : "2018-09-20 22:11:44",
         "Name" : "Temperature Eau",
         "Notifications" : "false",
         "PlanID" : "0",
         "PlanIDs" : [ 0 ],
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "idx" : "58"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}
I want to update the parameter : HaveTimeout.

I try multiple combination and always error here one test I try:
http://ip:port/json.htm?type=command&param=udevice&idx=$58&nvalue=HaveTimeout&dvalue=false

Code: Select all

{
   "status" : "ERR"
}
My device work good but blinking red beacause HaveTimeout is true and I want to correct this.

Thx
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest