How to "npm install" to a red-node in a docker?

My red-node is run via docker.
Then I see this addon: node-red-contrib-zigbee2mqtt (node) - Node-RED

  • "npm install" is certainly not something I can do in shell .. so where does this command go?

You are better off just using standard MTTQ nodes

thanks, by any chance, are you aware of a suitable example/tutorial/guide ?

My FlexDash docs have quite an extensive how-to for docker. Obviously it's geared towards FlexDash but it's really all about installing packages. But it may be more complexity than you want to deal with... Docker - FlexDash

A guide for what in particular?

If you mean information about mqtt then see this tutorial MQTT Essentials - All Core Concepts explained

If you mean specifically about using it with zigbee2mqtt then the best thing to do is to install mqttexplorer on a pc on your network and then you can look to see what mqtt topics your devices use so you can easily access then from node red.

First off, you need to open a shell on the container:

docker exec -it name_of_node-red_docker /bin/bash

Then, from within the running container, you go to the user dir you mapped when the container was launched, typically /data
Inside you will have a node_modules directory, you cd into it, and run:

npm i node-red-contrib-zigbee2mqtt

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.