Sensor data & Firebase

1,749 views
Skip to first unread message

Guy Dillen

unread,
Sep 17, 2014, 3:46:58 PM9/17/14
to fireba...@googlegroups.com
Would Firebase be a good option for using with sensor data coming from micro controllers? Most micro controllers are programmed in C/C++ or Wiring (C alike): has Firebase a C/C++ API?

Thanks.
Guy

James Yong

unread,
Sep 17, 2014, 4:48:30 PM9/17/14
to fireba...@googlegroups.com
Been using the REST API; its not bad as long as you have aggressive-retrying in place.

Mike McDonald

unread,
Sep 17, 2014, 4:53:46 PM9/17/14
to fireba...@googlegroups.com
Hey Guy,

Thanks for the question!

Currently, we only have Javascript, Java, and Objective-C SDK's. That being said, we have a REST API that you can use with Curl (or your favorite other HTTP library) to make requests with Firebase, and we've even made it realtime, using the EventSource protocol! We've talked with some people who are building their own implementations streaming C clients, but I don't have pointers to any repos right now.

The main limitation we have with running Firebase on a microcontroller is that most 8-bit controller (like the Arduino) can't support SSL, and therefore we can't use HTTPS or Firebase. If you're not tied to a specific microcontroller, there are a few options:

1) Arduino + Raspberry Pi and Johnny Five: allows you to control an Arduino via Firebase. You can check out an example of this in our Firebase Powered Fruit Detector app.

2) Electric Imp: There is a Firebase class for the Electric Imp that allows the Imp to communicate with Firebase. You can also read our blog post about a hack night we held with the EI folks.

3) Tessel: If you like programming in Javascript, the Tessel allows you to write Node.js code and run it on a uC. Firebase currently isn't supported, but I'm working on getting it running.

4) Use hardware like a Raspberry Pi or a Beaglebone and run Javascript (or Java), or your favorite language using the REST API.

Further expansion of our platform into IoT is definitely on our minds, and will hopefully continue to expand over the course of the year.

Thanks,
--Mike

On Wednesday, September 17, 2014 12:46:58 PM UTC-7, Guy Dillen wrote:

James Yong

unread,
Sep 17, 2014, 4:57:52 PM9/17/14
to fireba...@googlegroups.com
Or an Arduino Yun, which combines an atmel microcontroller together with a broadcom cpu running openwrt.

With warm regards,
James
Developer

--
You received this message because you are subscribed to a topic in the Google Groups "Firebase Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebase-talk/dqMjwN1LgiY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Guy Dillen

unread,
Sep 20, 2014, 3:44:59 PM9/20/14
to fireba...@googlegroups.com
Hi Mike,

The microcontrollers I'm using today are based on ARM Cortex M3/M4: TI CC3200, Spark Core, .... I need to check out if there's support for SSL/HTTPS in their software stack. 
As an alternative, maybe not an evident solution: Using a gateway between the edge-devices (micro controllers) and Firebase: edge-device sends message to MQTT message broker on a gateway; a Java app subscribes to the topic of the MQTT broker and communicates with Firebase???

Thanks.
Guy

Mike McDonald

unread,
Sep 22, 2014, 12:04:03 AM9/22/14
to fireba...@googlegroups.com
Guy,

The Spark Core is a Cortex M3, and it supports HTTPS, so you should be fine using that. There are a few TCP/IP stacks available that should work if you're planning on rolling your own. The CC3200 should hook directly up to the uC and will support the necessary communication. TI has a pretty good amount of documentation built around that series (starting with the CC3000) that should make this easy. The Spark Core and Tessel (as well as a bunch of other dev boards on the market) use this same combo (Cortex M3 and CC3X00) to get HTTPS, and so they should work with Firebase (obviously, rolling your own is going to take a bit more time).

You could definitely use the Gateway solution (this is actually something that I've been mulling over for protocols other than websockets or long polling [Bluetooth, 802.15.4, or 6LoWPAN]), but you would have to write a lot of message passing plumbing which would take a lot of time.

Thanks,
--Mike

Mike McDonald

unread,
Sep 22, 2014, 12:05:59 AM9/22/14
to fireba...@googlegroups.com
Guy,

James is also correct, you can do this. There's a blog post that details this here.

An Intel Galileo would do the same thing (Arduino + Linux).

Thanks,
--Mike

Roger Yang Yong Seng

unread,
Sep 22, 2014, 1:12:31 AM9/22/14
to fireba...@googlegroups.com
Hi mike, i have similar question as well. I am currently working on my ultrasonic sensor project. The sensors only respond to the software (command from the software to communicate with the sensor). Any suggestion on how do i send this data to communicate with firebase? The software is java based.

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Regards,
Roger

Jenny Tong

unread,
Sep 22, 2014, 3:04:01 PM9/22/14
to fireba...@googlegroups.com
Hi Roger, 

I'd need a bit more detail to give you a recommendation. Can you describe your hardware set up? And can you describe the environment in which you're running? For example, is this a sensor plugged into a laptop in a lab for one time use, or an embedded system attached to a robot in low earth orbit? 

Assuming you have the oomph to make an SSL connection, I'd just use the Java client directly. (I realize it's in a docs section labeled 'Android' but the client lib works great in other Java environments too).

On the other hand, if you don't have enough oomph for SSL, get your data on to something that can do SSL, like a Raspberry Pi. For example, if I want to put an Arduino project on Firebase, I use Firmata to get data to the Raspberry pi and then build stuff with Johnny Five.

~~Jenny

Mehran Dowlatshahi

unread,
Oct 8, 2014, 12:15:47 AM10/8/14
to fireba...@googlegroups.com
Hi
I am a new user of Firebase and plan to send sensor information from Raspberrypi to firebase (event based or periodical).
I tried the given example in firebase web siteon Java Micro Edition version 8 platform.

I used the firebase-client-jvm-1.1.1.jar for this test.

The problem is with the line below:

Firebase ref = new Firebase("https://docs-examples.firebaseio.com/android/saving-data/fireblog");

Please note that the same example works in standard JVM.

Can anyone please guide me if there is a possible solution for sending data from a Raspberrypi card to firebase in Java.

I checked Android for Raspberry but it seems not a stable platform for use.

Guy Dillen

unread,
Oct 8, 2014, 3:13:22 PM10/8/14
to fireba...@googlegroups.com
Why do you use Java me 8 on the Pi? Java SE 8 runs also on the Pi and would probably give no problems. Or if you use Java ME 8 for reading sensor data maybe you can run both (ME and SE) on the Pi.
Java me 8 has not all features of Java se 8. Probably the Firebase jar file uses something not available in Java ME 8.

Guy

Brandon Hurd

unread,
Nov 16, 2015, 9:19:25 PM11/16/15
to Firebase Google Group
Hi Mike,

Is there a link that you can share, which shows the most current development boards that will work with Firebase. I'm working on a project that I would like integrated with Nest. Thanks for your help!


Best,

Brandon

Kato Richardson

unread,
Nov 17, 2015, 1:09:40 PM11/17/15
to Firebase Google Group
Brandon,

There's not going to be anything more than anecdotal reports on specific boards. We don't have any deep testing of IoT devices worked into the release process--just Mike's tinkering and brilliance. You might do better to list some specific choices and see if anyone has experimented with those yet. The only solid requirements would be decent HTTPS support and enough memory to hold the payload in memory.

Also keep in mind that not everything that works with Firebase will necessarily work with Nest. As I understand, they are only using the REST API and not supporting all the API contracts (no streaming REST capabilities, for example, and I think queries are limited or non-existent as of the last discussion I had on this front).

You may want to loop in the nest team on any discussion here, and they don't monitor this forum afaik (I think they only do support via Stack Overflow at present?).

☼, Kato

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages