victronenergy / node-red-contrib-victron

MIT License
90 stars 18 forks source link

Figure out how to hide RPi GPIO nodes from the palette #41

Closed pkronstrom closed 4 years ago

pkronstrom commented 5 years ago

See if there's a way to remove the nodes, since they can't be used

pkronstrom commented 5 years ago

AFAIK they can be disabled from the ~/.node-red/.config.json file. This is not exactly a setting file, rather a run-time cache for the settings, so I do not know whether the changes will be persistent. Requires some further inspection/testing if still relevant.

"rpi-gpio": {
     "name": "rpi-gpio",
     "types": [
      "rpi-gpio in",
      "rpi-gpio out",
      "rpi-mouse",
      "rpi-keyboard"
     ],
     "enabled": false,
     "local": false,
     "module": "node-red",
     "file": "/usr/lib/node_modules/node-red/nodes/core/hardware/36-rpi-gpio.js"
    },
sbender9 commented 4 years ago

@mpvader the best way I've found to do this is to just remove the nodes from the filesystem when we build venus. I can make sure that it fails if anything is strange, like the file is not there any more.

I'd rather do this instead of depending on .config.json not getting overwritten or the format changing.

mpvader commented 4 years ago

Ok!

sbender9 commented 4 years ago

In the latest node-red release these are not included by default.