What's your rating of Node RED

FAQ: Node-Red

One speaks German

Node-Red recently started speaking German. Unfortunately the translations are a disaster. How can I switch back to English?

Unfortunately not with on-board resources. Node-Red recognizes the browser's preferred language and sets it. The developers are aware of the poor quality of the translation and numerous improvements have already been made. If you don't want to wait for the developers to correct all the translations, you can forcibly remove the localization. To do this, change to the path of your Node-Red installation and delete the directory there.


Integrate Google Assistant

I would like to control my Node-Red installation with the Google Assistant. How can I connect the two?

There are several ways to do it and all of them are rocky. Unlike Amazon's Alexa, Google's Assistant has not yet integrated any useful support for local devices. All services available in Google Home and the Assistant run via the manufacturer clouds. These then pass the commands from the Assistant to the devices. The problem is that manufacturers have to register with Google beforehand, so you can't just enter an MQTT server.

A possible detour is via IFTTT, a web service that can be used to intercept commands from the Google Assistant and forward them to a webhook, i.e. a URL provided by Node-Red. But that works only reasonably well, because you cannot store devices, only phrases with a variable parameter. The phrases must not be too similar to those used by Google, otherwise they will not work. So if you save "living room light on", you only get the message that Google doesn't know any living room light and the webhook is not triggered. It helps to prefix a code word such as “command” or “smart home”. But that feels anything but “smart”.

The situation may improve with the control of local devices presented at the I / O developer conference. However, this is still in the beta phase and we are not yet aware of any Node Red extensions that support the control.

The most rocky, but probably also the most flexible way is to integrate your own Google Actions app. This solution requires some fiddling with Google's developer console. Both (documentation) and (documentation) are available as Node Red extensions.

Restrict access

Is there a way to restrict access to the Node-Red backend or dashboard?

Both are possible, but are inelegantly solved. You have to store user and password hashes for the necessary accounts in the settings.js file. To hash the password, you need the program node-red-admin (documentation), which you can install via npm. When you call up you will be asked for the password and after entering it the hash will be displayed. Copy this to add it to the. The block required for registration looks like this and must be inserted in the file before the last curly bracket:

For password, insert the hash value you just generated. Then restart Node-Red. You can also add other users with restricted rights. Unfortunately, the Node Red developers have not yet well documented the process for this. Those who prefer to connect Node-Red via OAuth or with their own login service can do that too.

A further step is necessary for password-protected access to the dashboard. The dashboard, like many other extensions that provide HTTP endpoints, safeguards the option. This only expects username and password hash as parameters:

Unfortunately, you cannot use OAuth procedures here, but are limited to user names and hashes.


Access Node-Red from the outside

How can I make Node-Red accessible from the outside?

The best way to do this is to use a reverse proxy like Traefik. It not only takes over the routing of the HTTP requests, but can also regulate the TLS management including the procurement of certificates. Of course, this also applies to services other than Node-Red.

An introduction to the upcoming version 2.0 of Traefik could be read in c’t 17/2019. In addition, you have to secure the access with a password so that not everyone who looks at your IP address can control the lights. More on this in the previous question.

Apps for smartphones

Can I also use Node-Red on my smartphone or tablet without opening the browser every time? Is there an app maybe?

You can hide the browser a bit by installing the dashboard as a Progressive Web App (PWA). It then appears in the list of apps or on the start screen, depending on the smartphone operating system. Native apps are only available indirectly. Some apps like Home Remote for Android and iOS can communicate with Node-Red via MQTT. For others, such as RemoteXY, you have to install extensions that retrofit the appropriate interfaces.

Better heating dashboard

I want to control my heating. I have already integrated the relevant interfaces in Node-Red, but I lack a flexible dashboard interface. Is there anything?

Yes. With the extension (documentation) you can see the current status of the room temperature and regulate it, because it comes with its own dashboard element. In addition, you can store flexible heating plans that are executed by the node. You just have to convert the commands so that the interface of your heating system understands them.

Node-Red configuration in Git

Is there a way to automatically back up my Node-Red configuration when changes are made?

Unfortunately not an integrated one. You can back up the files automatically at any time. Alternatively, there is also the project function that saves the Node-Red configuration in a Git repository. This has the advantage that you can always restore the previous status if changes are unsuccessful. The project function must first be activated in the. To do this, paste the following code:

Now restart Node-Red. Then open the settings via the hamburger menu. Then click on “Git Configuration”. Enter a user name and your email address. Next, click on the small button "Add Key" to generate an SSH key that Node-Red uses to log into the Git server. Assign a name and optionally a password. After another click on "Generate key" you can copy the public SSH key and enter it on your Git server.

So that Node-Red knows where the data should go, you still have to specify the Git repository. The setting for this can be found in the hamburger menu under "Project / Project Settings / Settings". There you can use the “add remote” button to enter a Git repository. If you use a GitHub repository, you should use the SSH protocol and not HTTPS.

Wanted tokens for vacuum cleaner robots

How can I integrate my Roborock / Xiaomi vacuum cleaner robot into Node-Red? I'm always asked for a token, but I don't know where to get it.

The token is required to access the vacuum robot's interfaces - both via the cloud and locally - and is unique for each device. With older models, you can access the token using the FloleVac Android app or the Miio command line program. This does not work with newer models such as the T6, S6 or 1S (2nd generation). You have to bite the bullet and install a hacked version of the Xiaomi Android app. This shows the token in the settings.

Node-Red without Docker

I'm not a friend of Docker's. Can I also operate Node-Red without it?

Of course. The Node-Red developers provide scripts and instructions for all kinds of platforms on their website. From the Raspi installation to the cloud deployment, everything is offered - and of course the local installation without a container. (mls)

This post comes from c't 19/2019