send data from raspberry to firebase cloud - c++

Hey i'm new in Firebase and I have a question.
First i will talk about the project and what I want to do. We have a organery with many sensors, those sensors are connected to arduino's. We have some arduino's who are connected to a raspberry by serial communication using an I2C connection. Then we want to send that data to the firebase cloud. But honestly i have no clue how i have to do that. That data from the cloud we use to make an app to see the "climate" of our arganery.
Our program in arduino is made in C++, and the raspberry code is also in C++. Any ideas to get that data into the firebase cloud? Thank You for reading!
Greeting Iben

I have sent data to Firebase by first publishing data to an MQTT (Mosquitto), and then using Node-RED with a Firebase node to store data in Firebase.
Currently I am only storing the latest value in Firebase, but sure you can also store history. Node-RED is a very powerful and easy to use tool for IoT.
You can run bot Mosquitto and Node-RED on your Raspberry Pi.

Related

Google Local Home SDK UDP commands to BrighSign player

For a research, I want to try controlling a BrightSign player with a Google Nest Hub.
The BrightSign player support UDP commands with ASCII/HEX on default the receiving port 5000.
Because the player is not a smart device, can I use the Google Local Home SDK, to send UDP commands with the HEX only to non-smart devices?
If so, does someone have an example of TypeScript of JavaScript how to set this up?
I'm new to both languages and just want to implement this simple feature.
Thanks.
I already tried this tutorial: https://developers.home.google.com/local-home/overview.
But I did not got it to work with my device.

Google IoT Core MQTT Node-red Publish/Read /devices/deviceId/events

I'm trying to publish to the devices's topic from a Raspberry-Pi and read it on a Node.js server.
I'm using the GCP IoT contrib nodes for Node-Red.
I managed to write a message to the cloud with other node (on a general topic) and read it on the server, so the private key and credentials are fine.
I use the same project as above, the right registryId, the right region, and an already allowed deviceId:
The node is connected to the cloud and when I inject a timestamp into it, I can see a successful log:
But between them I get some unsuccessful:
I cannot find how to read the sent messages on the GCP Console (like you can with the normal messages from subscriptions).
And I don't know how to read them by code. Maybe like this?
gcp code link
Also:
When I send messages to a normal topic, and let the Node-Red read them with the Read from Google node, it crashes the app.
Thank you!

How to make a communication between Arduino, Web app and AWS?

I'm making a project where temperature and humidity levels are sensored by Arduino and send those data to AWS with ESP-8266-01s. At the same time, those data are also shown on the web application (it may be on Node.js/Java, etc.).
So what I'm asking is how the architecture should be. What is the best practice? Does AWS also provide a web app where I can use it for both database cloud as a web application or should I make a separate project as a web app to connect to AWS?
I searched on Google but the only answers I can find are two ways: Arduino and AWS without another aspect connected to it in my case the web app.
Make use of MQTT protocol.
Components required -
Pubsubclient.h library on esp8266 that will be used to publish temp and humidity data to MQTT Broker on AWS
mosquitto MQTT broker setup on AWS used to accept data from esp8266
Python script that will subscribe to data from the mosquitto broker and dumps into any database(my suggestion is influxdb)
Graphing platform to query database and display visual timeseries-graphs(my suggestion grafana)
Use AWS only for purchasing a virtual machine. Rest can be taken care using open-source Platforms.
Assuming you want to display graphs of temperature and humidity, Using grafana is the best practice.
You will not find a silver bullet here. A proper architecture for your case depends on many things and there can be different approaches with their own pros and cons.
There are many aspects to cover including connectivity, security, update, availability, costs.
Usually IoT devices are not connected directly to the cloud, because they don't have a constant connection, or any network connection. There is a hub (or middleware) that collects data from sensors/devices and send them to the cloud for processing.
But many cloud vendors provide some out of the box complex solutions here (including AWS).
I listed just examples.

How to send data from Arduino MKR Wifi 1010 to AWS (or any other cloud service)?

I'm pretty new to all the Arduino stuff, forgive me if this is a stupid question.
I got the MKR Wifi 1010 connected to AWS via the ATECC508A chip onboard the Arduino. I can securely send messages and instructions on the AWS console to the Arduino.
How do I send data back from the Arduino to AWS? There is absolutely no documentation on this. I'm making a weather station, so having data travelling both ways is pretty essential. If there's no easy way to do this, I might even switch to Raspberry Pi, which from what I've seen is a lot simpler for data transfer to cloud services.
This tutorial explain in detail how to communicate with AWS IoT Core: https://create.arduino.cc/projecthub/Arduino_Genuino/securely-connecting-an-arduino-mkr-wifi-1010-to-aws-iot-core-a9f365

How i can make kaaproject as gateway for arduino

Hi guys I am using Kaaserver for our IoT project and now i faced with one problem
I would like to ask you how i can send data with arduino to Kaaserver I read some where is possible to configure kaa as gateway and i wanna to know how ?
You can use other board as gateway for Arduino, so you'll need some device supported by Kaa (ESP8266, BeagleBone, Raspberry PI, etc.).
You can generate Kaa SDK for your device and write an application which will collect data from Arduino by serial port and send it to Kaa server using SDK.