Problème d'affichage

Bonjour,

Merci beaucoup pour ce plugin, l’idée est vraiment intéressante.
Je l’ai installé et tout semble bien fonctionner, le statut change dans les logs quand j’active ou je désactive le téléphone.

[2020-02-13 09:59:41][DEBUG] : cmdId:refresh
[2020-02-13 09:59:42][DEBUG] : eqLogic Id:30
[2020-02-13 09:59:42][DEBUG] : mac address: F0:0F:EC:FC:XX:XX
[2020-02-13 09:59:42][INFO] : BT Device: hci0
[2020-02-13 09:59:42][DEBUG] : device name: HUAWEI P20 lite 
[2020-02-13 09:59:42][DEBUG] : device state: 1
[2020-02-13 09:59:42][INFO] : updateGlobalDevice()
[2020-02-13 10:05:50][DEBUG] : cmdId:refresh
[2020-02-13 10:05:50][DEBUG] : eqLogic Id:30
[2020-02-13 10:05:50][DEBUG] : mac address: F0:0F:EC:FC:XX:XX
[2020-02-13 10:05:50][INFO] : BT Device: hci0
[2020-02-13 10:05:55][DEBUG] : device name: 
[2020-02-13 10:05:55][DEBUG] : device state: 0
[2020-02-13 10:05:55][INFO] : updateGlobalDevice()
(adresse MAC volontairement modifiée)

C’est au niveau de l’affichage que j’ai des soucis, en effet, l’état ne change jamais, j’ai toujours la croix, quel que soit le statut.
J’ai essayé de mettre une petite pop-up sur la valeur à 1 pour tester et elle n’apparaît jamais.

Ma config: RPI , jeedom V3.3.39,

Bonjour
Pourriez vous passer le log en ‹ debug › ?
Car cela vous permettrait d’en voir un peu plus et notamment sur le réglages de vos filtres.

Mois j’utilise ceci:

image

bonne journée

Au niveau des filtres, j’ai 600 pour l’intervalle de mise à jour quand le téléphone est absent, 300 quand il est présent et 180 pour considérer un téléphone comme absent.

Mes logs sont en debug en voici un extrait:

[2020-02-13 20:56:30][DEBUG] : cmdId:refresh
[2020-02-13 20:56:30][DEBUG] : eqLogic Id:32
[2020-02-13 20:56:30][DEBUG] : mac address: 1C:15:1F:52:XX:XX
[2020-02-13 20:56:30][INFO] : BT Device: hci0
[2020-02-13 20:56:31][DEBUG] : device name: HUAWEI P8 lite 2017 
[2020-02-13 20:56:31][DEBUG] : device state: 1
[2020-02-13 20:56:31][INFO] : updateGlobalDevice()
[2020-02-15 15:13:56][INFO] : Lancement démon phone_detection : /usr/bin/python3 /var/www/html/plugins/phone_detection/core/class/../../resources/phone_detectiond/phone_detectiond.py  --device hci0 --loglevel debug --apikey VjxC84qKPtlnQOj2Ebu0fXmlFmIHaEB3 --pidfile /tmp/jeedom/phone_detection/daemon.pid --socket /tmp/jeedom/phone_detection/daemon.sock --callback http://127.0.0.1:80/plugins/phone_detection/core/php/phone_detection.php --interval 600 --present_interval 300 --absentThreshold 180
[2020-02-15 15:13:57][INFO][root](MainThread) : Start phone_detectiond
[2020-02-15 15:13:57][INFO][root](MainThread) : Log level : debug
[2020-02-15 15:13:57][INFO][root](MainThread) : Socket : /tmp/jeedom/phone_detection/daemon.sock
[2020-02-15 15:13:57][INFO][root](MainThread) : PID file : /tmp/jeedom/phone_detection/daemon.pid
[2020-02-15 15:13:57][INFO][root](MainThread) : Device : hci0
[2020-02-15 15:13:57][INFO][root](MainThread) : Callback : http://127.0.0.1:80/plugins/phone_detection/core/php/phone_detection.php
[2020-02-15 15:13:57][INFO][root](MainThread) : Interval : 600
[2020-02-15 15:13:57][INFO][root](MainThread) : Present Interval : 300
[2020-02-15 15:13:57][INFO][root](MainThread) : AbsentThreshold: 180
[2020-02-15 15:13:57][INFO][root](MainThread) : Python version : 3.4.2 (default, Sep 16 2019, 19:58:00) 
[GCC 4.9.2]
[2020-02-15 15:13:57][DEBUG][root](MainThread) : Writing PID 2167 to /tmp/jeedom/phone_detection/daemon.pid
[2020-02-15 15:13:57][INFO][root](MainThread) : Create phone_detection daemon
[2020-02-15 15:13:57][DEBUG][root](MainThread) : Send to test to jeedom
[2020-02-15 15:13:57][DEBUG][root](MainThread) : Send to jeedom :  {'action': 'test'}
[2020-02-15 15:13:57][DEBUG][root](MainThread) : Status Code :  200
[2020-02-15 15:13:57][DEBUG][root](MainThread) : Jeedom reply :  {'success': True, 'value': 0}
[2020-02-15 15:13:57][INFO][root](MainThread) : Get devices from Jeedom
[2020-02-15 15:13:57][DEBUG][root](MainThread) : Send to jeedom :  {'action': 'get_devices'}
[2020-02-15 15:13:57][DEBUG][root](MainThread) : Status Code :  200
[2020-02-15 15:13:57][DEBUG][root](MainThread) : Jeedom reply :  {'success': True, 'value': {'33': {'id': '33', 'humanName': '[Quotidien][Huawei 1]', 'name': 'Huawei 1', 'macAddress': 'A0:57:E3:C4:XX:XX', 'lastValueDate': '', 'state': False}, '30': {'id': '30', 'humanName': '[Quotidien][Huawei 2]', 'name': 'Huawei 2', 'macAddress': 'F0:0F:EC:FC:XX:XX', 'lastValueDate': '', 'state': False}, '32': {'id': '32', 'humanName': '[Quotidien][Téléphone 3]', 'name': 'Téléphone 3', 'macAddress': '1C:15:1F:52:XX:XX', 'lastValueDate': '', 'state': False}}}
[2020-02-15 15:13:57][DEBUG][root](MainThread) : Send to jeedom :  {'action': 'refresh_group'}
[2020-02-15 15:13:57][INFO] : updateGlobalDevice()
[2020-02-15 15:13:57][INFO] : Démon phone_detection lancé
[2020-02-15 15:13:57][DEBUG][root](MainThread) : Status Code :  200
[2020-02-15 15:13:57][DEBUG][root](MainThread) : Jeedom reply :  {'success': True, 'value': 0}
[2020-02-15 15:13:57][INFO][root](MainThread) : Start thread detection for Huawei 1 [A0:57:E3:C4:XX:XX]
[2020-02-15 15:13:57][DEBUG][root](MainThread) : Send to jeedom :  {'id': 33, 'action': 'get_status'}
[2020-02-15 15:13:57][DEBUG] : id: 33
[2020-02-15 15:13:57][DEBUG][root](MainThread) : Status Code :  200
[2020-02-15 15:13:57][DEBUG][root](MainThread) : Jeedom reply :  {'success': True, 'value': ''}
[2020-02-15 15:13:57][DEBUG][root](MainThread) : Jeedom 33 device status: False
[2020-02-15 15:13:57][DEBUG][root](Thread-2) : Get phone information 33
[2020-02-15 15:13:57][INFO][root](MainThread) : Start thread detection for Huawei 2 [F0:0F:EC:FC:XX:XX]
[2020-02-15 15:13:57][DEBUG][root](MainThread) : Send to jeedom :  {'id': 30, 'action': 'get_status'}
[2020-02-15 15:13:57][DEBUG] : id: 30
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.4/threading.py", line 868, in run
    self._target(*self._args, **self._kwargs)
  File "/var/www/html/plugins/phone_detection/core/class/../../resources/phone_detectiond/phone_detectiond.py", line 137, in __run
    self.GetPhoneInformation()
  File "/var/www/html/plugins/phone_detection/core/class/../../resources/phone_detectiond/phone_detectiond.py", line 124, in GetPhoneInformation
    result = subprocess.run(['sudo', 'hcitool', '-i', self.btController, 'name', self.device.macAddress], stdout = subprocess.PIPE)
AttributeError: 'module' object has no attribute 'run'

[2020-02-15 15:13:57][DEBUG][root](MainThread) : Status Code :  200
[2020-02-15 15:13:57][DEBUG][root](MainThread) : Jeedom reply :  {'success': True, 'value': ''}
[2020-02-15 15:13:57][DEBUG][root](MainThread) : Jeedom 30 device status: False
[2020-02-15 15:13:57][DEBUG][root](Thread-3) : Get phone information 30
[2020-02-15 15:13:57][INFO][root](MainThread) : Start thread detection for Téléphone 3 [1C:15:1F:52:XX:XX]
[2020-02-15 15:13:57][DEBUG][root](MainThread) : Send to jeedom :  {'id': 32, 'action': 'get_status'}
[2020-02-15 15:13:57][DEBUG] : id: 32
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.4/threading.py", line 868, in run
    self._target(*self._args, **self._kwargs)
  File "/var/www/html/plugins/phone_detection/core/class/../../resources/phone_detectiond/phone_detectiond.py", line 137, in __run
    self.GetPhoneInformation()
  File "/var/www/html/plugins/phone_detection/core/class/../../resources/phone_detectiond/phone_detectiond.py", line 124, in GetPhoneInformation
    result = subprocess.run(['sudo', 'hcitool', '-i', self.btController, 'name', self.device.macAddress], stdout = subprocess.PIPE)
AttributeError: 'module' object has no attribute 'run'

[2020-02-15 15:13:57][DEBUG][root](MainThread) : Status Code :  200
[2020-02-15 15:13:57][DEBUG][root](MainThread) : Jeedom reply :  {'success': True, 'value': ''}
[2020-02-15 15:13:57][DEBUG][root](MainThread) : Jeedom 32 device status: False
[2020-02-15 15:13:57][DEBUG][root](Thread-4) : Get phone information 32