• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with a Switch rule
#1
Hi,
I'm using pilight 7 on a raspberry with LPF from the shop.
I have an old Mumbi remote control and I want to use it to control a Logilink switch. I solved the problem with two rules. The rules part for this looks like this:

Code:
"rules": {
        "Logilink_Switch_ON": {
            "rule": "IF mumbi_E.state IS on THEN switch DEVICE logilink_3 TO on",
            "active": 1
            },
        "Logilink_Switch_OFF": {
            "rule": "IF mumbi_E.state IS off THEN switch DEVICE logilink_3 TO off",
            "active": 1
            }

"mumbi_E" is the fake mumbi switch and "logilink_3" the real switch. So when I push button "on" at the mumbi remote control the "logilink_3" should change to on and vice versa. At the webinterface the status changes reliable but the logilink switch doesn't change everytime. The rule works sometimes and sometimes not. I can't see a pattern when it works and when it doesn't.
If I change the status of "logilink_3" in the webinterface it always works.
Does anybody has an idea how I can solve the problem?
 
Reply
#2
Switching your logilink doesn't work, because the rules will cause sending to the logilink already while the mumbi remote is still sending.

You can add
Code:
... AFTER 1 SECOND

to both of your switch commands to solve this. For some remotes 1 second is not enough and then you can increase the number of seconds.

Btw. if you are using the development version you can combine both rules into one this way:

Code:
"Logilink_Switch_ON_OFF": {
            "rule": "IF mumbi_E.state IS on OR mumbi_E.state IS off THEN switch DEVICE logilink_3 TO mumbi_E.state AFTER 1 SECOND",
            "active": 1
            },
 
Reply
#3
(01-12-2017, 12:32 PM)Niek Wrote: Switching your logilink doesn't work, because the rules will cause sending to the logilink already while the mumbi remote is still sending.

You can add
Code:
... AFTER 1 SECOND

to both of your switch commands to solve this. For some remotes 1 second is not enough and then you can increase the number of seconds.

Thank you I will try this tomorrow.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  GPIO input -> starting a rule scootermacro 1 238 06-09-2019, 07:40 AM
Last Post: curlymo
  REST API problem kaku_screen_old / elro_800_switch with pilight 8.1.4 pisperate 4 577 12-20-2018, 09:26 PM
Last Post: pisperate
  [SOLVED] Home Assistant switch gpio segalion 5 878 09-10-2018, 12:39 PM
Last Post: segalion
  pilight 8.1 and switch with date and time not working Pikeman 7 1,067 06-30-2018, 11:28 PM
Last Post: curlymo
  problem with alecto_wx500 protocol (pilight V7) TheWheel 18 5,696 04-12-2018, 06:38 PM
Last Post: NevelS
  Problem with Protocol gpio_switch engel035 15 3,108 03-19-2018, 06:46 PM
Last Post: curlymo
  Set color of label from rule Ulrich.Arnold 2 572 03-11-2018, 01:15 PM
Last Post: Ulrich.Arnold
  433MHz sender - receiver problem EndruK 1 799 02-17-2018, 02:24 PM
Last Post: EndruK
  pilight-send for like rc-switch "send" mindau 1 1,514 01-18-2018, 07:46 AM
Last Post: madmoses
  [Fully Supported] Conrad RSL Switch Hexcode 137 46,509 12-02-2017, 08:48 AM
Last Post: Micha_123

Forum Jump:


Browsing: 1 Guest(s)