balena-labs-projects / balena-node-red Goto Github PK
View Code? Open in Web Editor NEWa node-red application with balena-supervisor support, can be managed remotely via balena publicURL
License: Apache License 2.0
a node-red application with balena-supervisor support, can be managed remotely via balena publicURL
License: Apache License 2.0
network_mode has been set to host in the docker-compose.yml for the node-red service.
Is there a specific reason for that ?
If not I think it is better not to use this.
Node 16 is feeling a bit old (and incompatible with node-red-contrib-zwave-js) - Is 16.9 the newest we can have on balena (base image list?
Hi all,
Very new to balena but extremely familar with Node Red. Once installed on a Pi 3, the logs show that the Pi GPIO library is not installed.
Alongside this I added the modbus node to my palette but this won’t install due to a dependency on serial libraries. Is there a way a I can include this in the docker container to be rolled out automatically for future deployments?
Thanks
Hi!
How can I define USERNAME and PASSWORD env variables when developing in local mode? I tried to add them to docker file without success
ENV PASSWORD="YYYY" \
USERNAME="XXX"
When I want to change backlight of RPi display, it trhrows:
Error: EROFS: read-only file system, open '/sys/class/backlight/rpi_backlight/bl_power
Is there a way to do this on readonly FS or how do I change the FS to writable?
Thank you in advance.
Currently there are 2 different nodes to interface with the raspberry pi hardware (GPIO pins):
This issue is raised to support the 2nd node (=node-red-node-pi_gpiod) to interface with the raspberry pi hardware. This node can easily be installed via the node-red editor (via the manage palette menu) but in order to use this node the daemon pigpiod must be running.
So this issue is about how to get the daemon pigpiod running.
Hi!
What are the best practices to distribute created flows to another devices as created flows are stored in device?
Hi,
I am having the following error when pushing:
C:\repos\balena-node-red
!balena push node-red --source .
- Packaging the project source...[Info] Converting line endings CRLF -> LF for file: C:\repos\balena-node-red\.gitignore
[Info] Converting line endings CRLF -> LF for file: C:\repos\balena-node-red\CHANGELOG.md
[Info] Converting line endings CRLF -> LF for file: C:\repos\balena-node-red\LICENCE
[Info] Converting line endings CRLF -> LF for file: C:\repos\balena-node-red\README.md
[Info] Converting line endings CRLF -> LF for file: C:\repos\balena-node-red\balena.yml
[Info] Converting line endings CRLF -> LF for file: C:\repos\balena-node-red\docker-compose.yml
[Info] Converting line endings CRLF -> LF for file: C:\repos\balena-node-red\repo.yml
[Info] Converting line endings CRLF -> LF for file: C:\repos\balena-node-red\.versionbot\CHANGELOG.yml
[Info] Converting line endings CRLF -> LF for file: C:\repos\balena-node-red\node-red\Dockerfile.raspberrypi4-64
[Info] Converting line endings CRLF -> LF for file: C:\repos\balena-node-red\node-red\Dockerfile.template
[Info] Converting line endings CRLF -> LF for file: C:\repos\balena-node-red\node-red\app\settings.js
[Info] Converting line endings CRLF -> LF for file: C:\repos\balena-node-red\node-red\app\start.sh
[Info] Converting line endings CRLF -> LF for file: C:\repos\balena-node-red\node-red\app\flows\balena.json
[Error] The included balena.yml is not a valid contract, allowed types are sw.application,sw.block,sw.hal-module, stopping build
[Error] Some services failed to build:
[Error] Not deploying release.
[Error] Upstream API server/DB error:
Remote build failed
I am pushing from Windows and the application is being deployed to a RaspberryPi3 using the 64bit OS
I have tried to use this image in several raspberry 4 devices and it seems that is not booting as expected so I can not see my device in my relative fleet.
To see the device in my fleet after some seconds and be able to use Node Red when I enable the public URL.
Once it is powered on, both green and red light of the raspberry pi stays on. I don't see the device in my fleets or I see anything when I enter the HDMI. I have tried the same process to different devices.
Looking at the code I think that the base image should be referencing the version 4 but I have not tried to change that yet, neither I am sure that this is the cause of the problem.
The libatomic1
library is now required.
This node-red service is set as a privileged service and node-red runs as root user.
In most cases this is not really needed.
It would be nice and secure to be able to run the node-red service as a non privileged service which is not run as root.
Note also the node-red docker image managed by the node-red community is also not running as privileged service and it executes under the user "node-red".
See https://hub.docker.com/r/nodered/node-red-docker/
Hi,
this is nice to have a resin-node-red template to startup, but I think you could made it more explicit you have to setup env vars before you can do anyting in the Node-RED console, because it's not so obvious and you can actually see the interface and do some layout before you realize u can't save or run anything.
I have just installed this application on my raspberry pi.
The log file showed the following 2 warnings:
03.10.19 20:34:30 (+0200) node-red 3 Oct 18:34:30 - [warn] [node-red-contrib-balena/depDevices] Error: /usr/local/lib/node_modules/node-red-contrib-balena/depDevices/depDevices.html does not exist
03.10.19 20:34:30 (+0200) node-red 3 Oct 18:34:30 - [warn] [node-red-contrib-balena/depApps] Error: /usr/local/lib/node_modules/node-red-contrib-balena/depApps/depApps.html does not exist
Here below you see the complete start of the log file.
03.10.19 20:34:25 (+0200) Started service 'node-red sha256:c236a18214c7b05fb0b2074b7938a36c84f8700197c2f1e179a0e63ec9fbed10'
03.10.19 20:34:26 (+0200) node-red 3 Oct 18:34:26 - [info]
03.10.19 20:34:26 (+0200) node-red
03.10.19 20:34:26 (+0200) node-red Welcome to Node-RED
03.10.19 20:34:26 (+0200) node-red ===================
03.10.19 20:34:26 (+0200) node-red
03.10.19 20:34:26 (+0200) node-red 3 Oct 18:34:26 - [info] Node-RED version: v1.0.0
03.10.19 20:34:26 (+0200) node-red 3 Oct 18:34:26 - [info] Node.js version: v12.7.0
03.10.19 20:34:26 (+0200) node-red 3 Oct 18:34:26 - [info] Linux 4.14.98 arm LE
03.10.19 20:34:27 (+0200) node-red 3 Oct 18:34:27 - [info] Loading palette nodes
03.10.19 20:34:30 (+0200) node-red 3 Oct 18:34:30 - [warn] ------------------------------------------------------
03.10.19 20:34:30 (+0200) node-red 3 Oct 18:34:30 - [warn] [node-red-contrib-balena/depDevices] Error: /usr/local/lib/node_modules/node-red-contrib-balena/depDevices/depDevices.html does not exist
03.10.19 20:34:30 (+0200) node-red 3 Oct 18:34:30 - [warn] [node-red-contrib-balena/depApps] Error: /usr/local/lib/node_modules/node-red-contrib-balena/depApps/depApps.html does not exist
03.10.19 20:34:30 (+0200) node-red 3 Oct 18:34:30 - [warn] ------------------------------------------------------
03.10.19 20:34:30 (+0200) node-red 3 Oct 18:34:30 - [info] Settings file : /usr/src/app/settings.js
03.10.19 20:34:30 (+0200) node-red 3 Oct 18:34:30 - [info] Context store : 'default' [module=memory]
03.10.19 20:34:30 (+0200) node-red 3 Oct 18:34:30 - [info] User directory : /data/node-red/user/
03.10.19 20:34:30 (+0200) node-red 3 Oct 18:34:30 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
03.10.19 20:34:30 (+0200) node-red 3 Oct 18:34:30 - [info] Flows file : /data/node-red/user/flows_803bf37.json
03.10.19 20:34:30 (+0200) node-red 3 Oct 18:34:30 - [info] Creating new flow file
Hi!
Resin.io released support for multiple docker container. I tried to run this as separate container, without any luck. Is there some kind of modifications needed to make this work?
I've added USERNAME and PASSWORD in "DEVICE ENVIRONMENT VARIABLES", encoding my password with "node-red-admin hash-pw" since brcyptjs is not available, but I can't login ("login failed").
What can I do to debug this ?
Here are my USERNAME and encoded PASSWORD :
USERNAME : admin
PASSWORD : $2a$08$p7SNNZKTCvepTYQRxzwG0O5cVpWgoiILViIaFd7XW7FbWVcGacqMu (hash for "linc123" without quotes)
I've try to restart app and even reboot device but with no success.
I had no problem with your Node-red on debian image.
Hi,
I've finally took time to test this new slim node-red Dockerfile, but I've met some problems :
12.07.17 18:20:34 (+0200) 12 Jul 16:20:34 - [rpi-srf] Info : Can't find Pi RPi.GPIO python library.
12.07.17 18:20:34 (+0200) 12 Jul 16:20:34 - [warn] ------------------------------------------------------
12.07.17 18:20:34 (+0200) 12 Jul 16:20:34 - [warn] [rpi-srf] Warning : Can'tfind Pi RPi.GPIO python library.
Here is my the relevant RUN where you can see I've added py-rpigpio but maybe this library is not the same as python-rpi.gpio debian package :
# Install node modules, including i2c-bus without carrying all the deps in the layers
RUN apk add --no-cache \
tzdata \
make \
gcc \
g++ \
python \
py-rpigpio \
&& JOBS=MAX npm install -g --production --silent \
node-red \
node-red-contrib-resinio \
node-red-node-pisrf \
# Setup timezone
&& cp /usr/share/zoneinfo/Europe/Paris /etc/localtime \
&& echo "Europe/Paris" > /etc/timezone \
# Remove non runtime dependencies
&& apk del \
tzdata \
make \
gcc \
g++ \
&& npm cache clean --force \
&& rm -rf /tmp/*
As a conclusion, maybe you should keep a second Dockerfile template for those who need packages not available on alpine.
I've started a forum post here discussing. I've started to look into fixes, but if anyone has any suggestions I'm all ears open!
https://forums.balena.io/t/node-red-on-siemens-iot-2040/25564
Hi,
I am running resinOS 2.12.7 on a Siemens IOT2000.
I am facing an error after downloading the image to the IOT2000:
main /usr/src/app/start.sh: line 12: 45 Illegal instruction (core dumped) node-red --settings /usr/src/app/settings.js
Do you know why this error occurs?
$ git clone https://github.com/balena-io-projects/balena-node-red.git
$ cd balena-node-red
$ balena push test-rpi4
...
[node-red] E: Unable to locate package rpi.gpio
[node-red] E: Couldn't find any package by glob 'rpi.gpio'
[node-red] E: Couldn't find any package by regex 'rpi.gpio'
[node-red] E: Unable to locate package python-rpi.gpio
[node-red] E: Couldn't find any package by glob 'python-rpi.gpio'
[node-red] E: Couldn't find any package by regex 'python-rpi.gpio'
[node-red]
[node-red] Removing intermediate container f85e7e1cc7e2
[node-red] The command '/bin/sh -c apt-get update && apt-get install -yq --no-install-recommends rpi.gpio python-dev python-rpi.gpio && apt-get clean && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100
[Info] Uploading images
[Success] Successfully uploaded images
[Error] Some services failed to build:
[Error] Service: node-red
[Error] Error: The command '/bin/sh -c apt-get update && apt-get install -yq --no-install-recommends rpi.gpio python-dev python-rpi.gpio && apt-get clean && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100
[Info] Built on arm01
[Error] Not deploying release.
Remote build failed
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.