0

The provided Firebase + Electric Imp code seems like it doesn't work anymore, specifically for streaming.

https://github.com/firebase/ElectricImpDemo/blob/master/ImpFirebase-HRmonitor/bracelet-agent.nut

Is there a known regression I should know about? Or a new version of the library? Reads and writes work properly, but when I make a streaming request I just get empty data back.

Here's the snippet of actually using the firebase electric imp api:

firebase <- Firebase("https://smarthouse.firebaseio.com", null);
firebase.on("/", function(state) {
  server.log("got a change");
  server.log(http.jsonencode(state));
});
firebase.stream("/door", true);
Russell Cohen
  • 717
  • 4
  • 7

1 Answers1

0

It may be an error in the Firebase adapter for Electric Imp. It's unfortunately from before streaming was a fully-supported feature. Can you verify that you are able to get event streaming working from a browser (see https://developer.mozilla.org/en-US/docs/Server-sent_events/Using_server-sent_events)?

Greg Soltis
  • 1,434
  • 9
  • 10