zivillian / ism7mqtt

GNU General Public License v3.0
56 stars 10 forks source link

Docker container for ism7mqtt? #27

Closed IgitBuh closed 1 year ago

IgitBuh commented 2 years ago

I have spent many hours in the last couple of days trying to figure out how to integrate our new Wolf CHA (that will hopefully come in the next weeks) in our home automation (openHAB). It comes with a Wolf Link Home module, but all my research showed me that this is a proprietary communication that cannot be used locally with 3rd party software and that one needs a ISM8 module instead (which comes with other downsides).

Now I have found your project and I'm so glad ism7mqtt exists, thank you very much! It's also great knowing that the project is still alive, seeing the latest updates.

My question is whether you have thought about providing an official Docker container image for this? In my opinion this would be the most flexible and easy option for most users. It's easy to install and update and independent of hardware and OS, because Docker is basically available everywhere. I believe that many users even run their smart home system and mqtt projects in Docker containers side by side with other projects on one and the same hardware. In my case it's simply a Synology Diskstation, so I don't even need additional hardware.

Could you please consider providing an official Docker container image for ism7mqtt?

zivillian commented 1 year ago

can you try the image published at https://github.com/zivillian/ism7mqtt/pkgs/container/ism7mqtt?

IgitBuh commented 1 year ago

Unfortunately my ism7 module hasn't been delivered yet because they have production/chip issues and apparently plan to continue production in spring 2023 (delayed by a whole year!)... I guess that's when a lot of new users will receive their device and find this project here. However, I'd be willing to test as much as I can anyway to support this issue upfront!

I've installed your docker container (yesterday alpha, today v0.0.8-12-g226ee96) by connecting to my Synology with putty and running docker pull ghcr.io/zivillian/ism7mqtt:v0.0.8-12-g226ee96

It downloaded and installed correctly. Running it directly only prints the supported parameters list.

My thoughts:

  1. Please describe how to configure the parameters when used with docker. Your container has some predefined environment variabled (PATH, ASPNETCORE_URLS, DOTNET_RUNNING_IN_CONTAINER, DOTNET_SYSTEM_GLOBALIZATION_INVARIANT, OPENSSL_CONF). I suggest to prepare the variables that are used by ism7mqtt, so they can be set up and modified easily. Also I guess the /app/ folder has to be mapped to a folder outside of the container where the parameter.json file goes.
  2. As soon as the container is ready to be published officially, please make sure to add it to https://registry.hub.docker.com/ so it is more accessible to everyone.
sven-s commented 1 year ago

@zivillian

I have a little ODroid U3 running Ubuntu 18.04 with docker and multiple images running. When I try to run

docker pull ghcr.io/zivillian/ism7mqtt:v0.0.8-12-g226ee96

I am getting: no matching manifest for linux/arm/v7 in the manifest list entries

Running uname -a

gives me Linux odroid 4.16.0-v7 #1 SMP PREEMPT Mon Apr 2 11:02:49 UTC 2018 armv7l armv7l armv7l GNU/Linux

can you add this architecture as well? That would be really great!

zivillian commented 1 year ago

Oh, wow. I initially tried this, but decided that it's too difficult and nobody would use it. So thank for your feedback - I'll take a look into this.

zivillian commented 1 year ago

can you try v0.0.8-13-gfe6649d?

sven-s commented 1 year ago

Looks good!

I used the following compose file (with portainer):

version: '2'
services:
  ism7mqtt:
    image: ghcr.io/zivillian/ism7mqtt:v0.0.8-13-gfe6649d
    container_name: ism7mqtt    
    network_mode: host
    restart: always
    volumes:
      - /usr/share/docker/ism7mqtt/parameter.json:/app/parameter.json    
    environment:
      - ISM7_MQTTHOST=mqtt.lan
      - ISM7_IP=ip
      - ISM7_PASSWORD=password
      - ISM7_MQTTUSERNAME=user
      - ISM7_MQTTPASSWORD=password
      - ISM7_DEBUG=false

I copied my parameter.json to the odroid and mouted the file into the app directory. Everything is running so far! Thanks!

IgitBuh commented 1 year ago

Just wanted to say thanks! Found it now on docker hub and all the parameters are already prepared. Perfect!