Event not triggered by variable set by other event

Moderator: leecollings

Post Reply
Slinkos
Posts: 81
Joined: Thursday 10 December 2015 0:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.4834
Location: Netherlands
Contact:

Event not triggered by variable set by other event

Post by Slinkos »

Hi all, I'm having a weird issue and I hope I can explain it properly.

So I made a User Variable called "Save State". It's a interger variable. In my blocky's I made it so, that "Save State" can either have value 0, 1 or 2.
The problem is, when I set the variable to one of those values, for example value "1", another blocky what is meant to be triggered, does not start. When I update the variable myself and give it value "1", then the other blocky does get triggered. How is this possible?

I hope I made my problem clear to you all, if not please tell me. :-)
mosjonathan
Posts: 40
Joined: Friday 24 February 2017 21:20
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Event not triggered by variable set by other event

Post by mosjonathan »

that is a safeguard to prevent a loop.

scripts and blockly only trigger on variables set through webinterface.

luckily there is a work around for this.

update your variable with the following command:

http://127.0.0.1:domoport/json.htm?param=updateuservariable&type=command&vname=variablename&vtype=2&vvalue=value

replace: domoport with your port
replace: variablename with name of your variable
replace: value with the value that the variable must be changed to
Slinkos
Posts: 81
Joined: Thursday 10 December 2015 0:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.4834
Location: Netherlands
Contact:

Re: Event not triggered by variable set by other event

Post by Slinkos »

Thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest