Watson IoT Platform 上的规则后未触发 Node-RED 操作
Node-RED action not fired after rule on Watson IoT Platform
我目前正在使用 Watson IoT Platform 从我的 raspberrypi 收集数据。
我创建了一个基于阈值的规则,如果规则被激活,则创建三个操作:
- 第一个是调用 Bluemix 上的 Node-RED 节点的 Node-RED 操作
- 第二个是在我的 raspberry pi
上调用 Node-RED 节点的另一个 Node-RED 操作
- 第三个很简单"send mail"
当电子邮件始终正确发送时,前两个操作永远不会触发。
我在 BlueMix 上的 Node-RED 节点位于以下 url:https://xxx.eu-gb.mybluemix.net and the http endpoint is /command so the URL I configured is https://xxx.eu-gb.mybluemix.net/command。
这个配置有什么问题?
谢谢,
迭戈
node中的http必须使用POST作为method。这是一个示例流程,触发时会写入调试节点。
[{"id":"7ad184c7.c898cc","type":"debug","z":"ed48ac5f.aa6c68","name":"","active":true,"console":"false","complete":"false","x":443.9000244140625,"y":289.79998779296875,"wires":[]},{"id":"f269a1cd.d46d5","type":"function","z":"ed48ac5f.aa6c68","name":"","func":"msg.payload= \"Hello from my IoT Platform Rule\";\nreturn msg;\n","outputs":1,"noerr":0,"x":396.90000915527344,"y":201.59999084472656,"wires":[["aa867d6d.2b6518","7ad184c7.c898cc"]]},{"id":"e9a7c24c.2c8128","type":"http in","z":"ed48ac5f.aa6c68","name":"/inventory","url":"/inventory","method":"post","swaggerDoc":"","x":203.90000915527344,"y":206.99998474121094,"wires":[["f269a1cd.d46d5"]]},{"id":"aa867d6d.2b6518","type":"http response","z":"ed48ac5f.aa6c68","name":"","x":578.9000091552734,"y":207.40000915527344,"wires":[]}]
我目前正在使用 Watson IoT Platform 从我的 raspberrypi 收集数据。
我创建了一个基于阈值的规则,如果规则被激活,则创建三个操作:
- 第一个是调用 Bluemix 上的 Node-RED 节点的 Node-RED 操作
- 第二个是在我的 raspberry pi 上调用 Node-RED 节点的另一个 Node-RED 操作
- 第三个很简单"send mail"
当电子邮件始终正确发送时,前两个操作永远不会触发。
我在 BlueMix 上的 Node-RED 节点位于以下 url:https://xxx.eu-gb.mybluemix.net and the http endpoint is /command so the URL I configured is https://xxx.eu-gb.mybluemix.net/command。
这个配置有什么问题?
谢谢,
迭戈
node中的http必须使用POST作为method。这是一个示例流程,触发时会写入调试节点。
[{"id":"7ad184c7.c898cc","type":"debug","z":"ed48ac5f.aa6c68","name":"","active":true,"console":"false","complete":"false","x":443.9000244140625,"y":289.79998779296875,"wires":[]},{"id":"f269a1cd.d46d5","type":"function","z":"ed48ac5f.aa6c68","name":"","func":"msg.payload= \"Hello from my IoT Platform Rule\";\nreturn msg;\n","outputs":1,"noerr":0,"x":396.90000915527344,"y":201.59999084472656,"wires":[["aa867d6d.2b6518","7ad184c7.c898cc"]]},{"id":"e9a7c24c.2c8128","type":"http in","z":"ed48ac5f.aa6c68","name":"/inventory","url":"/inventory","method":"post","swaggerDoc":"","x":203.90000915527344,"y":206.99998474121094,"wires":[["f269a1cd.d46d5"]]},{"id":"aa867d6d.2b6518","type":"http response","z":"ed48ac5f.aa6c68","name":"","x":578.9000091552734,"y":207.40000915527344,"wires":[]}]