nodered

https://nodered.org/docs/getting-started/docker

Creating a nodered hash if runnning nodered on docker:

docker exec -it node-red npx node-red admin hash-pw

Quickstart:

docker run -it -p 1880:1880 --name mynodered nodered/node-red
docker run -d -p 1880:1880 -v /data/nodered:/data --name mynodered nodered/node-red         #run in daemon mode

Function

Trigger action if payload > 70:

var payload=msg.payload;
if (payload>70)
    return msg;

Required nodes

Examples:

Dashboard

Run

npm install node-red-dashboard

inside container, to install dashboard. Update:

npm install -g npm@8.19.2

Compose

docker-compose -f docker-compose.yml up -d
docker-compose.yml
################################################################################
# Node-RED Stack or Compose
################################################################################
# docker stack deploy node-red --compose-file docker-compose-node-red.yml
# docker-compose -f docker-compose-node-red.yml -p myNoderedProject up
################################################################################
version: '2'
#version: "3.7"
 
services:
  node-red:
    image: nodered/node-red:latest
    environment:
      - TZ=Europe/Berlin
    ports:
      - "1880:1880"
    networks:
      - node-red-net
    volumes:
      - /data/nodered:/data
    user: "0:0"
    restart: always
 
 
volumes:
  node-red-data:
 
networks:
  node-red-net:
iot/nodered.txt · Last modified: 2024/02/05 19:43 by tmade
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki