Strange log with blockly script

Moderator: leecollings

Post Reply
User avatar
capman
Posts: 157
Joined: Friday 12 July 2013 20:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Belgium
Contact:

Strange log with blockly script

Post by capman »

I have a script that switch a dummy switch on (iemand thuis) (somebody home) if this switch is off and person 1 is home or person 2 is home or person 3
is home then switch dummy switch ON. But in my log I see this strange logging.
iemand thuis.JPG
iemand thuis.JPG (40.29 KiB) Viewed 824 times
log.JPG
log.JPG (247.74 KiB) Viewed 824 times
Somebody know what to do. I restart domoticz a couple of times.

And , that is also strange , I saved it in blockly with the name 'iemand thuis nu' (somebody home now) and not 'iemand thuis nu_1' (somebody home now_1). I can't see no loop in my script :?:
User avatar
jvdz
Posts: 2445
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Strange log with blockly script

Post by jvdz »

I am not an Block fan (expert) but when one of the OR's is true I expect that Thuis is sswitched on... and this each time a device changes which results in an endless loop.
I guess you should have the 2 switches with the OR relation in one leg of the AND.
so something like:

Code: Select all

If Thuis = Off
And Life 360 1 = On OR life 360 2 = On OR life 360 3 = On 
Set Thuis = On
I still prefer Lua as then you simple put it inside of brackets. :)

Jos
User avatar
kuifje
Posts: 36
Joined: Wednesday 25 October 2017 16:38
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Heemskerk
Contact:

Re: Strange log with blockly script

Post by kuifje »

The iemand thuis nu _1 is the first event triggerd within iemand thuis nu.
No worries.
Groet,
Kuifje
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest