orrpan / pilight_docker

1 stars 0 forks source link

Pilight container connects to device, but it does not show up in webGUI #1

Open kinoegit opened 3 years ago

kinoegit commented 3 years ago

I'm a noob running several containers with Traefik v2 on a raspberry pi 3. I got into a dead end with orrpan/pilight: Running pilight-send -p elro_800_switch -s 3 -u 2 --on as a cli command in the container switches on/off though with Illegal instruction (core dumped)

But trying the same via the webGUI failed. Https website loads fine, but then it got stuck in the attempt to connect to the device = power sockets ->Brennenstuhl, which pilight managed finely when it was installed bare boned on RPi. Logs of pilight: (/build/pilight/libs/pilight/core/eventpool.c ... ERROR: uv_custom_poll_cb: socket not responding Traefik logs telling me: level=error msg="unable to find the IP address for the container \"/pilight\": the server is ignored" container=pilight-pilight-87... providerName=docker I searched for a while and tested network_mode: host along the lines of that guide (german): https://www.himpler.com/blog/network-mode-host-mit-traefik/, unfortunately without success. Hardware is connectable, but error of no IP address via webgui? Is this a bug or what am I missing?

Here's the docker-compose.yml of pilight:

version: '3'
services:
  pilight:
    image: orrpan/pilight_docker:latest
    container_name: pilight
    restart: unless-stopped
    privileged: true
    security_opt:
      - no-new-privileges:true
    environment:
      - TZ=Europe/Berlin
    ports:
      - 5001:5001
      - 5002:5002
    networks:
      - proxy
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - /home/pi/docker/pilight/data:/etc/pilight
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.pilight.entrypoints=http"
      - "traefik.http.routers.pilight.rule=Host(`pilight.example.com`)"
      - "traefik.http.middlewares.pilight-https-redirect.redirectscheme.scheme=https"
      - "traefik.http.routers.pilight.middlewares=pilight-https-redirect"
      - "traefik.http.routers.pilight-secure.entrypoints=https"
      - "traefik.http.routers.pilight-secure.rule=Host(`pilight.example.com`)"
      - "traefik.http.routers.pilight-secure.tls=true"
      - "traefik.http.routers.pilight-secure.service=pilight"
      - "traefik.http.services.pilight.loadbalancer.server.port=5001"
      - "traefik.docker.network=proxy"

networks:
  proxy:
    external: true

config.json:

{
        "devices": {
                "switch1": {
                        "protocol": [ "elro_800_switch" ],
                        "id": [{
                                "systemcode": 7,
                                "unitcode": 1
                        }],
                        "state": "on"
                }
        },
        "rules": {},
        "gui": {
                "switch1": {
                        "name": "Power Socket 1",
                        "group": [ "my power sockets" ],
                        "media": [ "all" ]
                }
        },
        "settings": {
                "log-level": 6,
                "pid-file": "/var/run/pilight.pid",
                "log-file": "/var/log/pilight.log",
                "standalone": 0,
                "webserver-enable": 1,
                "webgui-websockets": 0,
                "webserver-http-port": 5001,
                "webserver-https-port": 5002,
                "webserver-cache": 1,
                "webserver-root": "/usr/local/share/pilight/webgui",
                "gpio-platform": "raspberrypi3"
        },
        "hardware": {
                "433gpio": {
                        "sender": 0,
                        "receiver": 1
                }
        },
        "registry": {
                "pilight": {
                        "version": {
                                "current": "8.1.5"
                        }
                },
                "webserver": {
                        "ssl": {
                                "certificate": {
                                        "location": "/etc/pilight/pilight.pem"
                                }
                        }
                },
                "hardware": {
                        "RF433": {
                                "mingaplen": 4420,
                                "maxgaplen": 72900,
                                "minrawlen": 26,
                                "maxrawlen": 400
                        }
                }
        }
}
orrpan commented 3 years ago

Hi, I’ll look at it soon. Haven’t had much time over