RFI RC522 Support

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
garnold
Normal user
Posts: 93
Joined: 17 Jun 2019, 03:59

RFI RC522 Support

#1 Post by garnold » 08 Mar 2021, 23:18

I have read on the forum that ESPEasy does support this device via SPI. I was hoping to find some information on how to setup an example. Do I need a specific build to have this device in the list?
Thank you

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: RFI RC522 Support

#2 Post by Ath » 09 Mar 2021, 08:18

I have an open PR in ESPEasy to include this device, but I'm still ironing out some wrinkles. Should be Plugin P111, an updated version of P129 in the sources from the ESPEasyPluginPlayground repo.

If you can build your own, you could get that PR local en build yourself. It isn't included in any build configuration yet, because of size issues.
/Ton (PayPal.me)

garnold
Normal user
Posts: 93
Joined: 17 Jun 2019, 03:59

Re: RFI RC522 Support

#3 Post by garnold » 09 Mar 2021, 13:59

Understood and thank you. Building my own builds is still out of reach for me but since my last two requests seem to point to building my own version of this firmware, I think I need to pull up my big boy pants and figure this out.

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: RFI RC522 Support

#4 Post by Ath » 09 Mar 2021, 14:14

garnold wrote: 09 Mar 2021, 13:59 I think I need to pull up my big boy pants and figure this out.
Then this documentation is going to help you: https://espeasy.readthedocs.io/en/lates ... ormIO.html (Some people seem to assume that Arduino IDE is 'easier', it really isn't, for ESPEasy :), unless you're a crafted veteran in using Arduino IDE)

There is also a YT video by TD-er available, but I don't have the link (it's been posted here before). Please start off with installing the Git command-line tools, you're going to need them.
/Ton (PayPal.me)

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

Re: RFI RC522 Support

#5 Post by TD-er » 09 Mar 2021, 14:53


garnold
Normal user
Posts: 93
Joined: 17 Jun 2019, 03:59

Re: RFI RC522 Support

#6 Post by garnold » 09 Mar 2021, 14:59

HAHAHA! I just finished watching this video when your post popped up! It was a great video and I now how a working platform to make my own builds. I'm looking forward to his follow up video on how to customize the builds. I'll also read the docs linked in hopes that those teach me what I need. Thank you all!

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: RFI RC522 Support

#7 Post by Ath » 09 Mar 2021, 15:27

After cloning your fork of ESPEasy (sorry, jargon :shock: ) you can work on a specific PR by using this command:

Using a few more words on the above:
- Browse to https://github.com/letscontrolit/ESPEasy
- Log in to Github (create an account if not available yet)
- Click the Fork button (top right) and confirm what's needed to complete that
- Open VSCode or a command prompt in the desired directory and issue this command: git clone https://github.com/your_account/ESPEasy
Now you have your working directory for ESPEasy
- Connect your working copy to the 'upstream' repository by using this command: git add upstream https://github.com/letscontrolit/ESPEasy
This will allow to create a PR for the branch on your own repo, and automatically passes that on to the ESPEasy repo, where you can then create the PR
You can now build any configuration you like
When adding/changing code to include in ESPEasy:
- Create a new branch (use bugfix/name-of-branch or feature/name-of-the-branch, according to github common practices)
- Hack your code, and test until it works as expected
- Commit your changes
- Use command: git push
(That will tell you what to type the first time to add the branch to your repo, next commit on that branch is just a 'git push' to add the commit(s) to the branch)
- After the first git push, head over to https://github.com/letscontrolit/ESPEasy (and log in when not already), and you'll see a big notification to create a Pull Request.
- Add a description to your PR and create it.
- And the rest will be part of the history of ESPEasy ;)

For getting a specific, existing PR on your system:

Code: Select all

git pull origin pull/999/head
where 999 should be replaced by the PR number (3508 for the RC522 PR),
then you have to enable the plugin by adding USES_P111 to the list that starts with:
// STABLE #####################################
#ifdef PLUGIN_SET_STABLE

in the file 'src/src/CustomBuild/define_plugin_sets.h'

NB: When enabling the line in the TESTING set, you won't be able to build a test configuration as it currently won't fit (at least I'm having local build issues, may need to clean my library cache).

Then open the PlatformIO section on the left side of VSCode, expand one of the normal_ESP8266_4M1M configurations (will take a few seconds), and click build (or upload if the ESP board is connected to your computer via USB)
/Ton (PayPal.me)

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

Re: RFI RC522 Support

#8 Post by TD-er » 09 Mar 2021, 15:34

If you're more graphical minded, you can also have a look at a tool like GitKraken.
Still the steps are the same, but it may be (for some) a bit easier to grasp how all the terms relate to each other.

Just some jargon you may encounter quite often:

- Repository => The entire tree of all changes made in the past + all versions of all files.
- Branch => A 'side track' of the tree usually used to develop a new feature or fix a bug.
- Commit => A set of changes you made to a number of files all wrapped in a single update with a label and description.
- Pull request => A request to merge a number of commits in a branch with the main branch (can be on the same repository or a remote repository)

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: RFI RC522 Support

#9 Post by Ath » 09 Mar 2021, 16:04

Well, I've tried both GitKraken and SourceTree, and both left me hanging dry when trying to do rather basic stuff like fixing a half-baked merge or reverting a wrong commit.
'Manual intervention', using the command-line, with quite simple commands, always saved the day.

Yes, when I just started using git I was a bit overwhelmed, but now that I've been working on ESPEasy for close to a year, I'm getting more confident in the use of git commands. And using TFS/git at work does help a bit, though TFS is quite 'different' in the way it presents the git stuff.

Now I only use SourceTree to get a nice graphic overview of the branch history.

Most commands come from this manual: https://rogerdudler.github.io/git-guide/
And for the more esoteric stuff I just google my problem, and usually Stack Overflow comes to the rescue.
/Ton (PayPal.me)

garnold
Normal user
Posts: 93
Joined: 17 Jun 2019, 03:59

Re: RFI RC522 Support

#10 Post by garnold » 09 Mar 2021, 16:18

The video just showed me how to download the source as a zip from Github rather than me forking / pulling code. The video does state that Git would be the more ideal way to handle this but the zip was easy to get started. I'll have to look into all these steps. So to make the RFID build, I have to do some nerdy stuff right? It's just not one of the builds that are in the list.

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: RFI RC522 Support

#11 Post by Ath » 09 Mar 2021, 17:16

Well, you will need the pull request 3508, as that has all the code to have that plugin, it's not merged into the main branch (mega).

So to have that plugin there is some 'nerdy stuff' involved, yes :D
/Ton (PayPal.me)

garnold
Normal user
Posts: 93
Joined: 17 Jun 2019, 03:59

Re: RFI RC522 Support

#12 Post by garnold » 09 Mar 2021, 19:11

So I think I would need to use this build release?

https://github.com/tonhuisman/ESPEasy-1 ... rc522_rfid

garnold
Normal user
Posts: 93
Joined: 17 Jun 2019, 03:59

Re: RFI RC522 Support

#13 Post by garnold » 09 Mar 2021, 19:13

I got this from this link which is what I think you might have been referring to.

https://github.com/letscontrolit/ESPEasy/pull/3508

Post Reply

Who is online

Users browsing this forum: No registered users and 31 guests