ct-Open-Source / ct-Smart-Home

A ready-to-use Node-RED setup for home automation

Home Page:https://ct.de/smarthome

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does not work with Raspberry pi 1

volker4 opened this issue · comments

The actual container seem not to work with raspberry pi 1.
Is this correct?
Would be nice to document.
Best Regards
Volker

similar issue for Raspberry pi 2.
the mqtt service is working but the nodered service has an issue
checking with "docker image inspect" indicates that the nodered image is for amd64 and not arm. reason seems to be that it pulls the image from dockerhub rather building it locally based on repo cloned locally.
when i

  1. changed in docker-compose.yml the image comand by a build command:
    ...
    nodered:
    build: ./docker/ctnodered
    ...
    2a. renamed in ctnodered the Dockerfile into Dockerfile.amd and
    2b. renamced Dockerfile.arm into Dockerfile

  2. downloaded the qemu as per 'pre_build' file in the hooks directory and moved to ctnodered dir.

(4. tried to run the command in the hooks/pre_build file on my raspberrypi ommand but without success)

at least a local image build started ... however did not succeed. it stopped at step 6/12:

ERROR: Service 'nodered' failed to build: The command '/bin/sh -c set -ex && mkdir -p /usr/src/node-red && mkdir /data && useradd --home-dir /usr/src/no de-red --no-create-home node-red && mkdir /var/run/dbus && apt-get update && apt-get install -y --no-install-recommends build-essential g it openssh-client python python-pip python-setuptools python-wheel python-dev avahi-daemon avahi-discover libnss-mdns libudev-d ev supervisor libcap2-bin && pip install RPi.GPIO && sed -i "s/#enable-dbus=yes/enable-dbus=yes/g" /etc/avahi/avahi-daemon.conf && sed -i "s/rlimit-nproc/#rlimit-nproc/g" /etc/avahi/avahi-daemon.conf && setcap cap_net_raw+eip $(eval readlink -f which node) && npm install && npm cache clea n --force && chown -R node-red:node-red /usr/src/node-red && chown -R node-red:node-red /data && apt-get remove -y python-dev python-wheel pyth on-setuptools python-pip libudev-dev build-essential make g++ && apt-get autoremove -y && rm -rf /var/cache/apt && rm -rf /var/lib/apt/lists/*' r eturned a non-zero code: 139

i checked with "free" the raspberry memory during the build but looks like there was enough available .

spent now almost half a day on this issue .. and still did not succeed - any help would be appreciated.

yes, I can confirm that. Raspi 2 cannot start all 3 containers in parallel. In my case the nodered-container was constant restarted. I've tried it with a new raspi 3 and it works like a charm. :)

@volker4 This setup wasn't designed for a Raspiberry Pi 1. The docker support for it's CPU architecture is too bad. I will update the Readme accordingly

@jmdev68 could you tell me which docker version is installed on your Raspberry Pi?

Dockerfile.txt
docker-compose.arm.yml.txt

Hi Merlin
i pasted the version below. yes i tried to upgrade to an version >18.06 but that doesn't work as there seem to be an issue.
docker-ce segmentation fault on Raspbian (v18.09.03) · Issue #38175 · moby/moby · GitHub

Client:
Version: 18.06.1-ce
API version: 1.38
Go version: go1.10.3
Git commit: e68fc7a
Built: Tue Aug 21 17:30:52 2018
OS/Arch: linux/arm
Experimental: false

Server:
Engine:
Version: 18.06.1-ce
API version: 1.38 (minimum version 1.12)
Go version: go1.10.3
Git commit: e68fc7a
Built: Tue Aug 21 17:26:37 2018
OS/Arch: linux/arm
Experimental: false

however - as of now i don't need the zigbee support . and for Nodered i used the attached docker file referencing a node-red-docker:rpi-v8 image which helped my in getting node red up and running. Dockercompose file is attached as well which runs MQTT and influxdb

There is now support for ARM32v6 this image might now work on your Raspberry Pi 1.