Plugin switchbot

Ça ne fonctionne pas super bien de mon côté.
J’ai pour remonter mes 4 switchs mais il ne fonctionne qu’une fois sur deux, et encore…
Jérôme

Oui Idem pour moi. Je continue avec ifttt pour les boutons avec le hub. Par contre en journée j’ai bien les remontées de température de mes 5 thermomètres. Sauf que je suis obligé de redémarrer Jeedom chaque jour pour que la synchro remarche.

1 « J'aime »

Des logs en debug?

J’ai remplacé l’adresse MAC:

[2020-03-19 16:51:52][DEBUG] : launch remote cmd local
[2020-03-19 16:51:54][DEBUG] : Start switchbot : hci config
[2020-03-19 16:51:54][DEBUG] : Connecting to Switchbot…
[2020-03-19 16:51:54][DEBUG] : Sending action : Press
[2020-03-19 16:51:59][DEBUG] : Failed connecting to Switchbot: xx:xx:xx:xx:xx:xx
[2020-03-19 16:51:59][DEBUG] : Error talking to Switchbot.
[2020-03-19 16:52:04][DEBUG] : Cannot connect to Switchbot. Retrying remaining 4
[2020-03-19 16:52:05][DEBUG] : Sending action : Press
[2020-03-19 16:52:05][DEBUG] : Connecting to Switchbot…
[2020-03-19 16:52:05][DEBUG] : Failed connecting to Switchbot: xx:xx:xx:xx:xx:xx
[2020-03-19 16:52:05][DEBUG] : Error talking to Switchbot.
[2020-03-19 16:52:05][DEBUG] : Cannot connect to Switchbot. Retrying remaining 3
[2020-03-19 16:52:06][DEBUG] : Connecting to Switchbot…
[2020-03-19 16:52:06][DEBUG] : Sending action : Press
[2020-03-19 16:52:06][DEBUG] : Error talking to Switchbot.
[2020-03-19 16:52:06][DEBUG] : Failed connecting to Switchbot: xx:xx:xx:xx:xx:xx
[2020-03-19 16:52:06][DEBUG] : Launch hciconfig up.
[2020-03-19 16:52:06][DEBUG] : Cannot connect to Switchbot. Retrying remaining 2
[2020-03-19 16:52:07][DEBUG] : Connecting to Switchbot…
[2020-03-19 16:52:07][DEBUG] : Sending action : Press
[2020-03-19 16:52:07][DEBUG] : Failed connecting to Switchbot: xx:xx:xx:xx:xx:xx
[2020-03-19 16:52:07][DEBUG] : Error talking to Switchbot.
[2020-03-19 16:52:07][DEBUG] : Cannot connect to Switchbot. Retrying remaining 1
[2020-03-19 16:52:08][DEBUG] : Sending action : Press
[2020-03-19 16:52:08][DEBUG] : Connecting to Switchbot…
[2020-03-19 16:52:13][DEBUG] : Failed connecting to Switchbot: xx:xx:xx:xx:xx:xx
[2020-03-19 16:52:13][DEBUG] : Error talking to Switchbot.
[2020-03-19 16:52:18][DEBUG] : Switchbot communication failed. Stopping trying xx:xx:xx:xx:xx:xx
[2020-03-19 16:52:18][DEBUG] : launch cmd local : nok
[2020-03-19 16:52:18][DEBUG] : ########## Commande KO : Press ###################

1 « J'aime »

Quelle antenne ?
Ton bot est loin de l’antenne/clé bluetooth? SI tu l’approches?

L’antenne interne au RPI.
Pour mes tests, ils sont à 10 cm du RPI.

La portée est limitée mais pas à ce point là…

J’ai quand même essayé chez moi et ça fonctionne.

Plugin Blea? Si oui en désactivant ça corrige?

Si non , lance une lance une action en attendant la réponse et relance un scan?

1 « J'aime »

Bonjour,
J’ai essayé les deux actions, mais ça ne fonctionne pas mieux…
Jérôme

Ca ne focntionne toujours pas mieux …

@ZygOm4t1k

Hello, j’ai ça dans les logs tous les jours à minuit :thinking:

[2020-03-25 00:00:10][ERROR] : Start switchbot : hci config
[2020-03-25 00:00:10][ERROR] : Sending action : Getinfos
[2020-03-25 00:00:10][ERROR] : Connecting to Switchbot...
[2020-03-25 00:00:12][ERROR] : Connected to Switchbot.
[2020-03-25 00:00:13][ERROR] : Disconnecting
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/var/www/html/plugins/switchbot/core/class/../../resources/switchbot//switchbot_py3.py", line 191, in _sendcommand
self._launchcmd(act)
File "/var/www/html/plugins/switchbot/core/class/../../resources/switchbot//switchbot_py3.py", line 174, in _launchcmd
item['batt'] = notify[1]
IndexError: index out of rang

Bonjour,
Je pense avoir solutionné mon problème.
J’ai désactivé le plugin BLEA et Switchbot, puis réactivé Switchbot et relancé complètement le scan.
Pour la première, le plugin m’a remonté automatiquement des appareils.
Et depuis mes quatre appareils fonctionnent parfaitement bien, même après réactivation du BLEA.
Jérôme

@ Theking31

Je vais regarder

@ JTex92

Oui le scan peut poser soucis avec Blea et le mieux est de désactiver le démon blea le temps du scan des switchbots.Comme indiqué dans la doc) . Après tu redémarres le démon Blea et les plugins cohabitent

Malheureusement, même en suivant ces étapes, je pense qu’après réactivation, le plugin BLEA vient perturber le communication bluetooth avec les Switchbot.
Je ne sais pas s’il est possible de faire quelque chose pour pour solutionner ce problème.
Jérôme

Les commandes ne se lancent pas? des erreurs dans les logs du plugin, http.error?
Tu as des logs en debug ou les mêmes que ceux ci

[2020-03-19 16:51:52][DEBUG] : launch remote cmd local
[2020-03-19 16:51:54][DEBUG] : Start switchbot : hci config
[2020-03-19 16:51:54][DEBUG] : Connecting to Switchbot…
[2020-03-19 16:51:54][DEBUG] : Sending action : Press
[2020-03-19 16:51:59][DEBUG] : Failed connecting to Switchbot: xx:xx:xx:xx:xx:xx
[2020-03-19 16:51:59][DEBUG] : Error talking to Switchbot.
[2020-03-19 16:52:04][DEBUG] : Cannot connect to Switchbot. Retrying remaining 4
[2020-03-19 16:52:05][DEBUG] : Sending action : Press
[2020-03-19 16:52:05][DEBUG] : Connecting to Switchbot…
[2020-03-19 16:52:05][DEBUG] : Failed connecting to Switchbot: xx:xx:xx:xx:xx:xx
[2020-03-19 16:52:05][DEBUG] : Error talking to Switchbot.
[2020-03-19 16:52:05][DEBUG] : Cannot connect to Switchbot. Retrying remaining 3
[2020-03-19 16:52:06][DEBUG] : Connecting to Switchbot…
[2020-03-19 16:52:06][DEBUG] : Sending action : Press
[2020-03-19 16:52:06][DEBUG] : Error talking to Switchbot.
[2020-03-19 16:52:06][DEBUG] : Failed connecting to Switchbot: xx:xx:xx:xx:xx:xx
[2020-03-19 16:52:06][DEBUG] : Launch hciconfig up.
[2020-03-19 16:52:06][DEBUG] : Cannot connect to Switchbot. Retrying remaining 2
[2020-03-19 16:52:07][DEBUG] : Connecting to Switchbot…
[2020-03-19 16:52:07][DEBUG] : Sending action : Press
[2020-03-19 16:52:07][DEBUG] : Failed connecting to Switchbot: xx:xx:xx:xx:xx:xx
[2020-03-19 16:52:07][DEBUG] : Error talking to Switchbot.
[2020-03-19 16:52:07][DEBUG] : Cannot connect to Switchbot. Retrying remaining 1
[2020-03-19 16:52:08][DEBUG] : Sending action : Press
[2020-03-19 16:52:08][DEBUG] : Connecting to Switchbot…
[2020-03-19 16:52:13][DEBUG] : Failed connecting to Switchbot: xx:xx:xx:xx:xx:xx
[2020-03-19 16:52:13][DEBUG] : Error talking to Switchbot.
[2020-03-19 16:52:18][DEBUG] : Switchbot communication failed. Stopping trying xx:xx:xx:xx:xx:xx
[2020-03-19 16:52:18][DEBUG] : launch cmd local : nok
[2020-03-19 16:52:18][DEBUG] : ########## Commande KO : Press ###################

Toujours celles-ci

et donc si tu stoppes le démon BLEA ça fonctionne?

Si je stoppe les deux que je ne relance que Switchbot, ça fonctionne.
Après réactivation de BLEA, ça fonctionne, mais au bout d’une journée ou deux, c’est de nouveau aléatoire.

@ Theking31

tu as aussi des soucis si BLEA tourne?

1 « J'aime »

Peu de temps après la réactivation (pendant une journée) : non.
Mais quelques longues heures après, le lendemain par exemple : oui

Essaie en désactivant le cronDaily (qui se lance la nuit) dans la configuration générale du plugin.
Je suis en train de corriger une erreur et c’est peut-être lié.