【问题标题】:Firebase + Electric ImpFirebase + Electric Imp
【发布时间】:2014-04-16 06:49:09
【问题描述】:

提供的 Firebase + Electric Imp 代码似乎不再适用,特别是对于流式传输。

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

是否有我应该知道的已知回归?还是图书馆的新版本?读取和写入工作正常,但是当我发出流式请求时,我只会返回空数据。

这里是实际使用 firebase 电动小鬼 api 的 sn-p:

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);

【问题讨论】:

    标签: firebase imp


    【解决方案1】:

    这可能是 Electric Imp 的 Firebase 适配器中的错误。不幸的是,在流媒体是一项完全支持的功能之前。您能否验证您是否能够从浏览器获取事件流(请参阅https://developer.mozilla.org/en-US/docs/Server-sent_events/Using_server-sent_events)?

    【讨论】:

      猜你喜欢
      • 2016-01-29
      • 1970-01-01
      • 2015-05-23
      • 1970-01-01
      • 2010-12-07
      • 2011-06-15
      • 1970-01-01
      • 2011-09-30
      • 1970-01-01
      相关资源
      最近更新 更多