guillaumezin / DomoticzLinky

Linky plugin for Domoticz
GNU Affero General Public License v3.0
145 stars 26 forks source link

Installation plugin #235

Closed f1ssf closed 6 months ago

f1ssf commented 7 months ago

Bonsoir, Je ne parviens pas a voir le plug dans le materiel de DMZ. J'ai une fresh install de domoticz. Apres avoir lu pas mal de forum sur le sujet, j'ai un doute si le plug est toujours opérationnel avec la dernière version de DMZ? Merci si vous pouviez me clarifier. Bien cordialement version actuelle:2024.4, python:3.9.2

Smanar commented 7 months ago

Hello, oui, je confirme (ou j'ai raté une version de domoticz ?) Un probleme de répertoire ? La premiere fois, il faut redemarrer domoticz pour que le plugin soit prit en compte. Et meme si il n'etait plus compatible, tu le verrais dans la partie "hardware".

f1ssf commented 7 months ago

Hi, le plugin est bien installé dans /home/pi/domoticz/plugins/DomoticzLinky. J'ai bien fait un restart du pi et du service, rien, pas de trace dans Hardware. Si s'execute en direct, j'ai une error, la suite je sais pas faire.

`admin@raspberrypi:/home/pi/domoticz/plugins/DomoticzLinky $ python plugin.py Traceback (most recent call last): File "/home/pi/domoticz/plugins/DomoticzLinky/plugin.py", line 112, in import Domoticz ModuleNotFoundError: No module named 'Domoticz' admin@raspberrypi:/home/pi/domoticz/plugins/DomoticzLinky $

Smanar commented 7 months ago

Ca c'est normal, il doit etre lancé via domoticz. Tu n'as pas des message d'erreur en logs au demarrage de domoticz ?

f1ssf commented 7 months ago

non aucun message d'erreur, ci dessous après un restart du server. En plus j'ai pratiquement rien, car je suis actuellement sous jeedom, et DomoticsLinky est la condition pour que je bascule sous DMZ, d'ou ma fresh install.

024-03-07 20:12:19.804 Starting shared server on: :::6144 2024-03-07 20:12:19.595 Status: Domoticz V2024.4 (c)2012-2024 GizMoCuz 2024-03-07 20:12:19.596 Status: Build Hash: 731719420, Date: 2024-01-30 09:16:34 2024-03-07 20:12:19.597 Status: Startup Path: /home/admin/domoticz/ 2024-03-07 20:12:19.776 Status: PluginSystem: Started, Python version '3.9.2', 2 plugin definitions loaded. 2024-03-07 20:12:19.794 Status: WebServer(HTTP) started on address: :: with port 8080 2024-03-07 20:12:19.800 Status: WebServer(SSL) started on address: :: with port 443 2024-03-07 20:12:19.804 Status: RxQueue: queue worker started... 2024-03-07 20:12:19.804 Status: TCPServer: shared server started... 2024-03-07 20:12:19.624 Error: Default admin password has NOT been changed! Change it asap! 2024-03-07 20:12:21.805 Status: Meteo La Tuiliere: Using specified location (City La Tuiliere)! 2024-03-07 20:12:21.811 Status: Carte ES: 5-second poller started (192.168.1.166) 2024-03-07 20:12:21.817 Status: Carte ES: Connected to Relay Module 192.168.1.166 2024-03-07 20:12:22.284 Status: Meteo La Tuiliere: City (2985937)-> Lat/Long = 44.7559,0.0443 2024-03-07 20:12:22.284 Status: Meteo La Tuiliere: Updating preferences for forecastscreen to use OpenWeatherMap! 2024-03-07 20:12:22.285 Status: Meteo La Tuiliere: Started 2024-03-07 20:12:22.285 Status: Meteo La Tuiliere: Using specified location (City La Tuiliere)! 2024-03-07 20:12:22.724 Status: Meteo La Tuiliere: City (2985937)-> Lat/Long = 44.7559,0.0443 2024-03-07 20:12:22.724 Status: Meteo La Tuiliere: Updating preferences for forecastscreen to use OpenWeatherMap! 2024-03-07 20:12:22.725 Status: Meteo La Tuiliere: Started 2024-03-07 20:12:22.725 Status: NotificationSystem: thread started... 2024-03-07 20:12:22.726 Status: EventSystem: reset all events... 2024-03-07 20:12:22.726 Status: EventSystem: reset all device statuses... 2024-03-07 20:12:22.857 Status: Python EventSystem: Initializing event module. 2024-03-07 20:12:22.858 Status: EventSystem: Started 2024-03-07 20:12:22.858 Status: EventSystem: Queue thread started...

Tatroxitum commented 7 months ago

Bonjour,

Trois pistes au cas où :

Le jeu. 7 mars 2024, 20:18, f1ssf @.***> a écrit :

non aucun message d'erreur, ci dessous après un restart du server. En plus j'ai pratiquement rien, car je suis actuellement sous jeedom, et DomoticsLinky est la condition pour que je bascule sous DMZ, d'ou ma fresh install.

024-03-07 20:12:19.804 Starting shared server on: :::6144 2024-03-07 20:12:19.595 Status: Domoticz V2024.4 (c)2012-2024 GizMoCuz 2024-03-07 20:12:19.596 Status: Build Hash: 731719420, Date: 2024-01-30 09:16:34 2024-03-07 20:12:19.597 Status: Startup Path: /home/admin/domoticz/ 2024-03-07 20:12:19.776 Status: PluginSystem: Started, Python version '3.9.2', 2 plugin definitions loaded. 2024-03-07 20:12:19.794 Status: WebServer(HTTP) started on address: :: with port 8080 2024-03-07 20:12:19.800 Status: WebServer(SSL) started on address: :: with port 443 2024-03-07 20:12:19.804 Status: RxQueue: queue worker started... 2024-03-07 20:12:19.804 Status: TCPServer: shared server started... 2024-03-07 20:12:19.624 Error: Default admin password has NOT been changed! Change it asap! 2024-03-07 20:12:21.805 Status: Meteo La Tuiliere: Using specified location (City La Tuiliere)! 2024-03-07 20:12:21.811 Status: Carte ES: 5-second poller started (192.168.1.166) 2024-03-07 20:12:21.817 Status: Carte ES: Connected to Relay Module 192.168.1.166 2024-03-07 20:12:22.284 Status: Meteo La Tuiliere: City (2985937)-> Lat/Long = 44.7559,0.0443 2024-03-07 20:12:22.284 Status: Meteo La Tuiliere: Updating preferences for forecastscreen to use OpenWeatherMap! 2024-03-07 20:12:22.285 Status: Meteo La Tuiliere: Started 2024-03-07 20:12:22.285 Status: Meteo La Tuiliere: Using specified location (City La Tuiliere)! 2024-03-07 20:12:22.724 Status: Meteo La Tuiliere: City (2985937)-> Lat/Long = 44.7559,0.0443 2024-03-07 20:12:22.724 Status: Meteo La Tuiliere: Updating preferences for forecastscreen to use OpenWeatherMap! 2024-03-07 20:12:22.725 Status: Meteo La Tuiliere: Started 2024-03-07 20:12:22.725 Status: NotificationSystem: thread started... 2024-03-07 20:12:22.726 Status: EventSystem: reset all events... 2024-03-07 20:12:22.726 Status: EventSystem: reset all device statuses... 2024-03-07 20:12:22.857 Status: Python EventSystem: Initializing event module. 2024-03-07 20:12:22.858 Status: EventSystem: Started 2024-03-07 20:12:22.858 Status: EventSystem: Queue thread started...

— Reply to this email directly, view it on GitHub https://github.com/guillaumezin/DomoticzLinky/issues/235#issuecomment-1984256708, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGVKL74XSZCLQNC72GVG3ITYXC4RTAVCNFSM6AAAAABEJ2LTPWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBUGI2TMNZQHA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

f1ssf commented 7 months ago

J'ai fait en ssh, dans plugins: git clone https://github.com/guillaumezin/DomoticzLinky

Par contre git pull ne marche pas ou je l'utilise mal, ca me renvoie:

admin@raspberrypi:~/domoticz/plugins/DomoticzLinky $ git pull fatal: detected dubious ownership in repository at '/home/admin/domoticz/plugins/DomoticzLinky' To add an exception for this directory, call:

    git config --global --add safe.directory /home/admin/domoticz/plugins/DomoticzLinky

Domoticz et python Version: 2024.4 Build Hash: 731719420 Compile Date: 2024-01-30 09:16:34 dzVents Version: 3.1.8 Python Version: 3.9.2 (default, Mar 12 2021, 04:06:34) [GCC 10.2.1 20210110]

Tatroxitum commented 7 months ago

Le fichier plugin.py est bien non vide ? Et correspond bien à ce qu'il y a sur github ?

Le jeu. 7 mars 2024, 21:04, f1ssf @.***> a écrit :

J'ai fait en ssh, dans plugins: git clone https://github.com/guillaumezin/DomoticzLinky

Par contre git pull ne marche pas ou je l'utilise mal, ca me renvoie:

@.***:~/domoticz/plugins/DomoticzLinky $ git pull fatal: detected dubious ownership in repository at '/home/admin/domoticz/plugins/DomoticzLinky' To add an exception for this directory, call:

git config --global --add safe.directory /home/admin/domoticz/plugins/DomoticzLinky

Domoticz et python Version: 2024.4 Build Hash: 731719420 Compile Date: 2024-01-30 09:16:34 dzVents Version: 3.1.8 Python Version: 3.9.2 (default, Mar 12 2021, 04:06:34) [GCC 10.2.1 20210110]

— Reply to this email directly, view it on GitHub https://github.com/guillaumezin/DomoticzLinky/issues/235#issuecomment-1984332394, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGVKL723DDZI7QHYESA3VULYXDB4DAVCNFSM6AAAAABEJ2LTPWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBUGMZTEMZZGQ . You are receiving this because you commented.Message ID: @.***>

f1ssf commented 7 months ago

oui il contient bien des données... ci dessous dans mon rep

Linky Plugin

#

Authors:

Copyright (C) 2016 Baptiste Candellier

Modified (C) 2017 Asdepique777

Corrected (C) 2017 epierre

Modified (C) 2017 Asdepique777

Modified (C) 2018-2021 Barberousse

#

This program is free software: you can redistribute it and/or......................................;etc

guillaumezin commented 7 months ago

Bonsoir,

D'autres pistes:

L'erreur git que vous mentionnez suggère un problème de droit. Sous quel utilisateur est exécuté le process Domoticz ? Cet utilisateur a t il les droits de lecture et d'exécution sur plugin.py et ses répertoires parents ?

f1ssf commented 7 months ago

avez-vous mis l'attribut exécutable à plugin.py ? Bingo......après recherche j'ai fait :sudo chmod o+rw plugin.py. puis un restart et là je vois Linky ;-). juste une petite question, un super novice, il peut pas savoir cela? Merci à tous pour l'aide, j'allais baisser les bras. je poursuivrai demain. Slts

guillaumezin commented 7 months ago

Je pensais que c'était précisé dans le readme mais non, je confonds avec mon plugin ebusd. C'est indiqué dans https://www.domoticz.com/wiki/Using_Python_plugins vers lequel le readme renvoie mais c'est facile à louper, je l'ajouterai.

f1ssf commented 7 months ago

merci Guillaume pour le travail réalisé .En tout cas ca permet de mettre les mains dans le cambouis.

Par contre pour la suite les seules erreurs que j'ai sont: `2024-03-08 07:04:49.257 Error: Default admin password has NOT been changed! Change it asap! 2024-03-08 07:04:55.473 Error: CheckAuthToken(db61fce8998259c5a657cf2e0-----effacé par moi------ Y2JkYS00ZGM5LWJlMzEtZWQxYTk4MGIyN2Y1) : auth token mismatch

Je n'ai pas le code a transmettre sur le site RUNSANDOL.

f1ssf commented 6 months ago

ok c'est parfait, merci pour votre aide, j'ai la visu de la Conso. Ce fil de discussion pourra sans doute servir aussi aux novices comme moi. Bravo en tout cas pour le travail.

guillaumezin commented 6 months ago

Bonsoir, Je viens de faire des essais, et je n'ai pas l'impression que l'attribut exécutable soit nécessaire, comme le souligne @Phil353556, je ne l'ai pas sur 2 systèmes de test et pourtant ça fonctionne. Du coup je ne comprends pas ce que vous avez changé pour que ça se mette à fonctionner...

f1ssf commented 6 months ago

En toute franchise, comme je ne connais pas, en recherchant sur le web "attribut executable", j'ai fais plusieurs essais. +rw ou +x ou autre chose, je ne m'en souvient plus, mais ca m'a régler le problème. Merci au faite pour l'explication du codage de droit.

guillaumezin commented 6 months ago

@Phil353556 exact, je comprends mieux, ça rejoint ce que je disais avant, c'est un problème de droits incompatibles entre le process de domoticz et le fichier téléchargé par git. Le fait de le rendre lisible par tous est effectivement une solution. Ce n'est peut-être pas évident pour ceux qui débutent avec Linux, mais ça dépasse le cadre de Domoticz et de l'utilisation des plugins.