Autor Thema: MQTT2 Device + RFID Reader  (Gelesen 641 mal)

Offline gloob

  • Hero Member
  • *****
  • Beiträge: 3143
MQTT2 Device + RFID Reader
« am: 12 Januar 2019, 17:27:01 »
Hallo,

Ich habe gerade einen MQTT-RFID Reader gebastelt und wollte ihn jetzt in FHEM einbinden.
Wenn ich mit "MQTT.fx" mir die Readings anschaue kommen sie ohne Probleme im Broker an.

Folgendes Topic abonniere ich dort
/rfid_reader/uid
2019-01-12 17:23:59,524  INFO --- MqttFX ClientModel             : addPublishTopic : /rfid_reader/uid
2019-01-12 17:23:59,528  INFO --- MqttFX ClientModel             : sucessfully subscribed to topic /rfid_reader/uid (QoS 0)
2019-01-12 17:24:03,355  INFO --- MqttFX ClientModel             : messageArrived() with topic: /rfid_reader/uid
2019-01-12 17:24:03,362  INFO --- MqttFX ClientModel             : messageArrived() added: message #1 to topic '/rfid_reader/uid'
2019-01-12 17:24:07,905  INFO --- MqttFX ClientModel             : messageArrived() with topic: /rfid_reader/uid
2019-01-12 17:24:07,907  INFO --- MqttFX ClientModel             : messageArrived() added: message #2 to topic '/rfid_reader/uid'
2019-01-12 17:24:12,074  INFO --- MqttFX ClientModel             : messageArrived() with topic: /rfid_reader/uid
2019-01-12 17:24:12,075  INFO --- MqttFX ClientModel             : messageArrived() added: message #3 to topic '/rfid_reader/uid'
2019-01-12 17:24:14,122  INFO --- MqttFX ClientModel             : messageArrived() with topic: /rfid_reader/uid
2019-01-12 17:24:14,123  INFO --- MqttFX ClientModel             : messageArrived() added: message #4 to topic '/rfid_reader/uid'
2019-01-12 17:24:25,283  INFO --- MqttFX ClientModel             : messageArrived() with topic: /rfid_reader/uid
2019-01-12 17:24:25,286  INFO --- MqttFX ClientModel             : messageArrived() added: message #5 to topic '/rfid_reader/uid'
2019-01-12 17:24:26,307  INFO --- MqttFX ClientModel             : messageArrived() with topic: /rfid_reader/uid
2019-01-12 17:24:26,308  INFO --- MqttFX ClientModel             : messageArrived() added: message #6 to topic '/rfid_reader/uid'
2019-01-12 17:24:27,331  INFO --- MqttFX ClientModel             : messageArrived() with topic: /rfid_reader/uid
2019-01-12 17:24:27,331  INFO --- MqttFX ClientModel             : messageArrived() added: message #7 to topic '/rfid_reader/uid'
2019-01-12 17:24:31,632  INFO --- MqttFX ClientModel             : messageArrived() with topic: /rfid_reader/uid
2019-01-12 17:24:31,633  INFO --- MqttFX ClientModel             : messageArrived() added: message #8 to topic '/rfid_reader/uid'

Jetzt habe ich ein MQTT2 Device erstellt bekomme dort allerdings keine Updates:

defmod MQTT2_RFID MQTT2_DEVICE
attr MQTT2_RFID IODev MQTT2
attr MQTT2_RFID readingList rfid_reader/uid:.* UID
attr MQTT2_RFID room MQTT

setstate MQTT2_RFID 2019-01-12 17:17:10 UID c4eba279


Hat jemand eine Idee, wo mein Denkfehler ist?
Der Client kann nicht das Problem sein. Die Messages von Tasmota kommen alle an.

Gruß und Danke
Stefan



Hier sind noch Lists von den Devices:

Internals:
   BUF       
   DEF        192.168.1.15:1883
   DeviceName 192.168.1.15:1883
   FD         51
   NAME       MQTT2
   NR         229
   PARTIAL   
   STATE      opened
   TYPE       MQTT2_CLIENT
   WBCallback
   clientId   MQTT2
   lastMsgTime 1547310548.43234
   nextOpenDelay 5
   READINGS:
     2019-01-11 15:19:55   state           opened
Attributes:
   room       MQTT

Internals:
   CFGFN     
   DEVICETOPIC MQTT2_RFID
   IODev      MQTT2
   LASTInputDev MQTT2
   MQTT2_MSGCNT 13
   MQTT2_TIME 2019-01-12 17:17:10
   MSGCNT     13
   NAME       MQTT2_RFID
   NR         3164
   STATE      ???
   TYPE       MQTT2_DEVICE
   READINGS:
     2019-01-12 17:17:10   UID             c4eba279
Attributes:
   IODev      MQTT2
   readingList rfid_reader/uid:.* UID
   room       MQTT
« Letzte Änderung: 12 Januar 2019, 17:30:39 von gloob »
Raspberry Pi 3 | miniCUL 433MHz | nanoCUL 868 MHz | nanoCUL 433 MHz | MySensors WLAN Gateway | LaCrosse WLAN Gateway | SignalESP 433 MHz | SignalESP 868 MHz | HM-MOD-UART WLAN Gateway | IR - 360 Grad WLAN Gateway

Offline gloob

  • Hero Member
  • *****
  • Beiträge: 3143
Antw:MQTT2 Device + RFID Reader
« Antwort #1 am: 12 Januar 2019, 17:31:51 »
Erledigt. Ich habe einen Backslash vergessen beim Topic  :o
Raspberry Pi 3 | miniCUL 433MHz | nanoCUL 868 MHz | nanoCUL 433 MHz | MySensors WLAN Gateway | LaCrosse WLAN Gateway | SignalESP 433 MHz | SignalESP 868 MHz | HM-MOD-UART WLAN Gateway | IR - 360 Grad WLAN Gateway