Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. App Wishlist
  3. Node-RED - Flow-based programming for the Internet of Things

Node-RED - Flow-based programming for the Internet of Things

Scheduled Pinned Locked Moved App Wishlist
ideiot
33 Posts 14 Posters 5.6k Views 12 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #2

    Source
    https://github.com/node-red

    Node-RED - Wikipedia
    https://en.wikipedia.org/wiki/Node-RED

    Node Red in 5 minutes - YouTube

    Open Source Self-Hosted Node-RED Alternatives
    https://alternativeto.net/software/node-red/?license=opensource&platform=self-hosted

    1 Reply Last reply
    2
    • P Offline
      P Offline
      plusone-nick
      wrote on last edited by
      #3

      Here is a good 3 part series:
      1-


      2-

      3-

      The main interfaces or node RED are raspberry pi and conventional arduino boards but there is also a more industrial PLC: https://www.controllino.biz/ that use the arduino framework and in turn can leverage node-RED

      My main use cases are for Smart Home Automation & Microgreens
      This would be such a valuable addition!

      ✌💙+1

      1 Reply Last reply
      1
      • marcusquinnM Offline
        marcusquinnM Offline
        marcusquinn
        wrote on last edited by
        #4

        We can sponsor this if someone wants to package?

        Web Design https://www.evergreen.je
        Development https://brandlight.org
        Life https://marcusquinn.com

        1 Reply Last reply
        2
        • P Offline
          P Offline
          plusone-nick
          wrote on last edited by
          #5

          There is an industrial grade PLC that is 100% Arduino compatible = https://www.controllino.biz/
          I will have to dig up the additional resources I had but all in all you one can use: Node-RED + Arduino IDE + Controllino PLC 😎

          ✌💙+1

          1 Reply Last reply
          0
          • H Offline
            H Offline
            hakunamatata
            wrote on last edited by
            #6

            Another upvote for this app!

            1 Reply Last reply
            1
            • S Offline
              S Offline
              staypath
              wrote on last edited by
              #7

              I'm a long-time Node-RED user. I was able to get a custom app packaged for Cloudron. So far, so good...

              c786303d-fff3-4e10-b473-d649896c489c-image.png

              robiR marcusquinnM 2 Replies Last reply
              6
              • S staypath

                I'm a long-time Node-RED user. I was able to get a custom app packaged for Cloudron. So far, so good...

                c786303d-fff3-4e10-b473-d649896c489c-image.png

                robiR Offline
                robiR Offline
                robi
                wrote on last edited by
                #8

                @staypath cool, can you let us know where the repo is and @staff can help get it into the App store.

                Conscious tech

                S 1 Reply Last reply
                1
                • S staypath

                  I'm a long-time Node-RED user. I was able to get a custom app packaged for Cloudron. So far, so good...

                  c786303d-fff3-4e10-b473-d649896c489c-image.png

                  marcusquinnM Offline
                  marcusquinnM Offline
                  marcusquinn
                  wrote on last edited by
                  #9

                  @staypath Very cool! 🥇

                  Web Design https://www.evergreen.je
                  Development https://brandlight.org
                  Life https://marcusquinn.com

                  1 Reply Last reply
                  0
                  • robiR robi

                    @staypath cool, can you let us know where the repo is and @staff can help get it into the App store.

                    S Offline
                    S Offline
                    staypath
                    wrote on last edited by
                    #10

                    @robi Cloudron customizations are in the docker-custom folder

                    https://github.com/jsonsmth/node-red-docker

                    Feedback is welcome as this is my first foray into Cloudron app customization.

                    girishG 1 Reply Last reply
                    2
                    • S staypath

                      @robi Cloudron customizations are in the docker-custom folder

                      https://github.com/jsonsmth/node-red-docker

                      Feedback is welcome as this is my first foray into Cloudron app customization.

                      girishG Do not disturb
                      girishG Do not disturb
                      girish
                      Staff
                      wrote on last edited by
                      #11

                      @staypath That's a good start! I haven't used node-red before but does it require "plugins" or arbitrary node modules to be installed to be usable? A quick look into your package suggests that you decided to put everything into /app/data. Is it because of that?

                      S 1 Reply Last reply
                      1
                      • girishG girish

                        @staypath That's a good start! I haven't used node-red before but does it require "plugins" or arbitrary node modules to be installed to be usable? A quick look into your package suggests that you decided to put everything into /app/data. Is it because of that?

                        S Offline
                        S Offline
                        staypath
                        wrote on last edited by
                        #12

                        @girish Yes. Any new "plugins" installed are node modules that would be installed in /app/data/data/node_modules

                        I installed a couple of Node-RED modules (plugins), took a backup of the app in Cloudron, cloned the app from backup, etc... and all seemed to work well. Anything I'm missing? Thanks!

                        girishG 1 Reply Last reply
                        1
                        • S staypath

                          @girish Yes. Any new "plugins" installed are node modules that would be installed in /app/data/data/node_modules

                          I installed a couple of Node-RED modules (plugins), took a backup of the app in Cloudron, cloned the app from backup, etc... and all seemed to work well. Anything I'm missing? Thanks!

                          girishG Do not disturb
                          girishG Do not disturb
                          girish
                          Staff
                          wrote on last edited by
                          #13

                          @staypath Usually, we keep the code in Cloudron read-only. As a convention, the code is placed in /app/code. The data the app generates is put in /app/data and this is backed up. The idea is when we have an update, we can just throw out the old container, replace it with the new container, keep /app/data alone as-is (it's mounted into the new container) and things will work.

                          If the code itself is in /app/data, then it's part of the backup and also the update path is not clear. All the operations like backup/clone etc will work. Only update is an issue. Do you have any idea how to solve this?

                          One idea, if it's possible, is to put node-red code and npm install in /app/code in the Dockerfile. For additional plugins, if we can set some node module path which can be picked up from say /app/data/node_modules or something, that would be ideal. Is that possible though?

                          S 2 Replies Last reply
                          3
                          • girishG Do not disturb
                            girishG Do not disturb
                            girish
                            Staff
                            wrote on last edited by
                            #14

                            Per https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders, we can maybe set NODE_PATH=/app/data/node_modules maybe?

                            1 Reply Last reply
                            1
                            • girishG girish

                              @staypath Usually, we keep the code in Cloudron read-only. As a convention, the code is placed in /app/code. The data the app generates is put in /app/data and this is backed up. The idea is when we have an update, we can just throw out the old container, replace it with the new container, keep /app/data alone as-is (it's mounted into the new container) and things will work.

                              If the code itself is in /app/data, then it's part of the backup and also the update path is not clear. All the operations like backup/clone etc will work. Only update is an issue. Do you have any idea how to solve this?

                              One idea, if it's possible, is to put node-red code and npm install in /app/code in the Dockerfile. For additional plugins, if we can set some node module path which can be picked up from say /app/data/node_modules or something, that would be ideal. Is that possible though?

                              S Offline
                              S Offline
                              staypath
                              wrote on last edited by
                              #15

                              @girish Ok, I understand a bit more about the Cloudron build process now. I have updated my Dockerfile.cloudron and moved the repo here:

                              https://github.com/jsonsmth/node-red-docker-cloudron

                              The updated build process stores all app code in /app/code and only the user-specific data (including user node_modules) in /app/data.

                              1 Reply Last reply
                              3
                              • girishG girish

                                @staypath Usually, we keep the code in Cloudron read-only. As a convention, the code is placed in /app/code. The data the app generates is put in /app/data and this is backed up. The idea is when we have an update, we can just throw out the old container, replace it with the new container, keep /app/data alone as-is (it's mounted into the new container) and things will work.

                                If the code itself is in /app/data, then it's part of the backup and also the update path is not clear. All the operations like backup/clone etc will work. Only update is an issue. Do you have any idea how to solve this?

                                One idea, if it's possible, is to put node-red code and npm install in /app/code in the Dockerfile. For additional plugins, if we can set some node module path which can be picked up from say /app/data/node_modules or something, that would be ideal. Is that possible though?

                                S Offline
                                S Offline
                                staypath
                                wrote on last edited by
                                #16

                                @girish Also, I think we're following along with the recommended method for preserving user data within the app:

                                https://github.com/jsonsmth/node-red-docker-cloudron#managing-user-data

                                1 Reply Last reply
                                2
                                • S Offline
                                  S Offline
                                  staypath
                                  wrote on last edited by
                                  #17

                                  I have updated the repo here with built-in LDAP auth:

                                  https://github.com/jsonsmth/node-red-docker-cloudron

                                  1 Reply Last reply
                                  3
                                  • S Offline
                                    S Offline
                                    staypath
                                    wrote on last edited by
                                    #18

                                    Repo has been updated to include the following:

                                    • split the Dockerfile into Dockerfile.cloudron and start.sh to match Cloudron app standards
                                    • built-in LDAP auth

                                    I've tested backup,restore and package upgrade.

                                    https://github.com/jsonsmth/node-red-docker-cloudron

                                    Thanks!

                                    girishG 1 Reply Last reply
                                    7
                                    • S staypath

                                      Repo has been updated to include the following:

                                      • split the Dockerfile into Dockerfile.cloudron and start.sh to match Cloudron app standards
                                      • built-in LDAP auth

                                      I've tested backup,restore and package upgrade.

                                      https://github.com/jsonsmth/node-red-docker-cloudron

                                      Thanks!

                                      girishG Do not disturb
                                      girishG Do not disturb
                                      girish
                                      Staff
                                      wrote on last edited by
                                      #19

                                      @staypath awesome, I will take a look later this week!

                                      1 Reply Last reply
                                      3
                                      • H Offline
                                        H Offline
                                        hendrikvl
                                        wrote on last edited by
                                        #20

                                        I've been working on a Cloudron-app for Node-RED as well. Using node-red-docker and adapting it to Cloudron felt too complicated to me. So, as opposed to the app package that @staypath has been working on, I started with a Cloudron package from scratch.

                                        You can find my repo here: https://git.vereint-digital.de/hendrik/node-red-app

                                        Node-RED itself is simply installed through npm, so the code does not come bundled in the repo itself. Since Node-RED does rely on npm quite a lot anyhow, that seemed more straightforward to me. Plus it makes the Dockerfile really simple.

                                        The code of Node-RED itself (including three modules that are installed out of the box) is located in /app/code. The node-red userdir is in /app/data. So updates of node-red should work, but I've not been testing it long enough to tell.

                                        The app package uses the Cloudron sendmail and mongodb addons. Mails can be sent using node-red-contrib-sendmail and the database can be accessed using node-red-contrib-mongodb4. Both modules come preinstalled and are preconfigured using the environment variables that Cloudron exports.

                                        I must say though, that I do not feel too confident about my solution to send mails. I initially thought, that it would be easier to utilize a command line mail utility, but it turned out to be quite complex as well. In the end, I had to write my own script to act as mail utility, so that it matches the assumptions of node-red-contrib-sendmail. Writing a custom Node-RED module that uses Nodemailer and accesses the Cloudron environment variables probably would have been a better approach.

                                        For authorization, I currently use Cloudron proxyauth and only leave one route (/public) unprotected. Since custom user authentication can be implemented in Node-RED quite easily, it would be highly beneficial to have the authenticated user as part of the request headers, as discussed here. Implementing LDAP, as @staypath has done, also has its benefits though. I'm currently a bit indecisive which approach is preferable.

                                        I hope this is helpful to others, who want to use Node-RED on Cloudron. And maybe we get the discussion on including Node-RED in the app-store going again.

                                        girishG 1 Reply Last reply
                                        4
                                        • H hendrikvl

                                          I've been working on a Cloudron-app for Node-RED as well. Using node-red-docker and adapting it to Cloudron felt too complicated to me. So, as opposed to the app package that @staypath has been working on, I started with a Cloudron package from scratch.

                                          You can find my repo here: https://git.vereint-digital.de/hendrik/node-red-app

                                          Node-RED itself is simply installed through npm, so the code does not come bundled in the repo itself. Since Node-RED does rely on npm quite a lot anyhow, that seemed more straightforward to me. Plus it makes the Dockerfile really simple.

                                          The code of Node-RED itself (including three modules that are installed out of the box) is located in /app/code. The node-red userdir is in /app/data. So updates of node-red should work, but I've not been testing it long enough to tell.

                                          The app package uses the Cloudron sendmail and mongodb addons. Mails can be sent using node-red-contrib-sendmail and the database can be accessed using node-red-contrib-mongodb4. Both modules come preinstalled and are preconfigured using the environment variables that Cloudron exports.

                                          I must say though, that I do not feel too confident about my solution to send mails. I initially thought, that it would be easier to utilize a command line mail utility, but it turned out to be quite complex as well. In the end, I had to write my own script to act as mail utility, so that it matches the assumptions of node-red-contrib-sendmail. Writing a custom Node-RED module that uses Nodemailer and accesses the Cloudron environment variables probably would have been a better approach.

                                          For authorization, I currently use Cloudron proxyauth and only leave one route (/public) unprotected. Since custom user authentication can be implemented in Node-RED quite easily, it would be highly beneficial to have the authenticated user as part of the request headers, as discussed here. Implementing LDAP, as @staypath has done, also has its benefits though. I'm currently a bit indecisive which approach is preferable.

                                          I hope this is helpful to others, who want to use Node-RED on Cloudron. And maybe we get the discussion on including Node-RED in the app-store going again.

                                          girishG Do not disturb
                                          girishG Do not disturb
                                          girish
                                          Staff
                                          wrote on last edited by
                                          #21

                                          @hendrikvl This is awesome! Thanks for working on this.

                                          The app package uses the Cloudron sendmail and mongodb addons. Mails can be sent using node-red-contrib-sendmail and the database can be accessed using node-red-contrib-mongodb4. Both modules come preinstalled and are preconfigured using the environment variables that Cloudron exports.

                                          Nice, as expected of any cloudron app email and db are auto-configured.

                                          Implementing LDAP, as @staypath has done, also has its benefits though. I'm currently a bit indecisive which approach is preferable.

                                          Does node-red have a real concept of users and roles ? Meaning, can individual users create and manage separate flows? When LDAP is implemented, who provides the login page? Is this part of some plugin?

                                          H J 2 Replies Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Bookmarks
                                          • Search