[Neues Modul] Xiaomi Smart Home ohne Gateway direkt an FHEM

Begonnen von neumann, 22 Februar 2018, 18:00:22

Vorheriges Thema - Nächstes Thema

mark79

Zitat von: rani22 am 15 Januar 2019, 22:41:09
Habe jetzt verschiedene Distanzen und Versuche hinter mir, leider immer ohne Erfolg. hat jemand einen Tipp?

Wo genau liegt das Problem?

Der Würfel ist gepairt, sonst würdest du das hier nicht angezeigt bekommen:


Jan 15 22:35:50 loxberry npm[617]:   zigbee2mqtt:info 1/15/2019, 10:35:50 PM MQTT publish: topic 'zigbee2mqtt/0x00158d00029bb918', payload '{"battery":13,"voltage":2875,"linkquality":84,"action":"flip90","from_side":3,"to_side":4}'

Rock64 4GB mit Debian Strech, FHEM im LXC, Sonoff Switches/Touch, HM Thermostate, HMUART/Zigbee2MQTT@MapleCUN, ESP RGBWW Wifi Controller, ESP8266 Door Sensor/Briefkastenwächter, BT CSL Stick, BT iTags, Alexa, FireTV, RPi2 mit Kodi, Xiaomi Vacuum v1/Smarthome Komponenten

rani22

Zitat von: mark79 am 15 Januar 2019, 23:15:22
Wo genau liegt das Problem?

Der Würfel ist gepairt, sonst würdest du das hier nicht angezeigt bekommen:


Jan 15 22:35:50 loxberry npm[617]:   zigbee2mqtt:info 1/15/2019, 10:35:50 PM MQTT publish: topic 'zigbee2mqtt/0x00158d00029bb918', payload '{"battery":13,"voltage":2875,"linkquality":84,"action":"flip90","from_side":3,"to_side":4}'


Das Problem ist, dass ich dies in FHEM nicht sehe, gemäss den Videos, sollte ein XiaomiMQTTDevice auftauchen.Dies passiert jedoch nicht, somit kann ich die Daten vom Würfel auch nicht auswerten.

rippi46

FHEM, LMS, VDR ,Dell 9010 Ubuntu 20.04,Raspimatic, HM/HMIP, Max, Elro, Brennenstuhl u. Intertechno mit Connair.
Picoreplayer, Raspi IR-Lanadapter, Firmata(wifi), LaCrosse,
nanocul433, nanocul868, Signalduino, Connexoon,
MySensor-GW+Sensoren, RGBWW, Zigbee2mqtt,Xiaomi,Nextion,LEDMatrix,Alexa

mark79

Zitat von: rani22 am 16 Januar 2019, 08:17:14
Das Problem ist, dass ich dies in FHEM nicht sehe, gemäss den Videos, sollte ein XiaomiMQTTDevice auftauchen.Dies passiert jedoch nicht, somit kann ich die Daten vom Würfel auch nicht auswerten.

Dann hat Fhem womöglich keinen Zugriff auf den MQTT Server und kriegt deswegen nichts mit.
Poste mal ein "list" von deinem xBridge und MQTT Broker bzw. Client in Fhem.
Rock64 4GB mit Debian Strech, FHEM im LXC, Sonoff Switches/Touch, HM Thermostate, HMUART/Zigbee2MQTT@MapleCUN, ESP RGBWW Wifi Controller, ESP8266 Door Sensor/Briefkastenwächter, BT CSL Stick, BT iTags, Alexa, FireTV, RPi2 mit Kodi, Xiaomi Vacuum v1/Smarthome Komponenten

rani22

Zitat von: rippi46 am 16 Januar 2019, 08:50:33
autocreate eingeschalten?
Wie stelle ich das fest?
Zitat von: mark79 am 16 Januar 2019, 10:34:11
Dann hat Fhem womöglich keinen Zugriff auf den MQTT Server und kriegt deswegen nichts mit.
Poste mal ein "list" von deinem xBridge und MQTT Broker bzw. Client in Fhem.
wie komme ich zu dieser "list"

rippi46

FHEM, LMS, VDR ,Dell 9010 Ubuntu 20.04,Raspimatic, HM/HMIP, Max, Elro, Brennenstuhl u. Intertechno mit Connair.
Picoreplayer, Raspi IR-Lanadapter, Firmata(wifi), LaCrosse,
nanocul433, nanocul868, Signalduino, Connexoon,
MySensor-GW+Sensoren, RGBWW, Zigbee2mqtt,Xiaomi,Nextion,LEDMatrix,Alexa

rani22

#726
Zitat von: rippi46 am 16 Januar 2019, 12:57:14
list autocreate

Internals:
   NAME       autocreate
   NOTIFYDEV  global
   NR         14
   NTFY_ORDER 50-autocreate
   STATE      active
   TYPE       autocreate
Attributes:
   filelog    /opt/loxberry/log/plugins/fhem/%NAME.log


list

Type list <name> for detailed info.

Global:
  global               (no definition)

MQTT:
  MQTT                 (opened)

FHEMWEB:
  WEB                  (Initialized)
  WEB_192.168.2.142_3588 (Connected)
  WEBphone             (Initialized)
  WEBtablet            (Initialized)

XiaomiMQTTDevice:
  xBridge              (online)

XiaomiBTLESens:
  Beaucarnea           (active)
  Floribunda           (active)
  TempBath             (T: 19.5 H: 48.1)
  TempBedroom          (T: 18.6 H: 52.4)
  TempDG               (T: 19.1 H: 50.0)
  TempDiningEG         (error)
  TempEntranceEG       (T: 22.2 H: 43.3)
  TempGuestRoom        (T: 19.9 H: 47.0)
  TempRoomPW           (T: 18.8 H: 49.9)
  TempShower           (error)
  Yucca                (active)

eventTypes:
  eventTypes           (active)

notify:
  initialUsbCheck      (2019-01-15 22:43:00)
  n_publish_loxone     (2019-01-17 18:02:19)

FileLog:
  Logfile              (active)

allowed:
  allowed              (validFor:WEB,WEBphone,WEBtablet,telnetPort)

autocreate:
  autocreate           (active)

telnet:
  telnetForBlockingFn_1547588580 (Initialized)
  telnetPort           (Initialized)

rani22

#727
Brauche ich den /etc/systemd/system/xiaomi.service, wenn ich /etc/systemd/system/zigbee2mqtt.service am laufen habe?

edit/
Hab jetzt das ganze zum Laufen gebracht. Dazu musste ich alles neu aufsetzen. Alles geht jetzt mit /etc/systemd/system/zigbee2mqtt.service den /etc/systemd/system/xiaomi.service habe ich nicht eingerichtet.

Das Ganze läuft jetzt auf meinem Loxberry mit MQTT Gateway Plungin und Fhem Plugin.

Fillip

Hallo zusammen,

ich erhalte beim versuch zigbee2mqqt zu installieren, folgenden fehler
pi@raspberrypi:/opt/zigbee2mqtt $ sudo npm install
Unhandled rejection Error: Command failed: /usr/bin/git submodule update -q --init --recursivee_modules/.staging/rxjs-2179
fatal: Could not change back to '/root/.npm/_cacache/tmp/git-clone-088175fd': Permission denied

    at ChildProcess.exithandler (child_process.js:294:12)
    at ChildProcess.emit (events.js:182:13)
    at maybeClose (internal/child_process.js:962:16)
    at Socket.stream.socket.on (internal/child_process.js:381:11)
    at Socket.emit (events.js:182:13)
    at Pipe._handle.close (net.js:610:12)

Unhandled rejection Error: Command failed: /usr/bin/git submodule update -q --init --recursivee_modules/.staging/rxjs-2179
fatal: Could not change back to '/root/.npm/_cacache/tmp/git-clone-efc264dc': Permission denied

    at ChildProcess.exithandler (child_process.js:294:12)
    at ChildProcess.emit (events.js:182:13)
    at maybeClose (internal/child_process.js:962:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)

Unhandled rejection Error: Command failed: /usr/bin/git submodule update -q --init --recursivee_modules/.staging/rxjs-2179
fatal: Could not change back to '/root/.npm/_cacache/tmp/git-clone-62aae0ca': Permission denied

    at ChildProcess.exithandler (child_process.js:294:12)
    at ChildProcess.emit (events.js:182:13)
    at maybeClose (internal/child_process.js:962:16)
    at Socket.stream.socket.on (internal/child_process.js:381:11)
    at Socket.emit (events.js:182:13)
    at Pipe._handle.close (net.js:610:12)

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://npm.community>

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-01-21T18_15_34_286Z-debug.log


Versuche ich dann trotzdem zu starten, kommt folgender Feheler
pi@raspberrypi:/opt/zigbee2mqtt $ npm start

> zigbee2mqtt@1.0.1 start /opt/zigbee2mqtt
> node index.js

internal/modules/cjs/loader.js:583
    throw err;
    ^

Error: Cannot find module 'semver'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/opt/zigbee2mqtt/index.js:1:78)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zigbee2mqtt@1.0.1 start: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zigbee2mqtt@1.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2019-01-21T18_16_44_821Z-debug.log


Ich habe das versucht auf einem frischen RasPi zu installieren, eventuell jemand eine Lösung zu dem "Pronlem"?

ollir

#729
Zitat von: Fillip am 21 Januar 2019, 19:23:38
Hallo zusammen,

ich erhalte beim versuch zigbee2mqqt zu installieren, folgenden fehler
pi@raspberrypi:/opt/zigbee2mqtt $ sudo npm install
Unhandled rejection Error: Command failed: /usr/bin/git submodule update -q --init --recursivee_modules/.staging/rxjs-2179
fatal: Could not change back to '/root/.npm/_cacache/tmp/git-clone-088175fd': Permission denied

   .
.
.
.
.
ly not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2019-01-21T18_16_44_821Z-debug.log


Ich habe das versucht auf einem frischen RasPi zu installieren, eventuell jemand eine Lösung zu dem "Pronlem"?

Du installierst unter User root und ruftst das Programm unter User pi auf.
Instaliere und starte als User pi
Zitat#
# Install dependencies
sudo git clone https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt
sudo chown -R pi:pi /opt/zigbee2mqtt
cd /opt/zigbee2mqtt
npm install
/opt/zigbee2mqtt
npm start



ollir

Zitat von: rani22 am 19 Januar 2019, 13:05:28
Brauche ich den /etc/systemd/system/xiaomi.service, wenn ich /etc/systemd/system/zigbee2mqtt.service am laufen habe?

edit/
Hab jetzt das ganze zum Laufen gebracht. Dazu musste ich alles neu aufsetzen. Alles geht jetzt mit /etc/systemd/system/zigbee2mqtt.service den /etc/systemd/system/xiaomi.service habe ich nicht eingerichtet.

Das Ganze läuft jetzt auf meinem Loxberry mit MQTT Gateway Plungin und Fhem Plugin.

Beide Service funktionieren gleichzeitig nicht.
Ich habe bei mir nur den xiaomi.service genommen und erweitert mit user pi

Zitat
[Service]
.
.
.
User=pi
.
.

Fillip

Guten Abend zusammen,
auch ich habe einige Probleme beim Installieren, bekomme beim aufruf von npm install folgende Fehlermeldung:
pi@FHEM:/opt/zigbee2mqtt $ npm install
npm WARN tar ENOENT: no such file or directory, open '/opt/zigbee2mqtt/node_modules/.staging/sinon-249bc99f/package.json'
npm WARN tar ENOENT: no such file or directory, open '/opt/zigbee2mqtt/node_modules/.staging/sinon-249bc99f/AUTHORS'
npm WARN tar ENOENT: no such file or directory, open '/opt/zigbee2mqtt/node_modules/.staging/acorn-cd6124d3/dist/acorn.js.map'
npm WARN tar ENOENT: no such file or directory, open '/opt/zigbee2mqtt/node_modules/.staging/eslint-d135bca9/LICENSE'
npm WARN tar ENOENT: no such file or directory, open '/opt/zigbee2mqtt/node_modules/.staging/eslint-d135bca9/README.md'
npm WARN tar ENOENT: no such file or directory, open '/opt/zigbee2mqtt/node_modules/.staging/@babel/parser-d154d624/typings/babel-parser.d.ts'
npm WARN tar ENOENT: no such file or directory, open '/opt/zigbee2mqtt/node_modules/.staging/moment-6f9b3406/min/moment-with-locales.min.js'
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t https://github.com/Koenkk/zigbee-shepherd.git
npm ERR!
npm ERR!
npm ERR! exited with error code: 128

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2019-01-24T21_42_07_042Z-debug.log


Ich habe auch schonmal getestet das Git verzeichnis neu herunterzuladen, in ein neues Verzeichnis, jedoch sagt er er habe es heruntergeladen, aber es ist nicht da, wo es sein sollte...
pi@FHEM:/opt $ sudo git clone https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt-test
Cloning into '/opt/zigbee2mqtt-test'...
pi@FHEM:/opt $ ls
alexa-fhem  culfw-1.66  culfw-1.66.tar.gz  eff.org  fhem  jtradfri  letsencrypt  node  vc  zigbee2mqtt
pi@FHEM:/opt $

Kusselin

#732
Hallo Zusammen,

bekomme diesen Fehler hier..bin nach der Anleitung vorgegangen...

pi@raspberrypi:/opt/zigbee2mqtt $ npm start

> zigbee2mqtt@1.0.1 start /opt/zigbee2mqtt
> node index.js

  zigbee2mqtt:info 2019-1-26 14:14:38 Logging to directory: '/opt/zigbee2mqtt/da              ta/log/2019-01-26.14-14-38'
  zigbee2mqtt:info 2019-1-26 14:14:39 Starting zigbee2mqtt version 1.0.1 (commit               #43fc66c)
  zigbee2mqtt:info 2019-1-26 14:14:39 Starting zigbee-shepherd
  zigbee2mqtt:info 2019-1-26 14:14:42 Error while starting zigbee-shepherd, atte              mping to fix... (takes 60 seconds)
  zigbee2mqtt:info 2019-1-26 14:15:42 Starting zigbee-shepherd
  zigbee2mqtt:error 2019-1-26 14:15:45 Error while starting zigbee-shepherd!
  zigbee2mqtt:error 2019-1-26 14:15:45 Press the reset button on the stick (the one close     st to the USB) and start again
  zigbee2mqtt:error 2019-1-26 14:15:45 Failed to start
        {"message":"request timeout","stack":"Error: request timeout\n    at CcZnp.<anony     mous> (/opt/zigbee2mqtt/node_modules/cc-znp/lib/ccznp.js:255:22)\n    at Object.onceWrapp     er (events.js:273:13)\n    at CcZnp.emit (events.js:182:13)\n    at Timeout.<anonymous> (     /opt/zigbee2mqtt/node_modules/cc-znp/lib/ccznp.js:234:18)\n    at ontimeout (timers.js:43     6:11)\n    at tryOnTimeout (timers.js:300:5)\n    at listOnTimeout (timers.js:263:5)\n         at Timer.processTimers (timers.js:223:10)"}
^C

  zigbee2mqtt:error 2019-1-26 14:16:04 Not connected to MQTT server!
  zigbee2mqtt:error 2019-1-26 14:16:04 Cannot send message: topic: 'zigbee2mqtt/bridge/st     ate', payload: 'offline
  zigbee2mqtt:info 2019-1-26 14:16:04 zigbee-shepherd stopped


list von der Bridge:
Internals:
   CFGFN     
   DEF        bridge
   FRIENDLYNAME bridge
   FUUID      5c4c6dbd-f33f-a264-1ff8-06c44ba97aacb72c
   IODev      mqtt
   MODEL      bridge
   NAME       xBridge
   NOTIFYDEV  bridge
   NR         232
   SID        bridge
   STATE      paired
   TYPE       XiaomiMQTTDevice
   READINGS:
     2019-01-26 14:26:55   transmission-state outgoing publish acknowledged
   message_ids:
   subscribe:
     zigbee2mqtt/bridge
     xiaomi/bridge/#
     zigbee2mqtt/bridge/#
   subscribeExpr:
     ^zigbee2mqtt\/bridge$
     ^xiaomi\/bridge.*$
     ^zigbee2mqtt\/bridge.*$
   subscribeQos:
     xiaomi/bridge/# 0
     zigbee2mqtt/bridge 0
     zigbee2mqtt/bridge/# 0
   subscribeReadings:
     zigbee2mqtt/bridge/config/devices:
     zigbee2mqtt/bridge/config/permit_join:
Attributes:
   IODev      mqtt


und von meinem mqtt server:
Internals:
   DEF        192.168.200.120:1883
   DeviceName 192.168.200.120:1883
   FD         56
   FUUID      5c45dbb5-f33f-a264-df40-0e00ee07237dfeea
   NAME       mqtt
   NOTIFYDEV  global
   NR         182
   NTFY_ORDER 50-mqtt
   PARTIAL   
   STATE      opened
   TYPE       MQTT
   buf       
   msgid      9
   ping_received 1
   timeout    60
   READINGS:
     2019-01-26 14:31:18   connection      active
     2019-01-26 14:24:15   state           opened
   messages:
Attributes:


configuration.yaml
# MQTT settings
mqtt:
  # MQTT base topic for zigbee2mqtt MQTT messages
  base_topic: zigbee2mqtt
  # MQTT server URL
  server: 'mqtt://localhost'
  # MQTT server authentication, uncomment if required:
  # user: my_user
  # password: my_password


Über ne Info vielen Dank

Beta-User

Das klingt eher danach, als wäre der Stick nicht zu finden....
=> Pfad in der yaml paßt?
=> Rechte?
=> Konflikte? ("by-id"?) (Evtl. greift FHEM auf dieselbe Schnittstelle zu, das Teil verhält sich wie ein Modem - genau wie der CUL; Wiki: Mehrere USB-Geräte einbinden; kann man entsprechend bei zigbee2mqtt anwenden).
Server: HP-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: MiLight@ESP-GW, BT@OpenMQTTGw | MySensors: seriell, v.a. 2.3.1@RS485 | ZWave | ZigBee@deCONZ | SIGNALduino | MapleCUN | RHASSPY
svn: u.a MySensors, Weekday-&RandomTimer, Twilight,  div. attrTemplate-files

Kusselin

#734
Hallo Beta-User,
Da der CC2531 am gleichen Raspi häbgt an dem auch fhem läuft, kann ja localhost stehen bleiben..

Rechte habe ich aus der Anleitung genommen
sudo chown -R pi:pi /opt/zigbee2mqtt


Ich habe den cul 433 und den CC2531 an den usb dran..bei ausgabe von ls /serial/by-id kommt das:

pi@raspberrypi:~ $ ls /dev/serial/by-id
usb-busware.de_CUL433-if00
usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B0018E32C4C-if00


Das sollte dich auch passen
Gruss

Edit: was meinst du mit dem pfad in der .yaml Datei anpassen...???
Steht das auch in der Anleitung?