Non, la commande « echo $? » Retourne 0 si la commande hcitool c’est bien passée, ou on nombre négatif en cas d’erreur (c’est ça que je voudrais surveiller, via le script ca sera plus facile).
Dans le script python, si la commande hcitool retourne le nom du téléphone alors « value : 1 » signifie que le téléphone est present dans jeedom, et tous les autres cas (même les erreurs) sont traités avec « value : 0 » dans jeedom, donc comme un téléphone absent .
Benoit
Oui ok j’aurais dû regarder plus attentivement ton message précédent où tu as également un retour de cette commande à 0, alors que ton téléphone est bien détecté
Bonjour @Xboss06 et @dsigmoun,
j’ai modifie le script qui realise le polling regulier des telephones. Le changement est « leger », car j’ai ajoute surtout une gestion des exceptions autour de la commande « hcitool » qui est executee a intervales reguliers. En cas d’exception, le polling des telephones ne s’arretera pas, et un message sera affiche dans le log.
Pour installer ce fichier:
1/ aller dans le repertoire ou ce trouve le fichier python
cd /var/www/html/plugins/phone_detection/resources/phone_detectiond
2/ dans le repertoire, faire une copie de l’ancien fichier, pour revenir facilement en arriere au cas ou
cp phone_detectiond.py phone_detectiond.py.org
3/ toujours dans le repertoire, modifie les droits sur le fichier pour etre sur de pouvoir le mettre a jour:
sudo chmod 777 phone_detectiond.py
4/ Installer le nouveau fichier (tu peux le transferer via Jeexplorer ou ssh). Attention de le renommer de phone_detectiond.py.txt en phone_detectiond.py
Par exemple pour ssh
scp phone_detectiond.py.txt benoit@devmachine:/var/www/html/plugins/phone_detection/resources/phone_detectiond/phone_detectiond.py[phone_detectiond.py.txt|attachment](upload://5qRb3CGVwp1vXTSEcE4f0P9qqk1.txt) (15,4 Ko)
En cas de mauvaise manip « desastreuse », tu peux re-installer le plugin depuis le market, tu retrouveras le fichier d’origine
Tenais moi au courant, si ca fonctionne bien, je remonterai les modifications dans la branche master.
Benoit
Salut @benoit5672 et merci beaucoup de t’occuper de notre cas désespéré
J’ai tout fait jusqu’à l’étape pour télécharger ton ficher…je n’y arrive pas je dois rater un truc.
Ou est ce qu’on le trouve le script .txt ?
Bonne question, je ne le vois pas apparaître non plus dans mon post
Je retente: phone_detectiond.py.txt (15,4 Ko)
N’oubliez pas de redémarrer le démon en allant dans le configuration du plugin puis démon → redémarrer.
Benoit
Haaaaa super, là c’est bon Benoît
Merci encore, je te tiens au courant
Zut, ça ne fonctionne pas
Nos 4 téléphones sont à nouveau déconnectés.
Voici une partie du log (qui se remplit vite far toutes les 10 secondes il y a des nouvelles entrées)
[2021-03-01 22:18:44][DEBUG][root](Thread-4) : Get phone information 432
[2021-03-01 22:18:44][DEBUG][root](Thread-5) : Get phone information 434
[2021-03-01 22:18:44][DEBUG][root](Thread-3) : Get phone information 435
[2021-03-01 22:18:44][DEBUG][root](Thread-5) : 434 is absent
[2021-03-01 22:18:44][DEBUG][root](Thread-5) : lastStateDate: 2021-03-01 21:18:23.953378
[2021-03-01 22:18:44][DEBUG][root](Thread-5) : thresholdDate: 2021-03-01 21:19:23.953378
[2021-03-01 22:18:44][DEBUG][root](Thread-4) : 432 is absent
[2021-03-01 22:18:44][DEBUG][root](Thread-5) : datetime.utcnow(): 2021-03-01 21:18:44.223476
[2021-03-01 22:18:44][DEBUG][root](Thread-2) : 436 is absent
[2021-03-01 22:18:44][DEBUG][root](Thread-3) : 435 is absent
[2021-03-01 22:18:44][DEBUG][root](Thread-4) : lastStateDate: 2021-03-01 22:13:28
[2021-03-01 22:18:44][DEBUG][root](Thread-5) : is datetime.utcnow() > thresholdDate ? False
[2021-03-01 22:18:44][DEBUG][root](Thread-2) : lastStateDate: 2021-03-01 22:13:28
[2021-03-01 22:18:44][DEBUG][root](Thread-3) : lastStateDate: 2021-02-28 21:22:23
[2021-03-01 22:18:44][DEBUG][root](Thread-4) : thresholdDate: 2021-03-01 22:14:28
[2021-03-01 22:18:44][DEBUG][root](Thread-5) : 434 is up to date
[2021-03-01 22:18:44][DEBUG][root](Thread-2) : thresholdDate: 2021-03-01 22:14:28
[2021-03-01 22:18:44][DEBUG][root](Thread-3) : thresholdDate: 2021-02-28 21:23:23
[2021-03-01 22:18:44][DEBUG][root](Thread-4) : datetime.utcnow(): 2021-03-01 21:18:44.226757
[2021-03-01 22:18:44][DEBUG][root](Thread-2) : datetime.utcnow(): 2021-03-01 21:18:44.226943
[2021-03-01 22:18:44][DEBUG][root](Thread-3) : datetime.utcnow(): 2021-03-01 21:18:44.227062
[2021-03-01 22:18:44][DEBUG][root](Thread-4) : is datetime.utcnow() > thresholdDate ? False
[2021-03-01 22:18:44][DEBUG][root](Thread-2) : is datetime.utcnow() > thresholdDate ? False
[2021-03-01 22:18:44][DEBUG][root](Thread-3) : is datetime.utcnow() > thresholdDate ? True
[2021-03-01 22:18:44][DEBUG][root](Thread-4) : 432 is up to date
[2021-03-01 22:18:44][DEBUG][root](Thread-2) : 436 is up to date
[2021-03-01 22:18:44][DEBUG][root](Thread-3) : 435 is up to date
[2021-03-01 22:18:54][DEBUG][root](Thread-2) : Get phone information 436
[2021-03-01 22:18:54][DEBUG][root](Thread-5) : Get phone information 434
[2021-03-01 22:18:54][DEBUG][root](Thread-3) : Get phone information 435
[2021-03-01 22:18:54][DEBUG][root](Thread-4) : Get phone information 432
[2021-03-01 22:18:54][DEBUG][root](Thread-2) : 436 is absent
[2021-03-01 22:18:54][DEBUG][root](Thread-2) : lastStateDate: 2021-03-01 22:13:28
[2021-03-01 22:18:54][DEBUG][root](Thread-3) : 435 is absent
[2021-03-01 22:18:54][DEBUG][root](Thread-4) : 432 is absent
[2021-03-01 22:18:54][DEBUG][root](Thread-2) : thresholdDate: 2021-03-01 22:14:28
[2021-03-01 22:18:54][DEBUG][root](Thread-3) : lastStateDate: 2021-02-28 21:22:23
[2021-03-01 22:18:54][DEBUG][root](Thread-4) : lastStateDate: 2021-03-01 22:13:28
[2021-03-01 22:18:54][DEBUG][root](Thread-5) : 434 is absent
[2021-03-01 22:18:54][DEBUG][root](Thread-2) : datetime.utcnow(): 2021-03-01 21:18:54.376819
[2021-03-01 22:18:54][DEBUG][root](Thread-3) : thresholdDate: 2021-02-28 21:23:23
[2021-03-01 22:18:54][DEBUG][root](Thread-4) : thresholdDate: 2021-03-01 22:14:28
[2021-03-01 22:18:54][DEBUG][root](Thread-5) : lastStateDate: 2021-03-01 21:18:23.953378
[2021-03-01 22:18:54][DEBUG][root](Thread-2) : is datetime.utcnow() > thresholdDate ? False
[2021-03-01 22:18:54][DEBUG][root](Thread-3) : datetime.utcnow(): 2021-03-01 21:18:54.378386
[2021-03-01 22:18:54][DEBUG][root](Thread-4) : datetime.utcnow(): 2021-03-01 21:18:54.378700
[2021-03-01 22:18:54][DEBUG][root](Thread-5) : thresholdDate: 2021-03-01 21:19:23.953378
[2021-03-01 22:18:54][DEBUG][root](Thread-2) : 436 is up to date
[2021-03-01 22:18:54][DEBUG][root](Thread-3) : is datetime.utcnow() > thresholdDate ? True
[2021-03-01 22:18:54][DEBUG][root](Thread-4) : is datetime.utcnow() > thresholdDate ? False
[2021-03-01 22:18:54][DEBUG][root](Thread-5) : datetime.utcnow(): 2021-03-01 21:18:54.379681
[2021-03-01 22:18:54][DEBUG][root](Thread-3) : 435 is up to date
[2021-03-01 22:18:54][DEBUG][root](Thread-4) : 432 is up to date
[2021-03-01 22:18:54][DEBUG][root](Thread-5) : is datetime.utcnow() > thresholdDate ? False
[2021-03-01 22:18:54][DEBUG][root](Thread-5) : 434 is up to date
Mince.
Ca veut dire que pour le système, la commande hcitool ne retourne pas d’erreur, et que pour lui le téléphone n’est pas vu.
Je ne vois pas comment aller plus loin pour vous aider, désolé ! Il faudrait chercher sur des forums du nuc s’il n’y a pas de problème connu autour du bluetooth.
Bonne soirée
Benoit
Encore un grand merci pour le temps passé sur ce problème
Si un jour c’est solutionné, je reviendrai poster ici
Bonne soirée !
Pour ma part, c’est beaucoup mieux. J’arrive à avoir 3 connexions simultanément même si j’ai des petites déconnexions de temps en temps.
Je n’ai pas logs que rencontre @Xboss06.
Voici les miens
[2021-03-01 22:28:27][DEBUG] : id: 414
[2021-03-01 22:28:27][DEBUG] : value: 1
[2021-03-01 22:28:27][DEBUG] : Device Name: [Présence][Bluetooth - Frédéric - Huawei P20]
[2021-03-01 22:28:27][DEBUG] : State property name: [Présence][Bluetooth - Frédéric - Huawei P20][Etat]
[2021-03-01 22:28:27][INFO] : updateGlobalDevice()
[2021-03-01 22:28:45][DEBUG] : id: 418
[2021-03-01 22:28:45][DEBUG] : value: 1
[2021-03-01 22:28:45][DEBUG] : Device Name: [Présence][Bluetooth - Alexandra - Xiaomi A1]
[2021-03-01 22:28:45][DEBUG] : State property name: [Présence][Bluetooth - Alexandra - Xiaomi A1][Etat]
[2021-03-01 22:28:45][INFO] : updateGlobalDevice()
[2021-03-01 22:43:02][DEBUG] : id: 414
[2021-03-01 22:43:02][DEBUG] : value: 0
[2021-03-01 22:43:02][DEBUG] : Device Name: [Présence][Bluetooth - Frédéric - Huawei P20]
[2021-03-01 22:43:02][DEBUG] : State property name: [Présence][Bluetooth - Frédéric - Huawei P20][Etat]
[2021-03-01 22:43:02][INFO] : updateGlobalDevice()
[2021-03-01 22:43:53][DEBUG] : id: 414
[2021-03-01 22:43:53][DEBUG] : value: 1
[2021-03-01 22:43:53][DEBUG] : Device Name: [Présence][Bluetooth - Frédéric - Huawei P20]
[2021-03-01 22:43:53][DEBUG] : State property name: [Présence][Bluetooth - Frédéric - Huawei P20][Etat]
[2021-03-01 22:43:53][INFO] : updateGlobalDevice()
[2021-03-01 23:03:49][DEBUG] : id: 420
[2021-03-01 23:03:49][DEBUG] : value: 1
[2021-03-01 23:03:49][DEBUG] : Device Name: [Présence][Bluetooth - Baptiste - Xiaomi A1]
[2021-03-01 23:03:49][DEBUG] : State property name: [Présence][Bluetooth - Baptiste - Xiaomi A1][Etat]
[2021-03-01 23:03:49][INFO] : updateGlobalDevice()
[2021-03-01 23:48:16][DEBUG] : id: 420
[2021-03-01 23:48:16][DEBUG] : value: 0
[2021-03-01 23:48:16][DEBUG] : Device Name: [Présence][Bluetooth - Baptiste - Xiaomi A1]
[2021-03-01 23:48:16][DEBUG] : State property name: [Présence][Bluetooth - Baptiste - Xiaomi A1][Etat]
[2021-03-01 23:48:16][INFO] : updateGlobalDevice()
[2021-03-01 23:48:54][DEBUG] : id: 420
[2021-03-01 23:48:54][DEBUG] : value: 1
[2021-03-01 23:48:54][DEBUG] : Device Name: [Présence][Bluetooth - Baptiste - Xiaomi A1]
[2021-03-01 23:48:54][DEBUG] : State property name: [Présence][Bluetooth - Baptiste - Xiaomi A1][Etat]
[2021-03-01 23:48:54][INFO] : updateGlobalDevice()
[2021-03-02 06:44:58][DEBUG] : id: 414
[2021-03-02 06:44:58][DEBUG] : value: 0
[2021-03-02 06:44:58][DEBUG] : Device Name: [Présence][Bluetooth - Frédéric - Huawei P20]
[2021-03-02 06:44:58][DEBUG] : State property name: [Présence][Bluetooth - Frédéric - Huawei P20][Etat]
[2021-03-02 06:44:58][INFO] : updateGlobalDevice()
[2021-03-02 06:45:42][DEBUG] : id: 414
[2021-03-02 06:45:42][DEBUG] : value: 1
[2021-03-02 06:45:42][DEBUG] : Device Name: [Présence][Bluetooth - Frédéric - Huawei P20]
[2021-03-02 06:45:42][DEBUG] : State property name: [Présence][Bluetooth - Frédéric - Huawei P20][Etat]
[2021-03-02 06:45:42][INFO] : updateGlobalDevice()
Hello,
moi je vais faire les test egalement, je ne voulais pas surcharger au niveau commentaires, moi je tournes avec un Odroid C2…
Idem je reviendrais faire part de mes resultats.
Merci en tout cas pour chaque acteurs de vos infos.
J’ai même beaucoup de deconnexion et reconnexion ce matin
Rechercher
cron_execution (835 o)
http.error
phone_detection (132.1 Ko)
scenario_execution
sigri_atome (1.2 Ko)
Rechercher
[2021-03-02 08:00:17][DEBUG][root](Thread-4) : datetime.utcnow(): 2021-03-02 07:00:17.978010
[2021-03-02 08:00:17][DEBUG][root](Thread-4) : is datetime.utcnow() > thresholdDate ? True
[2021-03-02 08:00:17][INFO][root](Thread-4) : Set "Bluetooth - Frédéric - Huawei P20" phone absent
[2021-03-02 08:00:17][DEBUG][root](Thread-4) : 414 must be update
[2021-03-02 08:00:17][DEBUG][root](Thread-4) : Bluetooth - Frédéric - Huawei P20 status has changed to 'absent'! Notify Jeedom.
[2021-03-02 08:00:17][DEBUG][root](Thread-4) : device status: False
[2021-03-02 08:00:17][DEBUG][root](Thread-4) : Send to jeedom : {'action': 'update_device_status', 'id': 414, 'value': 0}
[2021-03-02 08:00:17][DEBUG] : id: 414
[2021-03-02 08:00:17][DEBUG] : value: 0
[2021-03-02 08:00:17][DEBUG] : Device Name: [Présence][Bluetooth - Frédéric - Huawei P20]
[2021-03-02 08:00:17][DEBUG] : State property name: [Présence][Bluetooth - Frédéric - Huawei P20][Etat]
[2021-03-02 08:00:18][INFO] : updateGlobalDevice()
[2021-03-02 08:00:18][DEBUG][root](Thread-4) : Status Code : 200
[2021-03-02 08:00:18][DEBUG][root](Thread-4) : Jeedom reply : {'success': True, 'value': 0}
[2021-03-02 08:00:23][DEBUG][root](Thread-5) : 466 is absent
[2021-03-02 08:00:23][DEBUG][root](Thread-5) : lastStateDate: 2021-03-02 06:59:00.341592
[2021-03-02 08:00:23][DEBUG][root](Thread-5) : thresholdDate: 2021-03-02 07:00:00.341592
[2021-03-02 08:00:23][DEBUG][root](Thread-5) : datetime.utcnow(): 2021-03-02 07:00:23.106001
[2021-03-02 08:00:23][DEBUG][root](Thread-5) : is datetime.utcnow() > thresholdDate ? True
[2021-03-02 08:00:23][DEBUG][root](Thread-5) : 466 is up to date
[2021-03-02 08:00:24][DEBUG][root](Thread-2) : Get phone information 418
[2021-03-02 08:00:28][DEBUG][root](Thread-4) : Get phone information 414
[2021-03-02 08:00:29][DEBUG][root](Thread-2) : 418 is absent
[2021-03-02 08:00:29][DEBUG][root](Thread-2) : lastStateDate: 2021-03-02 06:59:19.568562
[2021-03-02 08:00:29][DEBUG][root](Thread-2) : thresholdDate: 2021-03-02 07:00:19.568562
[2021-03-02 08:00:29][DEBUG][root](Thread-2) : datetime.utcnow(): 2021-03-02 07:00:29.944191
[2021-03-02 08:00:29][DEBUG][root](Thread-2) : is datetime.utcnow() > thresholdDate ? True
[2021-03-02 08:00:29][INFO][root](Thread-2) : Set "Bluetooth - Alexandra - Xiaomi A1" phone absent
[2021-03-02 08:00:29][DEBUG][root](Thread-2) : 418 must be update
[2021-03-02 08:00:29][DEBUG][root](Thread-2) : Bluetooth - Alexandra - Xiaomi A1 status has changed to 'absent'! Notify Jeedom.
[2021-03-02 08:00:29][DEBUG][root](Thread-2) : device status: False
[2021-03-02 08:00:29][DEBUG][root](Thread-2) : Send to jeedom : {'action': 'update_device_status', 'id': 418, 'value': 0}
[2021-03-02 08:00:29][DEBUG] : id: 418
[2021-03-02 08:00:29][DEBUG] : value: 0
[2021-03-02 08:00:29][DEBUG] : Device Name: [Présence][Bluetooth - Alexandra - Xiaomi A1]
[2021-03-02 08:00:29][DEBUG] : State property name: [Présence][Bluetooth - Alexandra - Xiaomi A1][Etat]
[2021-03-02 08:00:29][INFO] : updateGlobalDevice()
[2021-03-02 08:00:29][DEBUG][root](Thread-2) : Status Code : 200
[2021-03-02 08:00:29][DEBUG][root](Thread-2) : Jeedom reply : {'success': True, 'value': 0}
[2021-03-02 08:00:33][DEBUG][root](Thread-5) : Get phone information 466
[2021-03-02 08:00:35][DEBUG][root](Thread-4) : 414 is absent
[2021-03-02 08:00:35][DEBUG][root](Thread-4) : lastStateDate: 2021-03-02 07:00:18.045076
[2021-03-02 08:00:35][DEBUG][root](Thread-4) : thresholdDate: 2021-03-02 07:01:18.045076
[2021-03-02 08:00:35][DEBUG][root](Thread-4) : datetime.utcnow(): 2021-03-02 07:00:35.082039
[2021-03-02 08:00:35][DEBUG][root](Thread-4) : is datetime.utcnow() > thresholdDate ? False
[2021-03-02 08:00:35][DEBUG][root](Thread-4) : 414 is up to date
[2021-03-02 08:00:37][DEBUG][root](Thread-3) : Get phone information 420
[2021-03-02 08:00:40][DEBUG][root](Thread-2) : Get phone information 418
[2021-03-02 08:00:40][DEBUG][root](Thread-5) : 466 is absent
[2021-03-02 08:00:40][DEBUG][root](Thread-5) : lastStateDate: 2021-03-02 06:59:00.341592
[2021-03-02 08:00:40][DEBUG][root](Thread-5) : thresholdDate: 2021-03-02 07:00:00.341592
[2021-03-02 08:00:40][DEBUG][root](Thread-5) : datetime.utcnow(): 2021-03-02 07:00:40.220253
[2021-03-02 08:00:40][DEBUG][root](Thread-5) : is datetime.utcnow() > thresholdDate ? True
[2021-03-02 08:00:40][DEBUG][root](Thread-5) : 466 is up to date
[2021-03-02 08:00:40][DEBUG][root](Thread-3) : 420 is present
[2021-03-02 08:00:40][DEBUG][root](Thread-3) : 420 is up to date
[2021-03-02 08:00:41][DEBUG][root](Thread-2) : 418 is present
[2021-03-02 08:00:41][INFO][root](Thread-2) : Set Bluetooth - Alexandra - Xiaomi A1's phone present
[2021-03-02 08:00:41][DEBUG][root](Thread-2) : 418 must be update
[2021-03-02 08:00:41][DEBUG][root](Thread-2) : Bluetooth - Alexandra - Xiaomi A1 status has changed to 'present'! Notify Jeedom.
[2021-03-02 08:00:41][DEBUG][root](Thread-2) : device status: True
[2021-03-02 08:00:41][DEBUG][root](Thread-2) : Send to jeedom : {'action': 'update_device_status', 'id': 418, 'value': 1}
[2021-03-02 08:00:41][DEBUG] : id: 418
[2021-03-02 08:00:41][DEBUG] : value: 1
[2021-03-02 08:00:41][DEBUG] : Device Name: [Présence][Bluetooth - Alexandra - Xiaomi A1]
[2021-03-02 08:00:41][DEBUG] : State property name: [Présence][Bluetooth - Alexandra - Xiaomi A1][Etat]
[2021-03-02 08:00:41][INFO] : updateGlobalDevice()
[2021-03-02 08:00:41][DEBUG][root](Thread-2) : Status Code : 200
[2021-03-02 08:00:41][DEBUG][root](Thread-2) : Jeedom reply : {'success': True, 'value': 1}
[2021-03-02 08:00:45][DEBUG][root](Thread-4) : Get phone information 414
[2021-03-02 08:00:50][DEBUG][root](Thread-5) : Get phone information 466
[2021-03-02 08:00:50][DEBUG][root](Thread-4) : 414 is absent
[2021-03-02 08:00:50][DEBUG][root](Thread-4) : lastStateDate: 2021-03-02 07:00:18.045076
[2021-03-02 08:00:50][DEBUG][root](Thread-4) : thresholdDate: 2021-03-02 07:01:18.045076
[2021-03-02 08:00:50][DEBUG][root](Thread-4) : datetime.utcnow(): 2021-03-02 07:00:50.235105
[2021-03-02 08:00:50][DEBUG][root](Thread-4) : is datetime.utcnow() > thresholdDate ? False
[2021-03-02 08:00:50][DEBUG][root](Thread-4) : 414 is up to date
[2021-03-02 08:00:55][DEBUG][root](Thread-5) : 466 is absent
[2021-03-02 08:00:55][DEBUG][root](Thread-5) : lastStateDate: 2021-03-02 06:59:00.341592
[2021-03-02 08:00:55][DEBUG][root](Thread-5) : thresholdDate: 2021-03-02 07:00:00.341592
[2021-03-02 08:00:55][DEBUG][root](Thread-5) : datetime.utcnow(): 2021-03-02 07:00:55.395382
[2021-03-02 08:00:55][DEBUG][root](Thread-5) : is datetime.utcnow() > thresholdDate ? True
[2021-03-02 08:00:55][DEBUG][root](Thread-5) : 466 is up to date
[2021-03-02 08:01:00][DEBUG][root](Thread-4) : Get phone information 414
[2021-03-02 08:01:02][DEBUG][root](Thread-4) : 414 is present
[2021-03-02 08:01:02][INFO][root](Thread-4) : Set Bluetooth - Frédéric - Huawei P20's phone present
[2021-03-02 08:01:02][DEBUG][root](Thread-4) : 414 must be update
[2021-03-02 08:01:02][DEBUG][root](Thread-4) : Bluetooth - Frédéric - Huawei P20 status has changed to 'present'! Notify Jeedom.
[2021-03-02 08:01:02][DEBUG][root](Thread-4) : device status: True
[2021-03-02 08:01:02][DEBUG][root](Thread-4) : Send to jeedom : {'action': 'update_device_status', 'id': 414, 'value': 1}
[2021-03-02 08:01:02][DEBUG] : id: 414
[2021-03-02 08:01:02][DEBUG] : value: 1
[2021-03-02 08:01:02][DEBUG] : Device Name: [Présence][Bluetooth - Frédéric - Huawei P20]
[2021-03-02 08:01:02][DEBUG] : State property name: [Présence][Bluetooth - Frédéric - Huawei P20][Etat]
[2021-03-02 08:01:03][INFO] : updateGlobalDevice()
[2021-03-02 08:01:03][DEBUG][root](Thread-4) : Status Code : 200
[2021-03-02 08:01:03][DEBUG][root](Thread-4) : Jeedom reply : {'success': True, 'value': 1}
[2021-03-02 08:01:05][DEBUG][root](Thread-5) : Get phone information 466
[2021-03-02 08:01:10][DEBUG][root](Thread-5) : 466 is absent
[2021-03-02 08:01:10][DEBUG][root](Thread-5) : lastStateDate: 2021-03-02 06:59:00.341592
[2021-03-02 08:01:10][DEBUG][root](Thread-5) : thresholdDate: 2021-03-02 07:00:00.341592
[2021-03-02 08:01:10][DEBUG][root](Thread-5) : datetime.utcnow(): 2021-03-02 07:01:10.567407
[2021-03-02 08:01:10][DEBUG][root](Thread-5) : is datetime.utcnow() > thresholdDate ? True
[2021-03-02 08:01:10][DEBUG][root](Thread-5) : 466 is up to date
[2021-03-02 08:01:10][DEBUG][root](Thread-3) : Get phone information 420
[2021-03-02 08:01:11][DEBUG][root](Thread-2) : Get phone information 418
[2021-03-02 08:01:11][DEBUG][root](Thread-3) : 420 is present
[2021-03-02 08:01:11][DEBUG][root](Thread-3) : 420 is up to date
[2021-03-02 08:01:11][DEBUG][root](Thread-2) : 418 is present
[2021-03-02 08:01:11][DEBUG][root](Thread-2) : 418 is up to date
[2021-03-02 08:01:20][DEBUG][root](Thread-5) : Get phone information 466
[2021-03-02 08:01:25][DEBUG][root](Thread-5) : 466 is absent
[2021-03-02 08:01:25][DEBUG][root](Thread-5) : lastStateDate: 2021-03-02 06:59:00.341592
[2021-03-02 08:01:25][DEBUG][root](Thread-5) : thresholdDate: 2021-03-02 07:00:00.341592
[2021-03-02 08:01:25][DEBUG][root](Thread-5) : datetime.utcnow(): 2021-03-02 07:01:25.741824
[2021-03-02 08:01:25][DEBUG][root](Thread-5) : is datetime.utcnow() > thresholdDate ? True
[2021-03-02 08:01:25][DEBUG][root](Thread-5) : 466 is up to date
[2021-03-02 08:01:33][DEBUG][root](Thread-4) : Get phone information 414
[2021-03-02 08:01:35][DEBUG][root](Thread-5) : Get phone information 466
[2021-03-02 08:01:38][DEBUG][root](Thread-4) : 414 is absent
[2021-03-02 08:01:38][DEBUG][root](Thread-4) : lastStateDate: 2021-03-02 07:01:03.018102
[2021-03-02 08:01:38][DEBUG][root](Thread-4) : thresholdDate: 2021-03-02 07:02:03.018102
[2021-03-02 08:01:38][DEBUG][root](Thread-4) : datetime.utcnow(): 2021-03-02 07:01:38.198024
[2021-03-02 08:01:38][DEBUG][root](Thread-4) : is datetime.utcnow() > thresholdDate ? False
[2021-03-02 08:01:38][DEBUG][root](Thread-4) : 414 is up to date
[2021-03-02 08:01:41][DEBUG][root](Thread-3) : Get phone information 420
[2021-03-02 08:01:41][DEBUG][root](Thread-2) : Get phone information 418
[2021-03-02 08:01:43][DEBUG][root](Thread-5) : 466 is absent
[2021-03-02 08:01:43][DEBUG][root](Thread-5) : lastStateDate: 2021-03-02 06:59:00.341592
[2021-03-02 08:01:43][DEBUG][root](Thread-5) : thresholdDate: 2021-03-02 07:00:00.341592
[2021-03-02 08:01:43][DEBUG][root](Thread-5) : datetime.utcnow(): 2021-03-02 07:01:43.336135
[2021-03-02 08:01:43][DEBUG][root](Thread-5) : is datetime.utcnow() > thresholdDate ? True
[2021-03-02 08:01:43][DEBUG][root](Thread-5) : 466 is up to date
[2021-03-02 08:01:44][DEBUG][root](Thread-3) : 420 is present
[2021-03-02 08:01:44][DEBUG][root](Thread-3) : 420 is up to date
[2021-03-02 08:01:46][DEBUG][root](Thread-2) : 418 is present
[2021-03-02 08:01:46][DEBUG][root](Thread-2) : 418 is up to date
[2021-03-02 08:01:53][DEBUG][root](Thread-5) : Get phone information 466
[2021-03-02 08:01:58][DEBUG][root](Thread-5) : 466 is absent
[2021-03-02 08:01:58][DEBUG][root](Thread-5) : lastStateDate: 2021-03-02 06:59:00.341592
[2021-03-02 08:01:58][DEBUG][root](Thread-5) : thresholdDate: 2021-03-02 07:00:00.341592
[2021-03-02 08:01:58][DEBUG][root](Thread-5) : datetime.utcnow(): 2021-03-02 07:01:58.499137
[2021-03-02 08:01:58][DEBUG][root](Thread-5) : is datetime.utcnow() > thresholdDate ? True
[2021-03-02 08:01:58][DEBUG][root](Thread-5) : 466 is up to date
[2021-03-02 08:02:08][DEBUG][root](Thread-4) : Get phone information 414
[2021-03-02 08:02:08][DEBUG][root](Thread-5) : Get phone information 466
[2021-03-02 08:02:13][DEBUG][root](Thread-4) : 414 is absent
[2021-03-02 08:02:13][DEBUG][root](Thread-4) : lastStateDate: 2021-03-02 07:01:03.018102
[2021-03-02 08:02:13][DEBUG][root](Thread-4) : thresholdDate: 2021-03-02 07:02:03.018102
[2021-03-02 08:02:13][DEBUG][root](Thread-4) : datetime.utcnow(): 2021-03-02 07:02:13.404236
[2021-03-02 08:02:13][DEBUG][root](Thread-4) : is datetime.utcnow() > thresholdDate ? True
[2021-03-02 08:02:13][INFO][root](Thread-4) : Set "Bluetooth - Frédéric - Huawei P20" phone absent
[2021-03-02 08:02:13][DEBUG][root](Thread-4) : 414 must be update
[2021-03-02 08:02:13][DEBUG][root](Thread-4) : Bluetooth - Frédéric - Huawei P20 status has changed to 'absent'! Notify Jeedom.
[2021-03-02 08:02:13][DEBUG][root](Thread-4) : device status: False
[2021-03-02 08:02:13][DEBUG][root](Thread-4) : Send to jeedom : {'action': 'update_device_status', 'id': 414, 'value': 0}
[2021-03-02 08:02:13][DEBUG] : id: 414
[2021-03-02 08:02:13][DEBUG] : value: 0
[2021-03-02 08:02:13][DEBUG] : Device Name: [Présence][Bluetooth - Frédéric - Huawei P20]
[2021-03-02 08:02:13][DEBUG] : State property name: [Présence][Bluetooth - Frédéric - Huawei P20][Etat]
[2021-03-02 08:02:13][INFO] : updateGlobalDevice()
[2021-03-02 08:02:13][DEBUG][root](Thread-4) : Status Code : 200
[2021-03-02 08:02:13][DEBUG][root](Thread-4) : Jeedom reply : {'success': True, 'value': 0}
[2021-03-02 08:02:14][DEBUG][root](Thread-3) : Get phone information 420
[2021-03-02 08:02:16][DEBUG][root](Thread-2) : Get phone information 418
[2021-03-02 08:02:18][DEBUG][root](Thread-5) : 466 is absent
[2021-03-02 08:02:18][DEBUG][root](Thread-5) : lastStateDate: 2021-03-02 06:59:00.341592
[2021-03-02 08:02:18][DEBUG][root](Thread-5) : thresholdDate: 2021-03-02 07:00:00.341592
[2021-03-02 08:02:18][DEBUG][root](Thread-5) : datetime.utcnow(): 2021-03-02 07:02:18.542519
[2021-03-02 08:02:18][DEBUG][root](Thread-5) : is datetime.utcnow() > thresholdDate ? True
[2021-03-02 08:02:18][DEBUG][root](Thread-5) : 466 is up to date
[2021-03-02 08:02:19][DEBUG][root](Thread-3) : 420 is present
[2021-03-02 08:02:19][DEBUG][root](Thread-3) : 420 is up to date
[2021-03-02 08:02:23][DEBUG][root](Thread-4) : Get phone information 414
[2021-03-02 08:02:24][DEBUG][root](Thread-2) : 418 is absent
[2021-03-02 08:02:24][DEBUG][root](Thread-2) : lastStateDate: 2021-03-02 07:01:46.725572
[2021-03-02 08:02:24][DEBUG][root](Thread-2) : thresholdDate: 2021-03-02 07:02:46.725572
[2021-03-02 08:02:24][DEBUG][root](Thread-2) : datetime.utcnow(): 2021-03-02 07:02:24.360989
[2021-03-02 08:02:24][DEBUG][root](Thread-2) : is datetime.utcnow() > thresholdDate ? False
[2021-03-02 08:02:24][DEBUG][root](Thread-2) : 418 is up to date
[2021-03-02 08:02:26][DEBUG][root](Thread-4) : 414 is present
[2021-03-02 08:02:26][INFO][root](Thread-4) : Set Bluetooth - Frédéric - Huawei P20's phone present
[2021-03-02 08:02:26][DEBUG][root](Thread-4) : 414 must be update
[2021-03-02 08:02:26][DEBUG][root](Thread-4) : Bluetooth - Frédéric - Huawei P20 status has changed to 'present'! Notify Jeedom.
[2021-03-02 08:02:26][DEBUG][root](Thread-4) : device status: True
[2021-03-02 08:02:26][DEBUG][root](Thread-4) : Send to jeedom : {'action': 'update_device_status', 'id': 414, 'value': 1}
[2021-03-02 08:02:26][DEBUG] : id: 414
[2021-03-02 08:02:26][DEBUG] : value: 1
[2021-03-02 08:02:26][DEBUG] : Device Name: [Présence][Bluetooth - Frédéric - Huawei P20]
[2021-03-02 08:02:26][DEBUG] : State property name: [Présence][Bluetooth - Frédéric - Huawei P20][Etat]
[2021-03-02 08:02:26][INFO] : updateGlobalDevice()
[2021-03-02 08:02:26][DEBUG][root](Thread-4) : Status Code : 200
[2021-03-02 08:02:26][DEBUG][root](Thread-4) : Jeedom reply : {'success': True, 'value': 1}
[2021-03-02 08:02:28][DEBUG][root](Thread-5) : Get phone information 466
[2021-03-02 08:02:33][DEBUG][root](Thread-5) : 466 is absent
[2021-03-02 08:02:33][DEBUG][root](Thread-5) : lastStateDate: 2021-03-02 06:59:00.341592
[2021-03-02 08:02:33][DEBUG][root](Thread-5) : thresholdDate: 2021-03-02 07:00:00.341592
[2021-03-02 08:02:33][DEBUG][root](Thread-5) : datetime.utcnow(): 2021-03-02 07:02:33.705972
[2021-03-02 08:02:33][DEBUG][root](Thread-5) : is datetime.utcnow() > thresholdDate ? True
[2021-03-02 08:02:33][DEBUG][root](Thread-5) : 466 is up to date
Édit : mise à jour en debug
Bonjour,
Je ne vois pas de log indiquant qu une erreur c’est produite lors de l’exécution de la commande hcitool. Pour ces erreurs, le niveau de log est « info » donc pas la peine d etre en debug.
Suggestion du jour:
La fréquence de polling est de 10s et 30s par défaut. Essayez d augmenter ces valeurs dans la page configuration du plugin, avec par exemple 60s et 60s. Si ça fonctionne, essayez de réduire avec par exemple 30s/30s
Redémarrez le demon après chaque changement.
Benoit
Bonjour,
Je ne vois pas de log indiquant qu une erreur c’est produite lors de l’exécution de la commande hcitool. Pour ces erreurs, le niveau de log est « info » donc pas la peine d etre en debug.
Suggestion du jour:
La fréquence de polling est de 10s et 30s par défaut. Essayez d augmenter ces valeurs dans la page configuration du plugin, avec par exemple 60s et 60s. Si ça fonctionne, essayez de réduire avec par exemple 30s/30s
Redémarrez le demon après chaque changement.
Benoit
OK je viens de faire les modifications. Je verrai ce soir ce que cela donne lorsque je rentrerai.
En tout cas, merci pour ton aide !
Voici ce que cela donne avec des valeurs à 60 et 60
21-03-02 19:22:40][INFO] : updateGlobalDevice()
[2021-03-02 19:23:47][INFO][root](Thread-2) : Set "Bluetooth - Alexandra - Xiaomi A1" phone absent
[2021-03-02 19:23:47][INFO] : updateGlobalDevice()
[2021-03-02 19:26:00][INFO][root](Thread-2) : Set Bluetooth - Alexandra - Xiaomi A1's phone present
[2021-03-02 19:26:00][INFO] : updateGlobalDevice()
[2021-03-02 19:27:05][INFO][root](Thread-2) : Set "Bluetooth - Alexandra - Xiaomi A1" phone absent
[2021-03-02 19:27:05][INFO] : updateGlobalDevice()
[2021-03-02 19:28:07][INFO][root](Thread-2) : Set Bluetooth - Alexandra - Xiaomi A1's phone present
[2021-03-02 19:28:07][INFO] : updateGlobalDevice()
[2021-03-02 19:29:03][INFO][root](Thread-4) : Set Bluetooth - Frédéric - Huawei P20's phone present
[2021-03-02 19:29:03][INFO] : updateGlobalDevice()
[2021-03-02 19:31:09][INFO][root](Thread-4) : Set "Bluetooth - Frédéric - Huawei P20" phone absent
[2021-03-02 19:31:09][INFO] : updateGlobalDevice()
[2021-03-02 19:32:19][INFO][root](Thread-2) : Set "Bluetooth - Alexandra - Xiaomi A1" phone absent
[2021-03-02 19:32:19][INFO] : updateGlobalDevice()
[2021-03-02 19:33:17][INFO][root](Thread-4) : Set Bluetooth - Frédéric - Huawei P20's phone present
[2021-03-02 19:33:17][INFO] : updateGlobalDevice()
[2021-03-02 19:33:22][INFO][root](Thread-2) : Set Bluetooth - Alexandra - Xiaomi A1's phone present
[2021-03-02 19:33:22][INFO] : updateGlobalDevice()
[2021-03-02 19:40:31][INFO][root](Thread-4) : Set "Bluetooth - Frédéric - Huawei P20" phone absent
[2021-03-02 19:40:31][INFO] : updateGlobalDevice()
[2021-03-02 19:42:38][INFO][root](Thread-4) : Set Bluetooth - Frédéric - Huawei P20's phone present
[2021-03-02 19:42:38][INFO] : updateGlobalDevice()
[2021-03-02 19:42:43][INFO][root](Thread-2) : Set "Bluetooth - Alexandra - Xiaomi A1" phone absent
[2021-03-02 19:42:43][INFO] : updateGlobalDevice()
[2021-03-02 19:43:47][INFO][root](Thread-2) : Set Bluetooth - Alexandra - Xiaomi A1's phone present
[2021-03-02 19:43:47][INFO] : updateGlobalDevice()
[2021-03-02 19:48:08][INFO][root](Thread-4) : Set "Bluetooth - Frédéric - Huawei P20" phone absent
[2021-03-02 19:48:08][INFO] : updateGlobalDevice()
[2021-03-02 19:50:16][INFO][root](Thread-4) : Set Bluetooth - Frédéric - Huawei P20's phone present
[2021-03-02 19:50:16][INFO] : updateGlobalDevice()
[2021-03-02 19:51:23][INFO][root](Thread-4) : Set "Bluetooth - Frédéric - Huawei P20" phone absent
[2021-03-02 19:51:24][INFO] : updateGlobalDevice()
[2021-03-02 19:51:29][INFO][root](Thread-2) : Set "Bluetooth - Alexandra - Xiaomi A1" phone absent
[2021-03-02 19:51:29][INFO] : updateGlobalDevice()
[2021-03-02 19:52:30][INFO][root](Thread-2) : Set Bluetooth - Alexandra - Xiaomi A1's phone present
[2021-03-02 19:52:30][INFO] : updateGlobalDevice()
[2021-03-02 19:53:33][INFO][root](Thread-4) : Set Bluetooth - Frédéric - Huawei P20's phone present
[2021-03-02 19:53:33][INFO] : updateGlobalDevice()
[2021-03-02 19:53:38][INFO][root](Thread-2) : Set "Bluetooth - Alexandra - Xiaomi A1" phone absent
[2021-03-02 19:53:38][INFO] : updateGlobalDevice()
[2021-03-02 19:54:39][INFO][root](Thread-2) : Set Bluetooth - Alexandra - Xiaomi A1's phone present
[2021-03-02 19:54:39][INFO] : updateGlobalDevice()
[2021-03-02 19:56:50][INFO][root](Thread-4) : Set "Bluetooth - Frédéric - Huawei P20" phone absent
[2021-03-02 19:56:50][INFO] : updateGlobalDevice()
[2021-03-02 19:56:55][INFO][root](Thread-2) : Set "Bluetooth - Alexandra - Xiaomi A1" phone absent
[2021-03-02 19:56:55][INFO] : updateGlobalDevice()
[2021-03-02 19:57:57][INFO][root](Thread-2) : Set Bluetooth - Alexandra - Xiaomi A1's phone present
[2021-03-02 19:57:57][INFO] : updateGlobalDevice()
[2021-03-02 19:59:06][INFO][root](Thread-2) : Set "Bluetooth - Alexandra - Xiaomi A1" phone absent
[2021-03-02 19:59:06][INFO] : updateGlobalDevice()
[2021-03-02 20:00:05][INFO][root](Thread-4) : Set Bluetooth - Frédéric - Huawei P20's phone present
[2021-03-02 20:00:05][INFO] : updateGlobalDevice()
[2021-03-02 20:00:09][INFO][root](Thread-2) : Set Bluetooth - Alexandra - Xiaomi A1's phone present
[2021-03-02 20:00:09][INFO] : updateGlobalDevice()
[2021-03-02 20:03:22][INFO][root](Thread-2) : Set "Bluetooth - Alexandra - Xiaomi A1" phone absent
[2021-03-02 20:03:22][INFO] : updateGlobalDevice()
[2021-03-02 20:04:29][INFO][root](Thread-2) : Set Bluetooth - Alexandra - Xiaomi A1's phone present
[2021-03-02 20:04:29][INFO] : updateGlobalDevice()
[2021-03-02 20:08:48][INFO][root](Thread-4) : Set "Bluetooth - Frédéric - Huawei P20" phone absent
[2021-03-02 20:08:48][INFO] : updateGlobalDevice()
[2021-03-02 20:09:50][INFO][root](Thread-4) : Set Bluetooth - Frédéric - Huawei P20's phone present
[2021-03-02 20:09:50][INFO] : updateGlobalDevice()
[2021-03-02 20:13:08][INFO][root](Thread-4) : Set "Bluetooth - Frédéric - Huawei P20" phone absent
[2021-03-02 20:13:08][INFO] : updateGlobalDevice()
Même s’il y a des déconnexions, au moins maintenant il y a des reconnections avec le Bluetooth du nuc.
À noter qu’avec ma clé bluetooth sena UD100 le problème perdure.
C’est quand même pas très stable. De mon point de vue, difficile de construire sur un tel comportement, tu vas avoir plein de faux positifs et des changements d etat permanent
Oui on est d’accord en l’état ce n’est pas exploitable. Mais je vois une évolution positive et je reste optimiste
Heureusement, pas de soucis du côté du WiFi.
Exact , je gère aussi la présence grâce au wifi mais l’alliance des 2 protocoles était parfaite et ultra fiable
Ça me soule que ça ne fonctionne plus avec le NUC
Par hasard, ton nuc tourne t’il en 64 bit ?
J’essaierai bien de repasser sur un image 32bit pour tester.