Event not triggered by variable set by other event

Post Reply
Slinkos
Posts: 106
Joined: Thursday 10 December 2015 1:21
Target OS: Raspberry Pi
Domoticz version: 3.4834
Location: Netherlands
Contact:

Event not triggered by variable set by other event

Post by Slinkos » Saturday 07 October 2017 1:00

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: 70
Joined: Friday 24 February 2017 22:20
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Event not triggered by variable set by other event

Post by mosjonathan » Sunday 08 October 2017 15:21

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: 106
Joined: Thursday 10 December 2015 1:21
Target OS: Raspberry Pi
Domoticz version: 3.4834
Location: Netherlands
Contact:

Re: Event not triggered by variable set by other event

Post by Slinkos » Sunday 08 October 2017 22:56

Thanks!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest