RFID update values when removing tag
Moderators: grovkillen, Stuntteam, TD-er
RFID update values when removing tag
Hi all,
I would like to apologize in advance if this has already been asked several times before.
My current project is to control a water hose with a RFID token.
Current setup:
- Wemos D1 mini (espeasy)
- RDM6300 RFID
- Relais for magnetic valve
- Homematic (Generic HTTP controller)
- iobroker (rules)
The water should turn on when I place the RFID Tag on reader and should turn off when removing it, but the ESPeasy stores the last RFID ID value . see picture "001.jpg"
even when I remove it.
How can I clear the value when RFID token has been removed?
Thanks
sawo
I would like to apologize in advance if this has already been asked several times before.
My current project is to control a water hose with a RFID token.
Current setup:
- Wemos D1 mini (espeasy)
- RDM6300 RFID
- Relais for magnetic valve
- Homematic (Generic HTTP controller)
- iobroker (rules)
The water should turn on when I place the RFID Tag on reader and should turn off when removing it, but the ESPeasy stores the last RFID ID value . see picture "001.jpg"
even when I remove it.
How can I clear the value when RFID token has been removed?
Thanks
sawo
- Attachments
-
- 001.JPG (20.63 KiB) Viewed 13558 times
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: RFID update values when removing tag
I would use a timer for it. And clear if after x seconds.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: RFID update values when removing tag
hi grovkillen,
thanks for your reply.
Okay I'll give it a try. Never set up a rule in espeasy before
thanks
sawo
thanks for your reply.
Okay I'll give it a try. Never set up a rule in espeasy before
thanks
sawo
Re: RFID update values when removing tag
Hi,
so last night I had time to learn about the rules and I have managed to create the rules.
The value will be set to "0" when token is removed.
But now I have the next issue, the rule causes the wemos to reboot after 24 seconds..... and also the load will be by 100%
Could any one check my 2 rules please, to see if I made something wrong?
Rule 1:
On rfid_tag_water#Tag do
timerSet,1,5
endon
On Rules#Timer=1 do
TaskValueSet,1,1,0
SendToHTTP 192.168.1.10,8181,x.exe?Antwort=dom.GetObject("Tag").State(0)
GPIO,4,0
endon
Rule 2: to switch on the relais when token is available
On rfid_tag_water#Tag do
if [rfid_tag_water#Tag]=3364040
GPIO,4,1
endif
endon
thx so far.
sawo
so last night I had time to learn about the rules and I have managed to create the rules.
The value will be set to "0" when token is removed.
But now I have the next issue, the rule causes the wemos to reboot after 24 seconds..... and also the load will be by 100%
Could any one check my 2 rules please, to see if I made something wrong?
Rule 1:
On rfid_tag_water#Tag do
timerSet,1,5
endon
On Rules#Timer=1 do
TaskValueSet,1,1,0
SendToHTTP 192.168.1.10,8181,x.exe?Antwort=dom.GetObject("Tag").State(0)
GPIO,4,0
endon
Rule 2: to switch on the relais when token is available
On rfid_tag_water#Tag do
if [rfid_tag_water#Tag]=3364040
GPIO,4,1
endif
endon
thx so far.
sawo
- Attachments
-
- log.JPG (64.77 KiB) Viewed 13415 times
-
- info.JPG (36.56 KiB) Viewed 13415 times
Re: RFID update values when removing tag
On what interval is your rfid reader (device in ESPEasy) set? If that interval is too short, like 1 second, then the load will be (close to) 100%, causing intermittent crashes & reboots.
/Ton (PayPal.me)
Re: RFID update values when removing tag
Hi,
attached you´ll find a picture of the device settings.
Nothing to change or setup.
Sawo
attached you´ll find a picture of the device settings.
Nothing to change or setup.
Sawo
- Attachments
-
- device.JPG (33.5 KiB) Viewed 13410 times
Re: RFID update values when removing tag
When I remove the rules and place the rfid token on the reader, it will reboot after 70 seconds.
Re: RFID update values when removing tag
I do see an error you could not post the data to the selected controller.
So maybe you're running out of memory while trying.
Can you set the queue depth of the active controller to 1 as a test?
So maybe you're running out of memory while trying.
Can you set the queue depth of the active controller to 1 as a test?
Re: RFID update values when removing tag
Hi TD-er,
I have removed it, now it will reboot after 44 seconds.
Maybe I´ll some thing different.
Once the rfid token is placed on the reader it will turn on the valve until I place the token again on the reader.
In this case I will not send so much data.
Could any one help me with this rule or give me a hint what to do?
SAWO
I have removed it, now it will reboot after 44 seconds.
Maybe I´ll some thing different.
Once the rfid token is placed on the reader it will turn on the valve until I place the token again on the reader.
In this case I will not send so much data.
Could any one help me with this rule or give me a hint what to do?
SAWO
Re: RFID update values when removing tag
So now it tested my new rules:
on water_on do
gpio,4,1
endon
on water_off do
gpio,4,0
endon
on rfid_tag_water#Tag do
timerSet,1,2
if [water_pump#On]=1
event,water_off
else
event,water_on
endif
endon
On Rules#Timer=1 do
TaskValueSet,1,1,0
endon
but when I hold the token on the reader it always switches the relay twince. see attached log file:
I have now idea why.
sawo
on water_on do
gpio,4,1
endon
on water_off do
gpio,4,0
endon
on rfid_tag_water#Tag do
timerSet,1,2
if [water_pump#On]=1
event,water_off
else
event,water_on
endif
endon
On Rules#Timer=1 do
TaskValueSet,1,1,0
endon
but when I hold the token on the reader it always switches the relay twince. see attached log file:
I have now idea why.
sawo
- Attachments
-
- log2.JPG (62.22 KiB) Viewed 13381 times
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: RFID update values when removing tag
Instead of :
TaskValueSet,1,1,0
Try
TaskValueSetAndRun,1,1,0
TaskValueSet,1,1,0
Try
TaskValueSetAndRun,1,1,0
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: RFID update values when removing tag
Hi grovkillen,
sorry that makes no difference.
Even when I remove this part of the rule:
On Rules#Timer=1 do
TaskValueSetAndRun,1,1,-3342336
SendToHTTP 192.168.1.10,8181,x.exe?Antwort=dom.GetObject("Tag").State(0)
endon
it still switches twince or even more often.
Sawo
sorry that makes no difference.
Even when I remove this part of the rule:
On Rules#Timer=1 do
TaskValueSetAndRun,1,1,-3342336
SendToHTTP 192.168.1.10,8181,x.exe?Antwort=dom.GetObject("Tag").State(0)
endon
it still switches twince or even more often.
Sawo
- Attachments
-
- video1.gif (2.99 MiB) Viewed 13371 times
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: RFID update values when removing tag
Please give me the full rules set, or is it that one above?
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: RFID update values when removing tag
here you go.
on water_on do
gpio,4,1
endon
on water_off do
gpio,4,0
endon
on rfid_tag_water#Tag do
timerSet,1,2
if [water_pump#On]=1
event,water_off
else
event,water_on
endif
endon
THX
on water_on do
gpio,4,1
endon
on water_off do
gpio,4,0
endon
on rfid_tag_water#Tag do
timerSet,1,2
if [water_pump#On]=1
event,water_off
else
event,water_on
endif
endon
THX
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: RFID update values when removing tag
I would do it like this (without knowing your setup 100%)
EDIT: updated rules.
Code: Select all
on rfid_tag_water#Tag=3364040 do
timerSet,1,2
Let,1,[water_pump#On]
gpio,4,[VAR#1#!Z]
endon
On Rules#Timer=1 do
TaskValueSet,1,1,0
endon
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: RFID update values when removing tag
You can read up on how to format data: https://espeasy.readthedocs.io/en/lates ... Rules.html
In the section "Formatting refered values"
In the section "Formatting refered values"
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: RFID update values when removing tag
Or if you want any tag to trigger the rule:
Your rule would trigger when you have set the tag value = 0 which isn't what you wanted.
Code: Select all
on rfid_tag_water#Tag>0 do
timerSet,1,2
Let,1,[water_pump#On]
gpio,4,[VAR#1#!Z]
endon
On Rules#Timer=1 do
TaskValueSet,1,1,0
endon
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: RFID update values when removing tag
Hi grovkillen,
thanks a lot for helping me.
One question, what does the [VAR1#!Z] stand for, do I need to create a variable or device?
When I copy your rule nothing happends, what do you need to know from my setup?
thx
thanks a lot for helping me.
One question, what does the [VAR1#!Z] stand for, do I need to create a variable or device?
When I copy your rule nothing happends, what do you need to know from my setup?
thx
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: RFID update values when removing tag
I had an error in my rule which I have corrected.
Let,1,[task#value] <---- this sets the first internal variable (16 maximum) to what ever value your pump have.
[VAR#1] is now the same value as [pump#state] (or whatever you called your task and value).
[VAR#1#Z] is making a transformation of the value, but we want this transformation to be inverted and thus:
[VAR#1#!Z]
You can read about it in the page I linked to.
Let,1,[task#value] <---- this sets the first internal variable (16 maximum) to what ever value your pump have.
[VAR#1] is now the same value as [pump#state] (or whatever you called your task and value).
[VAR#1#Z] is making a transformation of the value, but we want this transformation to be inverted and thus:
[VAR#1#!Z]
You can read about it in the page I linked to.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: RFID update values when removing tag
Hi grovkillen,
thanks a lot for explaining.
But the issue still exists, I think that the interval of the RDM6300 is set to high.
When I quickly put the tag on and off it only swichtes once, but if I old it on for about a 1/1,5 second it will switch 2 or more times.
Is there a possibility to pause the reading of the RDM6300, by rule, for a few seconds or increase the interval?
attached is the log from around 1 second, holding the tag on the reader.
thx
sawo
thanks a lot for explaining.
But the issue still exists, I think that the interval of the RDM6300 is set to high.
When I quickly put the tag on and off it only swichtes once, but if I old it on for about a 1/1,5 second it will switch 2 or more times.
Is there a possibility to pause the reading of the RDM6300, by rule, for a few seconds or increase the interval?
attached is the log from around 1 second, holding the tag on the reader.
thx
sawo
- Attachments
-
- log3.JPG (72.88 KiB) Viewed 13316 times
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: RFID update values when removing tag
That sounds like a design flaw. Please open a issue on GitHub and refer to this thread
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: RFID update values when removing tag
@grovkillen
thanks a lot for helping, I have created an issue.
thanks a lot for helping, I have created an issue.
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: RFID update values when removing tag
Great! And thank you for reporting this issue.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Who is online
Users browsing this forum: No registered users and 31 guests