Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to address Firebase from an Arduino?

Background: I've a sensor hooked up to an arduino printing readings through the serial monitor. I want to log these in firebase.

I've done a bit of digging on this, and my research has shown me that an arduino simply can't handle the SSL needed to talk to firebase properly.

Any suggestions for workarounds? Checking SO and google's only turned up "it can't be done", but I figured I'd ask anyway. Any lateral thinking is appreciated, thanks!

like image 326
user2643767 Avatar asked Dec 16 '22 07:12

user2643767


2 Answers

If you figure out a way, let us ([email protected]) know. That would be an awesome hack!

Some thoughts:

  1. You might want to look into the Spark Core (available for pre-order). They mention SSL support, though it's unclear to me what that means exactly.
  2. You could proxy the requests through a server that can speak SSL. For instance, you could run a tiny node.js service on an Amazon EC2 box that just proxies REST requests to Firebase (e.g. using http-proxy).
  3. If you're hardcore, you could try to get the Arduino talking to an external ethernet controller that has built-in SSL support (e.g. this one), but that's probably a big project. :-)

Longer-term, we might expose a non-SSL endpoint for Firebase requests that's specifically for this sort of low-end hardware use-case. Ping us at [email protected] if you want to start a dialog.

like image 99
Michael Lehenbauer Avatar answered Jan 10 '23 05:01

Michael Lehenbauer


Here's a php script I whipped together to solve for Arduino no https. It's basically a form that GETs to the php script and then sends it off to your Firebase database. http->php->Firebase

https://github.com/robertcedwards/httpFirebase

*Make sure you add Heroku or your server to the whitelist of IPs that can post to Firebase

like image 23
Robert C Edwards Avatar answered Jan 10 '23 07:01

Robert C Edwards