[Solved] Pushing multiple values in a single node in Firebase from nodeMCU.
SalmanFK last edited by salmanfaris
Since I'm new to nodeMCU and Firebase, I'm having a problem to push multiple values in a single node (randomly created) in Firebase from my nodeMCU-ESP8266. I can successfully push a single value whether it's String or Integer.
To be clear... I'm willing to store temperature and humidity values to a new node that's randomly created each time as the values are available. But, the problem is I can't push more than one value in that single node!
It'll be really helpful if you guys can help me out...
The image is the result when I store the values through an android app. But, I can't do the same with the nodeMCU!
kowshik1729 last edited by kowshik1729
@SalmanFK Thanks for posting the query. I would like to know what exactly you are referring to when you say "node".
According to what I understood you are not able to push more than one value at a time into the firebase. Am I right? is that your doubt is? Just to add on, I want to let you know that ESP8266 cannot send characters or strings to the cloud directly. You need to declare a C string and initialize a pointer to run over the length of string, then upload each character to the cloud. This is what basically I did when I faced the error.
salmanfaris last edited by salmanfaris
Hi @SalmanFK ,
You can Serialize the data as a JSON or CSV string format and publish that as a single string, so you get the data in a single node, you also DeSerialize the string simply in the application end.
Very much informative!!!!
If you are using raspberry pi as one of your main computers and have separate monitor, keyboard and mouse, then you might be tired of copy and pasting terminal commands and codes while doing projects with raspberry pi, because running chromium-browser and reading tutorial will pi slower and using a sperate keyboard and mouse use our workbench space too.
recently I read a blog Share your keyboard and mouse between computers with Barrier by Gordon Hollingworth which is cool.
In that blog, he mentioned a software called barrier, it's a software that will allow you to use a single keyboard and mouse to control multiple computers by physically turning a dial on the box to switch the machine you're controlling at any given moment. The barrier does this in software, allowing you to tell it which machine to control by moving your mouse to the edge of the screen, or by using a keypress to switch focus to a different system.
Follow these to share your computer keyboard and mouse with the raspberry pi
First, we need setup raspberry pi
Step 1: Download and Install Raspberry Pi OS on SD Card
Step 2: Connect raspberry pi to the wi-fi network
Step 3: Install barrier, for that open your terminal (Ctrl + T) and paste or enter the followingsudo apt install barrier
Then click enter.
Step 4: Setup barrier, Open barrier by typing barrier on the terminal, if you successfully installed the barrier you can see like this.
Select option Client (Use another computer's mouse and keyboard) and Select Auto config option too, also note the Screen name, which we need for the server.
That's all next we need to set up the desktop/laptop computer.
Step 5: Download and Install barrier on desktop or laptop computer (The Server), download link
Step 6: Set up the barrier by selecting Server and position your monitor on barrier software.
To Position, the screen clicks the configure server.
Here, to drag and drop the monitor icon to the desired position you need on the grid.
double click the screen and set the screen name, you can obtain the screen name from the raspberry pi barrier client. (See Step 4)
after setup, it should be like this. Then click OK
in the following screen, click Apply and Just wait few seconds then try to move the mouse to the corner. Yes, It should work.
@rafitc99 Looks cool, Thanks for sharing.
This is a speaker call for MakerChat by MakerGram. MakerChat is a webinar series where makers from different domain sharing their expertise with other fellow makers. MakerGram is an Open Community Platform for Makers and hardware enthusiasts to empower them by promoting learning, sharing and collaboration.
Do you think you can come up with some interesting ideas revolving around Amazon Alexa? What if we could help you build that idea into a reality. Tell us about your idea and the best one wins an Amazon Alexa Echo Dot.
🧲 Bonus points for those solutions involving Covid-19 or promoting social-distancing.
Schedule️Application - The application starts on 26th June 2020. Closing - The registration will end on 17th July 2020. Results - The results declared by last week of July
For Registration: https://alexa.hackclub.com/