Node-RED

As per their website: Node-RED is a programming tool for wiring together hardware devices, APIs and online services in new and interesting ways.

With default install, you can wire up API, mostly.

I installed Node-RED on my VPS using their Docker image: https://hub.docker.com/r/nodered/node-red

If you want to use Ansible to deploy your Node-RED (in my case behind Traefik v2):

  - name: node
    docker_container:
      name: node
      image: 'nodered/node-red:latest'
      networks:
        - name: YOURBRIDGE
      purge_networks: yes
      env:
        TZ: "Europe/Brussels"
      labels:
        ansible: "true"
        traefik.enable: "true"
        traefik.http.routers.node.entrypoints: "https"
        traefik.http.routers.node.rule: "Host(`nodered.example.org`)"
        traefik.http.routers.node.tls: "true"
        traefik.http.routers.node.tls.certresolver: "letsencrypt"
        traefik.http.services.node.loadbalancer.server.port: "1880"
        traefik.http.middlewares.node-auth.basicauth.users: "user:XXXXXXXXXX"
      volumes:
        - "/opt/docker/nodered.example.org/data:/data"

You can find community developed “nodes” (see them as connectors or plugins) here.

This is an example of diagram to interact with my Netatmo thermostat:

This uses four external nodes:

To install an external node from the community, connect to your container and run:

npm install NAME-OF-MODULE

Also make sure to enable projects in Node-RED, this allows you to store flows in Git repositories.

Add in your settings.js:

    editorTheme: {                                                              
        projects: {                                                             
            // To enable the Projects feature, set this value to true           
            enabled: true                                                       
        }                                                                       
    }

Learn more about projects here.




Thanks for reading this post!


Did you find an issue in this article?

- click on the following Github link
- log into Github with your account
- click on the line number containing the error
- click on the "..." button
- choose "Reference in new issue"
- add a title and your comment
- click "Submit new issue"

Your feedback is much appreciated! πŸ€œπŸΌπŸ€›πŸΌ

You can also drop me a line below!