[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer

Begonnen von CoolTux, 11 Januar 2018, 15:42:45

Vorheriges Thema - Nächstes Thema

KyleK

Seit dem letzten Update habe ich eine Perl-Warnung im Log, die immer wieder auftaucht (ich habe insgesamt 5 ThermoHygrometer laufen):

2020.01.06 20:44:31 1:  PERL WARNING: Use of uninitialized value $gtResult[0] in string ne at /opt/fhem/FHEM/74_XiaomiBTLESens.pm line 753.


Hier ist das Log eines Devices mit verbose = 5:

2020.01.06 20:43:32 5:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 4C:65:A8:DB:8D:DA --char-read -a 0x18 2>&1 and loop 0
2020.01.06 20:43:47 5:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,5d
2020.01.06 20:43:47 4:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,5d
2020.01.06 20:43:47 5:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - ExecGatttool_Done: gatttool return string: Xiaomi_Sensor_Bad_aussen|4C:65:A8:DB:8D:DA|ok|read|0x18|{"gtResult":"5d "}
2020.01.06 20:43:47 4:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - ProcessingNotification
2020.01.06 20:43:47 4:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - ProcessingNotification: handle 0x18
2020.01.06 20:43:47 4:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - Thermo/Hygro Sens Handle0x18
2020.01.06 20:43:47 4:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - WriteReadings: Readings were written
2020.01.06 20:43:47 4:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - Run CreateParamGatttool with mod: write
2020.01.06 20:43:47 5:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - Write XiaomiBTLESens_ExecGatttool_Run Xiaomi_Sensor_Bad_aussen|4C:65:A8:DB:8D:DA|write|0x10|0100
2020.01.06 20:43:47 5:  Execute Command: $psCommand | grep -E "$gatttoolCmdlineStaticEscaped"
2020.01.06 20:43:47 5:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:DB:8D:DA --char-write-req -a 0x10 -n 0100 --listen 2>&1 and loop 0
2020.01.06 20:43:57 5:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 30 2e 34 20 48 3d 35 35 2e 31 00
Notification handle = 0x000e value,54 3d 32 30 2e 35 20 48 3d 35 34 2e 38 00
Notification handle = 0x000e value,54 3d 32 30 2e 34 20 48 3d 35 35 2e 31 00
Notification handle = 0x000e value,54 3d 32 30 2e 35 20 48 3d 35 34 2e 38 00
Notification handle = 0x000e value,54 3d 32 30 2e 34 20 48 3d 35 35 2e 30 00
Notification handle = 0x000e value,54 3d 32 30 2e 35 20 48 3d 35 34 2e 38 00
Notification handle = 0x000e value,54 3d 32 30 2e 34 20 48 3d 35 35 2e 31 00
Notification handle = 0x000e value,54 3d 32 30 2e 35 20 48 3d 35 34 2e 38 00
Notification handle = 0x000e value,54 3d 32 30 2e 34 20 48 3d 35 35 2e 31 00
Notification handle = 0x000e value,54 3d 32 30 2e 35 20 48 3d 35 34 2e 38 00
Notification handle = 0x000e value,54 3d 32 30 2e 35 20 48 3d 35 35 2e 33 00
Notification handle = 0x000e value,54 3d 32 30 2e 36 20 48 3d 35 34 2e 38 00
2020.01.06 20:43:57 5:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:DB:8D:DA --char-write-req -a 0x10 -n 0100 --listen 2>&1 and loop 1
2020.01.06 20:44:07 5:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - ExecGatttool_Run: gatttool loop result
2020.01.06 20:44:07 5:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:DB:8D:DA --char-write-req -a 0x10 -n 0100 --listen 2>&1 and loop 2
2020.01.06 20:44:17 5:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - ExecGatttool_Run: gatttool loop result
2020.01.06 20:44:17 5:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:DB:8D:DA --char-write-req -a 0x10 -n 0100 --listen 2>&1 and loop 3
2020.01.06 20:44:27 5:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 30 2e 35 20 48 3d 35 34 2e 37 00
Notification handle = 0x000e value,54 3d 32 30 2e 35 20 48 3d 35 35 2e 31 00
Notification handle = 0x000e value,54 3d 32 30 2e 36 20 48 3d 35 34 2e 38 00
Notification handle = 0x000e value,54 3d 32 30 2e 35 20 48 3d 35 35 2e 30 00
Notification handle = 0x000e value,54 3d 32 30 2e 35 20 48 3d 35 34 2e 38 00
Notification handle = 0x000e value,54 3d 32 30 2e 35 20 48 3d 35 35 2e 31 00
Notification handle = 0x000e value,54 3d 32 30 2e 36 20 48 3d 35 34 2e 38 00
Notification handle = 0x000e value,54 3d 32 30 2e 35 20 48 3d 35 34 2e 38 00
2020.01.06 20:44:27 5:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:DB:8D:DA --char-write-req -a 0x10 -n 0100 --listen 2>&1 and loop 4
2020.01.06 20:44:31 1:  PERL WARNING: Use of uninitialized value $gtResult[0] in string ne at /opt/fhem/FHEM/74_XiaomiBTLESens.pm line 753.


Was auffällig ist, dass er mit dem neuen Code scheinbar 5-mal durch die do-while-Schleife läuft, während das mit der vorherigen Version nicht so war.
FHEM on Raspberry Pi 3B+
CUL868
7x MAX! Thermostat, 8x MAX! Fensterkontakte
Conbee II + deConz, TradFri Lampen, Osram Smart+ Steckdosen

CoolTux

Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

mi.ke

Zitat von: Pati_Alpha am 06 Januar 2020, 15:23:52
Geil, das sieht ja mal cool aus! Grade die Sache mit dem ReadingsSupervision Modul.

Bin eben durch Zufall auf den den neuen Namen gestoßen:

neues Modul 98_readingsWatcher , war 98_ReadingsSupervision
https://forum.fhem.de/index.php/topic,49408.msg410767.html#msg410767

Cheers
FHEM 5.9 | RPi4 + 5 x RPi(Z) + FB7590 + FB 6890 LTE via LAN und WAN (VPN) verbunden.
2 x CUL868 + 3 x RFXTRX(e) + 6 x HMwLanGW + 4 x z2tGw + 5 x LGW + 2 x IRBlast + CO2 +++
FS20, FHT, FMS, Elro(mod), CM160, Revolt, LGTV, STV, AVR, withings, HM-sec-*, HM-CC-RT-DN, AMAD, PCA301, arlo, Aqara

CoolTux

Zitat von: KyleK am 06 Januar 2020, 21:19:41
Seit dem letzten Update habe ich eine Perl-Warnung im Log, die immer wieder auftaucht (ich habe insgesamt 5 ThermoHygrometer laufen):

2020.01.06 20:44:31 1:  PERL WARNING: Use of uninitialized value $gtResult[0] in string ne at /opt/fhem/FHEM/74_XiaomiBTLESens.pm line 753.


Hier ist das Log eines Devices mit verbose = 5:

2020.01.06 20:43:32 5:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 4C:65:A8:DB:8D:DA --char-read -a 0x18 2>&1 and loop 0
2020.01.06 20:43:47 5:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,5d
2020.01.06 20:43:47 4:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,5d
2020.01.06 20:43:47 5:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - ExecGatttool_Done: gatttool return string: Xiaomi_Sensor_Bad_aussen|4C:65:A8:DB:8D:DA|ok|read|0x18|{"gtResult":"5d "}
2020.01.06 20:43:47 4:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - ProcessingNotification
2020.01.06 20:43:47 4:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - ProcessingNotification: handle 0x18
2020.01.06 20:43:47 4:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - Thermo/Hygro Sens Handle0x18
2020.01.06 20:43:47 4:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - WriteReadings: Readings were written
2020.01.06 20:43:47 4:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - Run CreateParamGatttool with mod: write
2020.01.06 20:43:47 5:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - Write XiaomiBTLESens_ExecGatttool_Run Xiaomi_Sensor_Bad_aussen|4C:65:A8:DB:8D:DA|write|0x10|0100
2020.01.06 20:43:47 5:  Execute Command: $psCommand | grep -E "$gatttoolCmdlineStaticEscaped"
2020.01.06 20:43:47 5:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:DB:8D:DA --char-write-req -a 0x10 -n 0100 --listen 2>&1 and loop 0
2020.01.06 20:43:57 5:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 30 2e 34 20 48 3d 35 35 2e 31 00
Notification handle = 0x000e value,54 3d 32 30 2e 35 20 48 3d 35 34 2e 38 00
Notification handle = 0x000e value,54 3d 32 30 2e 34 20 48 3d 35 35 2e 31 00
Notification handle = 0x000e value,54 3d 32 30 2e 35 20 48 3d 35 34 2e 38 00
Notification handle = 0x000e value,54 3d 32 30 2e 34 20 48 3d 35 35 2e 30 00
Notification handle = 0x000e value,54 3d 32 30 2e 35 20 48 3d 35 34 2e 38 00
Notification handle = 0x000e value,54 3d 32 30 2e 34 20 48 3d 35 35 2e 31 00
Notification handle = 0x000e value,54 3d 32 30 2e 35 20 48 3d 35 34 2e 38 00
Notification handle = 0x000e value,54 3d 32 30 2e 34 20 48 3d 35 35 2e 31 00
Notification handle = 0x000e value,54 3d 32 30 2e 35 20 48 3d 35 34 2e 38 00
Notification handle = 0x000e value,54 3d 32 30 2e 35 20 48 3d 35 35 2e 33 00
Notification handle = 0x000e value,54 3d 32 30 2e 36 20 48 3d 35 34 2e 38 00
2020.01.06 20:43:57 5:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:DB:8D:DA --char-write-req -a 0x10 -n 0100 --listen 2>&1 and loop 1
2020.01.06 20:44:07 5:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - ExecGatttool_Run: gatttool loop result
2020.01.06 20:44:07 5:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:DB:8D:DA --char-write-req -a 0x10 -n 0100 --listen 2>&1 and loop 2
2020.01.06 20:44:17 5:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - ExecGatttool_Run: gatttool loop result
2020.01.06 20:44:17 5:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:DB:8D:DA --char-write-req -a 0x10 -n 0100 --listen 2>&1 and loop 3
2020.01.06 20:44:27 5:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 30 2e 35 20 48 3d 35 34 2e 37 00
Notification handle = 0x000e value,54 3d 32 30 2e 35 20 48 3d 35 35 2e 31 00
Notification handle = 0x000e value,54 3d 32 30 2e 36 20 48 3d 35 34 2e 38 00
Notification handle = 0x000e value,54 3d 32 30 2e 35 20 48 3d 35 35 2e 30 00
Notification handle = 0x000e value,54 3d 32 30 2e 35 20 48 3d 35 34 2e 38 00
Notification handle = 0x000e value,54 3d 32 30 2e 35 20 48 3d 35 35 2e 31 00
Notification handle = 0x000e value,54 3d 32 30 2e 36 20 48 3d 35 34 2e 38 00
Notification handle = 0x000e value,54 3d 32 30 2e 35 20 48 3d 35 34 2e 38 00
2020.01.06 20:44:27 5:  XiaomiBTLESens (Xiaomi_Sensor_Bad_aussen) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:DB:8D:DA --char-write-req -a 0x10 -n 0100 --listen 2>&1 and loop 4
2020.01.06 20:44:31 1:  PERL WARNING: Use of uninitialized value $gtResult[0] in string ne at /opt/fhem/FHEM/74_XiaomiBTLESens.pm line 753.


Was auffällig ist, dass er mit dem neuen Code scheinbar 5-mal durch die do-while-Schleife läuft, während das mit der vorherigen Version nicht so war.

Kannst Du bitte einmal diese Version hier testen?
https://github.com/fhem/XiaomiBTLESens/archive/devel.zip

Zip entpacken und die pm ins /opt/fhem/FHEM Verzeichnis kopieren. Rechte anpassen nicht vergessen und FHEM neustarten. Die alte Datei am besten vorher sichern.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

KyleK

Hallo CoolTux,

ich hab die neue Datei eingespielt.
Die Warnung ist nun weg, und prinzipiell scheints auch zu funktionieren (Readings werden aktualisiert).

Ich werde dennoch nicht schlau aus den Logs:

2020.01.08 23:43:56 4: XiaomiBTLESens (Xiaomi_Sensor_Flur) - Run CreateParamGatttool with mod: write
2020.01.08 23:43:57 5: XiaomiBTLESens (Xiaomi_Sensor_Flur) - Write XiaomiBTLESens_ExecGatttool_Run Xiaomi_Sensor_Flur|4C:65:A8:D5:7A:AD|write|0x10|0100
2020.01.08 23:43:57 5: XiaomiBTLESens (Xiaomi_Sensor_Flur) - ExecGatttool_Run: Execute Command ps ax | grep -E [g]atttool -i hci0 -b 4C:65:A8:D5:7A:AD
2020.01.08 23:43:57 5: XiaomiBTLESens (Xiaomi_Sensor_Flur) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:7A:AD --char-write-req -a 0x10 -n 0100 --listen 2>&1 and loop 0
2020.01.08 23:44:07 5: XiaomiBTLESens (Xiaomi_Sensor_Flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 31 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 32 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 33 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 32 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 33 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 30 2e 39 00
Notification handle = 0x000e value,54 3d 31 39 2e 37 20 48 3d 35 31 2e 32 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 34 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 31 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 33 00

2020.01.08 23:44:07 5: XiaomiBTLESens (Xiaomi_Sensor_Flur) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:7A:AD --char-write-req -a 0x10 -n 0100 --listen 2>&1 and loop 1
2020.01.08 23:44:17 5: XiaomiBTLESens (Xiaomi_Sensor_Flur) - ExecGatttool_Run: gatttool loop result Characteristic Write Request failed,Request attribute has encountered an unlikely error

2020.01.08 23:44:17 5: XiaomiBTLESens (Xiaomi_Sensor_Flur) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:7A:AD --char-write-req -a 0x10 -n 0100 --listen 2>&1 and loop 2
2020.01.08 23:44:27 5: XiaomiBTLESens (Xiaomi_Sensor_Flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 33 00
Notification handle = 0x000e value,54 3d 31 39 2e 39 20 48 3d 35 31 2e 32 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 33 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 34 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 32 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 33 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 34 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 32 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 33 00

2020.01.08 23:44:27 5: XiaomiBTLESens (Xiaomi_Sensor_Flur) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:7A:AD --char-write-req -a 0x10 -n 0100 --listen 2>&1 and loop 3
2020.01.08 23:44:37 5: XiaomiBTLESens (Xiaomi_Sensor_Flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 31 39 2e 39 20 48 3d 35 31 2e 31 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 32 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 30 2e 39 00
Notification handle = 0x000e value,54 3d 31 39 2e 37 20 48 3d 35 31 2e 33 00
Notification handle = 0x000e value,54 3d 31 39 2e 39 20 48 3d 35 31 2e 31 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 33 00
Notification handle = 0x000e value,54 3d 31 39 2e 39 20 48 3d 35 31 2e 32 00
Notification handle = 0x000e value,54 3d 31 39 2e 39 20 48 3d 35 31 2e 33 00
Notification handle = 0x000e value,54 3d 31 39 2e 39 20 48 3d 35 31 2e 31 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 34 00
Notification handle = 0x000e value,54 3d 31 39 2e 39 20 48 3d 35 31 2e 32 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 33 00

2020.01.08 23:44:37 5: XiaomiBTLESens (Xiaomi_Sensor_Flur) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:7A:AD --char-write-req -a 0x10 -n 0100 --listen 2>&1 and loop 4
2020.01.08 23:44:47 5: XiaomiBTLESens (Xiaomi_Sensor_Flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2020.01.08 23:44:47 3: XiaomiBTLESens (Xiaomi_Sensor_Flur) - ExecGatttool_Run: errorcode: "124", ErrorString: "Characteristic value was written successfully
"
2020.01.08 23:44:47 4: XiaomiBTLESens (Xiaomi_Sensor_Flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2020.01.08 23:44:47 5: XiaomiBTLESens (Xiaomi_Sensor_Flur) - ExecGatttool_Done: gatttool return string: Xiaomi_Sensor_Flur|4C:65:A8:D5:7A:AD|error|write|0x10|{"gtResult":"no data response"}
2020.01.08 23:44:47 4: XiaomiBTLESens (Xiaomi_Sensor_Flur) - ProcessingErrors
2020.01.08 23:44:47 4: XiaomiBTLESens (Xiaomi_Sensor_Flur) - WriteReadings: Readings were written
2020.01.08 23:45:43 4: XiaomiBTLESens (Xiaomi_Sensor_Flur) - Run CreateParamGatttool with mod: write
2020.01.08 23:45:43 5: XiaomiBTLESens (Xiaomi_Sensor_Flur) - Write XiaomiBTLESens_ExecGatttool_Run Xiaomi_Sensor_Flur|4C:65:A8:D5:7A:AD|write|0x10|0100
2020.01.08 23:45:43 4: XiaomiBTLESens (Xiaomi_Sensor_Flur) - stateRequestTimer: Call Request Timer
2020.01.08 23:45:43 5: XiaomiBTLESens (Xiaomi_Sensor_Flur) - ExecGatttool_Run: Execute Command ps ax | grep -E [g]atttool -i hci0 -b 4C:65:A8:D5:7A:AD
2020.01.08 23:45:43 5: XiaomiBTLESens (Xiaomi_Sensor_Flur) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:7A:AD --char-write-req -a 0x10 -n 0100 --listen 2>&1 and loop 0
2020.01.08 23:45:45 4: XiaomiBTLESens (Xiaomi_Sensor_Flur) - WriteReadings: Readings were written
2020.01.08 23:45:53 5: XiaomiBTLESens (Xiaomi_Sensor_Flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 31 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 33 00
Notification handle = 0x000e value,54 3d 31 39 2e 39 20 48 3d 35 31 2e 32 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 33 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 30 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 32 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 30 2e 39 00
Notification handle = 0x000e value,54 3d 31 39 2e 37 20 48 3d 35 31 2e 32 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 31 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 32 00

2020.01.08 23:45:53 5: XiaomiBTLESens (Xiaomi_Sensor_Flur) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:7A:AD --char-write-req -a 0x10 -n 0100 --listen 2>&1 and loop 1
2020.01.08 23:46:03 5: XiaomiBTLESens (Xiaomi_Sensor_Flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 31 39 2e 39 20 48 3d 35 31 2e 32 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 32 00

2020.01.08 23:46:03 5: XiaomiBTLESens (Xiaomi_Sensor_Flur) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:7A:AD --char-write-req -a 0x10 -n 0100 --listen 2>&1 and loop 2
2020.01.08 23:46:13 5: XiaomiBTLESens (Xiaomi_Sensor_Flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 31 00
Notification handle = 0x000e value,54 3d 31 39 2e 37 20 48 3d 35 31 2e 33 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 33 00

2020.01.08 23:46:13 5: XiaomiBTLESens (Xiaomi_Sensor_Flur) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:7A:AD --char-write-req -a 0x10 -n 0100 --listen 2>&1 and loop 3
2020.01.08 23:46:23 5: XiaomiBTLESens (Xiaomi_Sensor_Flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 31 39 2e 39 20 48 3d 35 31 2e 32 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 33 00
Notification handle = 0x000e value,54 3d 31 39 2e 39 20 48 3d 35 31 2e 31 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 33 00

2020.01.08 23:46:23 5: XiaomiBTLESens (Xiaomi_Sensor_Flur) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:7A:AD --char-write-req -a 0x10 -n 0100 --listen 2>&1 and loop 4
2020.01.08 23:46:33 5: XiaomiBTLESens (Xiaomi_Sensor_Flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 31 39 2e 39 20 48 3d 35 31 2e 31 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 33 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 31 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 33 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 30 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 32 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 33 00

2020.01.08 23:46:33 3: XiaomiBTLESens (Xiaomi_Sensor_Flur) - ExecGatttool_Run: errorcode: "124", ErrorString: "Characteristic value was written successfully
Notification handle = 0x000e value: 54 3d 31 39 2e 39 20 48 3d 35 31 2e 31 00
Notification handle = 0x000e value: 54 3d 31 39 2e 38 20 48 3d 35 31 2e 33 00
Notification handle = 0x000e value: 54 3d 31 39 2e 38 20 48 3d 35 31 2e 31 00
Notification handle = 0x000e value: 54 3d 31 39 2e 38 20 48 3d 35 31 2e 33 00
Notification handle = 0x000e value: 54 3d 31 39 2e 38 20 48 3d 35 31 2e 30 00
Notification handle = 0x000e value: 54 3d 31 39 2e 38 20 48 3d 35 31 2e 32 00
Notification handle = 0x000e value: 54 3d 31 39 2e 38 20 48 3d 35 31 2e 33 00
"
2020.01.08 23:46:33 4: XiaomiBTLESens (Xiaomi_Sensor_Flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 31 39 2e 39 20 48 3d 35 31 2e 31 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 33 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 31 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 33 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 30 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 32 00
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 31 2e 33 00

2020.01.08 23:46:33 5: XiaomiBTLESens (Xiaomi_Sensor_Flur) - ExecGatttool_Done: gatttool return string: Xiaomi_Sensor_Flur|4C:65:A8:D5:7A:AD|ok|write|0x10|{"gtResult":"54 3d 31 39 2e 39 20 48 3d 35 31 2e 31 00 "}
2020.01.08 23:46:33 4: XiaomiBTLESens (Xiaomi_Sensor_Flur) - ProcessingNotification
2020.01.08 23:46:33 4: XiaomiBTLESens (Xiaomi_Sensor_Flur) - ProcessingNotification: handle 0x10
2020.01.08 23:46:33 4: XiaomiBTLESens (Xiaomi_Sensor_Flur) - Thermo/Hygro Sens Handle0x10
2020.01.08 23:46:33 4: XiaomiBTLESens (Xiaomi_Sensor_Flur) - WriteReadings: Readings were written

(Für das Log habe ich für 1 Device das Loglevel auf 5 gesetzt, und dann 2x "getSensorData" abgefragt. Nach der ersten Abfrage war im state reading ein error).

Die Loop mit 5 Retries wird scheinbar immer komplett ausgereizt: 5x wird derselbe Befehl abgesetzt, meistens erfolgreich.
Würde hier nicht eine Abbruchbedingung Sinn machen?
FHEM on Raspberry Pi 3B+
CUL868
7x MAX! Thermostat, 8x MAX! Fensterkontakte
Conbee II + deConz, TradFri Lampen, Osram Smart+ Steckdosen

CoolTux

Kannst Du bitte noch einmal runter laden und diesmal nicht das verbose hoch schrauben. Es müsste dann eine spezielle DEBUG Meldung im Log erscheinen. Die Ansicht brauche ich dann bitte.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

Pati_Alpha

#921
Ich komme noch nicht weiter, kriege die Gatttool Fehlermeldung locker 1x am Tag und sie geht von allein nicht weg.

Muss ich gatttool am RPi (da ist der BT Adapter) oder auf der VM (da läuft FHEM) aufrufen?
Und mit welchen Parametern??

In htop wird es auf beiden Systemen nicht angezeigt.
Mit "ps aux | grep gatttool" bekomme ich auch nicht angezeigt, dass gatttool laufen würde, also kann ich auch nix killen!

Es hat bestimmt was damit zutun, dass bei mir FHEM-VM und der RPi zwei Systeme sind und ich das sshHost Attribut nutze. Es funktioniert ja "oft", aber wenns einmal hängt ist der Ofen halt aus.
Aktuell hilft dann nur den RPi Neustarten und das ist natürlich totaler Mist!

Im Log steht dann jeweils:
2020.01.10 15:11:00 3: XiaomiBTLESens (Birkenfeige) - ExecGatttool_Run: errorcode: "1", ErrorString: "connect error: Software caused connection abort (103)
"


EDIT:
Hier nochmal das log mit verbose 5:
2020.01.10 16:22:04 4: XiaomiBTLESens (Birkenfeige) - Run CreateParamGatttool with mod: read
2020.01.10 16:22:04 5: XiaomiBTLESens (Birkenfeige) - Read XiaomiBTLESens_ExecGatttool_Run Birkenfeige|C4:7C:8D:6A:56:7A|read|0x38
2020.01.10 16:22:05 5: XiaomiBTLESens (Birkenfeige) - ExecGatttool_Run: Execute Command ps ax | grep -E [g]atttool -i hci0 -b C4:7C:8D:6A:56:7A
2020.01.10 16:22:05 5: XiaomiBTLESens (Birkenfeige) - ExecGatttool_Run: call gatttool with command: ssh pi@10.0.0.211 'gatttool -i hci0 -b C4:7C:8D:6A:56:7A --char-read -a 0x38 2>&1' and loop 0
2020.01.10 16:22:29 3: [Twilight] got no weather info from yahoo. Error code: gethostbyname query.yahooapis.com failed
2020.01.10 16:22:46 5: XiaomiBTLESens (Birkenfeige) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)

2020.01.10 16:22:46 5: XiaomiBTLESens (Birkenfeige) - ExecGatttool_Run: call gatttool with command: ssh pi@10.0.0.211 'gatttool -i hci0 -b C4:7C:8D:6A:56:7A --char-read -a 0x38 2>&1' and loop 1
2020.01.10 16:23:20 4: XiaomiBTLESens (Birkenfeige) - Run CreateParamGatttool with mod: read
2020.01.10 16:23:20 5: XiaomiBTLESens (Birkenfeige) - Read XiaomiBTLESens_ExecGatttool_Run Birkenfeige|C4:7C:8D:6A:56:7A|read|0x38
2020.01.10 16:23:20 4: XiaomiBTLESens (Birkenfeige) - stateRequestTimer: Call Request Timer
2020.01.10 16:23:27 5: XiaomiBTLESens (Birkenfeige) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)

2020.01.10 16:23:27 5: XiaomiBTLESens (Birkenfeige) - ExecGatttool_Run: call gatttool with command: ssh pi@10.0.0.211 'gatttool -i hci0 -b C4:7C:8D:6A:56:7A --char-read -a 0x38 2>&1' and loop 2
2020.01.10 16:23:29 3: [Twilight] got no weather info from yahoo. Error code: gethostbyname query.yahooapis.com failed
2020.01.10 16:23:34 1: Timeout for FHEM::XiaomiBTLESens::ExecGatttool_Run reached, terminated process 23544
2020.01.10 16:23:34 4: XiaomiBTLESens (Birkenfeige) - WriteReadings: Readings were written
2020.01.10 16:23:34 4: XiaomiBTLESens (Birkenfeige) - ExecGatttool_Aborted: The BlockingCall Process terminated unexpectedly. Timedout


EDIT 2:
Lasse ich das hier auf dem RPi laufen:
gatttool -i hci0 -b C4:7C:8D:6A:56:7A --char-read -a 0x38 2>&1
kriege ich:
connect error: Connection refused (111)

CoolTux

Zitat von: CoolTux am 09 Januar 2020, 05:01:34
Kannst Du bitte noch einmal runter laden und diesmal nicht das verbose hoch schrauben. Es müsste dann eine spezielle DEBUG Meldung im Log erscheinen. Die Ansicht brauche ich dann bitte.

Hat sich erledigt. Seit heute morgen gibt es eine aktuelle Version über FHEM Update.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

Pati_Alpha

In Antwort auf meinen Post davor:

Ich lese, dass Gatttool irgendwie nur 5 Connections kann? Ich nutze den RPi auch noch um per presenced/collectord nach Handys zu scannen. Kann es das sein?
Und ich lese, dass man bei Gatttool folgendes hinzufügen soll:
-t random

Das kann ich grade im Terminal aber noch nicht testen, da ich den RPi mal wieder rebooted habe und es grade läuft...
Aber ich kriege den Fehler jetzt quasi 1x pro Tag und nach dem RPi-Reboot läuft es wieder für ungefähr einen Tag, kann also eig. nicht am Sensor liegen?

Und ich lese hier und da, dass es Probleme mit Raspbian Buster geben könnte? Mein RPi ist komplett upgedated. Könnte das das Problem sein?

mi.ke

Zitat von: Pati_Alpha am 11 Januar 2020, 10:57:18
Ich nutze den RPi auch noch um per presenced/collectord nach Handys zu scannen. Kann es das sein?

Das funktioniert mit Sicherheit nicht stabil in Kombination.
FHEM 5.9 | RPi4 + 5 x RPi(Z) + FB7590 + FB 6890 LTE via LAN und WAN (VPN) verbunden.
2 x CUL868 + 3 x RFXTRX(e) + 6 x HMwLanGW + 4 x z2tGw + 5 x LGW + 2 x IRBlast + CO2 +++
FS20, FHT, FMS, Elro(mod), CM160, Revolt, LGTV, STV, AVR, withings, HM-sec-*, HM-CC-RT-DN, AMAD, PCA301, arlo, Aqara

Pati_Alpha

Die Befürchtung habe ich auch. Aber ich habe auch hier und da gelesen, dass der RPi mit nem aktuellen Linux Kernel noch Probleme mit dem BT hat? Denn bevor ich den ganzen Kram auf Buster geupdated habe, hatte ich diese Probleme nicht!

Ich hab mir als Workaround jetzt auch erstmal ein DOIF gebaut, was einfach auf dem RPi das BT resetted sobald der Xiaomi auf ERROR steht. Nicht schön, aber funktioniert. Triggert aber tatsächlich 1x täglich. Das war vor Buster DEFINITIV nicht so!

Holger S

Hallo,

habe den im Bild dargestellte Thermometer. Werte werden leider nicht korrekt ausgelesen.
Das einzige was stimmt ist der devicename.

Kann ich Informationen liefern damit der Sensor korrekt gelesen, angesprochen werden kann?

Danke

Holger

CoolTux

Was genau ist es denn für ein Sensor? Hersteller, Modell. Kann man nur das Display ablesen oder ist er smart?
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

CoolTux

OK Fragen haben erübrigt. Durch Zufall heute auf eBay gesehen und für 6 Euro mal einen gekauft
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

Holger S