I finally plunged into the deep end, got bored, and moved my IOT laptop configuration to my RPI 2B that was laying around. It went pretty smoothly except for the DateTime adaptor. Here, at a high level, is what I performed:
-
Installed Ubuntu Core and attempted to use it as the base for my docker image. Boy, what a mistake. Had nothing but problems. Snap sucks. In my previous work life, I was very used to CoreOS. Researched that on Red Hat. It too seemed overly-complicated.
-
Installed Rapian Lite Buster. It installed and worked much easier for those who know legacy linux. Installed DOCKER and pulled the Mozilla IOT v12 container.
-
Installed and mounted a 16G USB drive to be used as the Mozilla IOT home folder to avoid disk write issues on my RPI. Well see if writing to a USB is a better choice in the long term. Mounted the USB folder in /etc/fstab.
-
Copied the previous/legacy Mozilla IOT folder to the USB
-
Pulled the Mozilla IOT gateway:latest Docker image
-
Inserted an AEOTECH Gen 5 USB Z-Wave device previous installed on the laptop to verify the device name was detected by the RPI (it was)
-
So, at this point I moved the MIOT folder to a folder on the RPI 2B (in a USB folder), inserted the Z-wave device and verified it was detected, built a custom docker script to start the latest image (see below). As I’ve played with all this shit before, it was not too hard. NOBS, beware. Note: to complicate issues, I was moving from a X64 laptop to a RPI with a different architecture.
-
Suprisingly, when I started the IOT docker container, it detected the Z-Wave AEOTECH and loaded all modules except for the DateTime adapter.
-
After debugging the DateTime adapter, and manually trying to execute the install script shown in the log, Rapian Buster Lite does not have Python3 “pip” installed. I then apt-get installed “phthon3 pip”.
-
I then tried to manually re-install the DateTime python module on the CLI using the command shown in the log file. It HUNG, and after 5 minutes I broke out.
-
I then reviewed the log file and the DateTime adapter appeared to have loaded correctly. Whew… I guess that the command I copied from the log file had not-cli-correct syntax and re-directed output somewhere but it did install correctly.
-
After that, I was able to add the new DateTime device.
-
@mstegeman, stated I would need to re-download/install the Z-wave add-on since I moved from an x64 to a RPI. I did not do this and the IOT was able to control lights without any updates. Not sure if it downloaded an update in the background like DateTime tried to do.
Bottom line:
- If you are familiar with Linux, file permissions, copying, reading logs, scp, mounting, installing and booting OS’, debugging, general updating of programs add-ons, and have backups of your environment in case of failures, this upgrade was mostly EASY-PEASY. Not so much if you have issues and are note familiar with Linux…
Eric Edberg
ps: here is my docker start command
docker rm mozilla-iot-gateway
docker run -d --restart always --net=host \
-e TZ=America/Chicago \
--device /dev/ttyACM0:/dev/ttyACM0 \
--log-opt max-size=1m \
--log-opt max-file=5 \
-v /etc/timezone:/etc/timezone:ro \
-v /mnt/EdbergFS/mozilla-iot:/home/node/.mozilla-iot \
--name mozilla-iot-gateway mozillaiot/gateway:latest