Esp-rfid et jmqtt

Bonjour à tous,
J’ai installé le firmware « esp-rfid » (https://github.com/esprfid/esp-rfid) sur un nodemcu et j’essaie de faire communiquer ça proprement avec jeedom via jmqtt.

Le esp-rfid est connecté chez moi sur le wifi.
J’ai renseigné dans l’interface pour le MQTT :
IP : l’ip de jeedom
port : 1883
topic : rfid

Puis dans le plugin jmqtt :
IP mosquito : idem, l’IP de jeedom
port: 1883
identifiant de connexion: rfid

Ca marche presque, ça me renvoie des éléments de mes badges que je passe devant le lecteur, mais assez aléatoirement.
Et maintenant, au niveau du plugin, il me dit « le broker est offline » (dans la config du demon).

j’avoue être complètement perdu…
Que faire ? que chercher ?

Merci d’avance pour votre aide.

Si le broker est celui du #plugin-jmqtt, laisse « localhost » pour l’IP mosquito.

bonjour, ça semble mieux, merci.

Comment je récupère l’ID du badge (le nom d’utilisateur) pour l’utiliser dans un scénario ?

et question subsidiaire, dans l’interface esp-rfid, je n’arrive pas à mettre le module à l’heure.
Il y a pourtant une ligne pour mettre un serveur ntp, (j’ai mis :http://fr.pool.ntp.org ), j’ai meme cliqué sur synchroniser avec mon pc, rien, ça ne marche pas (ça prend l’heure une fois, mais ça la perd ensuite, et revient au 1 janvbier 1970 à chaque fois que je reconnecte l’interface (je précise, sans forcément couper l’alimentation du nodemcu). Une idée ??

Merci pour votre aide !

question subsidiaire :comment je peux faire pour que la lecture du badge soit instantanée ?
Je m’explique, il y a une tuile sur le dashboard avec les infos qui remontent du rfid, mais ça ne se met à jour que pas très souvent …
Il faudrait que ça se mette à jour dès que je passe un badge devant .
Et je trouve pas…
Help !!!
merci

Et sans le http:// ?

Pour tes autres problèmes, sans capture d’écran de jMQTT, cela va être dur de t’aider.

bonjour, ça semble marcher sans le « http:// » … Merci !

Pour les copies d’écran :
voici le paramètrage côté esp-rfid :
image

et le paramétrage de jmqtt:

dites moi si vous avez besoin d’autre chose pour m’aider.
Merci :slight_smile:

et j’ai une tuile qui apparait dans le dashboard qui est :

mais ça ne se met pas à jour rapidement

Regarde dans le log JMQTT_JMQTT si les données arrivent bien en temps réel.

Peux tu fournir la capture d’écran de la configuration du plugin?

Pour topic de souscription, mettre rfid/#, te permettra de ne pas tout mélanger dans le même équipement.

voilà ce que j’ai dans la config du plug in


je ne trouve pas où chercher le log dont tu parles …

et d’ailleurs, ça ne marche plus …
image

je clic sur redémarrer, et j’ai un message d’erruer

Donnes les deux logs visible sur « Log et surveillance ».

ah oui, y a un truc qui cloche :
le 1er ça donne plein de lignes comme ça :
[2020-02-03 18:08:03][ERROR] : Erreur sur jMQTT::daemon() : Call to a member function getId() on null
[2020-02-03 18:09:03][ERROR] : Erreur sur jMQTT::daemon() : Call to a member function getId() on null
[2020-02-03 18:10:05][ERROR] : Erreur sur jMQTT::daemon() : Call to a member function getId() on null
[2020-02-03 18:10:40][ERROR] : Erreur sur jMQTT::daemon() : Call to a member function getId() on null
[2020-02-03 18:11:03][ERROR] : Erreur sur jMQTT::daemon() : Call to a member function getId() on null
[2020-02-03 18:12:03][ERROR] : Erreur sur jMQTT::daemon() : Call to a member function getId() on null
[2020-02-03 18:13:03][ERROR] : Erreur sur jMQTT::daemon() : Call to a member function getId() on null
[2020-02-03 18:14:03][ERROR] : Erreur sur jMQTT::daemon() : Call to a member function getId() on null
[2020-02-03 18:14:22][ERROR] : Erreur sur jMQTT::daemon() : Call to a member function getId() on null
[2020-02-03 18:15:04][ERROR] : Erreur sur jMQTT::daemon() : Call to a member function getId() on null
[2020-02-03 18:15:26][ERROR] : Erreur sur jMQTT::daemon() : Call to a member function getId() on null
[2020-02-03 18:15:36][ERROR] : Erreur sur jMQTT::daemon() : Call to a member function getId() on null
[2020-02-03 18:15:38][ERROR] : Erreur sur jMQTT::daemon() : Call to a member function getId() on null
[2020-02-03 18:15:44][ERROR] : Erreur sur jMQTT::daemon() : Call to a member function getId() on null
[2020-02-03 18:16:03][ERROR] : Erreur sur jMQTT::daemon() : Call to a member function getId() on null
[2020-02-03 18:17:03][ERROR] : Erreur sur jMQTT::daemon() : Call to a member function getId() on null
[2020-02-03 18:18:03][ERROR] : Erreur sur jMQTT::daemon() : Call to a member function getId() on null
[2020-02-03 18:19:03][ERROR] : Erreur sur jMQTT::daemon() : Call to a member function getId() on null
[2020-02-03 18:19:06][ERROR] : Erreur sur jMQTT::daemon() : Call to a member function getId() on null
[2020-02-03 18:19:07][ERROR] : Erreur sur jMQTT::daemon() : Call to a member function getId() on null
[2020-02-03 18:20:04][ERROR] : Erreur sur jMQTT::daemon() : Call to a member function getId() on null

et le 2eme :


  • Install dependancies *

Progress file: /tmp/jeedom/jMQTT/progress_dep.txt
Install Mosquitto: 1

  • Update package source repository

Reading package lists…
Building dependency tree…
Reading state information…
lsb-release is already the newest version (9.20161125).
php-pear is already the newest version (1:1.10.1+submodules+notgz-9+deb9u1).
The following packages were automatically installed and are no longer required:
icedtea-netx icedtea-netx-common
Use ‹ sudo apt autoremove › to remove them.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
–2020-02-03 14:00:47-- http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key
Resolving repo.mosquitto.org (repo.mosquitto.org)… 2001:ba8:1f1:f271::2, 85.119.83.194
Connecting to repo.mosquitto.org (repo.mosquitto.org)|2001:ba8:1f1:f271::2|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 3167 (3.1K) [application/octet-stream]
Saving to: ‹ mosquitto-repo.gpg.key ›
0K … 100% 272K=0.01s
2020-02-03 14:00:48 (272 KB/s) - ‹ mosquitto-repo.gpg.key › saved [3167/3167]
Warning: apt-key output should not be parsed (stdout is not a terminal)
OK
–2020-02-03 14:00:50-- http://repo.mosquitto.org/debian/mosquitto-stretch.list
Resolving repo.mosquitto.org (repo.mosquitto.org)… 2001:ba8:1f1:f271::2, 85.119.83.194
Connecting to repo.mosquitto.org (repo.mosquitto.org)|2001:ba8:1f1:f271::2|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 51 [application/octet-stream]
Saving to: ‹ mosquitto-stretch.list ›
0K 100% 3.03M=0s
2020-02-03 14:00:50 (3.03 MB/s) - ‹ mosquitto-stretch.list › saved [51/51]
*

  • Synchronize the package index

Ign:1 Index of /debian/ stretch InRelease
Get:2 Index of /debian-security stretch/updates InRelease [94.3 kB]
Get:3 Index of /debian/ stretch-updates InRelease [91.0 kB]
Hit:4 Index of /debian/ stretch Release
Ign:5 Index of /ubuntu/beta/ stretch InRelease
Ign:6 Index of /ubuntu/beta/ stretch Release
Ign:7 Index of /ubuntu/beta/ stretch/main amd64 Packages
Hit:8 https://deb.nodesource.com/node_12.x stretch InRelease
Ign:9 Index of /ubuntu/beta/ stretch/main all Packages
Hit:10 Index of /debian/ stretch InRelease
Ign:11 Index of /ubuntu/beta/ stretch/main Translation-fr
Ign:12 Index of /ubuntu/beta/ stretch/main Translation-en
Ign:13 Index of /ubuntu/beta/ stretch/main all DEP-11 Metadata
Ign:14 Index of /ubuntu/beta/ stretch/main amd64 DEP-11 Metadata
Ign:15 Index of /ubuntu/beta/ stretch/main DEP-11 64x64 Icons
Ign:7 Index of /ubuntu/beta/ stretch/main amd64 Packages
Ign:9 Index of /ubuntu/beta/ stretch/main all Packages
Ign:11 Index of /ubuntu/beta/ stretch/main Translation-fr
Get:16 Index of /debian-security stretch/updates/main Sources [207 kB]
Ign:12 Index of /ubuntu/beta/ stretch/main Translation-en
Ign:13 Index of /ubuntu/beta/ stretch/main all DEP-11 Metadata
Ign:14 Index of /ubuntu/beta/ stretch/main amd64 DEP-11 Metadata
Get:17 Index of /debian-security stretch/updates/main amd64 Packages [516 kB]
Ign:15 Index of /ubuntu/beta/ stretch/main DEP-11 64x64 Icons
Ign:7 Index of /ubuntu/beta/ stretch/main amd64 Packages
Ign:9 Index of /ubuntu/beta/ stretch/main all Packages
Ign:11 Index of /ubuntu/beta/ stretch/main Translation-fr
Ign:12 Index of /ubuntu/beta/ stretch/main Translation-en
Ign:13 Index of /ubuntu/beta/ stretch/main all DEP-11 Metadata
Ign:14 Index of /ubuntu/beta/ stretch/main amd64 DEP-11 Metadata
Ign:15 Index of /ubuntu/beta/ stretch/main DEP-11 64x64 Icons
Ign:7 Index of /ubuntu/beta/ stretch/main amd64 Packages
Ign:9 Index of /ubuntu/beta/ stretch/main all Packages
Ign:11 Index of /ubuntu/beta/ stretch/main Translation-fr
Ign:12 Index of /ubuntu/beta/ stretch/main Translation-en
Ign:13 Index of /ubuntu/beta/ stretch/main all DEP-11 Metadata
Ign:14 Index of /ubuntu/beta/ stretch/main amd64 DEP-11 Metadata
Ign:15 Index of /ubuntu/beta/ stretch/main DEP-11 64x64 Icons
Ign:7 Index of /ubuntu/beta/ stretch/main amd64 Packages
Ign:9 Index of /ubuntu/beta/ stretch/main all Packages
Ign:11 Index of /ubuntu/beta/ stretch/main Translation-fr
Ign:12 Index of /ubuntu/beta/ stretch/main Translation-en
Ign:13 Index of /ubuntu/beta/ stretch/main all DEP-11 Metadata
Ign:14 Index of /ubuntu/beta/ stretch/main amd64 DEP-11 Metadata
Ign:15 Index of /ubuntu/beta/ stretch/main DEP-11 64x64 Icons
Err:7 Index of /ubuntu/beta/ stretch/main amd64 Packages
404 Not Found
Ign:9 Index of /ubuntu/beta/ stretch/main all Packages
Ign:11 Index of /ubuntu/beta/ stretch/main Translation-fr
Ign:12 Index of /ubuntu/beta/ stretch/main Translation-en
Ign:13 Index of /ubuntu/beta/ stretch/main all DEP-11 Metadata
Ign:14 Index of /ubuntu/beta/ stretch/main amd64 DEP-11 Metadata
Ign:15 Index of /ubuntu/beta/ stretch/main DEP-11 64x64 Icons
Fetched 909 kB in 2s (426 kB/s)
Reading package lists…
W: The repository ‹ Index of /ubuntu/beta/ stretch Release › does not have a Release file.
E: Failed to fetch http://deconz.dresden-elektronik.de/ubuntu/beta/dists/stretch/main/binary-amd64/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
*

  • Install Mosquitto

Reading package lists…
Building dependency tree…
Reading state information…
libmosquitto-dev is already the newest version (1.6.8-0mosquitto1~stretch1).
mosquitto is already the newest version (1.6.8-0mosquitto1~stretch1).
mosquitto-clients is already the newest version (1.6.8-0mosquitto1~stretch1).
The following packages were automatically installed and are no longer required:
icedtea-netx icedtea-netx-common
Use ‹ sudo apt autoremove › to remove them.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
*

  • Install php mosquitto wrapper

Version 7 of PHP detected
Install php7.0-dev
Reading package lists…
Building dependency tree…
Reading state information…
php7.0-dev is already the newest version (7.0.33-0+deb9u6).
The following packages were automatically installed and are no longer required:
icedtea-netx icedtea-netx-common
Use ‹ sudo apt autoremove › to remove them.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Install pecl/Mosquitto
pecl/Mosquitto is already installed and is the same as the released version 0.4.0
install failed
Adding mosquitto.so to /etc/php/7.0/cli/php.ini
extension=mosquitto.so
Adding mosquitto.so to /etc/php/7.0/apache2/php.ini
extension=mosquitto.so
Reload the web server apache2


  •         End dependancy installation              *
    

j’ai essayé de relancer les dependances, ça change rien.

bon, j’ai effacé l’installation du broker sur jmqtt et j’ai recommencé.
Au moins, je n’ai plus d’erreur, mais ça ne remonte toujours pas les badges que je passe devant le lecteur

Le deamon tourne ?
As-tu maintenant le log JMQTT_JMQTT en plus des deux autres ?

ce log là?
image
il est vide

et oui le démon tourne

la tuile du dashboard est devenue :
image

j’ai l’impression que c’est le badge qui remonte pas.
Y a peut-etre un problème de config dans l’esp-rfid ?