oskarn97 / fhem-xiaomi-mqtt Goto Github PK
View Code? Open in Web Editor NEWFHEM Zigbee2MQTT Integration
FHEM Zigbee2MQTT Integration
Hallo,
ich habe heute in meinen FHEM-Log geschaut.
Dabei ist mir aufgefallen, dass die XiaomiMQTT-Bridge alle paar Sekunden, also immer wenn neue Werte über MQTT von der Bridge kommen, xBridge: unknown attribute subscribeReading_. Type 'attr xBridge ?' for a detailed list.
in den Log schreibt und diesen dadurch zumüllt, sodass es ewig dauert die Log-Datei zu öffnen oder der Browser gar ganz abstürzt.
Das genannte Attribut subscribeReading_.
gibt es an meinem Gerät nicht.
Bitte um schnelle Behebung!
LG
Moin Oskar, ich habe seit kurzem einen Motion Sensor in Betrieb, Daten werden wunderbar aufbereitet.
Nach einer "motion" dauert es 90 Sekunden bis er auf "no_motion" switched.
Kannst du evtl. einbauen, dass diese Dauer verändert werden kann?
Gruß
Mathze
Hallo,
Habe eben versucht wie in dem Forenbeitrag bei FHEM und in der Readme beschrieben das Modul in betrieb zunehmen.
Leider bekomme ich folgende Meldung:
2019.01.03 09:20:13 1: UPD FHEM/72_XiaomiMQTTDevice.pm 2019.01.03 09:20:13 1: saving fhem.cfg 2019.01.03 09:20:13 1: saving ./log/fhem.save 2019.01.03 09:20:13 1: 2019.01.03 09:20:13 1: New entries in the CHANGED file: 2019.01.03 09:20:13 1: 404: Not Found 2019.01.03 09:20:13 1: Calling /usr/bin/perl ./contrib/commandref_join.pl -noWarnings, this may take a while 2019.01.03 09:21:07 1: *** EN FHEM/72_XiaomiMQTTDevice.pm: No document text found
nachfolgend
`2019.01.03 09:33:50 1: reload: Error:Modul 00_MQTT deactivated:
Can't locate Module/Pluggable.pm in @inc (you may need to install the Module::Pluggable module) (@inc contains: . /etc/perl /usr/local/lib/arm-linux-gnueabihf/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/arm-linux-gnueabihf/perl5/5.24 /usr/share/perl5 /usr/lib/arm-linux-gnueabihf/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/arm-linux-gnueabihf/perl-base ./FHEM ./FHEM/lib) at FHEM/lib/Net/MQTT/Message.pm line 9.
BEGIN failed--compilation aborted at FHEM/lib/Net/MQTT/Message.pm line 9.
Compilation failed in require at ./FHEM/00_MQTT.pm line 80.
BEGIN failed--compilation aborted at ./FHEM/00_MQTT.pm line 80.
2019.01.03 09:33:50 0: Can't locate Module/Pluggable.pm in @inc (you may need to install the Module::Pluggable module) (@inc contains: . /etc/perl /usr/local/lib/arm-linux-gnueabihf/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/arm-linux-gnueabihf/perl5/5.24 /usr/share/perl5 /usr/lib/arm-linux-gnueabihf/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/arm-linux-gnueabihf/perl-base ./FHEM ./FHEM/lib) at FHEM/lib/Net/MQTT/Message.pm line 9.
BEGIN failed--compilation aborted at FHEM/lib/Net/MQTT/Message.pm line 9.
Compilation failed in require at ./FHEM/00_MQTT.pm line 80.
BEGIN failed--compilation aborted at ./FHEM/00_MQTT.pm line 80.
2019.01.03 09:35:19 1: nothing to do...
2019.01.03 09:36:02 1: PERL WARNING: Constant subroutine MQTT::MQTT_SUBSCRIBE redefined at FHEM/lib/Net/MQTT/Constants.pm line 44.
2019.01.03 09:36:02 1: PERL WARNING: Constant subroutine MQTT::MQTT_PINGRESP redefined at FHEM/lib/Net/MQTT/Constants.pm line 44.
2019.01.03 09:36:02 1: PERL WARNING: Constant subroutine MQTT::MQTT_CONNECT_REFUSED_UNACCEPTABLE_PROTOCOL_VERSION redefined at FHEM/lib/Net/MQTT/Constants.pm line 44.
2019.01.03 09:36:02 1: PERL WARNING: Constant subroutine MQTT::MQTT_PINGREQ redefined at FHEM/lib/Net/MQTT/Constants.pm line 44.
2019.01.03 09:36:02 1: PERL WARNING: Constant subroutine MQTT::MQTT_PUBREL redefined at FHEM/lib/Net/MQTT/Constants.pm line 44.
2019.01.03 09:36:02 1: PERL WARNING: Constant subroutine MQTT::MQTT_PUBREC redefined at FHEM/lib/Net/MQTT/Constants.pm line 44.
2019.01.03 09:36:02 1: PERL WARNING: Constant subroutine MQTT::MQTT_CONNECT_REFUSED_BAD_USER_NAME_OR_PASSWORD redefined at FHEM/lib/Net/MQTT/Constants.pm line 44.
2019.01.03 09:36:02 1: PERL WARNING: Constant subroutine MQTT::MQTT_QOS_AT_MOST_ONCE redefined at FHEM/lib/Net/MQTT/Constants.pm line 44.
2019.01.03 09:36:02 1: PERL WARNING: Constant subroutine MQTT::MQTT_DISCONNECT redefined at FHEM/lib/Net/MQTT/Constants.pm line 44.
2019.01.03 09:36:02 1: PERL WARNING: Constant subroutine MQTT::MQTT_CONNECT redefined at FHEM/lib/Net/MQTT/Constants.pm line 44.
2019.01.03 09:36:02 1: PERL WARNING: Constant subroutine MQTT::MQTT_PUBLISH redefined at FHEM/lib/Net/MQTT/Constants.pm line 44.
2019.01.03 09:36:02 1: PERL WARNING: Constant subroutine MQTT::MQTT_CONNECT_ACCEPTED redefined at FHEM/lib/Net/MQTT/Constants.pm line 44.
2019.01.03 09:36:02 1: PERL WARNING: Constant subroutine MQTT::MQTT_QOS_EXACTLY_ONCE redefined at FHEM/lib/Net/MQTT/Constants.pm line 44.
2019.01.03 09:36:02 1: PERL WARNING: Constant subroutine MQTT::MQTT_SUBACK redefined at FHEM/lib/Net/MQTT/Constants.pm line 44.
2019.01.03 09:36:02 1: PERL WARNING: Constant subroutine MQTT::MQTT_CONNECT_REFUSED_SERVER_UNAVAILABLE redefined at FHEM/lib/Net/MQTT/Constants.pm line 44.
2019.01.03 09:36:02 1: PERL WARNING: Constant subroutine MQTT::MQTT_CONNECT_REFUSED_IDENTIFIER_REJECTED redefined at FHEM/lib/Net/MQTT/Constants.pm line 44.
2019.01.03 09:36:02 1: PERL WARNING: Constant subroutine MQTT::MQTT_UNSUBSCRIBE redefined at FHEM/lib/Net/MQTT/Constants.pm line 44.
2019.01.03 09:36:02 1: PERL WARNING: Constant subroutine MQTT::MQTT_QOS_AT_LEAST_ONCE redefined at FHEM/lib/Net/MQTT/Constants.pm line 44.
2019.01.03 09:36:02 1: PERL WARNING: Constant subroutine MQTT::MQTT_CONNECT_REFUSED_NOT_AUTHORIZED redefined at FHEM/lib/Net/MQTT/Constants.pm line 44.
2019.01.03 09:36:02 1: PERL WARNING: Constant subroutine MQTT::MQTT_PUBACK redefined at FHEM/lib/Net/MQTT/Constants.pm line 44.
2019.01.03 09:36:02 1: PERL WARNING: Constant subroutine MQTT::MQTT_UNSUBACK redefined at FHEM/lib/Net/MQTT/Constants.pm line 44.
2019.01.03 09:36:02 1: PERL WARNING: Constant subroutine MQTT::MQTT_PUBCOMP redefined at FHEM/lib/Net/MQTT/Constants.pm line 44.
2019.01.03 09:36:02 1: PERL WARNING: Constant subroutine MQTT::MQTT_CONNACK redefined at FHEM/lib/Net/MQTT/Constants.pm line 44.
2019.01.03 09:36:02 1: reload: Error:Modul 00_MQTT deactivated:
Attempt to reload Net/MQTT/Message.pm aborted.
Compilation failed in require at ./FHEM/00_MQTT.pm line 80.
BEGIN failed--compilation aborted at ./FHEM/00_MQTT.pm line 80.
2019.01.03 09:36:02 0: Attempt to reload Net/MQTT/Message.pm aborted.
Compilation failed in require at ./FHEM/00_MQTT.pm line 80.
BEGIN failed--compilation aborted at ./FHEM/00_MQTT.pm line 80.
2019.01.03 09:38:28 1: nothing to do...
2019.01.03 09:40:01 1: reload: Error:Modul 00_MQTT deactivated:
Attempt to reload Net/MQTT/Message.pm aborted.
Compilation failed in require at ./FHEM/00_MQTT.pm line 80.
BEGIN failed--compilation aborted at ./FHEM/00_MQTT.pm line 80.
2019.01.03 09:40:01 0: Attempt to reload Net/MQTT/Message.pm aborted.
Compilation failed in require at ./FHEM/00_MQTT.pm line 80.
BEGIN failed--compilation aborted at ./FHEM/00_MQTT.pm line 80.`
Gruß
Meck87
Ist es möglich bei deinem FHEM Modul die standardmäßig angelegten log files für die Geräte per def oder attr abzuschalten?
Derzeit lösche ich die beim Pairen angelegte file einfach per Hand aber fände es schöner wenn es optional abschaltbar wäre.
Hi, is it possible to deactivate the automaticaly generated logfiles in FHEM which are created during pair and „update Devices“
Hi,
ich habe mal versucht einen Zigbee-Stick einzubinden aber beim Anlegen der Brdige stoße ich auf ein Problem: sämmtlich Guides die ich finde arbeiten mit Mosquito und gehen über das IODev MQTT - Ich habe aber das MQTT2-SERVER Modul am laufen und daher keine Mosquito bzw. MQTT IODev. Das Modul hier scheint zwingend das Device MQTT zu verlangen und geht sofort auf die bretter wenn es in Fhem nicht existiert.
Wie stelle ich es an über as IODv MQTT2 zu gehen fg ?
Danke!
https://forum.fhem.de/index.php/topic,120794.0/all.html
No MQTT IODev found.
Seit einem der letzten FHEM Updates wird das Xiaomi Modul offensichtlich Fehler:
019.01.08 12:44:44 1: stacktrace: 2019.01.08 12:44:44 1: main::__ANON__ called by fhem.pl (1604) 2019.01.08 12:44:44 1: main::GetDefAndAttr called by fhem.pl (1688) 2019.01.08 12:44:44 1: main::CommandSave called by ./FHEM/72_XiaomiMQTTDevice.pm (285) 2019.01.08 12:44:44 1: XiaomiMQTT::DEVICE::onmessage called by fhem.pl (3610) 2019.01.08 12:44:44 1: main::CallFn called by ./FHEM/00_MQTT.pm (535) 2019.01.08 12:44:44 1: MQTT::__ANON__ called by FHEM/GPUtils.pm (48) 2019.01.08 12:44:44 1: GPUtils::GP_ForallClients called by ./FHEM/00_MQTT.pm (545) 2019.01.08 12:44:44 1: MQTT::Read called by fhem.pl (3610) 2019.01.08 12:44:44 1: main::CallFn called by fhem.pl (727) 2019.01.08 12:44:44 1: PERL WARNING: Use of uninitialized value $val in substitution (s///) at fhem.pl line 1605.
Ich bin mir nicht sicher ob der Fehler im Xiaomi Modul oder in FHEM liegt.
Hi, habe gerade gesehen, dass es noch ein Update gibt. Habe update all
ausgeführt und jetzt stoppt der Vorgang mit dem Fehler: *** EN FHEM/72_XiaomiMQTTDevice.pm: No document text found
.
Update Check gibt:
xiaomi-zb2mqtt List of new / modified files since last update: UPD FHEM/72_XiaomiMQTTDevice.pm New entries in the CHANGED file: 404: Not Found
wobei die letzten beiden Zeilen eben schon so waren.
Nach dem Update von gestern (29.12.18) wurde der friendly name gelöscht.
Um diesen wiederherzustellen, muss ich im NodeRed Admin Panel zweimal auf Rename klicken, damit die Änderungen wirksam werden.
Nach einem Neustart von FHEM ist der friendly name aber wieder gelöscht.
Es wäre schön, wenn man die Namen der Readings an die in den Development Guidelines für Fhem vorgeschlagenen Readings Namen anpassen könnte. Damit können andere Module, die z.B. die Batteriestand überwachen, auch ohne manuelle Anpassung alle Readings direkt erkennen.
https://wiki.fhem.de/wiki/DevelopmentGuidelines#Standardisierung_der_Readings
Hallo @oskarn97 ,
könntest du bitte die aktuelle Version um folgendes anpassen?
{"version":"1.2.1","commit":"03ca8ec","coordinator_firmware":20190217,"log_level":"info","permit_join":true}
Tausend Dank für das klasse Modul.
There seems to be a little bug in the newest version:
PERL WARNING: Use of uninitialized value in string eq at ./FHEM/72_XiaomiMQTTDevice.pm line 288.
Hallo,
seit dem Update von heute (29.12.2018) bekomme ich jede Sekunde folgende LogEinträge:
2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002322532 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002b44107 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002781b24 2018-12-29 15:48:42 Global global MODIFIED 0x8418260000103c81 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002376361 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0001a2dd67 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0001d6398f 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002af9752 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002322532 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002b44107 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002781b24 2018-12-29 15:48:42 Global global MODIFIED 0x8418260000103c81 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002376361 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0001a2dd67 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0001d6398f 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002af9752 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002322532 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002b44107 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002781b24 2018-12-29 15:48:42 Global global MODIFIED 0x8418260000103c81 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002376361 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0001a2dd67 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0001d6398f 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002af9752 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002322532 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002b44107 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002781b24 2018-12-29 15:48:42 Global global MODIFIED 0x8418260000103c81 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002376361 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0001a2dd67 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0001d6398f 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002af9752 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002322532 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002b44107 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002781b24 2018-12-29 15:48:42 Global global MODIFIED 0x8418260000103c81 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002376361 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0001a2dd67 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0001d6398f 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002af9752 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002322532 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002b44107 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002781b24 2018-12-29 15:48:42 Global global MODIFIED 0x8418260000103c81 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002376361 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0001a2dd67 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0001d6398f 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002af9752 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002322532 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002b44107 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002781b24 2018-12-29 15:48:42 Global global MODIFIED 0x8418260000103c81 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002376361 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0001a2dd67 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0001d6398f 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002af9752 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002322532 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002b44107 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002781b24 2018-12-29 15:48:42 Global global MODIFIED 0x8418260000103c81 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002376361 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0001a2dd67 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0001d6398f 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002af9752 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002322532 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002b44107 2018-12-29 15:48:42 Global global MODIFIED 0x00158d0002781b24
Ich habe nur 8 Geräte angelernt.
Somit ist das schlimmer als Issue #6 (Log: "unknown attribute subscribeReading_." alle 4 Sekunden).
Bitte schnell fixen.
Hi, wenn ich eine RB 175 W anlerne scheint es durch den Namen Problme mit dem Verteilen der Internals zu geben.
Gleich nach dem Anlernen bekomme ich folgende Zuordnungen:
Internals:
CFGFN
DEF RB 175 W 0x00158d0001970b2d
FRIENDLYNAME W
IODev MQTT
MODEL RB
NAME 0x00158d0001970b2d
NOTIFYDEV RB 175 W 0x00158d0001970b2d
NR 1008
SID 175
STATE OFF
TYPE XiaomiMQTTDevice
...
subscribe:
zigbee2mqtt/W
xiaomi/175/#
subscribeExpr:
^zigbee2mqtt\/W$
^xiaomi\/175.*$
subscribeQos:
xiaomi/175/# 0
zigbee2mqtt/W 0
MODEL (RB), SID (175) und FRIENDLYNAME (W) scheinen sich aus der eigndlichen Modelbezeichnung (RB 175 W) abzuleiten. Auch weiß ich nicht ob subscribe so richtig ist.
Vor dem Update hatte ich auch schon Probleme mit dem Namen und ich musste in der configuration.yaml den FRIENDLYNAME auf W anpasen, damit ich schalten kann. Jetzt kam wohl nur dazu das ein Umbenennen des Device in fhem auch den FRIENDLYNAME in der configuration.yaml mit ändert. Es kann aber nur mit W geschaltete werden kann, da die Internals bei W bleiben,
Ist nichts wildes, aber das hat mich u.a. nach dem gestrigen Update etwas aus dem Tritt gebracht.
Hallo,
nach einem Systemupdate gestern hatte ich das Problem, dass keine Informationen von meine Xiaomi-Geräten nach FHEM durchgereicht wurden. Ich habe FHEM, MQTT und die Xiaomibridge mit dem CC2351-Stick jeweils in einem eigenen Docker-Container laufen. So konnte ich verfolgen, dass die Xiaomibridge ihre Topics an den MQTT-Server schickte. Dort konnte ich sie mit einem anderen MQTT-Client auf meinem Mac verfolgen. Nur das XIAOMIMQTTDEVICE als bridge im FHEM-Container hat nicht reagiert.
Verschickt wurden aber beispielsweise Topics wie updateDevices, die auch korrekt bei der Xiaomibridge ankamen und eine entsprechende Antwort erzeugten.
Nach längerem Suchen habe ich dann noch einen Blick in das Modul 72_XiaomiMQTTDevice.pm geworfen. Da ich Perl nicht beherrsche, war das schon etwas mühsam. Dann habe ich aber in Zeile 116 den Fehler gefunden. Dieser Zweig wird wohl beim Anlegen neuer Attribute ausgeführt. Existiert das Attribute IODEV, so soll ein subscribe auf die notwendigen zigbee2mqtt-Topics ausgeführt werden. Leider ist gerade dieser Subscribe-Anweisung ein # als Kommentar vorangestellt. Also wird nie ein Subscribe ausgeführt. Nachdem ich den Kommentar entfernt habe, läuft wieder alles wie vorher.
Für mich scheint das die Ursache gewesen zu sein.
Viele Grüße
Michael
Hi Oskar,
wäre es möglich ohne viel Aufwand aus der jetzigen und super funktionierenden Version, eine Art Universal Version zu machen die z.B. auch bei Lampen (Hue, Ikea) automatisch agiert?
Es geht um Funktionen wie On/Off, Brightness, Color die aktuell ja nicht angelegt werden bei "Device Update".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.