Page 6 sur 17

Re: Nouveau Plugin Freebox

Publié : 01 juin 2018, 07:55
par Gells
Bonjour,

N'ayant pu corriger les gels de Domoticz lors de l'utilisation de ce plugin, je tente une nouvelle installation de Domoticz et du plugin sur un autre Raspberry.
A chaque redémarrage du PI3, j'obtiens cette série de messages d'erreur :

Code : Tout sélectionner

2018-05-31 18:27:35.231 Domoticz V3.8153 (c)2012-2017 GizMoCuz
2018-05-31 18:27:35.231 Build Hash: 494fff7, Date: 2017-07-30 12:19:41
2018-05-31 18:27:35.231 Startup Path: /home/pi/domoticz/
2018-05-31 18:27:35.510 Sunrise: 05:41:00 SunSet:21:19:00
2018-05-31 18:27:35.510 EventSystem: reset all events...
2018-05-31 18:27:35.865 PluginSystem: Started, Python version '3.4.2'.
2018-05-31 18:27:35.885 Active notification Subsystems: email (1/12)
2018-05-31 18:27:35.940 WebServer(HTTP) started on address: :: with port 8080
2018-05-31 18:27:35.964 WebServer(SSL) started on address: :: with port 443
2018-05-31 18:27:35.967 Proxymanager started.
2018-05-31 18:27:35.968 Starting shared server on: :::6144
2018-05-31 18:27:35.969 RxQueue: queue worker started...
2018-05-31 18:27:35.969 TCPServer: shared server started...
2018-05-31 18:27:37.969 Hardware Monitor: Started
2018-05-31 18:27:38.242 EventSystem: reset all events...
2018-05-31 18:27:38.243 EventSystem: reset all device statuses...
2018-05-31 18:27:38.359 Python EventSystem: Module not found - Trying to initialize.
2018-05-31 18:27:38.361 Python EventSystem: Initalizing event module.
2018-05-31 18:27:38.361 EventSystem: Started
2018-05-31 18:27:38.536 PluginSystem: Entering work loop.
2018-05-31 18:27:39.773 (Freebox) Initialized version 1.0.0, author 'supermat'
2018-05-31 18:27:39.840 (Freebox) Token déjà présent. OK.
2018-05-31 18:27:39.887 Error: (Freebox) 'onStart' failed 'URLError'.
2018-05-31 18:27:39.887 Error: (Freebox) ----> Line 219 in /home/pi/domoticz/plugins/PluginDomoticzFreebox/plugin.py, function onStart
2018-05-31 18:27:39.887 Error: (Freebox) ----> Line 128 in /home/pi/domoticz/plugins/PluginDomoticzFreebox/plugin.py, function onStart
2018-05-31 18:27:39.887 Error: (Freebox) ----> Line 60 in /home/pi/domoticz/plugins/PluginDomoticzFreebox/freebox.py, function __init__
2018-05-31 18:27:39.887 Error: (Freebox) ----> Line 44 in /home/pi/domoticz/plugins/PluginDomoticzFreebox/freebox.py, function _mksession
2018-05-31 18:27:39.887 Error: (Freebox) ----> Line 40 in /home/pi/domoticz/plugins/PluginDomoticzFreebox/freebox.py, function _com
2018-05-31 18:27:39.888 Error: (Freebox) ----> Line 153 in /usr/lib/python3.4/urllib/request.py, function urlopen
2018-05-31 18:27:39.888 Error: (Freebox) ----> Line 455 in /usr/lib/python3.4/urllib/request.py, function open
2018-05-31 18:27:39.888 Error: (Freebox) ----> Line 473 in /usr/lib/python3.4/urllib/request.py, function _open
2018-05-31 18:27:39.888 Error: (Freebox) ----> Line 433 in /usr/lib/python3.4/urllib/request.py, function _call_chain
2018-05-31 18:27:39.888 Error: (Freebox) ----> Line 1202 in /usr/lib/python3.4/urllib/request.py, function http_open
2018-05-31 18:27:39.888 Error: (Freebox) ----> Line 1180 in /usr/lib/python3.4/urllib/request.py, function do_open
2018-06-01 07:37:07.352 Sunrise: 05:40:00 SunSet:21:20:00
2018-06-01 07:37:07.352 EventSystem: reset all events...
2018-06-01 07:37:07.354 Starting automatic database backup procedure...
2018-06-01 07:37:07.959 Ending automatic database backup procedure...
2018-06-01 07:42:00.467 LUA: PourCentMemoire 12.25
2018-06-01 07:42:45.430 Incoming connection from: 192.168.0.11 
Ensuite le fonctionnement est correct.

@Supermat
As-tu une idée du motif de ces messages d'erreur et de la façon de les éviter ?

Gells

[Resolu] Re: Nouveau Plugin Freebox

Publié : 13 juin 2018, 09:55
par Gells
Lors de ma dernière tentative d'utilisation du plugin Freebox sur une nouvelle installation de Raspberry et Domoticz, j'avais cette série de messages d'erreur.
Je me suis demandé si la Freebox était bien disponible immédiatement lors du redémarrage du Raspberry et de l'initialisation du plugin et si ce n'était pas le cas, cela pouvais expliquer ces erreurs .
Je suis donc parti en quête de rudiment de python pour ajouter une pause avant l'initialisation du plugin et voici la modification effectuée dans plugin.py

Sur la ligne import j'ai ajouté : time
import Domoticz,freebox,json,os,datetime,time
Puis sur la fonction onStart(), j'ai ajouté une pause de quelques secondes time.sleep(10)
def onStart():
global _plugin
time.sleep(10)
_plugin.onStart()
J'ai laissé 10 secondes, mais avec 5 s, il n'y avait déjà plus d'erreur.

Merci à ceux qui ont participé à cette discussion

Gells

Re: Nouveau Plugin Freebox

Publié : 13 juin 2018, 22:15
par Supermat
Merci de partager, j'intègre cette pause dans la prochaine version.

Re: Nouveau Plugin Freebox

Publié : 13 juin 2018, 23:45
par pascal_69
Merci pour ton analyse et le retour d'information.

Re: Nouveau Plugin Freebox

Publié : 29 juin 2018, 09:10
par bibi182
petite question: comment désinstaller proprement ce plugin?

Re: Nouveau Plugin Freebox

Publié : 29 juin 2018, 09:36
par Supermat
bibi182 a écrit :petite question: comment désinstaller proprement ce plugin?
Il suffit de supprimer le Matériel créé, puis supprimer le répertoire dans domoticz/Plugin.
Et je pense que c'est bon.

Re: Nouveau Plugin Freebox

Publié : 02 juil. 2018, 22:46
par Supermat
Ca y est, je sors enfin la version V1.1 avec le wifi et le reboot server.
A la demande de Gells, j'ai également ajouté une pause de 5s au démarrage.
Testé il y a quelques temps, je la met en ligne. J'espère que tout fonctionne bien.
Bonne mise à jour.

PS : Un petit backup avant, ça fait pas de mal :D

Re: Nouveau Plugin Freebox

Publié : 14 sept. 2018, 22:37
par hdpop
Bonsoir,

Je viens d'essayer d'installer le plugin, token ok, mais lorsque j'essaye d’écouter le nouveaux periphs, j'ai des erreurs.
J'ai suivis toutes les étapes comme indiquer sur le site

https://matdomotique.wordpress.com/2018 ... -domoticz/

2018-09-14 22:27:09.556 Error: (Freebox API) 'onHeartbeat' failed 'HTTPError'.
2018-09-14 22:27:09.556 Error: (Freebox API) ----> Line 294 in '/home/pi/domoticz/plugins/PluginDomoticzFreebox/plugin.py', function onHeartbeat
2018-09-14 22:27:09.556 Error: (Freebox API) ----> Line 230 in '/home/pi/domoticz/plugins/PluginDomoticzFreebox/plugin.py', function onHeartbeat
2018-09-14 22:27:09.556 Error: (Freebox API) ----> Line 90 in '/home/pi/domoticz/plugins/PluginDomoticzFreebox/freebox.py', function __init__
2018-09-14 22:27:09.557 Error: (Freebox API) ----> Line 78 in '/home/pi/domoticz/plugins/PluginDomoticzFreebox/freebox.py', function _mksession
2018-09-14 22:27:09.557 Error: (Freebox API) ----> Line 41 in '/home/pi/domoticz/plugins/PluginDomoticzFreebox/freebox.py', function _com
2018-09-14 22:27:09.557 Error: (Freebox API) ----> Line 163 in '/usr/lib/python3.5/urllib/request.py', function urlopen
2018-09-14 22:27:09.557 Error: (Freebox API) ----> Line 472 in '/usr/lib/python3.5/urllib/request.py', function open
2018-09-14 22:27:09.557 Error: (Freebox API) ----> Line 582 in '/usr/lib/python3.5/urllib/request.py', function http_response
2018-09-14 22:27:09.557 Error: (Freebox API) ----> Line 510 in '/usr/lib/python3.5/urllib/request.py', function error
2018-09-14 22:27:09.557 Error: (Freebox API) ----> Line 444 in '/usr/lib/python3.5/urllib/request.py', function _call_chain
2018-09-14 22:27:09.557 Error: (Freebox API) ----> Line 590 in '/usr/lib/python3.5/urllib/request.py', function http_error_default

Re: Nouveau Plugin Freebox

Publié : 15 sept. 2018, 19:05
par Supermat
Salut hdpop,

Peux tu activer le debug du plugin (option du plugin) et nous dire si tu as plus d'infos.

Re: Nouveau Plugin Freebox

Publié : 15 sept. 2018, 19:22
par hdpop
Salut Supermat,

Merci pour ta rapidité, Je viens de faire un essai en mode debug, voici le log.
J'ai un doute sur le token... mais d'apres le log c'est bon

2018-09-15 19:16:54.382 Status: (Freebox API) Started.
2018-09-15 19:16:55.393 Status: (Freebox API) Entering work loop.
2018-09-15 19:16:55.393 Status: (Freebox API) Initialized version 1.1.0, author 'supermat'
2018-09-15 19:17:00.405 (Freebox API) Debug logging mask set to: PYTHON PLUGIN QUEUE IMAGE DEVICE CONNECTION MESSAGE ALL
2018-09-15 19:17:00.405 (Freebox API) 'HardwareID':'21'
2018-09-15 19:17:00.405 (Freebox API) 'Version':'1.1.0'
2018-09-15 19:17:00.405 (Freebox API) 'DomoticzHash':'9e8ea729'
2018-09-15 19:17:00.406 (Freebox API) 'HomeFolder':'/home/pi/domoticz/plugins/PluginDomoticzFreebox/'
2018-09-15 19:17:00.406 (Freebox API) 'Author':'supermat'
2018-09-15 19:17:00.406 (Freebox API) 'Key':'Freebox'
2018-09-15 19:17:00.406 (Freebox API) 'Address':'http://mafreebox.free.fr'
2018-09-15 19:17:00.406 (Freebox API) 'Mode1':'sH6sG4NWCy7MqTkPiKjWRhetEoH7h3+1'
2018-09-15 19:17:00.406 (Freebox API) 'Port':'80'
2018-09-15 19:17:00.406 (Freebox API) 'Name':'Freebox API'
2018-09-15 19:17:00.406 (Freebox API) 'DomoticzVersion':'4.9999'
2018-09-15 19:17:00.406 (Freebox API) 'Mode6':'Debug'
2018-09-15 19:17:00.406 (Freebox API) 'DomoticzBuildTime':'2018-09-09 18:27:57'
2018-09-15 19:17:00.407 (Freebox API) Device count: 0
2018-09-15 19:17:00.407 (Freebox API) Token déjà présent. OK.
2018-09-15 19:17:00.522 Python: It's daytime!
2018-09-15 19:17:00.523 Python: Sunrise in minutes: 436
2018-09-15 19:17:00.523 Python: Sunset in minutes: 1189
2018-09-15 19:17:00.523 Python: Minutes since midnight: 1157
2018-09-15 19:17:00.627 Status: LUA: <font color="blue">**** Check_Temerature.lua ****</font>
2018-09-15 19:17:00.627 Status: LUA: <font color="grey">Nous sommes le 15, il est 19h17min</font>
2018-09-15 19:17:00.627 Status: LUA: <font color="grey">Sonde Sonde Ext = 22.6°C</font>
2018-09-15 19:17:00.627 Status: LUA: <font color="grey">Temp_max_ext 31.7°C</font>
2018-09-15 19:17:00.627 Status: LUA: <font color="grey">Temp_min_ext 16.3°C</font>
2018-09-15 19:17:00.514 Error: (Freebox API) 'onStart' failed 'HTTPError'.
2018-09-15 19:17:00.515 Error: (Freebox API) ----> Line 266 in '/home/pi/domoticz/plugins/PluginDomoticzFreebox/plugin.py', function onStart
2018-09-15 19:17:00.515 Error: (Freebox API) ----> Line 127 in '/home/pi/domoticz/plugins/PluginDomoticzFreebox/plugin.py', function onStart
2018-09-15 19:17:00.515 Error: (Freebox API) ----> Line 90 in '/home/pi/domoticz/plugins/PluginDomoticzFreebox/freebox.py', function __init__
2018-09-15 19:17:00.515 Error: (Freebox API) ----> Line 78 in '/home/pi/domoticz/plugins/PluginDomoticzFreebox/freebox.py', function _mksession
2018-09-15 19:17:00.515 Error: (Freebox API) ----> Line 41 in '/home/pi/domoticz/plugins/PluginDomoticzFreebox/freebox.py', function _com
2018-09-15 19:17:00.515 Error: (Freebox API) ----> Line 163 in '/usr/lib/python3.5/urllib/request.py', function urlopen
2018-09-15 19:17:00.515 Error: (Freebox API) ----> Line 472 in '/usr/lib/python3.5/urllib/request.py', function open
2018-09-15 19:17:00.515 Error: (Freebox API) ----> Line 582 in '/usr/lib/python3.5/urllib/request.py', function http_response
2018-09-15 19:17:00.515 Error: (Freebox API) ----> Line 510 in '/usr/lib/python3.5/urllib/request.py', function error
2018-09-15 19:17:00.515 Error: (Freebox API) ----> Line 444 in '/usr/lib/python3.5/urllib/request.py', function _call_chain
2018-09-15 19:17:00.516 Error: (Freebox API) ----> Line 590 in '/usr/lib/python3.5/urllib/request.py', function http_error_default