Page 1 of 1

Esp Easy Mega & RFID

Posted: 24 Sep 2019, 15:07
by LJSven
Hi everyone,

i´m new on ESP EASY - i would like to open my Garage with a RFID reader. I found a project, but it´s not working 100%. When i put the card in front of the Reader i get a value, but the RULE generate a different value. See screenshots. What is the reason or problem in this case?
Bildschirmfoto 2019-09-24 um 08.22.24.png
Bildschirmfoto 2019-09-24 um 08.22.24.png (70.61 KiB) Viewed 11837 times
Bildschirmfoto 2019-09-24 um 08.23.26.png
Bildschirmfoto 2019-09-24 um 08.23.26.png (64.66 KiB) Viewed 11837 times

Re: Esp Easy Mega & RFID

Posted: 24 Sep 2019, 23:36
by TD-er
That's a rounding error due to the fact the values are stored as a float.
A float only has 20 bit of resolution, which translates into roughly 6 or 7 decimals.
You're trying to store a 32 bit unsigned int in there.
You can store it into 2 variables, but then it is making the rules quite complex when using more cards.
You can also check if the values of several cards are in some range and then subtract the lowest value from whatever you read.
But I guess the tag ids can differ quite a lot per batch you buy, so that will not help you a lot.
You can also use the read values directly in the rules themselves.

on rfidreader#tag=123456789 do ....
Not sure if the syntax is correct, but that's easy to check :)

Re: Esp Easy Mega & RFID

Posted: 25 Sep 2019, 08:47
by Prutsium
I use also an RFID reader to open the front door and works perfect (at least with an older built of ESP Easy since there where some changes in the rule system where my "trick" didnt work anymore.
In this post you can find how i did the rules to handle the cards / opening
viewtopic.php?f=6&t=6991