This project integrates Firebase Realtime Database with a NodeMCU-based IoT system to monitor and notify the status of a parking lot. It also uses the Vonage API to send SMS notifications about the parking status.
- Real-time monitoring of parking lot status using Firebase Realtime Database.
- SMS notifications sent to a predefined phone number using the Vonage API.
- Node.js-based backend for handling Firebase and Vonage integrations.
Before setting up the project, ensure you have the following:
- Node.js installed on your system.
- A Firebase project with a Realtime Database configured.
- A Vonage account with API credentials.
- A valid
serviceAccountKey.jsonfile for Firebase authentication.
-
Clone the repository:
git clone <repository-url> cd iot_firebase_park_project
-
Install dependencies:
npm install
-
Add your Firebase service account key:
- Place your
serviceAccountKey.jsonfile in the root directory of the project.
- Place your
-
Configure Vonage API credentials:
- Update the
apiKeyandapiSecretinindex.jswith your Vonage credentials. - Replace the
phoneNumbervariable with the recipient's phone number.
- Update the
-
Start the application:
node index.js
-
The application will listen for changes in the Firebase Realtime Database and send SMS notifications when the parking lot status changes.
iot_firebase_park_project/
├── index.js # Main application logic
├── package.json # Project metadata and dependencies
├── package-lock.json # Dependency lock file
├── serviceAccountKey.json # Firebase service account key (not included in the repository)
├── .gitignore # Files to ignore in version control
└── README.md # Project documentation
- firebase-admin: Firebase Admin SDK for Node.js.
- @vonage/server-sdk: Vonage Server SDK for sending SMS.
- Ensure that your
serviceAccountKey.jsonfile is not shared publicly or committed to version control. - Update the Firebase database URL in
index.jsto match your Firebase project.
This project is licensed under the ISC License.