Skip to content

🔥 IoT node that detects RFID tags serial-number and send it to Cloud Firestore

License

Notifications You must be signed in to change notification settings

kaizoku-oh/firestore-rfid-node

Repository files navigation

firestore-rfid-node

IoT node that sends detect RFID tags serial-number and send it to Cloud Firestore

GitHub Build workflow status GitHub Release workflow status GitHub release GitHub issues GitHub top language License: MIT Twitter follow

Getting started

This project is created PlatformIO IDE using the esp-idf framework, the project also uses 2 external esp-idf components which are found as submodules under the components directory.

To get started:

  1. Install PlatformIO Extension for vscode
  2. Create a new project using ESP-IDF framework
  3. Under the root of the project create a new directory called components
  4. Clone this repo with its submodules
$ git clone https://github.com/kaizoku-oh/firestore-rfid-node.git
$ cd firestore-rfid-node
$ git submodule update --init
  1. To avoid exposing sensitive data in the code we'll store them in environment variables that'll be when building the project.

Windows/Linux (PowerShell 7)

# Set local environment variables
> $env:WIFI_SSID = '"TYPE_YOUR_WIFI_SSID_HERE"'
> $env:WIFI_PASS = '"TYPE_YOUR_WIFI_PASSWORD_HERE"'
> $env:FIRESTORE_FIREBASE_PROJECT_ID = '"TYPE_YOUR_FIREBASE_PROJECT_ID_HERE"'
> $env:FIRESTORE_FIREBASE_API_KEY = '"TYPE_YOUR_FIREBASE_API_KEY_HERE"'

# OPTIONAL: To read and verify the values of the variables that you just set:
> Get-ChildItem Env:WIFI_SSID
> Get-ChildItem Env:WIFI_PASS
> Get-ChildItem Env:FIRESTORE_FIREBASE_PROJECT_ID
> Get-ChildItem Env:FIRESTORE_FIREBASE_API_KEY

Linux (Bash)

# Set local environment variables
$ export WIFI_SSID='"TYPE_YOUR_WIFI_SSID_HERE"'
$ export WIFI_PASS='"TYPE_YOUR_WIFI_PASS_HERE"'
$ export FIRESTORE_FIREBASE_PROJECT_ID='"TYPE_YOUR_FIREBASE_PROJECT_ID_HERE"'
$ export FIRESTORE_FIREBASE_API_KEY='"TYPE_YOUR_FIREBASE_PROJECT_ID_HERE"'

# OPTIONAL: To read and verify the values of the variables that you just set:
$ echo $WIFI_SSID
$ echo $WIFI_PASS
$ echo $FIRESTORE_FIREBASE_PROJECT_ID
$ echo $FIRESTORE_FIREBASE_API_KEY