fuatakgun / eufy_security

Home Assistant integration to manage Eufy Security devices as cameras, home base stations, doorbells, motion and contact sensors.
922 stars 74 forks source link

Please provide configuration template in configuration.yaml file #163

Closed frlu94 closed 2 years ago

frlu94 commented 2 years ago

Hi There, I have been trying to use HACS download your integration but no luck with it.

Running in a container environment, I got 503 error for every file it tried to pull but my other PCs and the host itself is wgetting the code fine from your repo.

Dec 14 16:19:44 localhost 974a460071f1[1161]: #033[31m2021-12-14 16:19:44 ERROR (MainThread) [custom_components.hacs] Download was not completed [Got status code 503 when trying to download https://raw.fastgit.org/fuatakgun/eufy_security/master/custom_components/eufy_security/binary_sensor.py]#033[0m

Thought this would be something related to the docker image that i have for homeassistant core and I ended up manually update the custom_components myself, but still can't see the integration from WEB UI after manually adding it.

image

Checked the log and it seems the integration has been loaded..

Dec 14 16:24:56 localhost 974a460071f1[1161]: #033[33m2021-12-14 16:24:56 WARNING (SyncWorker_6) [homeassistant.loader] We found a custom integration eufy_security which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant#033[0m

I know some integrations can support configuration using configuration.yaml file and it would be helpful if you are able to provide the same for this integration.

I'm on core-2021.12.1.

Additional context Errors and tests from the problematic box

Followed https://github.com/hacs/integration/issues/1763

root@smarthomefansbox-super:~# docker container ls CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES e0a9d317a96a aler9/rtsp-simple-server:v0.17.6 "/rtsp-simple-server" 2 hours ago Up 2 hours 0.0.0.0:1935->1935/tcp, :::1935->1935/tcp, 0.0.0.0:8554->8554/tcp, :::8554->8554/tcp addon_75a80a57_rtsp_simple_server bebf65cac539 bropat/eufy-security-ws:0.6.0 "docker-entrypoint.s…" 2 hours ago Up 2 hours 0.0.0.0:3001->3000/tcp, :::3001->3000/tcp addon_3a26b21d_eufy_security_addon c2a2a5b35c2b esphome/esphome-hassio-aarch64:2021.11.4 "/init" 2 hours ago Up 2 hours addon_a0d7b954_esphome 4492faf5fcf5 mikejmcguire/hass-actronque-aarch64:2021.12.2 "dotnet hass-actronq…" 2 hours ago Up 2 hours addon_e4641267_hass-actronque 3856fb1cf384 ghcr.io/hassio-addons/motioneye/aarch64:0.16.0 "/init" 2 hours ago Up 2 hours addon_a0d7b954_motioneye 3b05cf80c60b ghcr.io/hassio-addons/home-panel/aarch64:2.3.0 "/init" 2 hours ago Up 2 hours addon_a0d7b954_home-panel b94e8134ed1c ghcr.io/hassio-addons/node-red/aarch64:10.2.0 "/init" 2 hours ago Up 2 hours addon_a0d7b954_nodered 025943d053a5 homeassistant/aarch64-addon-configurator:5.3.3 "/init" 2 hours ago Up 2 hours addon_core_configurator 26086e6e56d7 ghcr.io/hassio-addons/aircast/aarch64:3.2.0 "/init" 2 hours ago Up 2 hours addon_a0d7b954_aircast 3ecf7733efa3 homeassistant/aarch64-addon-samba:9.5.1 "/init" 2 hours ago Up 2 hours addon_core_samba 64c33cf14316 ghcr.io/hassio-addons/nut/aarch64:0.9.0 "/init" 2 hours ago Up 2 hours 0.0.0.0:3493->3493/tcp, :::3493->3493/tcp addon_a0d7b954_nut 3ddbf5eb34f3 homeassistant/aarch64-addon-mosquitto:6.0.1 "/init" 2 hours ago Up 2 hours 0.0.0.0:1883-1884->1883-1884/tcp, :::1883-1884->1883-1884/tcp, 0.0.0.0:8883-8884->8883-8884/tcp, :::8883-8884->8883-8884/tcp addon_core_mosquitto a4a533744157 homeassistant/aarch64-hassio-multicast:2021.04.0 "/init" 2 hours ago Up 2 hours hassio_multicast e193cc77cefa ghcr.io/home-assistant/aarch64-hassio-audio:2021.07.0 "/init" 2 hours ago Up 2 hours hassio_audio aa49476bf4e0 homeassistant/aarch64-hassio-dns:2021.06.0 "/init" 2 hours ago Up 2 hours hassio_dns 479a780af045 ghcr.io/home-assistant/aarch64-hassio-cli:2021.09.0 "/init /bin/bash -c …" 2 hours ago Up 2 hours hassio_cli 974a460071f1 ghcr.io/home-assistant/qemuarm-64-homeassistant:2021.12.1 "/init" 21 hours ago Up 7 minutes homeassistant fc767db352d8 homeassistant/aarch64-hassio-supervisor "/init" 3 days ago Up 2 hours hassio_supervisor 97bc765b956e ghcr.io/home-assistant/aarch64-hassio-observer:2021.10.0 "/init" 4 weeks ago Up 2 hours 0.0.0.0:4357->80/tcp, :::4357->80/tcp hassio_observer 35c7a634e660 smarthomefans/easydockerweb:arm64v8-latest "/bin/sh -c 'npm sta…" 5 months ago Up 2 hours 0.0.0.0:3000->3000/tcp, :::3000->3000/tcp dockerwebui

root@smarthomefansbox-super:~# docker exec -ti 974a460071f1 /bin/bash bash-5.1# bash-5.1# bash-5.1# bash-5.1# wget -q -O - https://hacs.xyz/install | bash -

INFO: Trying to find the correct directory... INFO: Found Home Assistant configuration directory at '/config' INFO: Changing to the custom_components directory... INFO: Downloading HACS Connecting to github.com (52.64.108.95:443) Connecting to github.com (52.64.108.95:443) Connecting to objects.githubusercontent.com (185.199.110.133:443) saving to 'hacs.zip' hacs.zip 100% |*****| 736k 0:00:00 ETA 'hacs.zip' saved WARN: HACS directory already exist, cleaning up... INFO: Creating HACS directory... INFO: Unpacking HACS... INFO: Removing HACS zip file... INFO: Installation complete.

INFO: Remember to restart Home Assistant before you configure it bash-5.1# bash-5.1# wget -q -O - https://raw.fastgit.org/fuatakgun/eufy_security/master/custom_components/eufy_security/websocket.py | bash - wget: server returned error: HTTP/1.1 503 Service Temporarily Unavailable bash-5.1# nslookup raw.fastgit.org Server: 172.30.32.3 Address: 172.30.32.3#53

raw.fastgit.org canonical name = raw.fastgit.org.cdn.cloudflare.net. Name: raw.fastgit.org.cdn.cloudflare.net Address: 104.21.233.133 Name: raw.fastgit.org.cdn.cloudflare.net Address: 104.21.233.134 Name: raw.fastgit.org.cdn.cloudflare.net Address: 2606:4700:3038::6815:e985 Name: raw.fastgit.org.cdn.cloudflare.net Address: 2606:4700:3038::6815:e986

bash-5.1# exit exit root@smarthomefansbox-super:~# wget -q -O - https://raw.fastgit.org/fuatakgun/eufy_security/master/custom_components/eufy_security/websocket.py | bash - root@smarthomefansbox-super:~# wget version --2021-12-14 16:38:31-- http://version/ Resolving version (version)... failed: Name or service not known. wget: unable to resolve host address ‘version’ root@smarthomefansbox-super:~# wget -v wget: missing URL Usage: wget [OPTION]... [URL]...

Try `wget --help' for more options. root@smarthomefansbox-super:~# man wget root@smarthomefansbox-super:~# wget -V GNU Wget 1.20.1 built on linux-gnu.

-cares +digest -gpgme +https +ipv6 +iri +large-file -metalink +nls +ntlm +opie +psl +ssl/gnutls

Wgetrc: /etc/wgetrc (system) Locale: /usr/share/locale Compile: gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/etc/wgetrc" -DLOCALEDIR="/usr/share/locale" -I. -I../../src -I../lib -I../../lib -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include/p11-kit-1 -DHAVE_LIBGNUTLS -DNDEBUG -g -O2 -fdebug-prefix-map=/build/wget-AlXaai/wget-1.20.1=. -fstack-protector-strong -Wformat -Werror=format-security -DNO_SSLv2 -D_FILE_OFFSET_BITS=64 -g -Wall Link: gcc -I/usr/include/p11-kit-1 -DHAVE_LIBGNUTLS -DNDEBUG -g -O2 -fdebug-prefix-map=/build/wget-AlXaai/wget-1.20.1=. -fstack-protector-strong -Wformat -Werror=format-security -DNO_SSLv2 -D_FILE_OFFSET_BITS=64 -g -Wall -Wl,-z,relro -Wl,-z,now -lpcre2-8 -luuid -lidn2 -lnettle -lgnutls -lz -lpsl ftp-opie.o gnutls.o http-ntlm.o ../lib/libgnu.a

Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://www.gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Originally written by Hrvoje Niksic hniksic@xemacs.org. Please send bug reports and questions to bug-wget@gnu.org. root@smarthomefansbox-super:~# docker exec -ti 974a460071f1 /bin/bash bash-5.1# wget -V wget: unrecognized option: V BusyBox v1.33.1 () multi-call binary.

Usage: wget [-cqS] [--spider] [-O FILE] [-o LOGFILE] [--header 'HEADER: VALUE'] [-Y on/off] [-P DIR] [-U AGENT] [-T SEC] URL...

Retrieve files via HTTP or FTP

--spider    Only check URL existence: $? is 0 if exists
-c      Continue retrieval of aborted transfer
-q      Quiet
-P DIR      Save to DIR (default .)
-S          Show server response
-T SEC      Network read timeout is SEC seconds
-O FILE     Save to FILE ('-' for stdout)
-o LOGFILE  Log messages to FILE
-U STR      Use STR for User-Agent header
-Y on/off   Use proxy
fuatakgun commented 2 years ago

thanks for reaching out, given that YAML support will be minimized by time inside home assistant and most of the integrations are moving into config based option, I do not think, this will be a good long term investment.

fuatakgun commented 2 years ago

more information here: https://www.home-assistant.io/blog/2020/04/14/the-future-of-yaml