You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like run the IOTstack on alternative hardware (instead raspi on a futro 740).
After Build a new stack nodered can not be started:
ERROR: for nodered Cannot start service nodered: error gathering device information while adding custom device "/dev/ttyAMA0".
The error message appears regardless of which nodered modules have been installed. Is there a way around the error?
Thanks
Holger
The ttyAMA0 device is the Raspberry Pi serial port. Apparently, "AMA" is the name of the bus on the Raspberry Pi SOC that connects to the UART.
Because /dev/ttyAMA0 is pretty much guaranteed to exist on a Raspberry Pi, it is used fairly often in IOTstack service definitions, both "for real" and as a placeholder.
Node-RED is an example of a "for real" mapping:
- /dev/ttyAMA0:/dev/ttyAMA0
With that in place a flow using the node-red-node-serialport add-on node can access the serial port on the Raspberry Pi (left hand side of the above mapping) by communicating with the container's serial port (right hand side of the above mapping).
It doesn't matter whether any node or flow is or isn't using /dev/ttyAMA0. The mapping makes the serial port available inside the container in case a node or flow wants to use it. It's a subtle difference.
Octoprint and Zigbee2MQTT are examples of "placeholder" usage. Until you connect your 3D printer or Zigbee adapter, you don't know how it is going to show up in /dev. Each of those service definitions maps:
- /dev/ttyAMA0:/dev/ttyACM0
Because Docker-Compose can find the left hand side of the mapping, it will at least start both the stack as a whole and any containers using that mapping.
The process running inside the container may well get upset and go into a restart loop (Zigbee2MQTT does) but that's a separate matter.
Anyway, in the case of Node-RED, you can solve this problem by doing one of the following:
Delete or comment-out the line containing /dev/ttyAMA0; or
For your particular hardware, figure out which device connects to your serial port and substitute it. For example, if /dev/ttyS0 leads to your UART, change the line to be:
- /dev/ttyS0:/dev/ttyAMA0
The approach you take depends on whether you have plans to communicate with the serial port - assuming that exists on your hardware.
Activity
Paraphraser commentedon Oct 2, 2022
Yes, there is a way around this.
Please read these links:
The
ttyAMA0device is the Raspberry Pi serial port. Apparently, "AMA" is the name of the bus on the Raspberry Pi SOC that connects to the UART.Because
/dev/ttyAMA0is pretty much guaranteed to exist on a Raspberry Pi, it is used fairly often in IOTstack service definitions, both "for real" and as a placeholder.Node-RED is an example of a "for real" mapping:
With that in place a flow using the
node-red-node-serialportadd-on node can access the serial port on the Raspberry Pi (left hand side of the above mapping) by communicating with the container's serial port (right hand side of the above mapping).Octoprint and Zigbee2MQTT are examples of "placeholder" usage. Until you connect your 3D printer or Zigbee adapter, you don't know how it is going to show up in
/dev. Each of those service definitions maps:Because Docker-Compose can find the left hand side of the mapping, it will at least start both the stack as a whole and any containers using that mapping.
Anyway, in the case of Node-RED, you can solve this problem by doing one of the following:
Delete or comment-out the line containing
/dev/ttyAMA0; orFor your particular hardware, figure out which device connects to your serial port and substitute it. For example, if
/dev/ttyS0leads to your UART, change the line to be:The approach you take depends on whether you have plans to communicate with the serial port - assuming that exists on your hardware.
I hope this makes sense?
tester277 commentedon Oct 3, 2022
Phill Thanks for the detailed explanation. With this it makes sense.