Page 1 of 1

Event does not seem to work

Posted: Wednesday 09 December 2015 12:51
by elgarne
Hi,

I have 5 rooms in my house, in each, I have a heater with 3 possible states. I created then 15 virtual switches, one for each state of each heater. The states are "confort", eco" and "off". Each switch executes a script when turned "on" and does nothing when turned "off". I have also added one event by switch when turned "on" which turns the other switches of the same room to "off". Turning "on" the switches does exactly what I expect on the heater but the event seems not working, since it does not turn "off" the other switches of the same room.

Here is my config:
Image
The events are similar to this one:
Image

In the second figure, if I turn "on" the switch labeled "cuisine confort", it does not turn "off" the two other "cuisine" switches. Any idea why it does not work?

Thanks a lot.

Re: Event does not seem to work

Posted: Wednesday 09 December 2015 12:57
by elgarne
Sorry. Right after posting, I figured out that the events had not the same color on the event list and payed attention to the "enable" check box. I have enabled them all and now it is working.
Sorry for the useless post.

Re: Event does not seem to work

Posted: Wednesday 09 December 2015 13:12
by Egregius
You should add an extra if before you set it to off. Now the cuisine Eco is set to off every minute the confort is on.
But way 3 switches for each room? Isn't a setpoint better for controlling heating?

Re: Event does not seem to work

Posted: Thursday 10 December 2015 16:28
by elgarne
That's exactly what I want. Since Cuisine can be either Eco, Confort, or Off, I want only one of them with the ON icon at a given instant, that's why I turn Eco off exactly when I turn Confort on (and vice versa).

If you can explain (or point) what is a setpoint, I'll do it. Thanks.

Re: Event does not seem to work

Posted: Thursday 10 December 2015 17:37
by Egregius
Setpoint is used for temperature. Together with a thermometer you have a thermostat.

Re: Event does not seem to work

Posted: Thursday 10 December 2015 21:09
by elgarne
Thanks but I do not plan to use it with a thermometer for now.

Re: Event does not seem to work

Posted: Friday 11 December 2015 14:29
by dannybloe
Small note: whenever a blockly script doesn't get triggered I usually remove it completely and create a new one (same logic). Sometimes by some weird disturbance in the Force an event simply stops firing. Had that several times now and creating a new one almost always solved it for me.