Bonjour,
Je constate depuis bien 5 jours que le plugin-phone_detection indique que mes téléphones sont présents alors qu’ils ne le sont pas.
Je viens de mettre les logs en debug et j’ai uniquement des lignes identiques (il n’y a que la date qui change) :
[2024-05-30 08:23:51][DEBUG] : This is a heartbeat from antenna local version=2.2.5 alive=0
Je m’interroge sur le alive=0
qui voudrait dire qu’il y a un problème mais pas de message d’erreur.
Les dépendances et le démons ont l’air fonctionnels.
Pour moi le dongle est bien branché et up
$ lsusb | grep "Cambridge"
Bus 002 Device 004: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
$ hciconfig -a hci0
hci0: Type: Primary Bus: USB
BD Address: 00:11:22:33:44:55 ACL MTU: 310:10 SCO MTU: 64:8
UP RUNNING
RX bytes:54542440 acl:0 sco:0 events:601584 errors:0
TX bytes:2621319 acl:0 sco:0 commands:201484 errors:0
Features: 0xff 0xff 0x8f 0xfe 0xdb 0xff 0x5b 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF PARK
Link mode: SLAVE ACCEPT
Name: 'dom'
Class: 0x000000
Service Classes: Unspecified
Device Class: Miscellaneous,
HCI Version: 4.0 (0x6) Revision: 0x22bb
LMP Version: 4.0 (0x6) Subversion: 0x22bb
Manufacturer: Cambridge Silicon Radio (10)
Je viens de relancer à l’instant le démon et la c’est bien reparti.
En attendant une éventuelle correction, y aurait-il une commande permettant de détecter ce dysfonctionnement afin que je puisse mettre en place un scénario pour relancer manuellement le plugin ?**
Merci
Log après relance du démon
[2024-05-30 08:34:13][INFO] : Launching remotes ...
[2024-05-30 08:34:14][INFO] : Lancement démon phone_detection : sudo /usr/bin/python3 /var/www/html/plugins/phone_detection/core/class/../../resources/phone_detectiond/phone_detectiond.py --device hci0 --loglevel debug --apikey ******************** --pidfile /tmp/jeedom/phone_detection/phone_detectiond.pid --socket /tmp/jeedom/phone_detection/daemon.sock --callback http://127.0.0.1:80/plugins/phone_detection/core/php/phone_detection.php --daemonname "local" --interval 15 --present_interval 60 --absentThreshold 240
[2024-05-30 08:34:14][INFO][root](MainThread) : =========
[2024-05-30 08:34:14][INFO][root](MainThread) : Start phone_detectiond
[2024-05-30 08:34:14][INFO][root](MainThread) : Version: 2.2.5
[2024-05-30 08:34:14][INFO][root](MainThread) : Log level : debug
[2024-05-30 08:34:14][INFO][root](MainThread) : Socket : /tmp/jeedom/phone_detection/daemon.sock
[2024-05-30 08:34:14][INFO][root](MainThread) : SocketHost :
[2024-05-30 08:34:14][INFO][root](MainThread) : SocketPort : 0
[2024-05-30 08:34:14][INFO][root](MainThread) : PID file : /tmp/jeedom/phone_detection/phone_detectiond.pid
[2024-05-30 08:34:14][INFO][root](MainThread) : Device : hci0
[2024-05-30 08:34:14][INFO][root](MainThread) : Callback : http://127.0.0.1:80/plugins/phone_detection/core/php/phone_detection.php
[2024-05-30 08:34:14][INFO][root](MainThread) : Daemon Name : local
[2024-05-30 08:34:14][INFO][root](MainThread) : Polling Interval when device is Absent : 15
[2024-05-30 08:34:14][INFO][root](MainThread) : Polling Interval when device is Present : 60
[2024-05-30 08:34:14][INFO][root](MainThread) : Threshold to consider device Absent: 240
[2024-05-30 08:34:14][INFO][root](MainThread) : Python version : 3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110]
[2024-05-30 08:34:14][INFO][root](MainThread) : Using bluetooth controller hci0 (id=0)
[2024-05-30 08:34:14][INFO][root](MainThread) : HCI interface hci0 is already UP
[2024-05-30 08:34:14][INFO][root](MainThread) : PageTimeout set to 1.5625s for controller hci0.
[2024-05-30 08:34:14][DEBUG][root](MainThread) : Writing PID 1737494 to /tmp/jeedom/phone_detection/phone_detectiond.pid
[2024-05-30 08:34:14][INFO][root](MainThread) : Create phone_detection daemon
[2024-05-30 08:34:14][DEBUG][root](MainThread) : Send to test connection to jeedom
[2024-05-30 08:34:14][DEBUG][root](MainThread) : Send to jeedom : {'action': 'test', 'source': 'local'}
[2024-05-30 08:34:14][INFO] : Receive a test from antenna local
[2024-05-30 08:34:14][DEBUG][root](MainThread) : Status Code : 200
[2024-05-30 08:34:14][DEBUG][root](MainThread) : Jeedom reply : {'success': True, 'value': 0}
[2024-05-30 08:34:14][INFO][root](MainThread) : Use Unix socket for Jeedom -> daemon communication
[2024-05-30 08:34:14][INFO][root](MainThread) : Get devices from Jeedom
[2024-05-30 08:34:14][DEBUG][root](MainThread) : Send to jeedom : {'action': 'get_devices', 'source': 'local'}
[2024-05-30 08:34:14][INFO] : Receive get_devices from antenna local
[2024-05-30 08:34:14][DEBUG] : [Placard Technique][Tel 1 BT]-->1
[2024-05-30 08:34:14][DEBUG] : [Placard Technique][Tél 2 BT]-->1
[2024-05-30 08:34:14][DEBUG] : [Placard Technique][Tél 3 BT]-->0
[2024-05-30 08:34:14][DEBUG] : updateGlobalDevice: state=1/nb1=4/nbDevices=3
[2024-05-30 08:34:14][DEBUG][root](MainThread) : Status Code : 200
[2024-05-30 08:34:14][DEBUG][root](MainThread) : Jeedom reply : {'success': True, 'value': {'354': {'state': 1, 'lastValueDate': '2024-05-24 01:32:02', 'name': 'Tel 1 BT', 'humanName': '[Placard Technique][Tel 1 BT]', 'id': '354', 'macAddress': '00:11:22:33:44:01'}, '356': {'state': 1, 'lastValueDate': '2024-05-24 06:14:55', 'name': 'Tél 2 BT', 'humanName': '[Placard Technique][Tél 2 BT]', 'id': '356', 'macAddress': '00:11:22:33:44:02'}, '555': {'state': 0, 'lastValueDate': '2023-09-28 17:14:16', 'name': 'Tél 3 BT', 'humanName': '[Placard Technique][Tél 3 BT]', 'id': '555', 'macAddress': '00:11:22:33:44:03'}}}
[2024-05-30 08:34:14][DEBUG][root](MainThread) : Send to jeedom : {'action': 'refresh_group', 'source': 'local'}
[2024-05-30 08:34:14][INFO] : Receive refresh_group from antenna local
[2024-05-30 08:34:14][DEBUG] : [Placard Technique][Tel 1 BT]-->1
[2024-05-30 08:34:14][DEBUG] : [Placard Technique][Tél 2 BT]-->1
[2024-05-30 08:34:14][DEBUG] : [Placard Technique][Tél 3 BT]-->0
[2024-05-30 08:34:14][DEBUG] : updateGlobalDevice: state=1/nb1=4/nbDevices=3
[2024-05-30 08:34:14][DEBUG][root](MainThread) : Status Code : 200
[2024-05-30 08:34:14][DEBUG][root](MainThread) : Jeedom reply : {'success': True, 'value': 0}
Merci
Informations Jeedom
Core : 4.4.6 (V4-stable)
DNS Jeedom : non
Plugin : Détection de téléphone (Bluetooth)
Version : 2024-03-04 01:21:43 (stable)
Statut Démon : Démarré - (2024-05-14 13:37:11)