Tag: home-assistant

  • 海康威视 R1 开Docker

    正常应该走app,但是我发现系统并没有为docker额外增加配置,而是直接依赖docker container create 。

    以plex为例,默认它会创建两个随机名称的volume,我为了好看就手工命名了。

    之前有位小朋友提及这里可以命令注入,实现更多参数,但是由于他家客户端错误提示不好,几乎等于盲注。记得闭合两边的引号。

    Plex

    
    docker volume remove plex-config
    docker volume remove plex-transcode
    
    docker rm plex
    
    docker volume create plex-config
    docker volume create plex-transcode
    
    docker container create  --name='plex'  \
      --volume='plex-config:/config:rw' \
      --volume='/drives/raid_a1/Users/admin/video:/video:rw' \
      --volume='plex-transcode:/transcode:rw'  \
      --device=/dev/dri:/dev/dri \
      --publish='1900:1900/udp' \
      --publish='32400:32400/tcp' \
      --publish='32410:32410/udp' \
      --publish='32412:32412/udp' \
      --publish='32413:32413/udp' \
      --publish='32414:32414/udp' \
      --publish='32469:32469/tcp' \
      --publish='8324:8324/tcp'  \
      --restart=unless-stopped \
      --env='LANG=C.UTF-8' \
      --env='LC_ALL=C.UTF-8' \
      --env='PLEX_CLAIM=claim-xxxx'\
      --env='ADVERTISE_IP=http://xx.yy.zz.aa:32400' \
      --env='HOME=/config' \
      --env='PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' \
      --env='TERM=xterm' \
      --env='TZ=Asia/Shanghai' plexinc/pms-docker:latest
    
    
    docker start plex 
    
    

    Home Assistant

    docker volume remove ha-config
    
    docker rm home-assistant
    
    docker volume create ha-config
    
    docker container create  --name='home-assistant'  \
      --volume='ha-config:/config:rw' \
      --volume='/etc/localtime:/etc/localtime:ro' \
      --volume='/run/dbus:/run/dbus:ro' \
      --env='LANG=C.UTF-8' \
      --env='LC_ALL=C.UTF-8' \
       --env='HOME=/config' \
       --env='PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' \
       --env='TERM=xterm' \
       --env='TZ=Asia/Shanghai' \
       --privileged \
       --publish='8123:8123/tcp' \
       --restart=unless-stopped \
       ghcr.io/home-assistant/home-assistant:stable 
    
    docker start home-assistant 
    
    # 以下为安装 HACS
    
    docker ps -a 
    
    docker exec -it 86 /bin/bash
    
    
    wget -O - https://get.hacs.xyz | bash -
    
    
    docker restart home-assistant 
    

    Portainer

    docker volume create portainer_data
    
    docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:2.21.4