It’s a really good project that automates the deploying of this typical open-Source LAMP-like stack for the Internet of Things I’ve been using (and deploying each component manually ) so far.
After I’ve set it up successfully, I’m thinking about next steps or questions:
Node-RED version deployed belongs to a custom Balena image version, as I’ve checked on docker-compose.yml file. What if I want to use and deploy the offficial image version of Node-RED (wich is more up-to-date)? What changes should I need?
Node-RED is deployed on 80 host port by default. What if I have another service already listening at that port and want to use another one? What changes should I need? Reference Issue
These are my first draft inquires I’ve think about and would like to resolve somehow (and sureley will help more users using it).
Thanks a lot for sharing the project & kudos for Marc Pous!
Node-RED version deployed belongs to a custom Balena image version, as I’ve checked on docker-compose.yml file. What if I want to use and deploy the offficial image version of Node-RED (wich is more up-to-date)? What changes should I need?
Actually i’m thinking on updating this and showing to the developers how to add more flows and more libraries from the Dockerfile template
Node-RED is deployed on 80 host port by default. What if I have another service already listening at that port and want to use another one? What changes should I need? Reference Issue
Regarding with the port 80, the balenaCloud public device URL only supports por 80, 443 and 8080, this is why I used 80 for NodeRED and 8080 for Grafana, so I can access remotely to my MING device My main goal was to take the advantage of the balenaCloud Public Device URL.
There are different possible solutions!
(1) Feel free to change it the docker-compose
(2) Add a new container and use a proxy that depending on the URL goes to one container or another (e.g. Traefik or others)
That means that NodeRED is built from this block → balenaHub: an easier way to find and publish fleets, apps, and blocks for edge devices from this repo → GitHub - balenablocks/balena-node-red) i think we were not using the docker image because it was not working perfectly with some devices.
Even so, isn’t there a possibility to try to deploy the official Node-RED image? If possible, would it only be necessary to change the image in the docker-compose.yml?
I´ve been able to install node-red-contrib-influxdb nodes from Balena Node-RED (through Manage palette-> Install) in order to save data received from an MQTT endpoint on Influxdb databases. I’ve faced that connection fails. Can you confirm if the url http://influxdb:8086 is the one exposed? Checking at the docker-compose.yml file, there’s no ports: option listed for influxdb service…maybe is it missing?)
I’ve checked that enabling PUBLIC DEVICE URL I can access Node-RED. Is the only service exposed publicly? I was (expecting) trying to access Grafana from https://mypublic_id.balena-devices.com:8080 but no success. So, Grafana can only be accessed locally?
did you try it? i don’t have any reason why the official nodeRED image shouldn’t work. We use that one because it has balena flows deployed on it. Feel free to test and let us know if that works. Are you testing on a Raspberry Pi or on a x86 device?
to access to the port 8080 try http instead of https. That might work!
Why do you need Kura and NodeRED at the same device? What is the use case where you need both?
Could you please share more details of the error you get? it works. Not sure the influxdb:8086 uses http. Feel free to send me more details of the issue
did you try it? i don’t have any reason why the official nodeRED image shouldn’t work. We use that one because it has balena flows deployed on it. Feel free to test and let us know if that works. Are you testing on a Raspberry Pi or on a x86 device?
Not yet, but I’d like to test it as I would like to have an up-to-date version of Node-RED. I´ll let you know in case!
to access to the port 8080 try http instead of https. That might work!
YES! It’s working now!
Why do you need Kura and NodeRED at the same device? What is the use case where you need both?
Oh, yeah, no need or reason to have both ! Personally I use Node-RED in my DIY projects, but we use a fleet of devices with Kura running where I’m workin now. So that’s the reason why I’m thinking in next steps if I’d like to customize somehow the project!
Could you please share more details of the error you get? it works. Not sure the influxdb:8086 uses http . Feel free to send me more details of the issue
Forget about it. I watched today your Node-RED Con 22 presentation & then I realized that you used [1.x] influxdb node configuration, instead the (wrong) one I was using [1.8-flux]! So I can confirm it’s working now as well.
Many thanks again for your quick feedback @mpous !
I’ll keep you updated as soon as I’ll continue doing tests!
I want to inform you about a the following fact I faced today:
I checked that my device was offline in Balena Cloud after several hours up&working ok, so I thought it was probably caused by some Wi-Fi connection issues. So great moment to check that the WiFi connect service was running and creating the captive portal.
I checked & it was active, so I tried to connect over exposed WiFi AP and expected to see the captive portal… yet the Balena Node-RED showed on local IP port 80. No way to access captive portal
So, did you checked this feature? Is it working as expected in your end? As you can check, I was not able to access the service and I had to unplug/plug again the RaspberryPi to access & see it online on Balena Cloud.
Hi @mpous , I’ve not tried any option yet… Regarding Traefik solution I think it’ll be probably the best, but it’s out of my actual knowledge base, so I’d try to change the host port of Node-RED on the docker-compose.yml project file and check if it fixes the issue.
Hi,
new to Balena and the forum so apologies if the question is basic or my use of the threads incorrect.
I’m trying to deploy the MING stack project using balena push <my-fleet>, but I’m getting the following error:
[Error] Some services failed to build:
[Error] Service: node-red
[Error] Error: (HTTP code 404) unexpected - pull access denied for bh.cr/balenablocks/balena-node-red, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
I’m logged in on my docker CLI and on inspection of the link, I get a 404 in my browser also, so I suspect it’s the wrong link. Can anyone else confirm the issue or suggest where I may be going wrong?
Thanks, looking forward to building more on balena.
Could you please paste the instructions that you are doing? you cloned the repo on your computer, typed balena login and then balena push <your-fleet>?
I’ve already set up a device for a fleet and running a balenaSense instance successfully. I wanted to extend on this and start connecting other MQTT devices and came across your project.
Cloned the repo
balena login
balena push <my-fleet>
At this point on the dash I observe the project starting to build on the local device, and the CLI tells me it successfully pulled other services listed in the docker-compose file (wifi-connect, influxdb, etc.). These are the logs:
[Info] Starting build for pilot, user XXX
[Info] Dashboard link: https://dashboard.balena-cloud.com/apps/.../devices
[Info] Building on arm05
[Info] Pulling previous images for caching purposes...
[Success] Successfully pulled cache images
[Info] Uploading images
[Success] Successfully uploaded images
[Error] Some services failed to build:
[Error] Service: node-red
[Error] Error: (HTTP code 404) unexpected - pull access denied for bh.cr/balenablocks/balena-node-red, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
[Info] Built on arm05
[Error] Not deploying release.
Remote build failed
EDIT: After some research, I can confirm it has been moved to a new balena organization (balenalabs) and that’s the reason why it fails to fetch it. So, if you change the docker-compose.yml file image to use with the new one bh.cr/balenalabs/balena-node-red I guess it would work !!! Please confirm if you test it.
Commit of the change that confirms the new organization.
We did some changes internally, as we are renaming some repos and that affected the link of the images from the containers registry! Sorry for that! We are going to work so this is not going to happen again.
I do not want to hijack this thread so I will look elsewhere in the forum to be apart of this effort as well. I will end my comment here. thanks for your work!
I am ok with supplying my next build as it goes. There are several pieces to the puzzle that I have not been able to get quite right along the lines of just the standard workflow. IOW, I have an app deployed across the several containers and I am constantly developing new and the standard fare of break/fix. Currently that is being done on my production instance that runs my fish tank. I am having the most difficulty with upgrades and configuration changes within the containers. I am thinking that the individual containers need to be blocks maybe. I have been using Balena and telling everyone I talk to about it. I REALLY believe it solves many of the problems I here within the IoT space. I am a Software Architect (hands-on) and been in the craft for over 30yrs. I have been using this app to work through practicality issues while automating EVERY task I can. It is a 180g, with automated water changes, Reverse Osmosis (RODI). I run several hundred gallons of fresh through the system a week. But the point is I build working apps for a living, and I know this technology (Balena) is on target. I know this post is a crazy ramble of the thousand things I have going on. But I am just putting this out there so folks can ask questions and I can tell what works and what doesn’t and maybe get some answers and give some as well. I guess I am attempting to create what is called a Reference Architecture. An app that showcases it in practice and how someone can replicate the process of taking their tech and putting it on this platform (Balena / Docker / Node-red, Python, Go, etc.) Nuf for now…