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

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

Open
kinoegit opened this issue Apr 22, 2021 · 1 comment

Comments

@kinoegit
Copy link

kinoegit commented Apr 22, 2021

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
Copy link
Owner

orrpan commented Apr 29, 2021

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

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

2 participants