I am looking for some help to be able to shorten the below rule as when i would add all the tags i require i will exceed the character limit from the rules.
This is for a small project with RFID tags to open a door by various users.
The idea is that each tag sends a "Text" string and if the Tag matches it activates the Timer,1,5 so that the relay stays On for 5 seconds and after that the relay is set to off.
What is below is working so thats no issue it's a matter of cleaning up
Code: Select all
On RFID#Tag do
if [RFID#Tag]=1899267376
gpio,13,0
gpio,14,1
publish domoticz/in,{"command": "switchlight", "idx": 125, "switchcmd": "On" }
publish domoticz/in,{"idx":124,"nvalue":0,"svalue":"Card"}
timerSet,1,5
if [RFID#Tag]=2271020827 // Jerome
gpio,13,0
gpio,14,1
publish domoticz/in,{"command": "switchlight", "idx": 125, "switchcmd": "On" }
publish domoticz/in,{"idx":124,"nvalue":0,"svalue":"Tag"}
timerSet,1,5
endif
endon
On Rules#Timer=1 do
gpio,13,1
gpio,14,0
publish domoticz/in,{"command": "switchlight", "idx": 125, "switchcmd": "Off" }
endon
