Esp Easy Mega & RFID

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
LJSven
New user
Posts: 2
Joined: 24 Sep 2019, 15:04

Esp Easy Mega & RFID

#1 Post by LJSven » 24 Sep 2019, 15:07

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 11786 times
Bildschirmfoto 2019-09-24 um 08.23.26.png
Bildschirmfoto 2019-09-24 um 08.23.26.png (64.66 KiB) Viewed 11786 times

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Esp Easy Mega & RFID

#2 Post by TD-er » 24 Sep 2019, 23:36

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 :)

Prutsium
Normal user
Posts: 39
Joined: 29 Mar 2018, 15:39
Location: Germany / Netherlands

Re: Esp Easy Mega & RFID

#3 Post by Prutsium » 25 Sep 2019, 08:47

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

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests