Xiaomi Smart Home Komponenten

Begonnen von FosCo, 21 Dezember 2016, 18:59:59

Vorheriges Thema - Nächstes Thema

chrisnitt

Hallo Torte,

danke für Deine Antwort. Ich habe die Version 1.41. Und eben mal auf Verbose 5 gestellt. Die letzten drei Tage lief fhem anstandslos durch. Ich bin gespannt.

Viele Grüße,
Chris

torte

Hi Chris,

Verbose 5 macht dir das Log ziemlich voll ;-)
nur das Du dich nicht wunderst.

Grüße
Torte

Typ1er

#1007
Abend Torte,

wieso kann ich den von FHEM das Gateway nicht scharf schalten, fehlt das aus einem bestimmten Grund?

Oder muss ich alle Regeln mit dem "ringtone" abbilden?

torte

Hi Typ1er,

ja hat einen Grund. Das geht nicht über die API.
Das Modul macht nur das was die API zulässt.

Aber mit nen paar DOIFs bekommt man das auch  schöner hin [emoji16]

Grüße
Torte

Gesendet mit Tapatalk


Typ1er

Danke für die Info, ich exportiere die meisten Funktionen nach Homekit.

Hier habe ich dafür ein zweites Plugin am Laufen, das hätte mir gern gespart.

ahlermi

Zitat von: burgi400 am 04 April 2019, 16:38:28
Hallo zusammen,

wenn ich ein Gateway anlege, zeigt fhem das Gateway schön an, stürtzt aber gleichzeitig ab. Also kann ich z. B. nicht das Paswort setzen oder ein andres Gerät anwählen. Das gehtr so schnell, dass es kaum möglich ist irgendetwas anzuklicken bevor der Absturz erfolgt.
Selbst für einen Log-Eintrag habe ich fast 10 Versuche benötigt, da fhem auch dafür anscheinend keine Zeit hatte.
Hier der Log-Eintrag:
MiGateway: connect> ConnectStart
2019.03.31 16:47:07 5: MiGateway: getGatewaySID> Answer {"cmd":"iam","port":"9898","sid":"xxxxxxxx","model":"gateway","proto_version":"1.1.2","ip":"192.168.xxx.29"}
2019.03.31 16:47:07 3: MiGateway: getGatewaySID> Find SID for Gateway: xxxxxxxx
Creating socket: Protocol not available

Jemand eine Idee, was für ein Protokoll-Problem vorliegen kann?

System: BananaPi mit Lubuntu, libs nach Wiki fehlerfrei installiert, Gateway mit und ohne eingerichtete Sensoren versucht, Developer-Modus etc. aktiviert
Steuerung per Xiaomi-App ohne Probleme möglich.

Viele Grüße
Ralf


Zitat von: ahlermi am 11 Februar 2019, 16:08:16
So, ich bin jetzt mit dem Einkreisen des Problems weiter.

Das Modul scheint die Verbindung abzulehnen solange noch eine Kommunikation aktiv ist.
Getestet habe ich das indem ich das GW einfach mal 60 sekunden lang jede Sekunde blinken lassen habe und einen zweiten Befehl abgeschickt habe. Fazit Fhem stürzt ab.

Nach der Anpassung in Zeile 548 oder um den dreh


    Log3 $name, 4, "$name: Write> $msg " . $GATEWAY;
        my $sock = $hash->{CD};
        my $MAXLEN  = 1024;
#       $sock->mcast_send($msg,$GATEWAY .':9898') or die "send: $!";
        if (!$sock->mcast_send($msg,$GATEWAY .':9898')){
          Log3 $name, 1, "Error: " . $! . " " . $msg . " " . $GATEWAY . ":9898";
        }


treten die Probleme jetzt nicht mehr auf.

Gruß Michael
PI4 FHEM, PI3 FHEM, 6 x Echo mit talk2fhem, Siri, SNIPS auf PI3 mit Samson UB1, YeeLight, Homematic, MAX!, 433Mhz, LaCross, Xiaomi Vacuum V1, ESPEasy, Gardena, Telegram, FLOORPLAN, HEOS, Xiaomi Aqara, Sonoff, SolvisMax, SolvisClient, HUE, ESPEasy für Bayernlüfter, Harmony, Tasmota, JKBMS, EASUN


chrisnitt

Bei mir lief es jetzt die letzten Wochen stabil, dachte schon, es hätte sich selbst reguliert. Leider ist es dann aber die letzten Tage wieder ein paar Mal zu unterschiedlichen Zeiten abgerauscht. Ich kopiere hier mal das Log von heute Nacht. Um 6:52 Uhr hab ich bemerkt, dass fhem nicht mehr läuft und neu gestartet. Kann sich jemand einen Reim darauf machen?

2019.06.20 23:46:37 4: MiControlHub: Reading> Heartbeat from 192.168.111.109 received with 7811dcfb1a12
2019.06.20 23:46:47 5: MiControlHub: Read> Read start
2019.06.20 23:46:47 5: MiControlHub: Read> [PLAIN] {"cmd":"heartbeat","model":"gateway","sid":"7811dcfb1a12","short_id":"0","token":"XXXXXXXXXXXXXXXXXX","data":"{\"ip\":\"192.168.111.109\"}"}
2019.06.20 23:46:47 5: MiControlHub: Read> HASH correctly
2019.06.20 23:46:47 5: MiControlHub: Reading> Reading start
2019.06.20 23:46:47 4: MiControlHub: Reading> Heartbeat from 192.168.111.109 received with 7811dcfb1a12
2019.06.20 23:46:57 5: MiControlHub: Read> Read start
2019.06.20 23:46:57 5: MiControlHub: Read> [PLAIN] {"cmd":"heartbeat","model":"gateway","sid":"7811dcfb1a12","short_id":"0","token":"yyyyyyyyyyyyyyyy","data":"{\"ip\":\"192.168.111.109\"}"}
2019.06.20 23:46:57 5: MiControlHub: Read> HASH correctly
2019.06.20 23:46:57 5: MiControlHub: Reading> Reading start
2019.06.20 23:46:57 4: MiControlHub: Reading> Heartbeat from 192.168.111.109 received with 7811dcfb1a12
2019.06.20 23:46:57 5: MiControlHub: Read> Read start
malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "<param><code value="...") at ./FHEM/71_XiaomiSmartHome.pm line 135.
2019.06.21 06:52:11 1: Including fhem.cfg
2019.06.21 06:52:12 3: WEB: port 8083 opened
2019.06.21 06:52:12 3: WEBphone: port 8084 opened
2019.06.21 06:52:12 3: WEBtablet: port 8085 opened
2019.06.21 06:52:12 2: eventTypes: loaded 1790 events from ./log/eventTypes.txt

chrisnitt

Letzte Aktion scheint immer "Read> Read start" zu sein. Und wieder der Verweis auf die Zeile 135

2019.06.23 07:14:48 4: MiControlHub: Reading> Heartbeat from 192.168.111.109 received with 7811dcfb1a12
2019.06.23 07:14:58 5: MiControlHub: Read> Read start
2019.06.23 07:14:58 5: MiControlHub: Read> [PLAIN] {"cmd":"heartbeat","model":"gateway","sid":"7811dcfb1a12","short_id":"0","token":"xxxxxxxxxxxxxx","data":"{\"ip\":\"192.168.111.109\"}"}
2019.06.23 07:14:58 5: MiControlHub: Read> HASH correctly
2019.06.23 07:14:58 5: MiControlHub: Reading> Reading start
2019.06.23 07:14:58 4: MiControlHub: Reading> Heartbeat from 192.168.111.109 received with 7811dcfb1a12
2019.06.23 07:15:08 5: MiControlHub: Read> Read start
2019.06.23 07:15:08 5: MiControlHub: Read> [PLAIN] {"cmd":"heartbeat","model":"gateway","sid":"7811dcfb1a12","short_id":"0","token":"yyyyyyyyyyyyyyyyy","data":"{\"ip\":\"192.168.111.109\"}"}
2019.06.23 07:15:08 5: MiControlHub: Read> HASH correctly
2019.06.23 07:15:08 5: MiControlHub: Reading> Reading start
2019.06.23 07:15:08 4: MiControlHub: Reading> Heartbeat from 192.168.111.109 received with 7811dcfb1a12
2019.06.23 07:15:11 5: MiControlHub: Read> Read start
malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "<param><code value="...") at ./FHEM/71_XiaomiSmartHome.pm line 135.
2019.06.23 10:26:50 1: Including fhem.cfg
2019.06.23 10:26:50 3: WEB: port 8083 opened
2019.06.23 10:26:50 3: WEBphone: port 8084 opened
2019.06.23 10:26:50 3: WEBtablet: port 8085 opened
2019.06.23 10:26:50 2: eventTypes: loaded 1790 events from ./log/eventTypes.txt

chrisnitt

Hier noch ein letzter Eintrag. Ist gestern nach ein paar Stunden wieder abgeraucht. Leider bin ich ziemlich planlos.

2019.06.23 14:45:07 5: MiControlHub: Read> Read start
2019.06.23 14:45:07 5: MiControlHub: Read> [PLAIN] {"cmd":"heartbeat","model":"gateway","sid":"7811dcfb1a12","short_id":"0","token":"yyyyyyyyyyyyyyy","data":"{\"ip\":\"192.168.111.109\"}"}
2019.06.23 14:45:07 5: MiControlHub: Read> HASH correctly
2019.06.23 14:45:07 5: MiControlHub: Reading> Reading start
2019.06.23 14:45:07 4: MiControlHub: Reading> Heartbeat from 192.168.111.109 received with 7811dcfb1a12
2019.06.23 14:45:14 5: MiControlHub: Read> Read start
2019.06.23 14:45:14 5: MiControlHub: Read> [PLAIN] {"cmd":"report","model":"gateway","sid":"7811dcfb1a12","short_id":0,"data":"{\"rgb\":0,\"illumination\":1223}"}
2019.06.23 14:45:14 5: MiControlHub: Read> HASH correctly
2019.06.23 14:45:14 5: MiControlHub: Reading> Reading start
2019.06.23 14:45:14 3: MiControlHub: Reading> SID: 7811dcfb1a12 Type: Gateway RGB: 0
2019.06.23 14:45:14 3: MiControlHub: Reading> SID: 7811dcfb1a12 Type: Gateway Illumination: 1223
2019.06.23 14:45:17 5: MiControlHub: Read> Read start
2019.06.23 14:45:17 5: MiControlHub: Read> [PLAIN] {"cmd":"heartbeat","model":"gateway","sid":"7811dcfb1a12","short_id":"0","token":"xxxxxxxxxxxxxx","data":"{\"ip\":\"192.168.111.109\"}"}
2019.06.23 14:45:17 5: MiControlHub: Read> HASH correctly
2019.06.23 14:45:17 5: MiControlHub: Reading> Reading start
2019.06.23 14:45:17 4: MiControlHub: Reading> Heartbeat from 192.168.111.109 received with 7811dcfb1a12
2019.06.23 14:45:24 5: MiControlHub: Read> Read start
2019.06.23 14:45:24 5: MiControlHub: Read> [PLAIN] {"cmd":"report","model":"gateway","sid":"7811dcfb1a12","short_id":0,"data":"{\"rgb\":0,\"illumination\":1249}"}
2019.06.23 14:45:24 5: MiControlHub: Read> HASH correctly
2019.06.23 14:45:24 5: MiControlHub: Reading> Reading start
2019.06.23 14:45:24 3: MiControlHub: Reading> SID: 7811dcfb1a12 Type: Gateway RGB: 0
2019.06.23 14:45:24 3: MiControlHub: Reading> SID: 7811dcfb1a12 Type: Gateway Illumination: 1249
2019.06.23 14:45:26 5: MiControlHub: Read> Read start
malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "<param><code value="...") at ./FHEM/71_XiaomiSmartHome.pm line 135.
2019.06.23 17:26:25 1: Including fhem.cfg
2019.06.23 17:26:26 3: WEB: port 8083 opened
2019.06.23 17:26:26 3: WEBphone: port 8084 opened
2019.06.23 17:26:26 3: WEBtablet: port 8085 opened
2019.06.23 17:26:26 2: eventTypes: loaded 1790 events from ./log/eventTypes.txt

torte

#1015
Hi Chris,

mmmmhhh komisch,


malformed JSON string


Ich guck mal ob ich Dir was basteln kann damit mir sehen können warum Dein Gateway Dir ein nicht ordentliches Json Paket vorbeischickt.
Ist das evtl. das neue Gateway Aqara?
Welche Version vom Modul hast Du? 1.41 bzw 1.40?

Grüße
Torte

chrisnitt

Hi Torte,
ich hab das Modul 1.41. Nach der Gateway-Bezeichung muss ich nachher ganz analog wenn ich daheim bin auf dem Gerät schauen, bei meinen Mails hab ich es eben vor Lauter anderer Aqara und Xiaomi Bestellungen nicht gefunden...  ;D
Danke schonmal, ich melde mich nachher.
Grüße,
Chris

chrisnitt

Moin Torte,
es ist offiziell: Ich habe keine Ahnung, welches Gateway ich habe...  :o  ::)
Ich vermute, es ist das aktuellste Aqara Gateway. Ich hänge Dir hier mal zwei Fotos an. In der Xiaomi Home App habe ich auch keine Bezeichnung gefunden.

Typ1er

Ich würde sagen das ist der ohne Homekit. Der mit Homekit lässt sich nicht mit fhem Koppeln.

ofno

Zitat von: chrisnitt am 25 Juni 2019, 06:35:41
Moin Torte,
es ist offiziell: Ich habe keine Ahnung, welches Gateway ich habe...  :o  ::)
Ich vermute, es ist das aktuellste Aqara Gateway. Ich hänge Dir hier mal zwei Fotos an. In der Xiaomi Home App habe ich auch keine Bezeichnung gefunden.
Also ich hab auch einen DGNWG02LM auch die gleiche CMIT ID nur nicht rund angeordnet