linuxserver / docker-homeassistant

GNU General Public License v3.0
204 stars 32 forks source link

[BUG] Updating Command Line Switch took longer than the scheduled update interval 0:00:30 #77

Closed shmick closed 1 year ago

shmick commented 1 year ago

Is there an existing issue for this?

Current Behavior

After updating from 2023.6.0 to 2023.6.1 I'm getting these log entries for command line switches.

The errors go away when going back to 2023.6.0

The switches still work and report their status back, so I'm not sure why it's making these entries in the logs every 30 seconds.

These switches are all curl commands

homeassistant  | 2023-06-15 16:48:36.249 WARNING (MainThread) [homeassistant.components.command_line] Updating Command Line Switch frontcam_motion took longer than the scheduled update interval 0:00:30
homeassistant  | 2023-06-15 16:48:36.813 WARNING (MainThread) [homeassistant.components.command_line] Updating Command Line Switch pihole2_yt_imac took longer than the scheduled update interval 0:00:30
homeassistant  | 2023-06-15 16:48:36.843 WARNING (MainThread) [homeassistant.components.command_line] Updating Command Line Switch pihole2_yt_phone took longer than the scheduled update interval 0:00:30
homeassistant  | 2023-06-15 16:48:37.302 WARNING (MainThread) [homeassistant.components.command_line] Updating Command Line Switch pihole1_yt_imac took longer than the scheduled update interval 0:00:30
homeassistant  | 2023-06-15 16:48:37.325 WARNING (MainThread) [homeassistant.components.command_line] Updating Command Line Switch pihole1_yt_phone took longer than the scheduled update interval 0:00:30

Expected Behavior

No errors

Steps To Reproduce

update from 2023.6.0 to 2023.6.1

Environment

- OS: raspberry pi os
- How docker service was installed: package manager

CPU architecture

arm64

Docker creation

version: "3.8"

services:
  homeassistant:
    container_name: homeassistant
    image: lscr.io/linuxserver/homeassistant:2023.6.1
    network_mode: host
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Toronto
    depends_on:
      - mariadb
    volumes:
      - ./config-homeassistant:/config
    restart: unless-stopped

  mariadb:
    image: lscr.io/linuxserver/mariadb:latest
    container_name: mariadb
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Toronto
      - MYSQL_DATABASE=hass
    volumes:
      - ./config-mariadb:/config
    ports:
      - 3306:3306
    restart: unless-stopped

Container logs

homeassistant  | 2023-06-15 16:48:36.249 WARNING (MainThread) [homeassistant.components.command_line] Updating Command Line Switch frontcam_motion took longer than the scheduled update interval 0:00:30
homeassistant  | 2023-06-15 16:48:36.813 WARNING (MainThread) [homeassistant.components.command_line] Updating Command Line Switch pihole2_yt_imac took longer than the scheduled update interval 0:00:30
homeassistant  | 2023-06-15 16:48:36.843 WARNING (MainThread) [homeassistant.components.command_line] Updating Command Line Switch pihole2_yt_phone took longer than the scheduled update interval 0:00:30
homeassistant  | 2023-06-15 16:48:37.302 WARNING (MainThread) [homeassistant.components.command_line] Updating Command Line Switch pihole1_yt_imac took longer than the scheduled update interval 0:00:30
homeassistant  | 2023-06-15 16:48:37.325 WARNING (MainThread) [homeassistant.components.command_line] Updating Command Line Switch pihole1_yt_phone took longer than the scheduled update interval 0:00:30
aptalca commented 1 year ago

What are the addresses being curled? Local dns? Other container? The last 2 docker versions had issues with docker dns but that would likely affect the older version as well.

Does the integration have a debug log option?

shmick commented 1 year ago

@aptalca

Making calls to IPs rather than hostnames.

The commands are:

ssh -oStrictHostKeyChecking=no -i /config/ssh/id_ed25519 user@IP 'docker exec pihole bash /etc/pihole/setGroupStatus.sh <group> <enable|disable|status>

and

curl -m 3 -s --digest -u user:pass "http://ip-of-camera/cgi-bin/configManager.cgi?action=getConfig&name=MotionDetect\[0\].Enable" | grep -o "Enable=true"

running the commands from inside the HA container works fine, and as mentioned, the switches all appear to be functioning and reporting their status correctly, but the HA logs report a problem for some reason

aptalca commented 1 year ago

I just saw in the HA discord mentions of changes to the command line integration yaml. Don't know the details but that could explain your issue. They mentioned the docs got updated: https://www.home-assistant.io/integrations/command_line/

shmick commented 1 year ago

I did already migrate the config when moving to 2023.6

shmick commented 1 year ago

This seems to be a known issue

shmick commented 1 year ago

Will be fixed in 2023.6.3 by https://github.com/home-assistant/core/pull/94672

aptalca commented 1 year ago

Thanks for circling back