Problème de détection

Bonjour,

J’ai un soucis avec le plugin depuis quelques semaines.

A des moments aléatoires, le plugin n’arrive plus à « communiquer » avec un téléphone et son état reste bloqué.
Du coup, cela ne lance pas les scénarios associés à ce trigger.

Je vous donne pour exemple, l’état du premier téléphone qui n’a pas été « détecté » depuis hier alors que ce même téléphone est parti de la maison depuis 1 heure seulement (et toujours en présence).

Au début, je pensais à mon antenne PiZero qui serait bloqué, mais en redémarrant uniquement le démon local sur Jeedom, cela débloque la situation.

Ce que j’ai dans les logs lorsque je redémarre le démon local:

Exception in thread Thread-4:
Traceback (most recent call last):
File "/var/www/html/plugins/phone_detection/core/class/../../resources/phone_detectiond/phone_detectiond.py", line 129, in GetPhoneInformation
result.check_returncode()
File "/usr/lib/python3.7/subprocess.py", line 428, in check_returncode
self.stderr)
subprocess.CalledProcessError: Command '['sudo', 'hcitool', '-i', 'hci0', 'name', '34:FE:77:XX:XX:XX']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/var/www/html/plugins/phone_detection/core/class/../../resources/phone_detectiond/phone_detectiond.py", line 153, in __run
self.GetPhoneInformation()
File "/var/www/html/plugins/phone_detection/core/class/../../resources/phone_detectiond/phone_detectiond.py", line 138, in GetPhoneInformation
except CallProcessError as e:
NameError: name 'CallProcessError' is not defined
Exception in thread Thread-3:
Traceback (most recent call last):
File "/var/www/html/plugins/phone_detection/core/class/../../resources/phone_detectiond/phone_detectiond.py", line 129, in GetPhoneInformation
result.check_returncode()
File "/usr/lib/python3.7/subprocess.py", line 428, in check_returncode
self.stderr)
subprocess.CalledProcessError: Command '['sudo', 'hcitool', '-i', 'hci0', 'name', '08:aa:55:XX:XX:XX']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/var/www/html/plugins/phone_detection/core/class/../../resources/phone_detectiond/phone_detectiond.py", line 153, in __run
self.GetPhoneInformation()
File "/var/www/html/plugins/phone_detection/core/class/../../resources/phone_detectiond/phone_detectiond.py", line 138, in GetPhoneInformation
except CallProcessError as e:
NameError: name 'CallProcessError' is not defined
Signal 15 caught, exiting...

Hello,

J’ai le soucis qui revient aujourd’hui.
En regardant les logs en mode Debug, j’ai l’impression que le Demon ne vérifie plus la présence du téléphone « Mag » sur l’antenne Local.

Le téléphone « Mag » est bien présence physiquement.

[2022-06-16 09:00:06]DEBUG : This is a heartbeat from antenna local
[2022-06-16 09:00:25]DEBUG : This is a heartbeat from antenna PiZero
[2022-06-16 09:00:36]DEBUG : This is a heartbeat from antenna local
[2022-06-16 09:00:37]INFO : Update device status from antenna PiZero
[2022-06-16 09:00:37]DEBUG : id: 180, value:1
[2022-06-16 09:00:37]DEBUG : Device Name: [Globales][Mobile_Bluetooth_Mag]
[2022-06-16 09:00:37]INFO : Update value from 1 to 1 for [Globales][Mobile_Bluetooth_Mag][Etat_PiZero]
[2022-06-16 09:00:37]DEBUG : [Globales][Mobile_Bluetooth_Mag]-->1
[2022-06-16 09:00:37]DEBUG : [Globales][Mobile_Bluetooth_Nico]-->1
[2022-06-16 09:00:37]DEBUG : updateGlobalDevice: state=1/nb1=2/nbDevices=2
[2022-06-16 09:00:50]INFO : Update device status from antenna local
[2022-06-16 09:00:50]DEBUG : id: 177, value:1
[2022-06-16 09:00:50]DEBUG : Device Name: [Globales][Mobile_Bluetooth_Nico]
[2022-06-16 09:00:50]INFO : Update value from 1 to 1 for [Globales][Mobile_Bluetooth_Nico][Etat_local]
[2022-06-16 09:00:50]DEBUG : [Globales][Mobile_Bluetooth_Mag]-->1
[2022-06-16 09:00:50]DEBUG : [Globales][Mobile_Bluetooth_Nico]-->1
[2022-06-16 09:00:50]DEBUG : updateGlobalDevice: state=1/nb1=2/nbDevices=2
[2022-06-16 09:00:55]DEBUG : This is a heartbeat from antenna PiZero
[2022-06-16 09:00:57]INFO : Update device status from antenna PiZero
[2022-06-16 09:00:57]DEBUG : id: 177, value:1
[2022-06-16 09:00:57]DEBUG : Device Name: [Globales][Mobile_Bluetooth_Nico]
[2022-06-16 09:00:57]INFO : Update value from 1 to 1 for [Globales][Mobile_Bluetooth_Nico][Etat_PiZero]
[2022-06-16 09:00:57]DEBUG : [Globales][Mobile_Bluetooth_Mag]-->1
[2022-06-16 09:00:57]DEBUG : [Globales][Mobile_Bluetooth_Nico]-->1
[2022-06-16 09:00:57]DEBUG : updateGlobalDevice: state=1/nb1=2/nbDevices=2
[2022-06-16 09:01:06]DEBUG : This is a heartbeat from antenna local

J’ai relancé le Démon ce matin, et de nouveau le téléphone avec l’id: 180 n’est plus pris en compte:

[2022-06-16 18:25:53][INFO] : Update value from 1 to 1 for [Globales][Mobile_Bluetooth_Nico][Etat_local]
[2022-06-16 18:25:53][DEBUG] : [Globales][Mobile_Bluetooth_Mag]-->1
[2022-06-16 18:25:53][DEBUG] : [Globales][Mobile_Bluetooth_Nico]-->1
[2022-06-16 18:25:53][DEBUG] : updateGlobalDevice: state=1/nb1=2/nbDevices=2
[2022-06-16 18:25:53][DEBUG][root](Thread-4) : Status Code :  200
[2022-06-16 18:25:53][DEBUG][root](Thread-4) : Jeedom reply :  {'success': True, 'value': 1}
[2022-06-16 18:26:09][DEBUG] : This is a heartbeat from antenna PiZero
[2022-06-16 18:26:13][DEBUG][root](Thread-4) : Get phone information 177
[2022-06-16 18:26:14][DEBUG][root](Thread-4) : 177 is present
[2022-06-16 18:26:14][DEBUG][root](Thread-4) : 177 is up to date
[2022-06-16 18:26:15][DEBUG][root](Thread-1) : Send to jeedom :  {'action': 'heartbeat', 'source': 'local'}
[2022-06-16 18:26:15][DEBUG] : This is a heartbeat from antenna local
[2022-06-16 18:26:15][DEBUG][root](Thread-1) : Status Code :  200
[2022-06-16 18:26:15][DEBUG][root](Thread-1) : Jeedom reply :  {'success': True, 'value': 0}
[2022-06-16 18:26:34][DEBUG][root](Thread-4) : Get phone information 177
[2022-06-16 18:26:34][DEBUG][root](Thread-4) : 177 is present
[2022-06-16 18:26:34][DEBUG][root](Thread-4) : 177 is up to date
[2022-06-16 18:26:39][DEBUG] : This is a heartbeat from antenna PiZero
[2022-06-16 18:26:45][DEBUG][root](Thread-1) : Send to jeedom :  {'action': 'heartbeat', 'source': 'local'}
[2022-06-16 18:26:45][DEBUG] : This is a heartbeat from antenna local
[2022-06-16 18:26:45][DEBUG][root](Thread-1) : Status Code :  200
[2022-06-16 18:26:45][DEBUG][root](Thread-1) : Jeedom reply :  {'success': True, 'value': 0}
[2022-06-16 18:26:54][DEBUG][root](Thread-4) : Get phone information 177
[2022-06-16 18:26:55][DEBUG][root](Thread-4) : 177 is present
[2022-06-16 18:26:55][DEBUG][root](Thread-4) : 177 is up to date
[2022-06-16 18:27:10][DEBUG] : This is a heartbeat from antenna PiZero
[2022-06-16 18:27:15][DEBUG][root](Thread-4) : Get phone information 177
[2022-06-16 18:27:15][DEBUG][root](Thread-1) : Send to jeedom :  {'action': 'heartbeat', 'source': 'local'}
[2022-06-16 18:27:15][DEBUG] : This is a heartbeat from antenna local
[2022-06-16 18:27:15][DEBUG][root](Thread-1) : Status Code :  200
[2022-06-16 18:27:15][DEBUG][root](Thread-1) : Jeedom reply :  {'success': True, 'value': 0}
[2022-06-16 18:27:15][DEBUG][root](Thread-4) : 177 is present
[2022-06-16 18:27:15][DEBUG][root](Thread-4) : 177 is up to date
[2022-06-16 18:27:16][INFO] : Update device status from antenna PiZero
[2022-06-16 18:27:16][DEBUG] : id: 177, value:1
[2022-06-16 18:27:16][DEBUG] : Device Name: [Globales][Mobile_Bluetooth_Nico]
[2022-06-16 18:27:16][INFO] : Update value from 1 to 1 for [Globales][Mobile_Bluetooth_Nico][Etat_PiZero]
[2022-06-16 18:27:16][DEBUG] : [Globales][Mobile_Bluetooth_Mag]-->1
[2022-06-16 18:27:16][DEBUG] : [Globales][Mobile_Bluetooth_Nico]-->1
[2022-06-16 18:27:16][DEBUG] : updateGlobalDevice: state=1/nb1=2/nbDevices=2
[2022-06-16 18:27:35][DEBUG][root](Thread-4) : Get phone information 177
[2022-06-16 18:27:36][DEBUG][root](Thread-4) : 177 is present
[2022-06-16 18:27:36][DEBUG][root](Thread-4) : 177 is up to date
[2022-06-16 18:27:40][DEBUG] : This is a heartbeat from antenna PiZero
[2022-06-16 18:27:45][DEBUG][root](Thread-1) : Send to jeedom :  {'action': 'heartbeat', 'source': 'local'}
[2022-06-16 18:27:45][DEBUG] : This is a heartbeat from antenna local
[2022-06-16 18:27:45][DEBUG][root](Thread-1) : Status Code :  200
[2022-06-16 18:27:45][DEBUG][root](Thread-1) : Jeedom reply :  {'success': True, 'value': 0}
[2022-06-16 18:27:56][DEBUG][root](Thread-4) : Get phone information 177