This object is in archive! 

Problem with a virtual switch (for Alexa)

Klaus G shared this question 7 years ago
Need Answer

Can someone help me with this rule?


It worked perfectly until I added a virtual switch (triggered by Alexa via IFTTT) Alexa sets a switch to true and the rule triggers. So far no problem. But with both remotes it runs perfectly, with the switch only sometimes. Sometimes all light work, sometimes only some lights, sometimes the lights go off as expected, but on again after 30 sec. I haven´t got a clue.... Perhaps an issue with virtual switches or IFTTT?


Any help is appreciated. I also tried to switch the virtual switch back at the end of the rule (to prevent multiple execution of the rule but that made things even worse ;-(((


And another question: I´ve got a motion activated light in the corridor. Is there any chance, to "trigger" the Fibaro Motion sensor from another rule (without movement)? I would like to start that light right when my mother switches of the lights in the living room. I tried it as in picture aaa.png but that doesn´t trigger the other rule ;-(

Replies (6)

photo
1

Concerning your second question:

AFAIK, you cannot set the STATE of a motion sensor. You can only read this value. So "aaa.PNG" won't work. I guess I would just add the corridor light to the living room switch rule.


Looking at your first rule, I dont understand why you have the remotes in the WHEN block, and not just the Alexa switch?

photo
1

OK, thanks a lot, I already feared, that there is no chance to trigger the sensor ;-(


Concerning your second question: I used to switch lights on and off with the two buttons of the remote, then got Alexa and now I changed the rule to toggle between on and off, regardless of which button I press OR with Alexa. So if the rule doesn´t work (due to problems with zipato/iInternet/IFTTT) I can change the state by simply clicking any button on the remote. So even if some buttons fail, I can toggle lights on or of and don´t have to rely on a specific button.

photo
photo
1

You have an untidy rule. For example the Nachtmode with Active state is twice.

If you expect in a rule that a switch will possibly be used both states, you need to use refresh piece as the rule without refresh puzzle will always assume the state of used devices as they were at the beginning of the trigger.

photo
2

I think I have to explain the purpose: The first "If nightmode is active" makes sure a lamp in the next corridor goes on when my mother switches off the lamps in the livingroom. The second "If nightmode is active" is there to make sure the last light in the livingroom goes off with a decent delay to make sure my mother reaches the corridor. If I had put everything in the first "If..." the other lights would stay on until the time is up. Nightmode is just my virtual switch which is active from 30 min after sunrise until 30 min before sunset.

photo
1

Have a look on the recommendation.

photo
1

Thank you Attila, I took most of your ideas and the rule looks tidy now.

(I think I don´t need the Join at the beginning because I don´t want

the rule to "retrigger" and if by coincidence I start the rule and the

day/night switch changes state it really doesn´t matter.


But one question remains (thats the reason I now separated the trigger with Alexa from both remote controls.):


If

I start with "If virtual switch is active" and set it back at the end

of the rule (or even at the begining), sometimes it worked, sometimes

not. Sometimes all lights went on or of and then, at the end of the rule

or sometimes later, changed their state again. Sometimes not all of the

lights go on, sometimes only some of them.


Now, with "If

virtual switch is any state" and a second "If virtual switch is

active"everything works. Isn´t that a bug? I think I remember that with a

two seconds delay it worked but that was too much delay, given the time

used bei Alexa and IFTTT. That makes it more difficult to use more

triggers for one rule.

photo
1

Well, you need to remember that if you want full dependence on a state of a device, you always need to start rule with state change "Any". because in case of "On" when the state was on and retrigger to on, will not fire the rule.

And there is the unknows factor. Once I have used random puzzles in a rule to simulate home state. Once the rule fired once, the whole zipatile went beserk and different light were switching on their own without being able to stop it. Even the zipato team were shocked. I never used the random puzzle again as it is dangerous. The rule looked to me tidy, but still, had to completely remove and watch the system to get stabilized with the help of the support.

So not everything is explainable but at the end if the 1st rule is working fine, then that is what matters. Remember, rule startw with state "Any" and then in the 1st if block is the "On'.

Leave a Comment
 
Attach a file