hoobs-org / soma-connect

23 stars 2 forks source link

Loose hoobs-dependency and/or release a Docker-Image #9

Closed VimS closed 3 years ago

VimS commented 3 years ago

Hey,

afaik the installing and running the Soma-Connect does not require Hoobs. So the Install-Guide and the .deb should not require you to run an install-script for hoobs it. Although the process didn't work for me.

Furthermore some people do not want do dedicate a whole pi for just one bridge. I would suggest to release a Version running in Docker.

VimS commented 3 years ago

Based on https://hub.docker.com/r/arm32v7/ubuntu/tags?page=1&ordering=last_updated and https://hub.docker.com/r/jrei/systemd-ubuntu

I created a Dockerfile: `FROM arm32v7/ubuntu:20.04 ENV container docker ENV LC_ALL C ENV DEBIAN_FRONTEND noninteractive

RUN sed -i 's/# deb/deb/g' /etc/apt/sources.list

RUN apt-get update \ && apt-get install -y systemd systemd-sysv libatomic1 ifplugd wpasupplicant bluez bluetooth \ && apt-get clean \ && rm -rf /var/lib/apt/lists/ /tmp/ /var/tmp/*

COPY soma-connect_2.2.0_armhf.deb / RUN dpkg --install /soma-connect_2.2.0_armhf.deb \ && rm /soma-connect_2.2.0_armhf.deb

RUN rm -f /lib/systemd/system/soma-connect.service COPY soma-connect.service /lib/systemd/system/

RUN cd /lib/systemd/system/sysinit.target.wants/ \ && ls | grep -v systemd-tmpfiles-setup | xargs rm -f $1

RUN rm -f /lib/systemd/system/multi-user.target.wants/ \ /etc/systemd/system/.wants/ \ /lib/systemd/system/local-fs.target.wants/ \ /lib/systemd/system/sockets.target.wants/udev \ /lib/systemd/system/sockets.target.wants/initctl \ /lib/systemd/system/basic.target.wants/ \ /lib/systemd/system/anaconda.target.wants/ \ /lib/systemd/system/plymouth \ /lib/systemd/system/systemd-update-utmp

VOLUME [ "/sys/fs/cgroup" ]

CMD ["/lib/systemd/systemd"]`

But when i try to start.

systemd[1]: Started SOMA Connect. soma-connect[40]: [[20:28:15.102]] [LOG] Sentry logging enabled soma-connect[40]: [[20:28:15.341]] [LOG] ALEXA: Using default SOMA Connect Server domain: connect.somasmarthome.com soma-connect[40]: [[20:28:15.351]] [LOG] Initialized lan interface name to: eth0 soma-connect[40]: [[20:28:15.356]] [LOG] lanIpv4Address=XX,lanIpv6Address=XXX,wlanIpv4Address=XXX,wlanIpv6Address=XXX soma-connect[40]: [[20:28:15.357]] [LOG] selectedIpv4Address=XXX,selectedIpv6Address=XXX,selectedInterfaceName=eth0 soma-connect[40]: Failed to connect to non-global ctrl_ifname: wlan0 error: No such file or directory soma-connect[40]: [[20:28:17.440]] [LOG] lanIpv4Address=XXX,lanIpv6Address=XXX,wlanIpv4Address=XXX,wlanIpv6Address=XXX soma-connect[40]: [[20:28:17.630]] [ERROR] (node:40) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated soma-connect[40]: [[20:28:17.663]] [WARN] raven@2.6.2 alert: failed to send exception to sentry: Client network socket disconnected before secure TLS connection was established soma-connect[40]: [[20:28:17.664]] [ERROR] Error: Command failed: wpa_cli -i 'wlan0' status soma-connect[40]: Failed to connect to non-global ctrl_ifname: wlan0 error: No such file or directory soma-connect[40]: at checkExecSyncError (child_process.js:630:11) soma-connect[40]: at Object.execSync (child_process.js:666:15) soma-connect[40]: at childProcess.execSync (pkg/prelude/bootstrap.js:1507:30) soma-connect[40]: at Object.get_status (/snapshot/src/wpa_cli.js) soma-connect[40]: at NetworkLogger.logJsonToServer (/snapshot/src/network_logger.js) soma-connect[40]: at NetworkLogger.ping (/snapshot/src/network_logger.js) soma-connect[40]: at new NetworkLogger (/snapshot/src/network_logger.js) soma-connect[40]: at Object.<anonymous> (/snapshot/src/main.js) soma-connect[40]: at Module._compile (pkg/prelude/bootstrap.js:1320:22) soma-connect[40]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10) soma-connect[40]: at Module.load (internal/modules/cjs/loader.js:1000:32) soma-connect[40]: at Function.Module._load (internal/modules/cjs/loader.js:899:14) soma-connect[40]: at Function.Module.runMain (pkg/prelude/bootstrap.js:1375:12) soma-connect[40]: at internal/main/run_main_module.js:18:47

So the dependencies from the .deb-File are lacking.

mkellsy commented 3 years ago

We have this in our deb repo.

Run this command to setup the repo list

wget -qO- https://support.hoobs.org/setup | sudo -E bash -

This script sets up 3 repos

  1. NodeSource
  2. Yarn
  3. HOOBS

If you just want the HOOBS repo, run these commands as root.

wget -qO- https://repo.hoobs.org/debian/pubkey.gpg | apt-key add -
echo 'deb https://repo.hoobs.org/debian/ buster main' | tee /etc/apt/sources.list.d/hoobs.list

Then you can run

sudo apt install -y soma-connect

Note: We only publish soma-connect for armhf. We only have access to the arm version. If you need to install on another architecture, you will need to open a ticket with Soma. https://support.somasmarthome.com/