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 posted this issue in the docker image repo (WebThingsIO/gateway-docker#42), but have since found more info on the problem. The arduino-cli that comes pre-packaged in the Candle-manager-addon does not work within the mozillaiot/gateway Docker image (which is based on node:12-buster-slim). The workaround for me was to download the arduino-cli from https://arduino.github.io/arduino-cli/installation/ and update the SHA256SUMS file (using sed).
Here's my docker create/startup script that installs the addon and performs the above workaround.
#!/bin/bash
TMP_DIR=./.tmp
IOT_DATA=/home/pi/Development/iot/data
ADDONS="$IOT_DATA/addons"
CANDLE_ADDON_SRC="https://s3-us-west-2.amazonaws.com/mozilla-gateway-addons/Candle-manager-addon-1.1.0-linux-arm-v3.5.tgz"
CANDLE_ADDON_DIR="$ADDONS/Candle-manager-addon"
ARDUINO_CLI_TAR="https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Linux_ARMv7.tar.gz"
docker run \
-it \
-e TZ=America/Chicago \
-v /home/pi/Development/iot/data:/home/node/.mozilla-iot \
--device "/dev/ttyUSB0:/dev/ttyUSB0" \
--network="host" \
--log-opt max-size=1m \
--log-opt max-file=10 \
--name webthings-gateway \
mozillaiot/gateway:latest
mkdir -p $ADDONSif [ !-d$CANDLE_ADDON_DIR ];then
mkdir -p $TMP_DIR
curl -L $CANDLE_ADDON_SRC| tar xzv --directory $TMP_DIR
mv $TMP_DIR/package $CANDLE_ADDON_DIR
curl -kL $ARDUINO_CLI_TAR| tar xzv --directory $TMP_DIR
mv $TMP_DIR/arduino-cli $CANDLE_ADDON_DIR/arduino-cli/linux-arm/arduino-cli
ARDUINO_CLI_SUM=`cd $CANDLE_ADDON_DIR&& sha256sum ./arduino-cli/linux-arm/arduino-cli`
sed -i -e "s%^.*\s*\.\/arduino-cli\/linux-arm\/arduino-cli\$%$ARDUINO_CLI_SUM%g"$CANDLE_ADDON_DIR/SHA256SUMS
rm -rf $TMP_DIRfi# Have to restart it because the first run exits with an SQLITE error
docker restart webthings-gateway
The text was updated successfully, but these errors were encountered:
tatemz
changed the title
Arduino CLI not working in mozillaiot/gateway Docker container (ARMv7)
Arduino CLI not working in mozillaiot/gateway Docker container on Raspberry Pi 4b (ARMv7)
Jul 19, 2020
I posted this issue in the docker image repo (WebThingsIO/gateway-docker#42), but have since found more info on the problem. The
arduino-cli
that comes pre-packaged in theCandle-manager-addon
does not work within themozillaiot/gateway
Docker image (which is based onnode:12-buster-slim
). The workaround for me was to download thearduino-cli
from https://arduino.github.io/arduino-cli/installation/ and update the SHA256SUMS file (usingsed
).Here's my docker create/startup script that installs the addon and performs the above workaround.
The text was updated successfully, but these errors were encountered: