• 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:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule reset status
#1
Hello,

i've created an rule to rest an status, because the PIR that i use only sends "closed". But it dosen't work:


Code:
"rules": {
                "Bewegungsmelder1": {
                        "rule": "IF motion.state IS closed THEN switch DEVICE motion TO opened AFTER 1 MINUTE",
                        "active": 1
                }
        },


Any ideas?

Best regards
Marc
 
Reply
#2
What protocol is "motion"?
 
Reply
#3
(06-16-2015, 09:18 PM)curlymo Wrote: What protocol is "motion"?

Code:
"motion": {
                        "protocol": [ "sc2262" ],
                        "id": [{
                                "systemcode": 0,
                                "unitcode": 5
                        }],
                        "state": "opened"
                }

(06-16-2015, 09:18 PM)curlymo Wrote: What protocol is "motion"?

if i Change it manually to opened it changes it back to "closed" if the PIR sends data
 
Reply
#4
If you use the latest nightly, you can do this:
Code:
IF sc2262.systemcode == 0 AND sc2262.unitcode == 5 AND sc2262.state IS closed AND sc2262.repeat == 1 THEN ...
 
Reply
#5
How could i change the Branche from master to nightly?
 
Reply
#6
Read the manual.
 
Reply
#7
(06-16-2015, 09:56 PM)curlymo Wrote: Read the manual.

Ok, but just one question. Shouldn't the rule i posted work in the current Version?
 
Reply
#8
Not if the state transmitted is the same. The "devices" approach only works when actual updates are received. So closed -> opened, or opened -> closed.
 
Reply
#9
so this means, i cant "reset" the Status of a device after a period of time the device received no updates?
 
Reply
#10
You can write rules that reset the state, but not in version 7.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  GPIO input -> starting a rule scootermacro 1 201 06-09-2019, 07:40 AM
Last Post: curlymo
  Set color of label from rule Ulrich.Arnold 2 540 03-11-2018, 01:15 PM
Last Post: Ulrich.Arnold
  rule fails with ping state pinu 1 938 06-09-2017, 10:14 AM
Last Post: Niek
  pilight rule does not execute pinu 1 883 06-09-2017, 10:01 AM
Last Post: Niek
  Problem with a Switch rule viper2035 2 1,310 01-12-2017, 04:33 PM
Last Post: viper2035
  usb will reset gpio koos147 3 1,481 02-23-2016, 08:12 PM
Last Post: koos147
  rule with suneset and datetime gets an error Rschnauzer 1 1,053 02-02-2016, 04:36 PM
Last Post: Niek
  rule #1 invalid: trying to compare string variable "datetime.hour" to an integer Michel 3 1,270 12-14-2015, 10:11 PM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)