问题标签 [xively]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
443 浏览

java - xively java 客户端返回状态码 401

尝试学习 Xively 的 Java 接口。以下简单测试失败并显示 401 状态代码:

异常声明是

com.xively.client.http.exception.HttpException: Http响应状态表示操作不成功[状态码:401.; 原因:{"title":"Unauthorized","errors":"您没有访问此资源的权限"} ]

以下控制台行让我相信我没有正确设置 API 密钥:

2013-10-21 18:58:17,925 506 调试 [DefaultClientConnection.java: 276] (main:) >> X-ApiKey:

开发人员文档说<your api key>config.properties我的 API 密钥替换。我这样做了,但它似乎没有任何区别。

我将带有 Maven 的库安装到我的默认 Maven 存储库中,并在 Referenced Libraries 中指向它。我正在尝试在 Eclipse 中构建整个东西。

我的具体问题是config.propertiesApiConfig 在哪里读取?

0 投票
1 回答
293 浏览

triggers - Xively:触发 url Web 服务没有被调用

我正在研究 Xively。

我创建了 3 个(A、B、C)频道。要求是每当通道值发生任何变化时,都应该调用我的 Web 服务。

但是由于某些未知原因,“发送测试触发器”按钮以及满足实际条件的触发器没有被调用。我已经测试了我的 Web 服务,它正在使用非 xively 界面。

任何建议这个问题背后的原因是什么。

PS -我的应用程序处于开发阶段

提前致谢。

0 投票
3 回答
771 浏览

javascript - How to access Xively datapoints history with javascript?

I am new to Xively. Now I am trying to access the datapoints history from the feed that I get. From this documentation: http://xively.github.io/xively-js/docs/ It seems that I can use the method xively.datapoint.history(feedID, datastreamID, options{}, callback(data)) but I don't know how to use it.

I know the parameter feedID, datastreamID, but I am not sure about the options... from Xively site https://xively.com/dev/docs/api/quick_reference/historical_data/, I think I should put start and end parameter. I used feed id:40053 and datastream id:airpressure. You can try to input the feed id here to get more info about it:http://xively.github.io/xively-js/demo/

I tried the code below but its not working. Am I doing something wrong, or the datapoints history itself is restricted and cant be accessed?

0 投票
1 回答
293 浏览

android - Xively Android 客户端服务崩溃

我正在使用 Android 客户端探索 Xively 框架。我已经安装了演示应用程序中给出的“服务”。当我在 Android 2.3 和 4.0 设备上启动应用程序时,它崩溃了。下面是相同的堆栈跟踪。令人惊讶的是,它适用于 Android 4.1。任何需要做什么的建议都可以在 Android 2.3 和 4.0 设备上运行

Stacktrace 10-25 18:25:18.854: D/HttpService(17080): onCreate() 10-25 18:25:18.874: W/dalvikvm(17080): 异常 Ljava/lang/RuntimeException; 初始化 Landroid/os/AsyncTask 时抛出;10-25 18:25:18.884: E/JavaBinder(17080): *未捕获的远程异常!(跨进程尚不支持异常。) 10-25 18:25:18.884: E/JavaBinder(17080): java.lang.ExceptionInInitializerError 10-25 18:25:18.884: E/JavaBinder(17080): at com. xively.android.service.HttpService.executeRequest(HttpService.java:276) 10-25 18:25:18.884: E/JavaBinder(17080): 在 com.xively.android.service.HttpService.put(HttpService.java:235 ) 10-25 18:25:18.884: E/JavaBinder(17080): 在 com.xively.android.service.HttpService.access$1(HttpService.java:232) 10-25 18:25:18.884: E/JavaBinder( 17080): 在 com.xively.android.service.HttpService$1.updateFeed(HttpService.java:73) 10-25 18:25:18.884: E/JavaBinder(17080): 在 com.xively.android.service.IHttpService$ Stub.onTransact(IHttpService.java:77) 10-25 18:25:18.884: E/JavaBinder(17080): 在 android.os.Binder.execTransact(Binder.java:

0 投票
0 回答
117 浏览

location - 如何在 xively 中读取航点

有一个很好的解释如何在 Xively 上存储位置 https://xively.com/dev/docs/api/metadata/waypoints/ https://xively.com/dev/docs/api/quick_reference/api_resource_attributes/

但是没有示例如何读取存储的航点?GET https://api.xively.com/v2/feeds/FEED_ID_HERE只给我最后的位置,但我需要历史航点。

0 投票
1 回答
335 浏览

python - 数据来回挂Xively

我有一个 python 脚本在一个稀有的 BBLack ubuntu 图像上运行,该图像具有完美的 wifi 工作,但是在使用 python 脚本时,我看到脚本运行但 xively 仪表板上的请求日志没有收到任何东西?!

我可以更新提要是否有频率限制?

还是我的应用程序?我认为它正在运行而不是下降。

这是代码:

0 投票
1 回答
70 浏览

xively - 计算 Xively 客户端停机时间

我试图计算我的物联网设备离线的时间。MQTT 具有称为 Last Will 和遗嘱的功能。有没有一种方法可以使用 Xively 仪表板跟踪客户端停机的时间。

0 投票
1 回答
239 浏览

websocket - 通过 xively websockets 获取更新

我正在尝试通过 xively-js javascript 库订阅数据流更新。但是,在创建 websocket 后,我​​得到的只是 503 错误:

WebSocket 连接到“ws://api.xively.com:8080/”失败:意外响应代码:503

xively-js 示例应用程序在 http://xively.github.io/xively-js/sample-app/产生了相同的错误

IE10 和 Chrome 都给出了相同的结果。我似乎找不到任何有效的 xively websocket 示例。有人有吗?

0 投票
1 回答
634 浏览

gsm - 403 Forbidden from xively api SIM900 shield

我将 SIM900 屏蔽与 arduino UNO 一起使用。我尝试与 xively 服务器建立连接。我按照以下说明操作:http ://arduino.cc/en/Tutorial/GSMExamplesXivelyClient?from=Tutorial.GSMExamplesPachubeClient

此示例适用于其他 GSM 屏蔽,但它向我展示了与 xively 连接的外观。我做了这样的代码:

通过此代码,我想发送 sensor1 值:16。

在 xively 服务器执行此代码后,请给出一些答案:

在网络上https://xively.com/dev/docs/api/communicating/http/http_status_codes/我发现错误的意思是:

403 Forbidden Xively 理解您的请求,但拒绝执行。随附的错误消息应说明原因。(注意:在 V2 API 中,这是超出 API 速率限制时返回的错误。)

如果我更改例如 API-KEY,服务器会给我 404 错误。我试图解决这个问题好几天。也许有人知道出了什么问题?

0 投票
1 回答
566 浏览

d3.js - 多次调用 xively.feed.history()

我正在尝试构建一个绘图网页,该网页从多个 xively 提要中获取数据并使用Rickshaw(基于D3)绘制它们。我遇到的问题是我无法访问从调用函数之外的服务器返回的数据。我是 js 新手,所以我不确定如何处理调用的异步性质。我想调用xively.feed.history()来获取历史数据的各个部分,并将它们连接到一个图表上。无论如何,这与我尝试过的类似。它基于xively 教程

正如我所说,我是 javascript 的新手,所以也许我遗漏了一些东西。如果将图形放在函数的回调部分内,则该图形可以正常xively.feed.history工作。如果我尝试多次调用该函数,那么在图形代码运行时数据还没有准备好。