node-red

Having trouble accessing /dev/serial0 on a Raspi from within a Module in Azure IoT Edge

試著忘記壹切 提交于 2021-02-11 15:31:34
问题 I'm trying to set up a Module which will interact with /dev/serial0 on a Raspberry Pi B+ running Raspian Stretch. I've used dtoverlay=pi3-miniuart-bt in /boot/config.txt to restore UART0/ttyAMA0 to GPIOs 14 and 15 (which is what my Raspi-based HW needs me to do). I have attempted to make that device accessible to the Module using the following Container Create Options: { "HostConfig": { "PortBindings": { "1880/tcp": [ { "HostPort": "1880" } ] }, "Privileged": true, "Devices": [ { "PathOnHost"

how to do reverse proxy on docker

流过昼夜 提交于 2021-02-05 11:13:07
问题 I have a server and I am using Ubuntu 20.04, nginx , mosquitto and node-red and docker , let's call the website http://mywebsite.com . The problem that I am facing that I have created a client lets call it client1 in docker so the URL will be http://mywebsite.com/client1 and I want to establish an MQTT connection via mosquitto and I'm sending the data on topic test The problem that on node red node of MQTT when I write the IP address of my mosquitto container it works But if I change the IP

how to do reverse proxy on docker

强颜欢笑 提交于 2021-02-05 11:12:55
问题 I have a server and I am using Ubuntu 20.04, nginx , mosquitto and node-red and docker , let's call the website http://mywebsite.com . The problem that I am facing that I have created a client lets call it client1 in docker so the URL will be http://mywebsite.com/client1 and I want to establish an MQTT connection via mosquitto and I'm sending the data on topic test The problem that on node red node of MQTT when I write the IP address of my mosquitto container it works But if I change the IP

How to send msg.payload from function node to template node

孤街醉人 提交于 2021-02-05 06:43:27
问题 How to send msg.payload from function node(tool) to template node(html)? <html> <head> <script type="text/javascript"> // function test() { // document.getElementById("test1").innerHTML = msg.payload; // } </script> </head> <body onload="test()"> <h1 id="test1">{{msg.payload}}</h1> </body> 回答1: The problem is you are using {{msg.payload}} in the template node. The values pulled in via mustache are keyed from the msg object. So the correct mustache template is {{payload}} . <head> <script type

how to stop setInterval in JS in node-red..?

跟風遠走 提交于 2021-01-29 06:52:00
问题 I'm trying to code a function node in node-red which will give output as increasing numbers by 1 for every second when get msg.paylaod true from inject node and stop when get msg.payload "false" from another inject node. it starts giving output but don't stop when payload "false" is injected. Node code: [ { "id":"b6c9b219.90a478", "type":"function", "z":"a3d6aff.bd4935", "name":"", "func":"var i = 1;\nfunction increment(){\n i = i + 1;\n msg={payload:i};\n node.send(msg);\n \n}\nif(msg

node-red redeploy flow using REST from within node-red

≯℡__Kan透↙ 提交于 2021-01-29 05:00:09
问题 I have a node-red flow in bluemix that uses dash-db nodes also. So each time some dash db maintenance or some other reason, this db connection gets lost and all writes fail. When i redeploy, everything is fine again. Bluemix shows only logs of last few hours hence I am finding it very difficult to debug. Meanwhile i was thinking of doing an automatic redeploy after i detect this issue to avoid losing writes. Can this be done using GET /flows followed by POST /flows in the same node-red app

即使不会node.js,拖拽就可完成数据的可视化展示

强颜欢笑 提交于 2020-12-04 10:52:41
摘要: node-red是一款基于Node.js的开源可视化界面开发工具,不需要掌握node.js而通过拖拽即可完成数据的可视化展示。 1.首先看一下node-red对数据的渲染效果 你可能认为,必须熟练掌握前端知识才能做出这样的页面,实际上它只需要一下几步拖拽操作即可 node-red本身就是为MQTT而诞生,因此很适合进行物联网数据展示,支持数据库操作、mqtt协议,同时用户也可以在它的基础上,使用html等进行前端界面修改。如果你想快速而完美的展示你的数据,不妨试一试NODE-RED。当然,你想安装它,也很简单的~~ 2.安装 首先需要安装nodejs(百度上有很多示例,也挺简单的,就不讲解啦),然后 在控制台输入 npm install -g --unsafe-perm node-red 即可; 为了让node-red在后台保持运行,我们使用此命令:nohup node-red & 完整的安装步骤如下 安装nodejs环境 sudo apt-get install nodejs 安装node-red sudo apt-get install npm sudo npm install -g node-red 普通运行 node-red 后台持续运行 nohup node-red & 3.使用示例 展示一下我自己展示温湿度的页面 nede-red这款工具,好用而且简单

意法半导体的STM32CubeMonitor也支持nodered

独自空忆成欢 提交于 2020-07-27 22:27:52
20200625 意法半导体的STM32CubeMonitor也支持nodered。 前几天(20200618)我写了一篇 《 node red?!! 》,给我感觉node red 并不是那么简单。那么到底什么是简单?什么是不简单? 这么说吧,有些知识需要很多年的积累还能用起来,但是一旦学个八九不离十,那么就花费不大的功夫就能完成很漂亮的功能。 但是nodered大概是不用太多积累,就能上手,但是比如dashboard控件,我试了一下,大概百毫秒级别的(记不太住了,大概如此),显示的还是比较慢,不过放在物联网场合是完全够用的,并且是很有竞争力的,但是放在工业场合就有点牵强。 nodered还有厉害的一点是:是个开放的平台,可以利用开源的力量丰富自己的控件库,这个很是很厉害了。 总之我前几天就觉得nodered不错,所以学习了一下nodered。没想到意法半导体也觉得这个nodered不错,看样子英雄所见略同,希望下次ST公司能先我一步。 来源: oschina 链接: https://my.oschina.net/u/4297014/blog/4325186

Reading 32 bit Float from modbus TCP using node red

半腔热情 提交于 2020-07-20 04:16:27
问题 how to read modbus TCP holding values (03) - 32bit float word swap (CD AB) with node red function block ? I have problem with modbus... Reading from modbus TCP ( FC3 , data size 32 bit Float, address 272 decimal)... When Node RED read values ( FC 3, read holding registers, quantity 2 ) returns values like [0,16833] ... Here I'm using msg.payload=msg.payload[1] in function to get value 16833 out from array... This is my temperature sensor value.. To see if modbus address is correct I'm using