Ibm cloud 物联网电话配方连接但不发送数据
我正在使用Bluemix教程配方“使用IBM Watson IoT平台分析的实时数据分析”,如下所示: 我没有在我的Watson IoT仪表板中看到上述行为;手机设备确实连接并自行注册,但我看不到任何事件或数据。 在节点服务器日志中,有两件事情似乎与此有关:Ibm cloud 物联网电话配方连接但不发送数据,ibm-cloud,iot,watson-iot,Ibm Cloud,Iot,Watson Iot,我正在使用Bluemix教程配方“使用IBM Watson IoT平台分析的实时数据分析”,如下所示: 我没有在我的Watson IoT仪表板中看到上述行为;手机设备确实连接并自行注册,但我看不到任何事件或数据。 在节点服务器日志中,有两件事情似乎与此有关: 404获取util.js;事实上,该文件不在我从配方的github下载的代码库中 三个不推荐的警告: …不推荐使用的multipart:在node_modules/express/node_modules/connect/lib/midd
缺少util.js是一种致命的情况吗?如果没有,那么下一步如何进行故障排除,因为我对整个软件包都是新手?已解决。配方检查是否需要创建cloudant数据库,而不知道我正在与其他应用程序共享我的cloudant服务实例;它发现数据库存在,愉快地假设它需要一个数据库,并跳过创建过程。将app.js更改为:
cloudant.db.list(function(err, all_dbs) {
if (all_dbs.length == 0) {
// first time -- need to create the iotzone-devices database
cloudant.db.create('device_credentials', function()
例如:
cloudant.db.list(function(err, all_dbs) {
if (all_dbs.indexOf(dbName) < 0) {
// first time -- need to create the iotzone-devices database
cloudant.db.create(dbName, function()
[etc...]
cloudant.db.list(函数(err,all_dbs){
if(所有数据库索引of(dbName)<0){
//第一次--需要创建IoZone设备数据库
create(dbName,function())
[等等]
数据库就位后,WatsonIoT接受来自手机的事件,并按预期显示数据
我根据日志中的打印语句发现了这一点。已解决。配方检查是否需要创建其cloudant数据库,但不知道我正在与其他应用共享我的cloudant服务实例;它发现存在一个db,愉快地假设它需要该db,并跳过create.Change app.js:
cloudant.db.list(function(err, all_dbs) {
if (all_dbs.length == 0) {
// first time -- need to create the iotzone-devices database
cloudant.db.create('device_credentials', function()
例如:
cloudant.db.list(function(err, all_dbs) {
if (all_dbs.indexOf(dbName) < 0) {
// first time -- need to create the iotzone-devices database
cloudant.db.create(dbName, function()
[etc...]
cloudant.db.list(函数(err,all_dbs){
if(所有数据库索引of(dbName)<0){
//第一次--需要创建IoZone设备数据库
create(dbName,function())
[等等]
数据库就位后,WatsonIoT接受来自手机的事件,并按预期显示数据
我是根据日志中的打印语句找到的。我在你引用的配方中添加了一条评论。该评论引用了此帖子。谢谢!我在你引用的配方中添加了一条评论。该评论引用了此帖子。谢谢!