This object is in archive! 

Rules evaluation prolem?

Martin shared this problem 6 years ago
Known

i have a simple rule, where counter goes always from 1 to 10, 1 to 10 ....

/2ee8bddc6e008115802ccb9964ef01da

how can it happen, that the counter gets to 11? and sometimes does not reach 10...

at 11 the rule stopped.

/60f493f441e6fb0fb64343ad59baf73b

/87f4d69fb6ef584c26c52b7daa5236af

/5a77b0905298cff0b11e7ffc7cbab44b

Replies (7)

photo
1

Weird. True when it reaches 10 it should be reset to 1, but if that fails, next time it will be incremented to 11 and then the rule can't reset it to 1 anymore. Maybe Set Counter to Get Counter + 1 doesn't behave properly. Can you try to use a variable to read the counter and then increment the counter with the variable.

Also I think some events are lost, this happens for all type of devices. I remember that the old dahsboard (now gone) was displaying more events than the current one. See https://community.zipato.com/topic/events-not-properly-reported-in-new-web-ui

photo
1

Well I see two things here;

1. The way your rule is it technically will never get to 10, because right after when you have 9+1 you set it back to 10 in the following instruction, which to me could happen very fast. Remember Virtual devices are linked to Zipato cloud therefore there is a lag time. I think that is why you never see it reaching 10, if you want it to reach 10 then change second evaluation from "=10" to ">10" and take it out of the "BETWEEN" evaluation, put it right after.

2. I think it could be the fact the rule is faster than the value updated in the cloud and since your rule looks for "=10" at one point it didn't reset due sync delays. Try doing what I suggested above.

photo
1

Alberto, your explanation makes sense, however someone from Zipato should explain how it works and how the system behaves.

It's ok, that I don't get result 10 when the procedure ends, but I was missing the 10 in the log. If the values are written to cloud asynchronous, the 10 should arrive, even when 1 arrives earlier.

when I noticed this behaviour, I changed the condition to >, to be on secure side.

But, how can I trust the system, when i need to store data between two rules, where every is triggered by other event and I need to exchange some states.

i don't have PRO, so i cannot use variables.

photo
1

Can you try adding wait at some stage? Before the 2nd if.

photo
1

I don't have PRO and I can't send variables to http request but I still can use variables in rules.

photo
1

ok, I added a wait clause:

/5GjDZmju3v1AAAAAElFTkSuQmCCAA==

now, it works "better", counter is still running, I see this 3 scenarious:

/AZ3ZjEj7ilrzAAAAAElFTkSuQmCCAA==

i will increase now wait to 5 sec

photo
1

rule works with 5sec waiting as it should

Leave a Comment
 
Attach a file