This object is in archive! 

How to use Virtual Switch in IF Rule

Alain shared this question 8 years ago
Need Answer

Hi,

I want to use a virtual switch in a IF block (the behaviour of the rule depends on the switch status when the Rule is fired).

Is it possible?

I think I tried every combinations possible, but that never worked...


Thank you for your help

Files: zipa.JPG

Replies (10)

photo
1

This one trigs every time that "Z Solen uppe" goes "ON".

photo
1

Thank you.

But that I want to do is to allow or avoid the action of the rule (here send a message) with the status of "Bloque Store" Switch. The Rule is triggered by "Test Switch", if "Bloque Store" is ON do something, if "Bloque Store" is OFF do nothing.

May be there is another solution to do that.


My goal is to prevent a roller shutter controled by a Fibaro module and a electrical switch to move even if the the roller shutter receive the order to move from the electrical switch (in fact neutralize the electrical switch).

photo
1

You must describe the technical solution more exact to answer this.

If you have a signal from a manual switch or somethings that acts similar to a manual switch connected. You can't prevent that signal. But you can listen and react.

photo
photo
1

Sorry. I didn't think that part was a problem.

photo
1

Wrong language. In English.

photo
1

Alain, are you perhaps experiencing the virtual switch state synch problem that happens after reboots or disconnects?


What are you seeing? Does the message never get sent? Or always get sent?

photo
1

Hello,


I dont know for the rule synch, but it's very long...

The message is never sent.

Actually I did exactly what henryfredrikson suggested, without success.

I tried using the http switch as Actuator (Attribut Events=On) or as Control (Attribut Events=On or Action Events)

photo
1

I have several solutions like that I described, sending messages, and they works.

Test to blink a lamp with the method. Maybe the message is the problem.

photo
photo
1

Try a couple of things:

1) Toggle your Bloque Store switch twice, to make sure that it's really on. Sometimes what happens is that we are seeing a switch as "on" in the cloud, but because of a disconnect or reboot it's actually off in the Zipabox's memory. (off, or in a "null" state). Toggling the switch twice will resynch it and ensure it's on. Then run your test rule and see if it works. If it does, this is your problem.


2) Try using a variable instead of a virtual switch, if you can. See if that works.


If 1) is confirmed, then you might find that 2) works more reliably. Also look up "reboot detector" to see what Henry and I have done to get around the state synch problem.

photo
1

I should also say that, if you have the state synch problem, Zipato claim that it's fixed in the newest beta firmware. But I can't confirm that yet. I'm still testing. You could try the beta firmware to see if it helps.

photo
2

David, you got it.

I moved the Bloque Store Switch a couple of times and ... it works !!!


Thank you all for your help.

(grrrr 2 hours just for that and my home credibility at very very low level...)

photo
1

Right, so it's definitely the switch state synch problem. The web interface is "lying" to you about its true state.


1) Try a variable

2) Try updating the firmware

3) Try setting up a rule to detect reboots and reset the switch states after the reboot

4) If the switch state is something that you can derive from basic information like time/date etc, try setting up a rule to recalculate its state every 10 minutes or half an hour or whatever.

photo
2

Ok, Thank you for your advices.

I did already an fw update and the wrong status "survived" to several reboots...

photo
1

Ah, good to know!

photo
Leave a Comment
 
Attach a file