Détection de téléphone

Zut, ça ne fonctionne pas :cry:
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 :clap:
Si un jour c’est solutionné, je reviendrai poster ici :+1:
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

1 « J'aime »

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 ! :slight_smile:

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 :blush:

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 :clap::ok_hand::+1:

Ça me soule que ça ne fonctionne plus avec le NUC :worried::sob::sob:

@Xboss06,

Par hasard, ton nuc tourne t’il en 64 bit ?

J’essaierai bien de repasser sur un image 32bit pour tester.

Oui 64 bits.
Il tourne depuis la dernière image officielle Jeedom (fresh install d’aujourd’hui)
J’avais également testé en installant debian avec l’interface graphique pour voir si j’avais davantage d’options de paramétrage pour le bluetooth mais c’était pareil…:worried:

C’est pas idiot…:+1:

Bonjour @Xboss06 as tu pu résoudre ton problème car je rencontre le même aujourd’hui depuis mon passage à un nouveau NUC.
Merci de ta réponse.
Cdt

Désolé j’étais en déplacement…

Alors NON, je n’ai malheureusement jamais pu régler ce problème et j’ai laissé tomber car je pense avoir essayé toutes les solutions potentielles possibles :frowning:
C’est vraiment dommage car j’adorais ce plugin et c’était très efficace!

Merci de ta réponse, moi j’ai remis en place mon Z83 car le plugin fonctionne très bien avec. Je cherche encore une solution pour l’activation de l’alarme avec mon super nuc en espérant trouver une solution viable. Le plugin Network le permet via le Wifi mais personne à mon domicile est en Wifi car la 5G est présente. Gardons espoir…

1 « J'aime »

Bonjour @fabe et @Xboss06,

j’utilise également phone_detection sur un NUC, mais dans une VM séparée de jeedom. Ensuite, j’utilise la version ‹ beta › du plugin pour créer une antenne distante, et ainsi reporter les événements dans jeedom.
Cela fonctionne parfaitement de mon cote.

Le code « beta » est très stable, je n’ai pas les droits pour publier le plugin en stable sur le market, c’est @Sebastien_Ferrand qui a les droits pour le faire.

J’ai utilise cette méthode car il y a (ou avait) des problèmes d’instabilité du bluetooth sur une VM jeedom. (voir https://www.jeedom-facile.fr/index.php/2018/12/07/machine-virtuelle-blea/ ). Je n’ai même pas tester une autre solution, je me suis directement dirige vers cette solution multi-VMs.

je vous encourage donc :
1/ a essayer de créer une VM supplémentaire sur votre NUC, et mettre le dongle bluetooth dans cette VM, créer une antenne dans le plugin phone_detection version beta.
2/ a utiliser ton z83 comme une antenne distance, et sur ton NUC, d’installer la version beta du plugin, et créer une antenne distance pointant sur ton z83.

S’il y a des améliorations, ce sera sur les drivers des cles USB bluetooth, ou sur l’OS pour offrir plus de stabilité. D’après le fichier que je vous avais fourni, il n’y a pas d’erreur retourne par hcitool quand un ‹ false positive › se produit, c’est a dire quand est mobile est détecté manquant alors qu’il est présent. Il y a donc peut de chose qu’on peut faire dans le plugin.

Benoit

3 « J'aime »

Bonjour,
je pense que le souci de detection arrive quand les X threads se lancent en meme temps.

j’ai modifié un peu le code pour avoir un truc qui fonctionne avec au moins deux telephones et en supprimant l’appel au shell via sudo.

il faut ajouter le package python3-bluez (module bluetooth pour pyton3)

jd_diff.txt (2,5 Ko)
phone_detectiond.py.txt (18,5 Ko)

le debug est un peu verbeux, il y a un global lock qui semble pas partir en dead lock