Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/inzar86/wemos-firebase-blogspot-web
ESP8266 WEMOS D1 Mini Firebase Retrieve data to HTML Java Script
https://github.com/inzar86/wemos-firebase-blogspot-web
arduino esp8266 esp8266-arduino esp8266-projects firebase firebase-database firebase-realtime-database html javascript wemos wemos-d1 wemos-d1-mini
Last synced: about 2 months ago
JSON representation
ESP8266 WEMOS D1 Mini Firebase Retrieve data to HTML Java Script
- Host: GitHub
- URL: https://github.com/inzar86/wemos-firebase-blogspot-web
- Owner: inzar86
- Created: 2019-05-10T17:53:54.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-08-28T06:17:30.000Z (over 2 years ago)
- Last Synced: 2024-07-29T11:51:34.744Z (6 months ago)
- Topics: arduino, esp8266, esp8266-arduino, esp8266-projects, firebase, firebase-database, firebase-realtime-database, html, javascript, wemos, wemos-d1, wemos-d1-mini
- Language: HTML
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WEMOS-Firebase-Blogspot-WEB
ESP8266 WEMOS D1 Mini Firebase Retrieve data to HTML Java Script1. Setup your realtime database using firebase in firebase website
2. Get API key or secret key from your realtime database and put detail inside file ```index.js```:
```javascript
(function(){
// Initialize firebase
const config = {
apiKey: "Your project API Key From Firebase"
authDomain: "your-project.firebaseapp.com",
databaseURL: "https://your-project.firebaseio.com",
//projectId: "your-project",
storageBucket: "your-project.appspot.com",
//messagingSenderId: "716575067735",
//appId: "1:716575067735:web:7d7b6a0c18ecc31e"
};
```
3. Set your realtime database to test mode read this
https://firebase.google.com/docs/rules/basics
4. Change your Tag database ex: DHT11 is my example
```
[+] your-project.firebaseapp.com
|_ [+] DHT11
```
my script is:
```javascript
firebase.initializeApp(config);
const preObject = document.getElementById("DHT11");
const dbRefObject = firebase.database().ref().child("DHT11");
dbRefObject.on("value", snap => {
preObject.innerText =JSON.stringify(snap.val(), null, 3);
});
```
5. Open ```index.html``` and change your tag (step 4) ex:DH11 to your realtime database
```html
```
6. Run and enjoy.