Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using hostname instand of ip adress for the HomeMatic address don't work #1057

Open
SMHRambo opened this issue Nov 7, 2023 · 0 comments
Open

Comments

@SMHRambo
Copy link

SMHRambo commented Nov 7, 2023

Describe the bug
Engl:
The adapter only works with IP address as HomeMatic Address, hostnames result in error.

Deutsch:
Der Adapter funktioniert nur wenn man eine IP als HomeMatic Adresse verwendet,
wenn man einen Hostname benutzt bekommt man einen Fehler.

To Reproduce
Steps to reproduce the behavior:
Engl:

  1. Using Raspberrymatic and ioBroker in a docker environment.
  2. Use a discrete network between the containers (Networkname: hm).
  3. Use aliases for the container in this network (hm_iobroker and hm_raspberrymatic).
  4. Install an instance of hm-rpc and hm-rega adapter.
  5. Use hm_raspberrymatic as HomeMatic Address and hm_iobroker as Callback Address

Deutsch:

  1. Verwende Raspberrymatic und ioBroker in einem Dockerumgebung.
  2. Benutze ein eigenes Netzwerk zwischen den beiden Container (Netzwerkname: hm).
  3. Benutze Aliases für die Container in diesem Netzwerk (hm_iobroker und hm_raspberrymatic).
  4. Erstelle eine Instanz vom hm-rpc und hm-rega Adapter.
  5. Benutze hm_raspberrymatic als HomeMatic Adresse und hm:iobroker als Callback Adresse,

Expected behavior
Engl:
The adapter should be able to access the raspberrymatic container by its hostname.
Working with the hostname for the callback address is possible, why not with the HomeMatic address?

Deutsch:
Der Adapter sollte es schaffen den Raspberrymatic Container mit Hilfe des Hostanme zu erreichen.
Einen Hostname für die Callback Adresse zu benutzen funktioniert, warum funktioiert das nicht mit der HomeMatic Adresse?

Screenshots & Logfiles
Both are pingable from eachother:
Beide sind voneinander erreichbar:

root@SmarthomePi:~# docker exec -it raspberrymatic /bin/sh
/ # ping hm_iobroker
PING hm_iobroker (172.18.2.2): 56 data bytes
64 bytes from 172.18.2.2: seq=0 ttl=64 time=0.254 ms
64 bytes from 172.18.2.2: seq=1 ttl=64 time=0.296 ms
64 bytes from 172.18.2.2: seq=2 ttl=64 time=0.207 ms
^C
--- hm_iobroker ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.207/0.252/0.296 ms
root@SmarthomePi:~# docker exec -it iobroker /bin/bash
root@iobroker:/opt/iobroker# ping hm_raspberrymatic
PING hm_raspberrymatic (172.18.2.3) 56(84) bytes of data.
64 bytes from raspberrymatic.hm (172.18.2.3): icmp_seq=1 ttl=64 time=0.260 ms
64 bytes from raspberrymatic.hm (172.18.2.3): icmp_seq=2 ttl=64 time=0.194 ms
64 bytes from raspberrymatic.hm (172.18.2.3): icmp_seq=3 ttl=64 time=0.209 ms
64 bytes from raspberrymatic.hm (172.18.2.3): icmp_seq=4 ttl=64 time=0.273 ms
64 bytes from raspberrymatic.hm (172.18.2.3): icmp_seq=5 ttl=64 time=0.177 ms
64 bytes from raspberrymatic.hm (172.18.2.3): icmp_seq=6 ttl=64 time=0.181 ms
64 bytes from raspberrymatic.hm (172.18.2.3): icmp_seq=7 ttl=64 time=0.163 ms
64 bytes from raspberrymatic.hm (172.18.2.3): icmp_seq=8 ttl=64 time=0.150 ms
^C
--- hm_raspberrymatic ping statistics ---
8 packets transmitted, 8 received, 0% packet loss, time 7062ms
rtt min/avg/max/mdev = 0.150/0.200/0.273/0.041 ms

Log:

Adapter Time Loglevel Message
hm-rpc.1 2023-11-07 18:04:19.119 info starting. Version 1.15.19 in /opt/iobroker/node_modules/iobroker.hm-rpc, node: v18.18.2, js-controller: 5.0.12
hm-rpc.1 2023-11-07 18:04:18.801 debug Plugin sentry destroyed because not initialized correctly
hm-rpc.1 2023-11-07 18:04:18.782 debug Plugin sentry Do not initialize Plugin (enabled=false)
hm-rpc.1 2023-11-07 18:04:18.455 debug States connected to redis: 127.0.0.1:9000
hm-rpc.1 2023-11-07 18:04:18.339 debug States create User PubSub Client
hm-rpc.1 2023-11-07 18:04:18.337 debug States create System PubSub Client
hm-rpc.1 2023-11-07 18:04:18.295 debug Redis States: Use Redis connection: 127.0.0.1:9000
hm-rpc.1 2023-11-07 18:04:18.195 debug Objects connected to redis: 127.0.0.1:9001
hm-rpc.1 2023-11-07 18:04:18.164 debug Objects client initialize lua scripts
hm-rpc.1 2023-11-07 18:04:18.030 debug Objects create User PubSub Client
hm-rpc.1 2023-11-07 18:04:18.028 debug Objects create System PubSub Client
hm-rpc.1 2023-11-07 18:04:18.023 debug Objects client ready ... initialize now
hm-rpc.1 2023-11-07 18:04:17.939 debug Redis Objects: Use Redis connection: 127.0.0.1:9001
hm-rpc.1 2023-11-07 18:04:12.495 info Terminated (ADAPTER_REQUESTED_TERMINATION): Without reason
hm-rpc.1 2023-11-07 18:04:12.493 info terminating
hm-rpc.1 2023-11-07 18:04:12.492 error Cannot call init: [http://hm_iobroker:2001, ""] Unknown XML-RPC tag 'TITLE'
hm-rpc.1 2023-11-07 18:04:12.476 info xmlrpc -> hm_raspberrymatic:2001/ init ["http://hm_iobroker:2001",""]
hm-rpc.1 2023-11-07 18:04:12.471 info Got terminate signal TERMINATE_YOURSELF
hm-rpc.1 2023-11-07 18:04:09.708 error Init not possible, going to stop: Unknown XML-RPC tag 'TITLE'
hm-rpc.1 2023-11-07 18:04:09.675 debug start connecting interval
hm-rpc.1 2023-11-07 18:04:09.652 debug xmlrpc -> hm_raspberrymatic:2001/ init ["http://hm_iobroker:2001","iobroker:hm-rpc.1:e981bedd29d5db4e28d10b519a0335b1"]
hm-rpc.1 2023-11-07 18:04:09.651 debug Connect...
hm-rpc.1 2023-11-07 18:04:09.649 info xmlrpc client is trying to connect to hm_raspberrymatic:2001/ with ["http://hm_iobroker:2001","iobroker:hm-rpc.1:e981bedd29d5db4e28d10b519a0335b1"]
hm-rpc.1 2023-11-07 18:04:09.648 info xmlrpc server is trying to listen on 172.18.2.2:2001
hm-rpc.1 2023-11-07 18:04:09.263 info starting. Version 1.15.19 in /opt/iobroker/node_modules/iobroker.hm-rpc, node: v18.18.2, js-controller: 5.0.12

Versions:

  • hm-rpc version: v1.15.19
  • hm-rega version: v3.0.47 | v4.0.0
  • JS-Controller version: 5.0.12 (docker (official image - v9.0.1))
  • Node version: v18.18.2
  • Operating system: raspberrypi os bookworm arm64 6.1.21-v8+ (Docker version 24.0.7, build afdd53b)
  • CCU model: raspberrymatic
  • CCU firmware: 3.71.12.20231020

Additional context
iobroker docker-compose file:

version: "3.8"

services:
  app:
    image: iobroker/iobroker:latest
    container_name: iobroker
    hostname: iobroker
    restart: always
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /docker/iobroker_stack/app/data:/opt/iobroker:rw
    networks:
      db:
        aliases:
          - db_iobroker
      mqtt:
        aliases:
          - mqtt_iobroker
      hm:
        aliases:
          - hm_iobroker
      hue:
        aliases:
          - hue_iobroker
      modbus:
        aliases:
          - modbus_iobroker
      traefik:
        aliases:
          - traefik_iobroker
    environment:
      - SETUID=1010
      - SETGID=1010

networks:
  mqtt:
    external: true
  db:
    external: true
  hm:
    external: true
  hue:
    external: true
  modbus:
    external: true
  traefik:
    external: true

raspberrymatic docker-compose file:

version: "3.8"

services:
  app:
    image: ghcr.io/jens-maus/raspberrymatic:latest
    container_name: raspberrymatic
    hostname: raspberrymatic
    restart: always
    privileged: true
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /lib/modules:/lib/modules:ro
      - /run/udev/control:/run/udev/control
      - /docker/raspberrymatic_stack/app/data:/usr/local:rw
      - /docker/raspberrymatic_stack/app/log:/var/lib:rw
    networks:
       hm:
        aliases:
          - hm_raspberrymatic
      traefik:
        aliases:
          - traefik_raspberrymatic
    group_add:
      - "1018"

networks:
  hm:
    external: true
  traefik:
    external: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant