【问题标题】:Best way to trigger a Node-RED flow from python script [closed]从python脚本触发Node-RED流的最佳方法[关闭]
【发布时间】:2015-08-27 12:21:45
【问题描述】:

我在树莓派上运行 Node-RED。我想在我在同一个 rpi 上运行的 python 脚本的末尾触发一个流程。最容易触发的输入节点是什么?使用它的 python 代码示例是什么?我想传回一个字符串变量

【问题讨论】:

  • “最佳”依据什么标准?

标签: python raspberry-pi node-red


【解决方案1】:

best 设为 最简单 那么 http-in 节点可能是最好的

并且使用这样的东西会起作用:

import urllib2
urllib2.urlopen("http://localhost:1880/start").read()

http-in 节点已配置为侦听 /start

【讨论】:

    猜你喜欢
    • 2015-11-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-25
    • 2013-08-16
    • 2012-08-23
    • 1970-01-01
    相关资源
    最近更新 更多