Intégration de matériel Eufy

Bonsoir

Possédant du matos Eufy, merci @rootard pour le développement du plugin.

Si vous avez une idée,
Je n’arrive pas à lancer le deamon :
Log du deamon

File "/var/www/html/plugins/eufy/resources/eufyd/eufyd.py", line 30, in 
import websocket
ModuleNotFoundError: No module named 'websocket'

Le container est bien lancé :
log eufy service:

*** Eufy service start *** starting container, options= -d 12caa33fb134c020224d4849f17f8f18bd153c7b39b45793c23f1a49185a10fc *** start terminated **OK** ***

log container:


2023-02-18T18:47:23.835617924Z e[90m2023-02-18 18:47:23.834  e[39me[1me[94mINFOe[39me[22m  Eufy Security server listening on host 0.0.0.0, port 3000
2023-02-18T18:47:27.465339579Z e[90m2023-02-18 18:47:27.464  e[39me[1me[94mINFOe[39me[22m  Push notification connection closed
2023-02-18T18:47:34.031873855Z e[90m2023-02-18 18:47:34.031  e[39me[1me[94mINFOe[39me[22m  Connected to station T8410P202037385D on host 192.168.1.12 and port 27779
2023-02-18T18:47:34.036107741Z e[90m2023-02-18 18:47:34.035  e[39me[1me[94mINFOe[39me[22m  Connected to station T8441P11213700CC on host 192.168.1.21 and port 15164
2023-02-18T18:47:34.039170133Z e[90m2023-02-18 18:47:34.038  e[39me[1me[94mINFOe[39me[22m  Connected to station T8441P1022270E14 on host 192.168.1.17 and port 15564
2023-02-18T18:47:43.929317781Z e[90m2023-02-18 18:47:43.928  e[39me[1me[94mINFOe[39me[22m  Push notification connection successfully established

J’ai peu être mal lu et mon pb vient peut-être de la :dans la conf du plugin, faut mettre quoi dans « device » ?

Philippe

salut

Tu as lancé l’install des dépendances?
Tu as bien les voyants communication verts?
Si tu ne trouves pas envoies moi les logs en MP

Oui pour les dépendances

Le voyant 2 est au rouge,

Tu veux quels logs ?

Envoies moi les logs eufy et eufy_daemon en debug et le résultat de la commande python3 test_eufy.py cf la doc
Le container se fait passer pour ton tel. Device c’est le nom qui sera envoyé au serveur Eufy. Ils ont tendance a bloquer les devices inconnus

Salut, et merci pour le dev du plugin !
Question bête : j’ai installé la précédente version en manuel et j’aimerai tester ton plugin. Comment faire, pour bien faire :sweat_smile:
Je copie les nouveaux fichiers dans les repertoires (install manuelle) ? faut-il supprimer au préalable quelque chose ? faut-il arreter le container avant ? bref, je ne suis pas très doué et je veux donc bien faire les choses.

Merci à vous.

salut

Effaces le répertoire /var/www/html/plugins/eufy et reinstalles la nouvelle version du market beta
voir le nouveau thread que j’ai ouvert pour le plugin ici

Salut @rootard,

J’ai du matériel Eufy importé d’Angleterre (avant qu’il ne soit sorti en France).
Il n’est pas reconnu par le plugin.

Voici les équivalences :
T8001 => T8010
T8111 => T8114

J’ai copié les fichiers JSON de config, ça marche bien.
A rajouter dans une prochaine version ?

Salut

Oui. Les commandes diffèrent parfois d’un modèle a l’autre. Pourrais-tu me partager la sortie de la commande test_eufy.py pour chacun de tes devices? Cf plus haut
[EDIT] Merci pour tes inputs. C’est fait, cf nouvelle release
Au passage T8001 ~ T8002

Hello,

Chez vous les alarmes On et Off fonctionnent ? Je voudrais faire sonner la base mais ça ne fait rien. J’ai la version 1.5.2 de eufy-security-ws.

Salut
Ma lib Eufy est en v1.5.2 aussi et chez moi non plus ca ne fonctionne pas (T8010/T8113)…Tu as quoi comme devices?
J’avais ouvert un ticket a bropat tu peux tjs lui reposer la question?

J’ai un Home Base 2 version 3.2.9.5h (2023/06/29). J’aurais du m’abstenir de mettre à jour^^
Dommage, car ça aurait permit de créer des petites alertes sympas avec un volume bas pour la nuit.

Oui je trouve ca dommage aussi
Tu peux tjs régler le volume de l’alarme et changer le mode mais tu ne pourras pas la déclencher…

Pourtant le carillon fonctionne… J’aurais aimé mettre plus de conditions pour activer l’alerte que de laisser la détection des caméras m’alerter. Un jour j’ai été réveillé par des oiseaux à l’aube ou des rats la nuit, faut que je baisse la sensibilité par défaut :rofl:

Bonjour,
Impossible d’utiliser le plugins chez moi, j’ai tout essayé, mais la connection à EUFY CLOUD ne se fait pas, j’ai le message « Container Eufy non connecté au Cloud ».

Lorsque je lance la commande python3 test_eufy.py, j’obtiens ceci :

jeedom@jeedom:/var/www/html/plugins/eufy/resources $ python3 test_eufy.py
Traceback (most recent call last):
File « test_eufy.py », line 20, in
ws = create_connection(« ws:// » + url)
File « /usr/local/lib/python3.7/dist-packages/websocket/_core.py », line 608, in create_connection
websock.connect(url, **options)
File « /usr/local/lib/python3.7/dist-packages/websocket/_core.py », line 259, in connect
options.pop(‹ socket ›, None))
File « /usr/local/lib/python3.7/dist-packages/websocket/_http.py », line 117, in connect
hostname, port_from_url, resource, is_secure = parse_url(url)
File « /usr/local/lib/python3.7/dist-packages/websocket/_url.py », line 40, in parse_url
raise ValueError(« url is invalid »)
ValueError: url is invalid

Je vous remercie pour votre aide.

Bonjour

Vérifies que tu n’as pas mis un espace après l’IP docker ou avant le port.

Bonjour,
Non, je n’ai pas d’espaces…

Merci de mettre la page santé jeedom, les logs de l’install de l’image eufy et le résultat des commandes python3, python, pip et pip3

Page santé Jeedom :

Logs installation EUFY :

  • echo ‹ *Begin of package installation ›
    *Begin of package installation
  • touch /tmp/jeedom_install_in_progress_eufy
  • echo 1
  • echo 2
    ++ awk ‹ $1 <= 4 ›
    ++ cut -f 2-
    ++ find /usr/local/lib/python2.7/dist-packages/ /usr/local/lib/python3.7/dist-packages/ -mindepth 1 -maxdepth 1 -type d -exec du -ks ‹ {} › +
  • RESULTTODELETE=
    ++ echo ‹  ›
    ++ sed ‹ s, ,\ ,g ›
  • RESULTTODELETE2=
  • echo ‹  ›
  • xargs rm -rf
  • echo 3
  • sudo pip3 cache purge
    Files removed: 64
  • echo 4
  • sudo pip3 install --upgrade pip
    Looking in indexes: Simple index, piwheels - Simple index
    Requirement already satisfied: pip in /usr/local/lib/python3.7/dist-packages (24.0)
    WARNING: Running pip as the ‹ root › user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: 12. Virtual Environments and Packages — Python 3.12.2 documentation
  • echo 5
  • sudo pip3 install --force-reinstall --upgrade wheel
    Looking in indexes: Simple index, piwheels - Simple index
    Collecting wheel
    Downloading https://www.piwheels.org/simple/wheel/wheel-0.42.0-py3-none-any.whl (65 kB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.4/65.4 kB 272.9 kB/s eta 0:00:00
    Installing collected packages: wheel
    Attempting uninstall: wheel
    Found existing installation: wheel 0.42.0
    Uninstalling wheel-0.42.0:
    Successfully uninstalled wheel-0.42.0
    Successfully installed wheel-0.42.0
    WARNING: Running pip as the ‹ root › user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: 12. Virtual Environments and Packages — Python 3.12.2 documentation
  • echo 6
  • sudo pip3 install --force-reinstall --upgrade requests
    Looking in indexes: Simple index, piwheels - Simple index
    Collecting requests
    Downloading https://www.piwheels.org/simple/requests/requests-2.31.0-py3-none-any.whl (62 kB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.6/62.6 kB 456.7 kB/s eta 0:00:00
    Collecting charset-normalizer<4,>=2 (from requests)
    Downloading https://www.piwheels.org/simple/charset-normalizer/charset_normalizer-3.3.2-py3-none-any.whl (48 kB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 48.5/48.5 kB 356.9 kB/s eta 0:00:00
    Collecting idna<4,>=2.5 (from requests)
    Downloading https://www.piwheels.org/simple/idna/idna-3.6-py3-none-any.whl (61 kB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.6/61.6 kB 2.3 MB/s eta 0:00:00
    Collecting urllib3<3,>=1.21.1 (from requests)
    Downloading https://www.piwheels.org/simple/urllib3/urllib3-2.0.7-py3-none-any.whl (124 kB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 124.2/124.2 kB 543.5 kB/s eta 0:00:00
    Collecting certifi>=2017.4.17 (from requests)
    Downloading https://www.piwheels.org/simple/certifi/certifi-2024.2.2-py3-none-any.whl (163 kB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 163.8/163.8 kB 719.6 kB/s eta 0:00:00
    Installing collected packages: urllib3, idna, charset-normalizer, certifi, requests
    Attempting uninstall: urllib3
    Found existing installation: urllib3 2.0.7
    Uninstalling urllib3-2.0.7:
    Successfully uninstalled urllib3-2.0.7
    Attempting uninstall: idna
    Found existing installation: idna 3.6
    Uninstalling idna-3.6:
    Successfully uninstalled idna-3.6
    Attempting uninstall: charset-normalizer
    Found existing installation: charset-normalizer 3.3.2
    Uninstalling charset-normalizer-3.3.2:
    Successfully uninstalled charset-normalizer-3.3.2
    Attempting uninstall: certifi
    Found existing installation: certifi 2024.2.2
    Uninstalling certifi-2024.2.2:
    Successfully uninstalled certifi-2024.2.2
    Attempting uninstall: requests
    Found existing installation: requests 2.31.0
    Uninstalling requests-2.31.0:
    Successfully uninstalled requests-2.31.0
    Successfully installed certifi-2024.2.2 charset-normalizer-3.3.2 idna-3.6 requests-2.31.0 urllib3-2.0.7
    WARNING: Running pip as the ‹ root › user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: 12. Virtual Environments and Packages — Python 3.12.2 documentation
  • echo 7
  • sudo pip3 install --force-reinstall --upgrade pyudev
    Looking in indexes: Simple index, piwheels - Simple index
    Collecting pyudev
    Downloading https://www.piwheels.org/simple/pyudev/pyudev-0.24.1-py3-none-any.whl (62 kB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.9/62.9 kB 356.2 kB/s eta 0:00:00
    Installing collected packages: pyudev
    Attempting uninstall: pyudev
    Found existing installation: pyudev 0.24.1
    Uninstalling pyudev-0.24.1:
    Successfully uninstalled pyudev-0.24.1
    Successfully installed pyudev-0.24.1
    WARNING: Running pip as the ‹ root › user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: 12. Virtual Environments and Packages — Python 3.12.2 documentation
  • echo 8
  • sudo pip3 install --force-reinstall --upgrade six
    Looking in indexes: Simple index, piwheels - Simple index
    Collecting six
    Downloading https://www.piwheels.org/simple/six/six-1.16.0-py2.py3-none-any.whl (11 kB)
    Installing collected packages: six
    Attempting uninstall: six
    Found existing installation: six 1.16.0
    Uninstalling six-1.16.0:
    Successfully uninstalled six-1.16.0
    Successfully installed six-1.16.0
    WARNING: Running pip as the ‹ root › user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: 12. Virtual Environments and Packages — Python 3.12.2 documentation
  • echo 9
  • sudo pip3 install --force-reinstall --upgrade pyserial
    Looking in indexes: Simple index, piwheels - Simple index
    Collecting pyserial
    Downloading https://www.piwheels.org/simple/pyserial/pyserial-3.5-py2.py3-none-any.whl (90 kB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 90.6/90.6 kB 655.9 kB/s eta 0:00:00
    Installing collected packages: pyserial
    Attempting uninstall: pyserial
    Found existing installation: pyserial 3.5
    Uninstalling pyserial-3.5:
    Successfully uninstalled pyserial-3.5
    Successfully installed pyserial-3.5
    WARNING: Running pip as the ‹ root › user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: 12. Virtual Environments and Packages — Python 3.12.2 documentation
  • echo 10
  • sudo pip3 install --force-reinstall --upgrade websocket-client
    Looking in indexes: Simple index, piwheels - Simple index
    Collecting websocket-client
    Downloading https://www.piwheels.org/simple/websocket-client/websocket_client-1.6.1-py3-none-any.whl (56 kB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.9/56.9 kB 406.1 kB/s eta 0:00:00
    Installing collected packages: websocket-client
    Attempting uninstall: websocket-client
    Found existing installation: websocket-client 1.6.1
    Uninstalling websocket-client-1.6.1:
    Successfully uninstalled websocket-client-1.6.1
    Successfully installed websocket-client-1.6.1
    WARNING: Running pip as the ‹ root › user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: 12. Virtual Environments and Packages — Python 3.12.2 documentation
  • echo 11
  • sudo chmod +x /var/www/html/core/class/…/…/plugins/eufy/resources/setup_eufy.sh
  • sudo /var/www/html/core/class/…/…/plugins/eufy/resources/setup_eufy.sh
  • echo 12
  • php /var/www/html/core/class/…/php/jeecli.php plugin dependancy_end eufy
  • rm /tmp/jeedom_install_in_progress_eufy
  • echo ‹ *End of package installation ›
    *End of package installation

Résultat des commandes python3 :

jeedom@jeedom:~ $ python3

Python 3.7.3 (default, Oct 31 2022, 14:04:00)

[GCC 8.3.0] on linux

Type « help », « copyright », « credits » or « license » for more information.

Résultat des commandes python :

jeedom@jeedom:~ $ python

Python 2.7.16 (default, Oct 10 2019, 22:02:15)

[GCC 8.3.0] on linux2

Type « help », « copyright », « credits » or « license » for more information.

Résultat des commandes pip :
jeedom@jeedom:~ $ pip

Usage:
pip [options]

Commands:
install Install packages.
download Download packages.
uninstall Uninstall packages.
freeze Output installed packages in requirements format.
inspect Inspect the python environment.
list List installed packages.
show Show information about installed packages.
check Verify installed packages have compatible dependencies.
config Manage local and global configuration.
search Search PyPI for packages.
cache Inspect and manage pip’s wheel cache.
index Inspect information available from package indexes.
wheel Build wheels from your requirements.
hash Compute hashes of package archives.
completion A helper command used for command completion.
debug Show information useful for debugging.
help Show help for commands.

General Options:
-h, --help Show help.
–debug Let unhandled exceptions propagate outside the
main subroutine, instead of logging them to
stderr.
–isolated Run pip in an isolated mode, ignoring
environment variables and user configuration.
–require-virtualenv Allow pip to only run in a virtual environment;
exit with an error otherwise.
–python Run pip with the specified Python interpreter.
-v, --verbose Give more output. Option is additive, and can be
used up to 3 times.
-V, --version Show version and exit.
-q, --quiet Give less output. Option is additive, and can be
used up to 3 times (corresponding to WARNING,
ERROR, and CRITICAL logging levels).
–log Path to a verbose appending log.
–no-input Disable prompting for input.
–keyring-provider <keyring_provider>
Enable the credential lookup via the keyring
library if user input is allowed. Specify which
mechanism to use [disabled, import, subprocess].
(default: disabled)
–proxy Specify a proxy in the form
scheme://[user:passwd@]proxy.server:port.
–retries Maximum number of retries each connection should
attempt (default 5 times).
–timeout Set the socket timeout (default 15 seconds).
–exists-action Default action when a path already exists:
(s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.
–trusted-host Mark this host or host:port pair as trusted,
even though it does not have valid or any HTTPS.
–cert Path to PEM-encoded CA certificate bundle. If
provided, overrides the default. See ‹ SSL
Certificate Verification › in pip documentation
for more information.
–client-cert Path to SSL client certificate, a single file
containing the private key and the certificate
in PEM format.
–cache-dir Store the cache data in .
–no-cache-dir Disable the cache.
–disable-pip-version-check
Don’t periodically check PyPI to determine
whether a new version of pip is available for
download. Implied with --no-index.
–no-color Suppress colored output.
–no-python-version-warning
Silence deprecation warnings for upcoming
unsupported Pythons.
–use-feature Enable new functionality, that may be backward
incompatible.
–use-deprecated Enable deprecated functionality, that will be
removed in the future.

Résultat des commandes pip3 :
jeedom@jeedom:~ $ pip3

Usage:
pip3 [options]

Commands:
install Install packages.
download Download packages.
uninstall Uninstall packages.
freeze Output installed packages in requirements format.
inspect Inspect the python environment.
list List installed packages.
show Show information about installed packages.
check Verify installed packages have compatible dependencies.
config Manage local and global configuration.
search Search PyPI for packages.
cache Inspect and manage pip’s wheel cache.
index Inspect information available from package indexes.
wheel Build wheels from your requirements.
hash Compute hashes of package archives.
completion A helper command used for command completion.
debug Show information useful for debugging.
help Show help for commands.

General Options:
-h, --help Show help.
–debug Let unhandled exceptions propagate outside the
main subroutine, instead of logging them to
stderr.
–isolated Run pip in an isolated mode, ignoring
environment variables and user configuration.
–require-virtualenv Allow pip to only run in a virtual environment;
exit with an error otherwise.
–python Run pip with the specified Python interpreter.
-v, --verbose Give more output. Option is additive, and can be
used up to 3 times.
-V, --version Show version and exit.
-q, --quiet Give less output. Option is additive, and can be
used up to 3 times (corresponding to WARNING,
ERROR, and CRITICAL logging levels).
–log Path to a verbose appending log.
–no-input Disable prompting for input.
–keyring-provider <keyring_provider>
Enable the credential lookup via the keyring
library if user input is allowed. Specify which
mechanism to use [disabled, import, subprocess].
(default: disabled)
–proxy Specify a proxy in the form
scheme://[user:passwd@]proxy.server:port.
–retries Maximum number of retries each connection should
attempt (default 5 times).
–timeout Set the socket timeout (default 15 seconds).
–exists-action Default action when a path already exists:
(s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.
–trusted-host Mark this host or host:port pair as trusted,
even though it does not have valid or any HTTPS.
–cert Path to PEM-encoded CA certificate bundle. If
provided, overrides the default. See ‹ SSL
Certificate Verification › in pip documentation
for more information.
–client-cert Path to SSL client certificate, a single file
containing the private key and the certificate
in PEM format.
–cache-dir Store the cache data in .
–no-cache-dir Disable the cache.
–disable-pip-version-check
Don’t periodically check PyPI to determine
whether a new version of pip is available for
download. Implied with --no-index.
–no-color Suppress colored output.
–no-python-version-warning
Silence deprecation warnings for upcoming
unsupported Pythons.
–use-feature Enable new functionality, that may be backward
incompatible.
–use-deprecated Enable deprecated functionality, that will be
removed in the future.

Envoies moi en MP les versions de pip:

pip -version
pip3 -version

Et le resultat des commandes suivantes:

sudo docker image ls
sudo docker container ls

Et enfin

cd /var/www/html/plugins/eufy
python3 resources/test_eufy.py

Bonjour

Moi j ai un pb suite à une réinstalle complète

Impossible de récupérer le bropat