FHEM Forum

FHEM - Hausautomations-Systeme => Sonstige Systeme => Thema gestartet von: CoolTux am 11 Januar 2018, 15:42:45

Titel: [74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 11 Januar 2018, 15:42:45
Dieses Modul löst das 74_XiaomiFlowerSens Modul ab. Das 74_XiaomiFlowerSens wird bestehen bleiben aber nicht weiter entwickelt.


Da das Modul nun mittlerweile so fortgeschritten ist, wollte ich dafür gerne einen eignen Threead auf machen.
Hier ein Auszug aus dem alten Thread, worum es eigentlich geht.

Ein großer Dank geht an fh168 und ZnarfMe für die Spende eines Xiaomi Flower Monitors zum testen!

Zitat
wollte hier nur mal kurz einen weiteren Bluetooth 4.1 BLE Pflanzensensor (ca. 12 Euro) vorstellen, den ich ans fhem (Raspberry) angebunden habe. Bisher läuft alles einwandfrei. Mir gefällt besonders, dass man sich nirgends anmelden oder registrieren muss, um die Werte auslesen zu können.

http://xiaomi-mi.com/mi-smart-home/xiaomi-huahuacacao-flower-care-smart-monitor/


Der Sensor liefert folgende Werte:
- Temperatur
- Feuchtigkeit
- Licht
- Dünger

Voraussetzung zum betrieb des Modules ist JSON sowie gatttool aus dem bluez Packet.



Das Modul unterstützt seit neustem nun auch den Xiamomi Themometer/Hygrometer mit Display

Grüße
Leon
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 15 Januar 2018, 07:48:22
Eine aktuelle Entwicklerversion findet Ihr hier (https://github.com/LeonGaultier/fhem-XiaomiBTLESens/archive/devel.zip)
Wobei diese Version für die FlowerSens Sensoren ja schon produktiv reif ist.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 15 Januar 2018, 18:51:12
Hallo,

ich hab die Funktion für das Setzen/Lesen des Devicename getestet:

Vorneweg: Es funktioniert.

Auslesen haut einwandfrei hin.
Schreiben eigentlich auch (zumindest landet im Device der richtige String).
Allerdings wird nach dem schreiben ein kryptischer Wert im Device angezeigt. Das wird auch so im Eventlog dargestellt. Vermutung: String wird von dir konvertiert (ASCII=>HEX) und dann der konvertierte String ausgegeben bzw. in das Device geschrieben.

2018-01-15 18:41:34 XiaomiBTLESens xbtle.temp.eg.fenster write devicename data
2018-01-15 18:41:41 XiaomiBTLESens xbtle.temp.eg.fenster devicename: x�ھɇ�
2018-01-15 18:41:41 XiaomiBTLESens xbtle.temp.eg.fenster active
...
2018-01-15 18:41:56 XiaomiBTLESens xbtle.temp.eg.fenster fetch devicename data
2018-01-15 18:42:02 XiaomiBTLESens xbtle.temp.eg.fenster devicename: MI_HT_V2
2018-01-15 18:42:02 XiaomiBTLESens xbtle.temp.eg.fenster active
2018-01-15 18:42:15 XiaomiBTLESens xbtle.temp.eg.fenster write devicename data
...
2018-01-15 18:42:20 XiaomiBTLESens xbtle.temp.eg.fenster devicename: x�ھɇ�
2018-01-15 18:42:20 XiaomiBTLESens xbtle.temp.eg.fenster active
2018-01-15 18:42:22 XiaomiBTLESens xbtle.temp.eg.fenster fetch devicename data
2018-01-15 18:42:22 XiaomiBTLESens xbtle.temp.eg.fenster devicename: MI_TEST1
2018-01-15 18:42:22 XiaomiBTLESens xbtle.temp.eg.fenster active


Log
2018.01.15 18:40:38 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - CallDeviceName: call function ExecGatttool_Run
2018.01.15 18:40:38 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b <MAC> --char-read -a 0x3 2>&1 /dev/null and loop 0
2018.01.15 18:40:44 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,4d 4a 5f 48 54 5f 56 31

2018.01.15 18:40:44 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,4d 4a 5f 48 54 5f 56 31

2018.01.15 18:40:44 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.fenster|<MAC>|ok|read|0x3|{"gtResult":"4d 4a 5f 48 54 5f 56 31 "}
2018.01.15 18:40:44 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification
2018.01.15 18:40:44 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification: handle 0x3
2018.01.15 18:40:44 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - Thermo/Hygro Sens Handle0x24
2018.01.15 18:40:44 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - WriteReadings: Readings were written
2018.01.15 18:41:00 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - WriteDeviceName: call function ExecGatttool_Run
2018.01.15 18:41:00 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b <MAC> --char-write-req -a 0x3 -n 48545f54455354 2>&1 /dev/null and loop 0
2018.01.15 18:41:11 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.01.15 18:41:11 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.01.15 18:41:11 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.fenster|4C:65:A8:D0:42:63|ok|write|0x3|{"gtResult":"no data response"}
2018.01.15 18:41:11 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification
2018.01.15 18:41:11 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification: handle 0x3
2018.01.15 18:41:11 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - Thermo/Hygro Sens Handle0x24
2018.01.15 18:41:11 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - WriteReadings: Readings were written
2018.01.15 18:41:34 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - WriteDeviceName: call function ExecGatttool_Run
2018.01.15 18:41:34 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b <MAC> --char-write-req -a 0x3 -n 4d495f48545f5632 2>&1 /dev/null and loop 0
2018.01.15 18:41:41 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.01.15 18:41:41 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.01.15 18:41:41 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.fenster|4C:65:A8:D0:42:63|ok|write|0x3|{"gtResult":"no data response"}
2018.01.15 18:41:41 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification
2018.01.15 18:41:41 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification: handle 0x3
2018.01.15 18:41:41 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - Thermo/Hygro Sens Handle0x24
2018.01.15 18:41:41 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - WriteReadings: Readings were written
2018.01.15 18:41:56 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - CallDeviceName: call function ExecGatttool_Run
2018.01.15 18:41:56 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b <MAC> --char-read -a 0x3 2>&1 /dev/null and loop 0
2018.01.15 18:42:02 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,4d 49 5f 48 54 5f 56 32

2018.01.15 18:42:02 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,4d 49 5f 48 54 5f 56 32

2018.01.15 18:42:02 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.fenster|<MAC>|ok|read|0x3|{"gtResult":"4d 49 5f 48 54 5f 56 32 "}
2018.01.15 18:42:02 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification
2018.01.15 18:42:02 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification: handle 0x3
2018.01.15 18:42:02 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - Thermo/Hygro Sens Handle0x24
2018.01.15 18:42:02 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - WriteReadings: Readings were written
2018.01.15 18:42:15 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - WriteDeviceName: call function ExecGatttool_Run
2018.01.15 18:42:15 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b <MAC> --char-write-req -a 0x3 -n 4d495f5445535431 2>&1 /dev/null and loop 0
2018.01.15 18:42:20 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.01.15 18:42:20 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.01.15 18:42:20 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.fenster|<MAC>|ok|write|0x3|{"gtResult":"no data response"}
2018.01.15 18:42:20 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification
2018.01.15 18:42:20 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification: handle 0x3
2018.01.15 18:42:20 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - Thermo/Hygro Sens Handle0x24
2018.01.15 18:42:20 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - WriteReadings: Readings were written
2018.01.15 18:42:22 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - CallDeviceName: call function ExecGatttool_Run
2018.01.15 18:42:22 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b <MAC> --char-read -a 0x3 2>&1 /dev/null and loop 0
2018.01.15 18:42:22 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,4d 49 5f 54 45 53 54 31

2018.01.15 18:42:22 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,4d 49 5f 54 45 53 54 31

2018.01.15 18:42:22 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.fenster|<MAC>|ok|read|0x3|{"gtResult":"4d 49 5f 54 45 53 54 31 "}
2018.01.15 18:42:22 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification
2018.01.15 18:42:22 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification: handle 0x3
2018.01.15 18:42:22 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - Thermo/Hygro Sens Handle0x24
2018.01.15 18:42:22 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - WriteReadings: Readings were written
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: gent am 15 Januar 2018, 18:55:24
Zitat von: CoolTux am 11 Januar 2018, 15:42:45
Das Modul unterstützt seit neustem nun auch den Xiamomi Themometer/Hygrometer mit Display

Hi Leon,

kannst Du mir bitte mitteilen, welchen genau? Da gibt's runde und eckige. Ist da was zu beachten?

Viele Grüße vom Gent
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 15 Januar 2018, 19:03:22
Das Runde. Zu beachten gibt es eigentlich nichts... ist halt noch relativ wenig getestet.
Das eckige ist m.W. nach auch OHNE Bluetooth, daher nicht einbindbar ;) [und auch noch nicht lieferbar?]
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 15 Januar 2018, 19:29:06
Zitat von: distel am 15 Januar 2018, 18:51:12
Hallo,

ich hab die Funktion für das Setzen/Lesen des Devicename getestet:

Vorneweg: Es funktioniert.

Auslesen haut einwandfrei hin.
Schreiben eigentlich auch (zumindest landet im Device der richtige String).
Allerdings wird nach dem schreiben ein kryptischer Wert im Device angezeigt. Das wird auch so im Eventlog dargestellt. Vermutung: String wird von dir konvertiert (ASCII=>HEX) und dann der konvertierte String ausgegeben bzw. in das Device geschrieben.

2018-01-15 18:41:34 XiaomiBTLESens xbtle.temp.eg.fenster write devicename data
2018-01-15 18:41:41 XiaomiBTLESens xbtle.temp.eg.fenster devicename: x�ھɇ�
2018-01-15 18:41:41 XiaomiBTLESens xbtle.temp.eg.fenster active
...
2018-01-15 18:41:56 XiaomiBTLESens xbtle.temp.eg.fenster fetch devicename data
2018-01-15 18:42:02 XiaomiBTLESens xbtle.temp.eg.fenster devicename: MI_HT_V2
2018-01-15 18:42:02 XiaomiBTLESens xbtle.temp.eg.fenster active
2018-01-15 18:42:15 XiaomiBTLESens xbtle.temp.eg.fenster write devicename data
...
2018-01-15 18:42:20 XiaomiBTLESens xbtle.temp.eg.fenster devicename: x�ھɇ�
2018-01-15 18:42:20 XiaomiBTLESens xbtle.temp.eg.fenster active
2018-01-15 18:42:22 XiaomiBTLESens xbtle.temp.eg.fenster fetch devicename data
2018-01-15 18:42:22 XiaomiBTLESens xbtle.temp.eg.fenster devicename: MI_TEST1
2018-01-15 18:42:22 XiaomiBTLESens xbtle.temp.eg.fenster active


Log
2018.01.15 18:40:38 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - CallDeviceName: call function ExecGatttool_Run
2018.01.15 18:40:38 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b <MAC> --char-read -a 0x3 2>&1 /dev/null and loop 0
2018.01.15 18:40:44 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,4d 4a 5f 48 54 5f 56 31

2018.01.15 18:40:44 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,4d 4a 5f 48 54 5f 56 31

2018.01.15 18:40:44 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.fenster|<MAC>|ok|read|0x3|{"gtResult":"4d 4a 5f 48 54 5f 56 31 "}
2018.01.15 18:40:44 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification
2018.01.15 18:40:44 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification: handle 0x3
2018.01.15 18:40:44 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - Thermo/Hygro Sens Handle0x24
2018.01.15 18:40:44 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - WriteReadings: Readings were written
2018.01.15 18:41:00 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - WriteDeviceName: call function ExecGatttool_Run
2018.01.15 18:41:00 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b <MAC> --char-write-req -a 0x3 -n 48545f54455354 2>&1 /dev/null and loop 0
2018.01.15 18:41:11 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.01.15 18:41:11 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.01.15 18:41:11 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.fenster|4C:65:A8:D0:42:63|ok|write|0x3|{"gtResult":"no data response"}
2018.01.15 18:41:11 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification
2018.01.15 18:41:11 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification: handle 0x3
2018.01.15 18:41:11 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - Thermo/Hygro Sens Handle0x24
2018.01.15 18:41:11 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - WriteReadings: Readings were written
2018.01.15 18:41:34 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - WriteDeviceName: call function ExecGatttool_Run
2018.01.15 18:41:34 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b <MAC> --char-write-req -a 0x3 -n 4d495f48545f5632 2>&1 /dev/null and loop 0
2018.01.15 18:41:41 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.01.15 18:41:41 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.01.15 18:41:41 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.fenster|4C:65:A8:D0:42:63|ok|write|0x3|{"gtResult":"no data response"}
2018.01.15 18:41:41 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification
2018.01.15 18:41:41 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification: handle 0x3
2018.01.15 18:41:41 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - Thermo/Hygro Sens Handle0x24
2018.01.15 18:41:41 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - WriteReadings: Readings were written
2018.01.15 18:41:56 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - CallDeviceName: call function ExecGatttool_Run
2018.01.15 18:41:56 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b <MAC> --char-read -a 0x3 2>&1 /dev/null and loop 0
2018.01.15 18:42:02 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,4d 49 5f 48 54 5f 56 32

2018.01.15 18:42:02 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,4d 49 5f 48 54 5f 56 32

2018.01.15 18:42:02 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.fenster|<MAC>|ok|read|0x3|{"gtResult":"4d 49 5f 48 54 5f 56 32 "}
2018.01.15 18:42:02 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification
2018.01.15 18:42:02 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification: handle 0x3
2018.01.15 18:42:02 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - Thermo/Hygro Sens Handle0x24
2018.01.15 18:42:02 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - WriteReadings: Readings were written
2018.01.15 18:42:15 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - WriteDeviceName: call function ExecGatttool_Run
2018.01.15 18:42:15 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b <MAC> --char-write-req -a 0x3 -n 4d495f5445535431 2>&1 /dev/null and loop 0
2018.01.15 18:42:20 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.01.15 18:42:20 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.01.15 18:42:20 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.fenster|<MAC>|ok|write|0x3|{"gtResult":"no data response"}
2018.01.15 18:42:20 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification
2018.01.15 18:42:20 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification: handle 0x3
2018.01.15 18:42:20 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - Thermo/Hygro Sens Handle0x24
2018.01.15 18:42:20 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - WriteReadings: Readings were written
2018.01.15 18:42:22 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - CallDeviceName: call function ExecGatttool_Run
2018.01.15 18:42:22 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b <MAC> --char-read -a 0x3 2>&1 /dev/null and loop 0
2018.01.15 18:42:22 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,4d 49 5f 54 45 53 54 31

2018.01.15 18:42:22 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,4d 49 5f 54 45 53 54 31

2018.01.15 18:42:22 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.fenster|<MAC>|ok|read|0x3|{"gtResult":"4d 49 5f 54 45 53 54 31 "}
2018.01.15 18:42:22 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification
2018.01.15 18:42:22 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification: handle 0x3
2018.01.15 18:42:22 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - Thermo/Hygro Sens Handle0x24
2018.01.15 18:42:22 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - WriteReadings: Readings were written


Das passt so schon. Ist nicht schlimm, ich muss da noch irgendwie ein Abbruch machen, da er write und read gleich behandelt. Er schreibt also bei write das Ergebnis als Reading und das ist nicht der Name sondern irgendwas. Ich schaue es mir an.



Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 16 Januar 2018, 12:54:51
So es gibt nun eine neue Version. Ich habe ein großes Codecleanup gemacht und das Problem mit dem Devicenamen beim set Befehl sollte auch behoben sein. Ausserdem habe ich einen devicenamen Check gemacht so das Leerzeichen oder Sonderzeichen ersetzt werden.

Bitte einmal testen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 16 Januar 2018, 13:42:48
Hallo,

klappt alles bis auf set devicename...
(und ja, immer noch kalt auf der Fensterbank!)

get devicename  :)
2018.01.16 13:33:35 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - Run CreateParamGatttool with mod: read
2018.01.16 13:33:35 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - Read XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.fenster|<MAC>|read|0x3
2018.01.16 13:33:35 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b <MAC> --char-read -a 0x3 2>&1 /dev/null and loop 0
2018.01.16 13:33:41 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,4d 4a 5f 48 54 5f 56 31

2018.01.16 13:33:41 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,4d 4a 5f 48 54 5f 56 31

2018.01.16 13:33:41 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.fenster|<MAC>|ok|read|0x3|{"gtResult":"4d 4a 5f 48 54 5f 56 31 "}
2018.01.16 13:33:41 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification
2018.01.16 13:33:41 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification: handle 0x3
2018.01.16 13:33:41 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - Thermo/Hygro Sens Handle0x3
2018.01.16 13:33:41 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - WriteReadings: Readings were written


set devicename  :(
2018.01.16 13:35:51 1: PERL WARNING: Use of uninitialized value $mod in concatenation (.) or string at ./FHEM/74_XiaomiBTLESens.pm line 410.
2018.01.16 13:35:51 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - Run CreateParamGatttool with mod:
2018.01.16 13:35:51 1: PERL WARNING: Use of uninitialized value $mod in string eq at ./FHEM/74_XiaomiBTLESens.pm line 412.
2018.01.16 13:35:51 1: PERL WARNING: Use of uninitialized value $mod in string eq at ./FHEM/74_XiaomiBTLESens.pm line 419.


get firmware :)
2018.01.16 13:38:06 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - Run CreateParamGatttool with mod: read
2018.01.16 13:38:06 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - Read XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.fenster|<MAC>|read|0x24
2018.01.16 13:38:06 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b <MAC> --char-read -a 0x24 2>&1 /dev/null and loop 0
2018.01.16 13:38:10 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,30 30 2e 30 30 2e 36 36

2018.01.16 13:38:10 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,30 30 2e 30 30 2e 36 36

2018.01.16 13:38:10 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.fenster|<MAC>|ok|read|0x24|{"gtResult":"30 30 2e 30 30 2e 36 36 "}
2018.01.16 13:38:10 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification
2018.01.16 13:38:10 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification: handle 0x24
2018.01.16 13:38:10 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - Thermo/Hygro Sens Handle0x24
2018.01.16 13:38:10 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - WriteReadings: Readings were written


get sensordata :)
2018.01.16 13:39:32 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - Run CreateParamGatttool with mod: write
2018.01.16 13:39:32 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.fenster|<MAC>|write|0x10|0100
2018.01.16 13:39:32 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: call gatttool with command timeout 15 gatttool -i hci0 -b <MAC> --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.01.16 13:39:47 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 31 35 2e 33 20 48 3d 35 38 2e 37 00
Notification handle = 0x000e value,54 3d 31 35 2e 33 20 48 3d 35 38 2e 36 00
Notification handle = 0x000e value,54 3d 31 35 2e 33 20 48 3d 35 38 2e 35 00
Notification handle = 0x000e value,54 3d 31 35 2e 32 20 48 3d 35 38 2e 36 00
Notification handle = 0x000e value,54 3d 31 35 2e 33 20 48 3d 35 38 2e 37 00
Notification handle = 0x000e value,54 3d 31 35 2e 33 20 48 3d 35 38 2e 38 00
Notification handle = 0x000e value,54 3d 31 35 2e 33 20 48 3d 35 38 2e 36 00

2018.01.16 13:39:47 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 31 35 2e 33 20 48 3d 35 38 2e 37 00
Notification handle = 0x000e value,54 3d 31 35 2e 33 20 48 3d 35 38 2e 36 00
Notification handle = 0x000e value,54 3d 31 35 2e 33 20 48 3d 35 38 2e 35 00
Notification handle = 0x000e value,54 3d 31 35 2e 32 20 48 3d 35 38 2e 36 00
Notification handle = 0x000e value,54 3d 31 35 2e 33 20 48 3d 35 38 2e 37 00
Notification handle = 0x000e value,54 3d 31 35 2e 33 20 48 3d 35 38 2e 38 00
Notification handle = 0x000e value,54 3d 31 35 2e 33 20 48 3d 35 38 2e 36 00

2018.01.16 13:39:47 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.fenster|<MAC>|ok|write|0x10|{"gtResult":"54 3d 31 35 2e 33 20 48 3d 35 38 2e 37 00 \nNotification handle = 0x000e value"}
2018.01.16 13:39:47 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification
2018.01.16 13:39:47 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification: handle 0x10
2018.01.16 13:39:47 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - Thermo/Hygro Sens Handle0x10
2018.01.16 13:39:47 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - WriteReadings: Readings were written
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 16 Januar 2018, 13:59:17
Neue Version
Bitte noch einmal set devicename testen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 16 Januar 2018, 14:13:36
set devicename  :)
2018.01.16 14:10:10 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - Run CreateParamGatttool with mod: write
2018.01.16 14:10:10 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.fenster|<MAC>|write|0x3|5445535454455354
2018.01.16 14:10:10 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b <MAC> --char-write-req -a 0x3 -n 5445535454455354 2>&1 /dev/null and loop 0
2018.01.16 14:10:13 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.01.16 14:10:13 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.01.16 14:10:13 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.fenster|<MAC>|ok|write|0x3|{"gtResult":"no data response"}
2018.01.16 14:10:13 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification
2018.01.16 14:10:13 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification: handle 0x3


get devicename  :)
2018.01.16 14:11:08 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - Run CreateParamGatttool with mod: read
2018.01.16 14:11:08 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - Read XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.fenster|<MAC>|read|0x3
2018.01.16 14:11:08 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b <MAC> --char-read -a 0x3 2>&1 /dev/null and loop 0
2018.01.16 14:11:12 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,54 45 53 54 54 45 53 54

2018.01.16 14:11:12 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,54 45 53 54 54 45 53 54

2018.01.16 14:11:12 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.fenster|<MAC>|ok|read|0x3|{"gtResult":"54 45 53 54 54 45 53 54 "}
2018.01.16 14:11:12 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification
2018.01.16 14:11:12 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - ProcessingNotification: handle 0x3
2018.01.16 14:11:12 5: XiaomiBTLESens (xbtle.temp.eg.fenster) - Thermo/Hygro Sens Handle0x3
2018.01.16 14:11:12 4: XiaomiBTLESens (xbtle.temp.eg.fenster) - WriteReadings: Readings were written
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 16 Januar 2018, 14:16:39
Gut dann fehlt noch ein automatischer devicename read nach dem write. werde ich mal einbauen und ich denke mal dann sind wir durch.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 16 Januar 2018, 14:32:09
So das sollte es dann gewesen sein. Bitte noch einmal zum Abschluss testen. Darauf achten das der neue Name nach dem setzten auch gleich ausgelesen wird.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 16 Januar 2018, 15:32:29
ok, dann "pinne" ich mich hier mal mit dran...
...werde aber wohl erst im Frühjahr (wieder) testen, wenn der Balkon wieder bepflanzt wird...

Gruß und danke, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: yrwyddfa am 16 Januar 2018, 19:18:25
Der Vollständigkeit halber: das Modul lässt sich via

define <Device> XiaomiBTLESens <MAC>

einbinden.

Ich grab meine Flowersenses mal wieder aus und teste die mal. Mehr dazu später.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: oli82 am 17 Januar 2018, 16:01:49
Kann es sein, dass ssh nicht mehr klappt?
Habe direkt meine Sensoren (FlowerSense) auf das neue Modul umgestellt und siehe da:

2018.01.17 16:01:04 4: XiaomiBTLESens (Pflanze1) - Run CreateParamGatttool with mod: read
2018.01.17 16:01:04 4: XiaomiBTLESens (Pflanze1) - Read XiaomiBTLESens_ExecGatttool_Run Pflanze1|C4:7C:8D:61:93:39|read|0x38
2018.01.17 16:01:04 4: XiaomiBTLESens (Pflanze1) - ExecGatttool_Done: gatttool return string: Pflanze1|C4:7C:8D:61:93:39|error|read|0x38|{"gtResult":"no gatttool binary found. Please check if bluez-package is properly installed"}
2018.01.17 16:01:04 5: XiaomiBTLESens (Pflanze1) - ProcessingErrors
2018.01.17 16:01:04 4: XiaomiBTLESens (Pflanze1) - WriteReadings: Readings were written
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 17 Januar 2018, 16:34:37
Ja leider. Ist mir vor einer Stunde auch auf gefallen. Ich brauche aber ein klein wenig Zeit zum fixen. Sorry.

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 17 Januar 2018, 16:41:22
Schau mal bitte in meinem Git, habe da im master Branch eine gefixste Version reingestellt.

Hoffe klappt.



Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: oli82 am 17 Januar 2018, 17:29:23
Kein Thema.
Version teste ich sobald ich wieder VPN habe.
Danke schonmal
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 17 Januar 2018, 20:23:58
Habe soeben Version 2.0.1 ins SVN geladen, damit sollte nun der ssh korrekt funktionieren.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: oli82 am 17 Januar 2018, 20:53:39
Danke.
Der fix von GitHub hat bereits gewirkt 😉
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: yrwyddfa am 17 Januar 2018, 22:33:18
Doch, bei mir läuft es einwandfrei, hat sich auch ohne Probleme erneut einbinden lassen.

@ Oli82: Greifst du via ssh auf die Sensoren zu? Also sind sie an einem entfernten pi installiert?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 18 Januar 2018, 02:54:17
Zitat von: yrwyddfa am 17 Januar 2018, 22:33:18
Doch, bei mir läuft es einwandfrei, hat sich auch ohne Probleme erneut einbinden lassen.

@ Oli82: Greifst du via ssh auf die Sensoren zu? Also sind sie an einem entfernten pi installiert?

Oli hatte sie per ssh angesprochen und da hatte sich ein kleiner Bug eingeschlichen gehabt. Könnte ich aber fixen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: oli82 am 18 Januar 2018, 09:08:08
Zitat von: yrwyddfa am 17 Januar 2018, 22:33:18
@ Oli82: Greifst du via ssh auf die Sensoren zu? Also sind sie an einem entfernten pi installiert?

Wie CoolTux bereits geschrieben hat, frage ich die Sensoren über einen Pi per SSH ab.
Das mache ich deshalb, da der Pi zu einem näher an den Sensoren ist und zum anderen läuft bei mir auf dem Fhem Server presenced und das beißt sich mit dem gattool.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 18 Januar 2018, 14:18:06
Zitat von: CoolTux am 16 Januar 2018, 14:16:39
Gut dann fehlt noch ein automatischer devicename read nach dem write.

Hallo,

ich war ein paar Tage unterwegs und konnte daher nicht testen. Aber jetzt hab ich die Gelegenheit gefunden: Automatisches Auslesen nach dem set devicename funktioniert (getestet mit der 2.0.1).

Vielen Dank!
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Tobias am 19 Januar 2018, 17:20:16
offtopic: für alle Interessierten statt einem PiZeroW einen ESP32 zu nutzen ist dieser Artikel sehr interessant:
http://www.iotsharing.com/2017/07/how-to-use-arduino-esp32-ble-as-gatt-client.html
https://www.open-homeautomation.com/2016/08/23/reverse-engineering-the-mi-plant-sensor/
Diesen Sketch könnte man als Ausgangsbasis nehmen um die FlowerSensoren abzufragen und dann per WiFi/MQTT bereitzustellen
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: stoxx am 20 Januar 2018, 09:51:28
Habe heute meinen Hygrometer bekommen und gleich mal eingebunden.
Im Log erhalte ich sporadisch die Meldung:
Zitat2018.01.20 09:24:23 1: PERL WARNING: Illegal hexadecimal digit ' ' ignored at ./FHEM/74_XiaomiBTLESens.pm line 680.
2018.01.20 09:24:23 3: eval: {XiaomiBTLESens_ExecGatttool_Done('Sens2|4C:65:A8:D1:13:CD|ok|read|0x18|{"gtResult":"64 "}')}
2018.01.20 09:24:23 1: PERL WARNING: Illegal hexadecimal digit ' ' ignored at ./FHEM/74_XiaomiBTLESens.pm line 681.
2018.01.20 09:24:23 3: eval: {XiaomiBTLESens_ExecGatttool_Done('Sens2|4C:65:A8:D1:13:CD|ok|read|0x18|{"gtResult":"64 "}')}

Hier ein List vom Device:
ZitatInternals:
   BTMAC      4C:65:A8:D1:13:CD
   CFGFN     
   DEF        4C:65:A8:D1:13:CD
   INTERVAL   300
   NAME       Sens2
   NOTIFYDEV  global,Sens2
   NR         95
   NTFY_ORDER 50-Sens2
   STATE      active
   TYPE       XiaomiBTLESens
   VERSION    2.0.4
   loglevel   4
   READINGS:
     2018-01-20 09:24:23   battery         ok
     2018-01-20 09:24:23   batteryLevel    100
     2018-01-20 09:21:18   firmware        00.00.66
     2018-01-20 09:42:11   humidity        34.4
     2018-01-20 09:28:44   lastGattError   no data response
     2018-01-20 09:42:11   state           active
     2018-01-20 09:42:11   temperature     20.6
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1516436663.25082
     updateTimestampCallBattery 2018-01-20 09:24:23
Attributes:
   hciDevice  hci1
   model      thermoHygroSens
   room       Sensoren

vg stoxx
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 20 Januar 2018, 10:40:07
Zitat von: stoxx am 20 Januar 2018, 09:51:28
Habe heute meinen Hygrometer bekommen und gleich mal eingebunden.
Im Log erhalte ich sporadisch die Meldung:
Hier ein List vom Device:
vg stoxx

Habe ich hoffentlich gefixt.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: stoxx am 20 Januar 2018, 11:11:32
Kam gerade noch was:
Zitat2018.01.20 11:01:58 3: eval: {XiaomiBTLESens_ExecGatttool_Done('Sens2|4C:65:A8:D1:13:CD|ok|write|0x10|{"gtResult":"no data response"}')}
2018.01.20 11:01:58 1: PERL WARNING: Use of uninitialized value in pack at ./FHEM/74_XiaomiBTLESens.pm line 701.
2018.01.20 11:01:58 3: eval: {XiaomiBTLESens_ExecGatttool_Done('Sens2|4C:65:A8:D1:13:CD|ok|write|0x10|{"gtResult":"no data response"}')}
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: yrwyddfa am 22 Januar 2018, 06:39:39
Zitat von: oli82 am 18 Januar 2018, 09:08:08
Wie CoolTux bereits geschrieben hat, frage ich die Sensoren über einen Pi per SSH ab.
Das mache ich deshalb, da der Pi zu einem näher an den Sensoren ist und zum anderen läuft bei mir auf dem Fhem Server presenced und das beißt sich mit dem gattool.

Spannend! Behalte ich mir mal im Hinterkopf, Danke für die Anregung!

Nach einigen Tagen kommen bei mir bis auf sporadische Auslesefehler keinerlei Fehler zu Stande. Ne blöde Frage aber habe ich: wenn ich ein get <device> firmware mache tut sich bei mir nichts. Wird die in das reading VERSION geschrieben oder bezieht sich das auf die Version des Moduls?
Ansonsten bau ich jetzt mal den zweiten wieder in Fhem ein und schau irgendwann auch noch mal, dass ich den ssh-Zugriff nachbau - kann aber dauern.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 22 Januar 2018, 10:51:45
Zitat von: yrwyddfa am 22 Januar 2018, 06:39:39
Spannend! Behalte ich mir mal im Hinterkopf, Danke für die Anregung!

Nach einigen Tagen kommen bei mir bis auf sporadische Auslesefehler keinerlei Fehler zu Stande. Ne blöde Frage aber habe ich: wenn ich ein get <device> firmware mache tut sich bei mir nichts. Wird die in das reading VERSION geschrieben oder bezieht sich das auf die Version des Moduls?
Ansonsten bau ich jetzt mal den zweiten wieder in Fhem ein und schau irgendwann auch noch mal, dass ich den ssh-Zugriff nachbau - kann aber dauern.

get firmware sollte das Reading firmware füllen. Hast Du das Reading?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: yrwyddfa am 23 Januar 2018, 07:50:51
Ah, super, passt. 2.9.4. Hab ich doch glatt überlesen.
Läuft flüssig wie Butter, das Einbinden des zweiten lief auch problemlos und die readings haben mir auch gleich aufgezeigt, dass ich das letzte Gießen vergessen hatte.

Ergo: funktioniert super, tolle Arbeit!
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 24 Januar 2018, 19:31:00
Hat sich was am Timing/Timeout geändert? Hintergrund: Wenn mein Thermometer außerhalb der Funkreichweite ist, hatte ich sonst die Fehlermeldung "connect error,Connection refused (111)"

Jetzt läuft die Abfrage (get sensordata) in ein timeout:
2018.01.24 19:25:31 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: read
2018.01.24 19:25:31 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Read XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|<MAC>|read|0x18
2018.01.24 19:25:31 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b <MAC> --char-read -a 0x18 2>&1 /dev/null and loop 0
2018.01.24 19:26:11 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)

2018.01.24 19:26:11 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b <MAC> --char-read -a 0x18 2>&1 /dev/null and loop 1
2018.01.24 19:26:31 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 48
2018.01.24 19:26:31 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.24 19:26:31 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Aborted: The BlockingCall Process terminated unexpectedly. Timedout

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 24 Januar 2018, 19:38:20
Das liegt dann wenn an gatttool das es auf gedeiht und Verderb versucht eine Verbindung herstellen zu stellen und nicht einfach nach paar Sekunden auf gibt  ;D

Solltest aber ein sauberes Error als Reading bekommen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Tobias am 24 Januar 2018, 19:42:32
@cooltux, hast du das Protokoll der Sensoren irgendwo nachlesen können oder selbst gerausgetüftelt?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 24 Januar 2018, 19:52:49
Das Protokoll war eine Vorarbeit eines anderen Forenmitgliedes. Zum alten Thread gibt es hier irgendwo im Thread einen Link.

Aktuell arbeite ich an einem Bluetooththermostaten und im Zuge dessen habe ich eine Recht gute Anleitung zum BT sniffen. Falls Deine Frage dahin geht  ;D
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 24 Januar 2018, 20:51:04
Ich nochmal... hab jetzt nen RPi2 mit BT-Stick als "radiohub" (soll noch mehr Sender/Empfänger bekommen) eingerichtet. Versuche also per ssh abzufragen.

Aus der Konsole per ssh klappt es (also Zertifikate korrekt eingerichtet). Ich bekomme auch sinnige Antworten vom Thermometer.

Für die einfachen Operationen (nur read) klappt es auch in fhem: get devicename bspw. funktioniert.
Bei komplexeren Operationen (z.B. set devicename = write + read) klappt das write, nicht aber das read - timeout. ein nachträgliches get devicename klappt dann aber und liefert den neuen Wert.

Die Abfrage der Sensorwerte klappt allerdings nicht. Obwohl es eigentlich gut aussieht:
2018.01.24 20:41:40 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.24 20:41:40 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|<MAC>|write|0x10|0100
2018.01.24 20:41:40 4: XiaomiBTLESens (xbtle.temp.eg.flur) - stateRequestTimer: Call Request Timer
2018.01.24 20:41:41 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command timeout 15 ssh fhem@radiohub-1.home 'gatttool -i hci0 -b <MAC> --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null' and loop 0
2018.01.24 20:41:52 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.24 20:41:56 5: XiaomiBTLESens (xbtle.temp.eg.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 32 2e 32 00
...
Notification handle = 0x000e value,54 3d 31 39 2e 34 20 48 3d 35 33 2e 37 00

2018.01.24 20:41:56 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 32 2e 32 00
...
Notification handle = 0x000e value,54 3d 31 39 2e 34 20 48 3d 35 33 2e 37 00

2018.01.24 20:41:56 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.01.24 20:41:58 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: another gatttool process is running. waiting...
...
2018.01.24 20:42:38 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.01.24 20:42:40 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.01.24 20:42:40 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 579
2018.01.24 20:42:40 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.24 20:42:40 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Aborted: The BlockingCall Process terminated unexpectedly. Timedout


1) der Befehl ssh fhem@radiohub-1.home 'gatttool -i hci0 -b <MAC> --char-write-req -a 0x10 -n 0100 --listen' kommt auch von der Console aus nicht zu einem definierten Ende, sondern läuft weiter
2) Der Aufruf aus fhem hinterlässt einen Zombie Prozess vom gatttool. Alle kommenden sind also aufgrund des bereits laufenden Prozesses zum scheitern verurteilt.

ps axf auf radiohub-1:
4196 ?        Ss     0:00 bash -c gatttool -i hci0 -b <MAC> --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev
4197 ?        S      0:00  \_ gatttool -i hci0 -b <MAC> --char-write-req -a 0x10 -n 0100 --listen /dev/null


Sachdienliche Hinweise bitte gern an mich :-)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 24 Januar 2018, 21:06:25
Das muss ich mir ganz in Ruhe anschauen
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 25 Januar 2018, 09:19:29
Zitat von: distel am 24 Januar 2018, 20:51:04
Ich nochmal... hab jetzt nen RPi2 mit BT-Stick als "radiohub" (soll noch mehr Sender/Empfänger bekommen) eingerichtet. Versuche also per ssh abzufragen.

Aus der Konsole per ssh klappt es (also Zertifikate korrekt eingerichtet). Ich bekomme auch sinnige Antworten vom Thermometer.

Für die einfachen Operationen (nur read) klappt es auch in fhem: get devicename bspw. funktioniert.
Bei komplexeren Operationen (z.B. set devicename = write + read) klappt das write, nicht aber das read - timeout. ein nachträgliches get devicename klappt dann aber und liefert den neuen Wert.

Die Abfrage der Sensorwerte klappt allerdings nicht. Obwohl es eigentlich gut aussieht:
2018.01.24 20:41:40 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.24 20:41:40 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|<MAC>|write|0x10|0100
2018.01.24 20:41:40 4: XiaomiBTLESens (xbtle.temp.eg.flur) - stateRequestTimer: Call Request Timer
2018.01.24 20:41:41 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command timeout 15 ssh fhem@radiohub-1.home 'gatttool -i hci0 -b <MAC> --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null' and loop 0
2018.01.24 20:41:52 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.24 20:41:56 5: XiaomiBTLESens (xbtle.temp.eg.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 32 2e 32 00
...
Notification handle = 0x000e value,54 3d 31 39 2e 34 20 48 3d 35 33 2e 37 00

2018.01.24 20:41:56 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 31 39 2e 38 20 48 3d 35 32 2e 32 00
...
Notification handle = 0x000e value,54 3d 31 39 2e 34 20 48 3d 35 33 2e 37 00

2018.01.24 20:41:56 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.01.24 20:41:58 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: another gatttool process is running. waiting...
...
2018.01.24 20:42:38 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.01.24 20:42:40 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.01.24 20:42:40 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 579
2018.01.24 20:42:40 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.24 20:42:40 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Aborted: The BlockingCall Process terminated unexpectedly. Timedout


1) der Befehl ssh fhem@radiohub-1.home 'gatttool -i hci0 -b <MAC> --char-write-req -a 0x10 -n 0100 --listen' kommt auch von der Console aus nicht zu einem definierten Ende, sondern läuft weiter
2) Der Aufruf aus fhem hinterlässt einen Zombie Prozess vom gatttool. Alle kommenden sind also aufgrund des bereits laufenden Prozesses zum scheitern verurteilt.

ps axf auf radiohub-1:
4196 ?        Ss     0:00 bash -c gatttool -i hci0 -b <MAC> --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev
4197 ?        S      0:00  \_ gatttool -i hci0 -b <MAC> --char-write-req -a 0x10 -n 0100 --listen /dev/null


Sachdienliche Hinweise bitte gern an mich :-)

Ich habe auf GitHub im Devel branch mal eine debug Version für Dich hingelegt. Bitte diese einmal testen und schauen ob es damit besser geht.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: frank_41 am 25 Januar 2018, 21:55:47
moin,
ich habe jetzt auf das neue Modul umgestellt. Irgendwie gibt es jetzt mehr timouts als vorher:
2018.01.25 16:16:03 4: XiaomiBTLESens (zamioculcas) - Run CreateParamGatttool with mod: read
2018.01.25 16:16:04 4: XiaomiBTLESens (zamioculcas) - Read XiaomiBTLESens_ExecGatttool_Run zamioculcas|C4:7C:8D:65:C0:8C|read|0x38
2018.01.25 16:16:04 4: XiaomiBTLESens (zamioculcas) - stateRequestTimer: Call Request Timer
2018.01.25 16:16:04 5: XiaomiBTLESens (zamioculcas) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b C4:7C:8D:65:C0:8C --char-read -a 0x38 2>&1 /dev/null and loop 0
2018.01.25 16:16:27 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 4093
2018.01.25 16:16:44 5: XiaomiBTLESens (zamioculcas) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)

2018.01.25 16:16:44 5: XiaomiBTLESens (zamioculcas) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b C4:7C:8D:65:C0:8C --char-read -a 0x38 2>&1 /dev/null and loop 1
2018.01.25 16:17:04 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 4119
2018.01.25 16:17:04 4: XiaomiBTLESens (zamioculcas) - WriteReadings: Readings were written
2018.01.25 16:17:04 4: XiaomiBTLESens (zamioculcas) - ExecGatttool_Aborted: The BlockingCall Process terminated unexpectedly. Timedout


Ist irgendwas am Timing geändert worden ?
Gruss
Frank
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 26 Januar 2018, 06:18:16
Zitat von: frank_41 am 25 Januar 2018, 21:55:47
moin,
ich habe jetzt auf das neue Modul umgestellt. Irgendwie gibt es jetzt mehr timouts als vorher:
2018.01.25 16:16:03 4: XiaomiBTLESens (zamioculcas) - Run CreateParamGatttool with mod: read
2018.01.25 16:16:04 4: XiaomiBTLESens (zamioculcas) - Read XiaomiBTLESens_ExecGatttool_Run zamioculcas|C4:7C:8D:65:C0:8C|read|0x38
2018.01.25 16:16:04 4: XiaomiBTLESens (zamioculcas) - stateRequestTimer: Call Request Timer
2018.01.25 16:16:04 5: XiaomiBTLESens (zamioculcas) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b C4:7C:8D:65:C0:8C --char-read -a 0x38 2>&1 /dev/null and loop 0
2018.01.25 16:16:27 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 4093
2018.01.25 16:16:44 5: XiaomiBTLESens (zamioculcas) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)

2018.01.25 16:16:44 5: XiaomiBTLESens (zamioculcas) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b C4:7C:8D:65:C0:8C --char-read -a 0x38 2>&1 /dev/null and loop 1
2018.01.25 16:17:04 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 4119
2018.01.25 16:17:04 4: XiaomiBTLESens (zamioculcas) - WriteReadings: Readings were written
2018.01.25 16:17:04 4: XiaomiBTLESens (zamioculcas) - ExecGatttool_Aborted: The BlockingCall Process terminated unexpectedly. Timedout


Ist irgendwas am Timing geändert worden ?
Gruss
Frank

Es wurde nichts verändert. Der Code für die Flower Sense ist so geblieben. Dein gatttool scheint sich aber auch ewig Zeit zu lassen beim 2. Aufruf

2018.01.25 16:16:44 5: XiaomiBTLESens (zamioculcas) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b C4:7C:8D:65:C0:8C --char-read -a 0x38 2>&1 /dev/null and loop 1

Und 30s später erfolgt der Abbruch, so lange hat gatttool auf eine Antwort der Gegenstelle gewartet

2018.01.25 16:17:04 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 4119

Wie oft kommt es denn vor?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 26 Januar 2018, 19:33:34
Zitat von: CoolTux am 25 Januar 2018, 09:19:29
Ich habe auf GitHub im Devel branch mal eine debug Version für Dich hingelegt. Bitte diese einmal testen und schauen ob es damit besser geht.

Hallo,

hab jetzt die 2.0.6devel installiert. Wenn ich es recht sehe, hast Du im Aufruf nicht mehr das "bash" vorangestellt.
Die Kommunikation läuft gefühlt schneller. Auch Ergebnisse werden transportiert.
Aber dennoch ist es nicht unbedingt erfolgreich :-/

Der erste Versuch scheitert (endpoint not connected) die weiteren dann ebenfalls (device busy).
Versuche ich das auf der Kommandozeile (ebenfalls via ssh vom fhem aus), dann bekomme ich zumindest im zweiten Versuch ne Antwort und kein busy.

Das read auf 0x35 hingegen klappt dann zuverlässig.

2018.01.26 19:24:09 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.26 19:24:09 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|<MAC>|write|0x10|0100
2018.01.26 19:24:10 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command timeout 5 ssh fhem@radiohub-1.home 'gatttool -i hci0 -b <MAC> --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null' and loop 0
2018.01.26 19:24:14 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result connect error,Transport endpoint is not connected (107)

2018.01.26 19:24:14 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command timeout 5 ssh fhem@radiohub-1.home 'gatttool -i hci0 -b <MAC> --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null' and loop 1
2018.01.26 19:24:19 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result
2018.01.26 19:24:19 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command timeout 5 ssh fhem@radiohub-1.home 'gatttool -i hci0 -b <MAC> --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null' and loop 2
2018.01.26 19:24:20 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result connect,Device or resource busy (16)

2018.01.26 19:24:20 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result connect,Device or resource busy (16)

2018.01.26 19:24:20 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.01.26 19:24:22 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.01.26 19:24:23 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b <MAC> --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.26 19:24:24 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,08 36 00 10 00

2018.01.26 19:24:24 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,08 36 00 10 00

2018.01.26 19:24:24 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|<MAC>|ok|read|0x35|{"gtResult":"08 36 00 10 00 "}
2018.01.26 19:24:24 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.26 19:24:24 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written


Ggf. sind die 5 Sekunden Timeout etwas optimistisch?! Wie wäre es, das Timeout parametrierbar zu machen, dann könnte ich verschiedene Werte testen.
Hab testweise mal die entsprechende Zeile von Hand auf 7 Sekunden geädert - das funktioniert besser, allerdings liegt jetzt das Thermometer auch direkt daneben. Ich teste mal noch ein wenig.


Gruß

Dirk
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: trinitywhm am 26 Januar 2018, 19:42:17
Ich habe hier auch vermehrt Fehler nach der Umstellung. Im Device das Reading
lastGattError
The BlockingCall Process terminated unexpectedly. Timedout


Im Log mit verbose 5 nach einem "get sensorData"
2018.01.26 19:21:06 4: XiaomiBTLESens (WZ_Pflanze1) - Run CreateParamGatttool with mod: read
2018.01.26 19:21:06 4: XiaomiBTLESens (WZ_Pflanze1) - Read XiaomiBTLESens_ExecGatttool_Run WZ_Pflanze1|C4:7C:8D:63:6D:E9|read|0x38
2018.01.26 19:21:34 5: XiaomiBTLESens (WZ_Pflanze1) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)

2018.01.26 19:21:34 5: XiaomiBTLESens (WZ_Pflanze1) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b C4:7C:8D:63:6D:E9 --char-read -a 0x38 2>&1 /dev/null and loop 1
2018.01.26 19:21:53 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 3521
2018.01.26 19:21:54 4: XiaomiBTLESens (WZ_Pflanze1) - WriteReadings: Readings were written
2018.01.26 19:21:54 4: XiaomiBTLESens (WZ_Pflanze1) - ExecGatttool_Aborted: The BlockingCall Process terminated unexpectedly. Timedout
2018.01.26 19:24:50 4: XiaomiBTLESens (WZ_Pflanze1) - Run CreateParamGatttool with mod: read
2018.01.26 19:24:51 4: XiaomiBTLESens (WZ_Pflanze1) - Read XiaomiBTLESens_ExecGatttool_Run WZ_Pflanze1|C4:7C:8D:63:6D:E9|read|0x38
2018.01.26 19:24:51 4: XiaomiBTLESens (WZ_Pflanze1) - stateRequestTimer: Call Request Timer
2018.01.26 19:24:51 5: XiaomiBTLESens (WZ_Pflanze1) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b C4:7C:8D:63:6D:E9 --char-read -a 0x38 2>&1 /dev/null and loop 0
2018.01.26 19:25:31 5: XiaomiBTLESens (WZ_Pflanze1) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)
2018.01.26 19:25:31 5: XiaomiBTLESens (WZ_Pflanze1) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b C4:7C:8D:63:6D:E9 --char-read -a 0x38 2>&1 /dev/null and loop 1
2018.01.26 19:25:50 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 3798
2018.01.26 19:25:51 4: XiaomiBTLESens (WZ_Pflanze1) - WriteReadings: Readings were written
2018.01.26 19:25:51 4: XiaomiBTLESens (WZ_Pflanze1) - ExecGatttool_Aborted: The BlockingCall Process terminated unexpectedly. Timedout
2018.01.26 19:26:29 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 3921
2018.01.26 19:27:13 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 3965

Und diese letzte Timeout-Meldung zieht sich schon durch den ganzen Tag, mal sporadisch, mal im Abstand von ein bis zwei Minuten.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 26 Januar 2018, 19:59:51
Zitat von: trinitywhm am 26 Januar 2018, 19:42:17
Ich habe hier auch vermehrt Fehler nach der Umstellung. Im Device das Reading
Das müssten aber zwei verschiedene Paar Schuhe sein, da Du den lokalen Bluetooth-Stack abfragst, ich aber auf einem Remote-System via ssh.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 26 Januar 2018, 20:04:58
Die Abbrüche scheinen nicht wirklich reproduzierbar im Zusammenhang mit dem (ssh-)timeout zu stehen. Zumindest die reinen leseoperationen geben sich unbeeindruckt (verwenden aber auch kein timeout):

Einfaches read - erfolgreich
2018.01.26 19:54:17 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: read
2018.01.26 19:54:17 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Read XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|<MAC>|read|0x3
2018.01.26 19:54:18 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b <MAC> --char-read -a 0x3 2>&1 /dev/null' and loop 0
2018.01.26 19:54:24 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,45 47 2e 54 65 73 74

2018.01.26 19:54:24 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,45 47 2e 54 65 73 74

2018.01.26 19:54:24 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|<MAC>|ok|read|0x3|{"gtResult":"45 47 2e 54 65 73 74 "}
2018.01.26 19:54:24 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.26 19:54:24 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification: handle 0x3
2018.01.26 19:54:24 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Thermo/Hygro Sens Handle0x3
2018.01.26 19:54:24 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written


Nochmal einfaches read - erfolgreich
2018.01.26 19:54:55 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: read
2018.01.26 19:54:55 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Read XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|<MAC>|read|0x24
2018.01.26 19:54:56 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b <MAC> --char-read -a 0x24 2>&1 /dev/null' and loop 0
2018.01.26 19:55:03 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,30 30 2e 30 30 2e 36 36

2018.01.26 19:55:03 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,30 30 2e 30 30 2e 36 36

2018.01.26 19:55:03 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|<MAC>|ok|read|0x24|{"gtResult":"30 30 2e 30 30 2e 36 36 "}
2018.01.26 19:55:03 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.26 19:55:03 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification: handle 0x24
2018.01.26 19:55:03 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Thermo/Hygro Sens Handle0x24
2018.01.26 19:55:03 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written


write (get sensordata) - nicht erfolgreich -- obwohl auf 0x000e vernünftige Infos zurückgeliefert werden.
2018.01.26 19:55:20 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.26 19:55:20 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|<MAC>|write|0x10|0100
2018.01.26 19:55:21 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command timeout 8 ssh fhem@radiohub-1.home 'gatttool -i hci0 -b <MAC> --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null' and loop 0
2018.01.26 19:55:29 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 31 2e 34 20 48 3d 34 38 2e 37 00
Notification handle = 0x000e value,54 3d 32 31 2e 35 20 48 3d 34 38 2e 36 00

2018.01.26 19:55:29 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 31 2e 34 20 48 3d 34 38 2e 37 00
Notification handle = 0x000e value,54 3d 32 31 2e 35 20 48 3d 34 38 2e 36 00

2018.01.26 19:55:30 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b <MAC> --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.26 19:55:31 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,08 36 00 10 00

2018.01.26 19:55:31 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,08 36 00 10 00

2018.01.26 19:55:31 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|<MAC>|ok|read|0x35|{"gtResult":"08 36 00 10 00 "}
2018.01.26 19:55:31 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.26 19:55:31 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 26 Januar 2018, 20:09:32
Zitat von: distel am 26 Januar 2018, 20:04:58
Die Abbrüche scheinen nicht wirklich reproduzierbar im Zusammenhang mit dem (ssh-)timeout zu stehen. Zumindest die reinen leseoperationen geben sich unbeeindruckt (verwenden aber auch kein timeout):

Einfaches read - erfolgreich
2018.01.26 19:54:17 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: read
2018.01.26 19:54:17 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Read XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|<MAC>|read|0x3
2018.01.26 19:54:18 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b <MAC> --char-read -a 0x3 2>&1 /dev/null' and loop 0
2018.01.26 19:54:24 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,45 47 2e 54 65 73 74

2018.01.26 19:54:24 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,45 47 2e 54 65 73 74

2018.01.26 19:54:24 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|<MAC>|ok|read|0x3|{"gtResult":"45 47 2e 54 65 73 74 "}
2018.01.26 19:54:24 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.26 19:54:24 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification: handle 0x3
2018.01.26 19:54:24 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Thermo/Hygro Sens Handle0x3
2018.01.26 19:54:24 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written


Nochmal einfaches read - erfolgreich
2018.01.26 19:54:55 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: read
2018.01.26 19:54:55 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Read XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|<MAC>|read|0x24
2018.01.26 19:54:56 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b <MAC> --char-read -a 0x24 2>&1 /dev/null' and loop 0
2018.01.26 19:55:03 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,30 30 2e 30 30 2e 36 36

2018.01.26 19:55:03 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,30 30 2e 30 30 2e 36 36

2018.01.26 19:55:03 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|<MAC>|ok|read|0x24|{"gtResult":"30 30 2e 30 30 2e 36 36 "}
2018.01.26 19:55:03 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.26 19:55:03 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification: handle 0x24
2018.01.26 19:55:03 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Thermo/Hygro Sens Handle0x24
2018.01.26 19:55:03 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written


write (get sensordata) - nicht erfolgreich -- obwohl auf 0x000e vernünftige Infos zurückgeliefert werden.
2018.01.26 19:55:20 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.26 19:55:20 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|<MAC>|write|0x10|0100
2018.01.26 19:55:21 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command timeout 8 ssh fhem@radiohub-1.home 'gatttool -i hci0 -b <MAC> --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null' and loop 0
2018.01.26 19:55:29 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 31 2e 34 20 48 3d 34 38 2e 37 00
Notification handle = 0x000e value,54 3d 32 31 2e 35 20 48 3d 34 38 2e 36 00

2018.01.26 19:55:29 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 31 2e 34 20 48 3d 34 38 2e 37 00
Notification handle = 0x000e value,54 3d 32 31 2e 35 20 48 3d 34 38 2e 36 00

2018.01.26 19:55:30 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b <MAC> --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.26 19:55:31 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,08 36 00 10 00

2018.01.26 19:55:31 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,08 36 00 10 00

2018.01.26 19:55:31 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|<MAC>|ok|read|0x35|{"gtResult":"08 36 00 10 00 "}
2018.01.26 19:55:31 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.26 19:55:31 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written


Also hier sieht alles super aus. Bei allen drei Beispielen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 26 Januar 2018, 22:16:59
Zitat von: CoolTux am 26 Januar 2018, 20:09:32
Also hier sieht alles super aus. Bei allen drei Beispielen.
Jein. Bei 1 und 2 ists ok. Bei 3 siehts gut aus, aber da fehlt noch was: Die Verarbeitung und das setzen der Readings. Sprich es erfolgt keine Aktualisierung :-/
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 26 Januar 2018, 22:33:22
Zitat von: distel am 26 Januar 2018, 20:04:58

2018.01.26 19:55:30 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b <MAC> --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.26 19:55:31 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,08 36 00 10 00

2018.01.26 19:55:31 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,08 36 00 10 00

2018.01.26 19:55:31 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|<MAC>|ok|read|0x35|{"gtResult":"08 36 00 10 00 "}
2018.01.26 19:55:31 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.26 19:55:31 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written


Also zu mindest steht WriteReadings: Readings da.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 26 Januar 2018, 22:44:15
Zitat von: CoolTux am 26 Januar 2018, 22:33:22
Also zu mindest steht WriteReadings: Readings da.
Stimmt, aber das einzige Reading, das aktualisiert wird ist state. Daher hatte ich das "nur" mit dem Lesen von 0x35 in Verbindung gebracht. Hier der Stand grad nach dem get sensordata:

Internals:
   BTMAC      <MAC>
   DEF        <MAC>
   INTERVAL   300
   NAME       xbtle.temp.eg.flur
   NOTIFYDEV  global,xbtle.temp.eg.flur
   NR         314
   NTFY_ORDER 50-xbtle.temp.eg.flur
   STATE      T: 21.5 °C / H: 48.5 %
   TYPE       XiaomiBTLESens
   VERSION    2.0.6debug
   loglevel   4
   READINGS:
     2018-01-26 15:37:33   battery         ok
     2018-01-26 15:37:33   batteryLevel    96
     2018-01-26 19:54:24   devicename      EG.Test
     2018-01-26 19:55:03   firmware        00.00.66
     2018-01-26 19:44:44   humidity        48.5
     2018-01-26 22:36:48   lastGattError   The BlockingCall Process terminated unexpectedly. Timedout
     2018-01-26 22:40:03   state           active
     2018-01-26 19:44:44   temperature     21.5
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1516977453.14894
     updateTimestampCallBattery 2018-01-26 15:37:33
Attributes:
   alias      Temperatur EG.Flur
   comment    fhem@radiohub-1.home
   group      Temperatur
   icon       temp_temperature
   interval   300
   model      thermoHygroSens
   room       Sensoren
   sshHost    fhem@radiohub-1.home
   stateFormat {"T: " . ReadingsVal($name,"temperature",0) . " °C / H: " . ReadingsVal($name,"humidity",0) . " %"}
   verbose    5


PS: Ja, da wo es jetzt liegt ist's wärmer ;)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 26 Januar 2018, 23:02:44
Das Problem ist leider das gatttool anscheinend auch mal locker 30s wartet bis es abbricht. BlockingCall aber nur 60s läuft und dann abbricht. Wenn es dann schon der 4. Versuch ist geht es ins Timeout. Ich weiß nicht wie es ist wenn man BlockingCall mehr Zeit gibt. Müsste man aus testen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: frank_41 am 27 Januar 2018, 00:47:52
Hm, ich bin's noch mal.
Also inzwischen hat fhem zu den meisten Flowersense Sensoren mal Kontakt gekriegt.
Der Abstand zum Raspi ist wohl an der Kante des Empfangs.
Das würde mich nicht stören.
Allerdings wird das logfile mit den timeout Meldungen vollgemüllt :

Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process xxxxx

Kann man diese Meldungen abstellen ??
Vielen Dank schonmal
Gruß
Frank


Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 27 Januar 2018, 00:58:46
Zitat von: frank_41 am 27 Januar 2018, 00:47:52
Hm, ich bin's noch mal.
Also inzwischen hat fhem zu den meisten Flowersense Sensoren mal Kontakt gekriegt.
Der Abstand zum Raspi ist wohl an der Kante des Empfangs.
Das würde mich nicht stören.
Allerdings wird das logfile mit den timeout Meldungen vollgemüllt :

Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process xxxxx

Kann man diese Meldungen abstellen ??
Vielen Dank schonmal
Gruß
Frank

Verbose auf 2 setzen. Ich werde mir das ganze die Tage noch mal anschauen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 27 Januar 2018, 07:52:36
Ich werde irgendwie das Gefühl nicht los, dass es sonniger wäre, eine kleine Software zu nutzen, die auf nem Pi (o.ä.) autonom die Sensoren abfragt und in fhem 'nur' die Werte aus solch einem 'Cache' abzufragen/einzubinden. Bei einem Thermometer ist ja noch alles okay, wenn es aber mehr werden... Gut, fhem2fhem wäre ja auch immer noch eine Lösung.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 27 Januar 2018, 07:59:23
Einbindung per ssh ist doch genau das!?

Die kleine SW heißt gattool... ;)

Hab meine alle per ssh eingebunden über einen PI Zero W der den Sensoren nahe ist...

Gruß, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 27 Januar 2018, 08:03:23
Zitat von: MadMax-FHEM am 27 Januar 2018, 07:59:23
Einbindung per ssh ist doch genau das!?

Jein. Aktuell erscheint mir die Kommunikation mit dem Thermometer etwas fragil, zeitlich lang und blockieren für fhem. Daher meine ich eine echte Entkopplung. Wie gesagt: fhem2fhem wäre eine Option.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 27 Januar 2018, 08:20:12
Warum blockierend?

Soweit ich die Implementierung kenne ist es non-blocking...

Gruß, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 27 Januar 2018, 08:42:06
Es ist auch non-blocking

ich werde noch etwas mit den Werten spielen und schauen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 27 Januar 2018, 11:29:02
Zitat von: MadMax-FHEM am 27 Januar 2018, 08:20:12
Warum blockierend?
Mein Fehler  ::)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 27 Januar 2018, 11:57:31
neue Version im Develzweig zum testen.
Distel bitte teste die einmal.

Kleine Info am Rande. Bei BTLE kann es mitunter um cm gehen in Abhängigkeit der Umwelt. Ich merke das ganz doll bei einem meiner Pflanzensensoren. Wenn ich den Topf mit dem es hin und wieder hackt um 50 cm zum Empfänger rücke geht es wieder. Es gibt Tage da geht es ohne Probleme und andere wo das Wetter augenscheinlich feuchter ist hängt er oft.



Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 27 Januar 2018, 12:29:07
Zitat von: CoolTux am 27 Januar 2018, 11:57:31
neue Version im Develzweig zum testen.
Distel bitte teste die einmal.

Also im Ergebnis: Sensorwerte werden ein, zwei Mal ausgelesen und in die readings geschrieben, aber dann bleibt gatttool als Zombie auf dem remote-system stehen. Allerdings scheint es (bei der Häufigkeit) auch irgendwie konkurrierende Zugriffe zu geben.

2018.01.27 12:25:12 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command timeout 10 ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null' and loop 0
2018.01.27 12:25:21 1: NOTE: WEB is probed by a search engine
2018.01.27 12:25:22 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 37 00
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 38 00
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 37 00

2018.01.27 12:25:22 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 37 00
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 38 00
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 37 00

2018.01.27 12:25:23 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.27 12:25:24 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 12:25:24 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 12:25:24 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x35|{"gtResult":"08 36 00 10 00 "}
2018.01.27 12:25:24 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.27 12:25:24 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.27 12:25:24 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 12:25:24 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 12:25:25 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command timeout 10 ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null' and loop 0
2018.01.27 12:25:26 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.27 12:25:26 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 12:25:26 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 12:25:26 4: XiaomiBTLESens (xbtle.temp.eg.flur) - stateRequestTimer: Call Request Timer
2018.01.27 12:25:35 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 37 00
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 38 00
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 37 00
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 36 00

2018.01.27 12:25:35 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 37 00
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 38 00
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 37 00
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 36 00

2018.01.27 12:25:36 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.27 12:25:42 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 12:25:42 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 12:25:42 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x35|{"gtResult":"08 36 00 10 00 "}
2018.01.27 12:25:42 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.27 12:25:42 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.27 12:25:42 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 12:25:42 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 12:25:44 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command timeout 10 ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null' and loop 0
2018.01.27 12:25:54 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 38 00
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 37 00
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 39 00
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 37 00
Notification handle = 0x000e value,54 3d 32 31 2e 37 20 48 3d 34 36 2e 37 00
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 39 00
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 38 00

2018.01.27 12:25:54 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 38 00
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 37 00
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 39 00
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 37 00
Notification handle = 0x000e value,54 3d 32 31 2e 37 20 48 3d 34 36 2e 37 00
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 39 00
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 38 00

2018.01.27 12:25:54 3: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.01.27 12:25:56 3: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.01.27 12:25:57 3: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: another gatttool process is running. waiting...


PS: Ich geb das MAC-ausstreichen auf. Bei der Reichweite ists eh egal und die Dinger geben sich ja auch ohne Pairing nicht grad zugeknöpft ;)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 27 Januar 2018, 12:34:39
Ich hab grad mal das Log leergemacht und das device vorher disabled. Dann schaut es beim enablen leider auch nicht besser aus: Zombi bleibt und stört den Fortgang:

2018.01.27 12:32:36 3: XiaomiBTLESens (xbtle.temp.eg.flur) - enabled
2018.01.27 12:32:36 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 12:32:36 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 12:32:36 4: XiaomiBTLESens (xbtle.temp.eg.flur) - stateRequestTimer: Call Request Timer
2018.01.27 12:32:37 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command timeout 10 ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null' and loop 0
2018.01.27 12:32:47 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 37 00
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 38 00
Notification handle = 0x000e value,54 3d 32 31 2e 39 20 48 3d 34 36 2e 38 00
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 36 00
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 37 00

2018.01.27 12:32:47 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 37 00
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 38 00
Notification handle = 0x000e value,54 3d 32 31 2e 39 20 48 3d 34 36 2e 38 00
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 36 00
Notification handle = 0x000e value,54 3d 32 31 2e 38 20 48 3d 34 36 2e 37 00

2018.01.27 12:32:47 3: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.01.27 12:32:49 3: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.01.27 12:32:50 3: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: another gatttool process is running. waiting...
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 27 Januar 2018, 12:42:49
Aber immer hin bekommt er den noch laufenden Prozess mit. Geht der Prozess denn nach einer Weile weg oder bleibt er echt als Zombie hängen?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 27 Januar 2018, 12:47:08
Bitte noch einmal eine neue Version testen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 27 Januar 2018, 14:11:03
Zitat von: CoolTux am 27 Januar 2018, 12:42:49
Aber immer hin bekommt er den noch laufenden Prozess mit. Geht der Prozess denn nach einer Weile weg oder bleibt er echt als Zombie hängen?
der Prozess bleibt wirklich stehen. Ich probier mal deine neue Version...
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 27 Januar 2018, 14:31:16
Zitat von: CoolTux am 27 Januar 2018, 12:47:08
Bitte noch einmal eine neue Version testen.

Die gute Nachricht vorweg: Keine Zombies mehr mit 2.0.6devel3
Die Schlechte: Es klappt allerdings auch nicht recht: abwechselnd write 0x10 und read 0x35 aber ohne Ergebnis bei 0x10


2018.01.27 14:20:24 3: XiaomiBTLESens (xbtle.temp.eg.flur) - enabled
2018.01.27 14:20:24 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: read
2018.01.27 14:20:24 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Read XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|read|0x18
2018.01.27 14:20:24 4: XiaomiBTLESens (xbtle.temp.eg.flur) - stateRequestTimer: Call Request Timer
2018.01.27 14:20:26 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x18 2>&1 /dev/null' and loop 0
2018.01.27 14:20:30 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,60

2018.01.27 14:20:30 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,60

2018.01.27 14:20:30 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x18|{"gtResult":"60 "}
2018.01.27 14:20:30 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.27 14:20:30 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification: handle 0x18
2018.01.27 14:20:30 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Thermo/Hygro Sens Handle0x18
2018.01.27 14:20:30 1: PERL WARNING: Illegal hexadecimal digit ' ' ignored at ./FHEM/74_XiaomiBTLESens.pm line 682.
2018.01.27 14:20:30 3: eval: {XiaomiBTLESens_ExecGatttool_Done('xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x18|{"gtResult":"60 "}')}
2018.01.27 14:20:30 1: PERL WARNING: Illegal hexadecimal digit ' ' ignored at ./FHEM/74_XiaomiBTLESens.pm line 683.
2018.01.27 14:20:30 3: eval: {XiaomiBTLESens_ExecGatttool_Done('xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x18|{"gtResult":"60 "}')}
2018.01.27 14:20:30 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.27 14:20:30 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 14:20:30 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 14:20:31 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 2>&1 /dev/null' and loop 0
2018.01.27 14:20:32 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.01.27 14:20:32 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.01.27 14:20:33 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.27 14:20:34 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:20:34 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:20:34 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x35|{"gtResult":"08 36 00 10 00 "}
2018.01.27 14:20:34 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.27 14:20:34 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.27 14:20:34 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 14:20:34 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 14:20:35 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 2>&1 /dev/null' and loop 0
2018.01.27 14:20:36 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.01.27 14:20:36 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.01.27 14:20:37 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.27 14:20:41 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:20:41 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:20:41 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x35|{"gtResult":"08 36 00 10 00 "}
2018.01.27 14:20:41 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.27 14:20:41 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.27 14:20:41 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 14:20:41 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 14:20:42 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 2>&1 /dev/null' and loop 0
2018.01.27 14:20:42 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.01.27 14:20:42 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.01.27 14:20:44 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.27 14:20:44 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:20:44 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:20:44 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x35|{"gtResult":"08 36 00 10 00 "}
2018.01.27 14:20:44 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.27 14:20:44 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.27 14:20:44 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 14:20:44 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 14:20:45 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 2>&1 /dev/null' and loop 0
2018.01.27 14:20:46 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.01.27 14:20:46 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.01.27 14:20:47 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.27 14:20:53 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result connect error,Function not implemented (38)

2018.01.27 14:20:53 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 1
2018.01.27 14:21:00 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:21:00 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:21:00 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x35|{"gtResult":"08 36 00 10 00 "}
2018.01.27 14:21:00 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.27 14:21:00 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.27 14:21:00 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 14:21:00 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 14:21:01 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 2>&1 /dev/null' and loop 0
2018.01.27 14:21:02 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.01.27 14:21:02 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.01.27 14:21:03 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.27 14:21:04 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:21:04 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:21:04 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x35|{"gtResult":"08 36 00 10 00 "}
2018.01.27 14:21:04 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.27 14:21:04 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.27 14:21:04 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 14:21:04 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 14:21:05 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 2>&1 /dev/null' and loop 0
2018.01.27 14:21:05 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.01.27 14:21:05 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.01.27 14:21:07 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.27 14:21:12 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:21:12 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:21:12 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x35|{"gtResult":"08 36 00 10 00 "}
2018.01.27 14:21:12 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.27 14:21:12 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.27 14:21:12 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 14:21:12 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 14:21:13 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 2>&1 /dev/null' and loop 0
2018.01.27 14:21:14 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.01.27 14:21:14 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.01.27 14:21:15 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.27 14:21:16 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:21:16 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:21:16 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x35|{"gtResult":"08 36 00 10 00 "}
2018.01.27 14:21:16 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.27 14:21:16 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.27 14:21:16 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 14:21:16 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 14:21:17 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 2>&1 /dev/null' and loop 0
2018.01.27 14:21:18 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic Write Request failed,Request attribute has encountered an unlikely error

2018.01.27 14:21:18 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic Write Request failed,Request attribute has encountered an unlikely error

2018.01.27 14:21:19 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.27 14:21:24 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:21:24 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:21:24 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x35|{"gtResult":"08 36 00 10 00 "}
2018.01.27 14:21:24 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.27 14:21:24 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.27 14:21:24 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 14:21:24 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 14:21:26 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 2>&1 /dev/null' and loop 0
2018.01.27 14:21:26 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.01.27 14:21:26 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.01.27 14:21:27 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.27 14:21:28 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:21:28 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:21:28 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x35|{"gtResult":"08 36 00 10 00 "}
2018.01.27 14:21:28 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.27 14:21:28 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.27 14:21:28 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 14:21:28 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 14:21:29 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 2>&1 /dev/null' and loop 0
2018.01.27 14:21:35 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.01.27 14:21:35 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.01.27 14:21:36 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.27 14:21:36 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:21:36 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:21:36 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x35|{"gtResult":"08 36 00 10 00 "}
2018.01.27 14:21:36 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.27 14:21:36 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.27 14:21:36 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 14:21:36 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 14:21:38 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 2>&1 /dev/null' and loop 0
2018.01.27 14:21:38 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.01.27 14:21:38 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.01.27 14:21:39 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.27 14:21:40 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor read failed,Request attribute has encountered an unlikely error

2018.01.27 14:21:40 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor read failed,Request attribute has encountered an unlikely error

2018.01.27 14:21:40 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|error|read|0x35|{"gtResult":"Request attribute has encountered an unlikely error"}
2018.01.27 14:21:40 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingErrors
2018.01.27 14:21:40 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.27 14:21:40 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 14:21:40 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 14:21:41 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 2>&1 /dev/null' and loop 0
2018.01.27 14:21:49 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.01.27 14:21:49 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.01.27 14:21:50 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.27 14:21:51 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:21:51 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:21:51 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x35|{"gtResult":"08 36 00 10 00 "}
2018.01.27 14:21:51 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.27 14:21:51 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.27 14:21:51 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 14:21:51 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 14:21:52 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 2>&1 /dev/null' and loop 0
2018.01.27 14:21:52 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.01.27 14:21:52 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.01.27 14:21:53 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.27 14:21:54 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor read failed,Request attribute has encountered an unlikely error

2018.01.27 14:21:54 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor read failed,Request attribute has encountered an unlikely error

2018.01.27 14:21:54 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|error|read|0x35|{"gtResult":"Request attribute has encountered an unlikely error"}
2018.01.27 14:21:54 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingErrors
2018.01.27 14:21:54 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.27 14:21:54 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 14:21:54 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 14:21:55 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 2>&1 /dev/null' and loop 0
2018.01.27 14:22:01 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result connect error,Connection timed out (110)

2018.01.27 14:22:01 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 2>&1 /dev/null' and loop 1
2018.01.27 14:22:10 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.01.27 14:22:10 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.01.27 14:22:11 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.27 14:22:11 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:22:11 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:22:11 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x35|{"gtResult":"08 36 00 10 00 "}
2018.01.27 14:22:11 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.27 14:22:11 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.27 14:22:11 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 14:22:11 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 14:22:13 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 2>&1 /dev/null' and loop 0
2018.01.27 14:22:13 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.01.27 14:22:13 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.01.27 14:22:14 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.27 14:22:15 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:22:15 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:22:15 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x35|{"gtResult":"08 36 00 10 00 "}
2018.01.27 14:22:15 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.27 14:22:15 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.27 14:22:15 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 14:22:15 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 14:22:16 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 2>&1 /dev/null' and loop 0
2018.01.27 14:22:20 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.01.27 14:22:20 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.01.27 14:22:21 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.27 14:22:22 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:22:22 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:22:22 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x35|{"gtResult":"08 36 00 10 00 "}
2018.01.27 14:22:22 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.27 14:22:22 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.27 14:22:22 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 14:22:22 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 14:22:23 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 2>&1 /dev/null' and loop 0
2018.01.27 14:22:24 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.01.27 14:22:24 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.01.27 14:22:25 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.27 14:22:29 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result connect error,Connection timed out (110)

2018.01.27 14:22:29 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 1
2018.01.27 14:22:36 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:22:36 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:22:36 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x35|{"gtResult":"08 36 00 10 00 "}
2018.01.27 14:22:36 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.27 14:22:36 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.27 14:22:36 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 14:22:36 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 14:22:37 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 2>&1 /dev/null' and loop 0
2018.01.27 14:22:38 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.01.27 14:22:38 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.01.27 14:22:39 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.27 14:22:39 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:22:39 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:22:39 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x35|{"gtResult":"08 36 00 10 00 "}
2018.01.27 14:22:39 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.27 14:22:39 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.27 14:22:39 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 14:22:39 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 14:22:41 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 2>&1 /dev/null' and loop 0
2018.01.27 14:22:41 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.01.27 14:22:41 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.01.27 14:22:42 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.27 14:22:46 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:22:46 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:22:46 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x35|{"gtResult":"08 36 00 10 00 "}
2018.01.27 14:22:46 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.27 14:22:46 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.27 14:22:46 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 14:22:46 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 14:22:47 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 2>&1 /dev/null' and loop 0
2018.01.27 14:22:48 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.01.27 14:22:48 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.01.27 14:22:49 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.27 14:22:50 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:22:50 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:22:50 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x35|{"gtResult":"08 36 00 10 00 "}
2018.01.27 14:22:50 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.27 14:22:50 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.27 14:22:50 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 14:22:50 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 14:22:51 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 2>&1 /dev/null' and loop 0
2018.01.27 14:22:51 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.01.27 14:22:51 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.01.27 14:22:52 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.27 14:22:56 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:22:56 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:22:56 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x35|{"gtResult":"08 36 00 10 00 "}
2018.01.27 14:22:56 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.27 14:22:56 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.27 14:22:56 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 14:22:56 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 14:22:57 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 2>&1 /dev/null' and loop 0
2018.01.27 14:22:58 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.01.27 14:22:58 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.01.27 14:22:59 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.27 14:23:00 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:23:00 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:23:00 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x35|{"gtResult":"08 36 00 10 00 "}
2018.01.27 14:23:00 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.27 14:23:00 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.27 14:23:00 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 14:23:00 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 14:23:01 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 2>&1 /dev/null' and loop 0
2018.01.27 14:23:02 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.01.27 14:23:02 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.01.27 14:23:03 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.27 14:23:09 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:23:09 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:23:09 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x35|{"gtResult":"08 36 00 10 00 "}
2018.01.27 14:23:09 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.27 14:23:09 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.27 14:23:09 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 14:23:09 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 14:23:10 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 2>&1 /dev/null' and loop 0
2018.01.27 14:23:10 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.01.27 14:23:10 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.01.27 14:23:12 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.27 14:23:12 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:23:12 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:23:12 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x35|{"gtResult":"08 36 00 10 00 "}
2018.01.27 14:23:12 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.27 14:23:12 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.27 14:23:12 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 14:23:12 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 14:23:13 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 2>&1 /dev/null' and loop 0
2018.01.27 14:23:14 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic Write Request failed,Request attribute has encountered an unlikely error

2018.01.27 14:23:14 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic Write Request failed,Request attribute has encountered an unlikely error

2018.01.27 14:23:15 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.27 14:23:17 3: XiaomiBTLESens (xbtle.temp.eg.flur) - disabled
2018.01.27 14:23:19 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:23:19 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 14:23:19 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x35|{"gtResult":"08 36 00 10 00 "}
2018.01.27 14:23:19 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.27 14:23:19 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 27 Januar 2018, 15:29:58
bitte noch mal testen, habe noch ein paar Optionen an das timeout gebunden
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 27 Januar 2018, 20:35:18
Zitat von: CoolTux am 27 Januar 2018, 15:29:58
bitte noch mal testen, habe noch ein paar Optionen an das timeout gebunden

Ich werd aus dem ganzen nicht schlau...
1) problematisch ist wirklich nur get sensordata, bei den anderen hab ich jetzt schon länger keine Probleme beobachtet.
2) BT-Stick und Thermometer sind vielleicht 50cm auseinander - eigentlich dürfte keine Verbindung fehlschlagen
3) Am schlimmsten: es ist nicht vorhersagbar, welcher Aufruf des gatttool zum Zombie wird.

Hier der erste Aufruf, bei dem werden die Readings NICHT aktualisiert, der gatttool Prozess (--char-write-req) verbleibt als Zombie!

2018.01.27 19:59:18 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 19:59:18 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 19:59:19 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command timeout -s 15 -k 15 5 ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null' and loop 0
2018.01.27 19:59:24 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 32 2e 33 20 48 3d 34 31 2e 34 00
Notification handle = 0x000e value,54 3d 32 32 2e 33 20 48 3d 34 31 2e 33 00
Notification handle = 0x000e value,54 3d 32 32 2e 33 20 48 3d 34 31 2e 32 00
Notification handle = 0x000e value,54 3d 32 32 2e 32 20 48 3d 34 31 2e 33 00
Notification handle = 0x000e value,54 3d 32 32 2e 33 20 48 3d 34 31 2e 34 00
Notification handle = 0x000e value,54 3d 32 32 2e 33 20 48 3d 34 31 2e 33 00
Notification handle = 0x000e value,54 3d 32 32 2e 33 20 48 3d 34 31 2e 32 00

2018.01.27 19:59:24 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 32 2e 33 20 48 3d 34 31 2e 34 00
Notification handle = 0x000e value,54 3d 32 32 2e 33 20 48 3d 34 31 2e 33 00
Notification handle = 0x000e value,54 3d 32 32 2e 33 20 48 3d 34 31 2e 32 00
Notification handle = 0x000e value,54 3d 32 32 2e 32 20 48 3d 34 31 2e 33 00
Notification handle = 0x000e value,54 3d 32 32 2e 33 20 48 3d 34 31 2e 34 00
Notification handle = 0x000e value,54 3d 32 32 2e 33 20 48 3d 34 31 2e 33 00
Notification handle = 0x000e value,54 3d 32 32 2e 33 20 48 3d 34 31 2e 32 00

2018.01.27 19:59:24 3: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: another gatttool process is running. waiting...
[...]
2018.01.27 20:00:47 3: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.01.27 20:00:48 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 1861
2018.01.27 20:00:48 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.27 20:00:48 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 20:00:48 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 20:00:48 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Aborted: The BlockingCall Process terminated unexpectedly. Timedout
2018.01.27 20:00:48 3: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: another gatttool process is running. waiting...
[...]
2018.01.27 20:01:50 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command timeout -s 15 -k 15 5 ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null' and loop 0
2018.01.27 20:01:55 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.01.27 20:01:55 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.01.27 20:01:56 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.27 20:01:57 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 20:01:57 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 20:01:57 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x35|{"gtResult":"08 36 00 10 00 "}
2018.01.27 20:01:57 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.27 20:01:57 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written


Nachdem ich dann den Prozess auf der Remote-Kiste abgeschossen habe, funktioniert es... scheinbar.
Scheinbar, weil zwar das Auslesen und Aktualisieren der Readings klappt, aber dennoch der Prozess vom gatttool zum Zombie wird - sprich nicht beendet wird. Das ist hier im log übrigens NICHT ersichtlich, aber ich wollte nicht schon wieder Unmengen von Loggings pasten:

2018.01.27 20:01:57 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 20:01:57 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 20:01:58 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command timeout -s 15 -k 15 5 ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null' and loop 0
2018.01.27 20:02:03 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 32 2e 33 20 48 3d 34 31 2e 33 00

2018.01.27 20:02:03 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 32 2e 33 20 48 3d 34 31 2e 33 00

2018.01.27 20:02:03 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|write|0x10|{"gtResult":"54 3d 32 32 2e 33 20 48 3d 34 31 2e 33 00 "}
2018.01.27 20:02:03 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.27 20:02:03 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification: handle 0x10
2018.01.27 20:02:03 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Thermo/Hygro Sens Handle0x10
2018.01.27 20:02:03 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.27 20:02:32 3: XiaomiBTLESens (xbtle.temp.eg.flur) - disabled


In einem Fall errreicht der fhem-code den Status "ExecGatttool_Done", im anderen nicht. Dennoch verbleibt in beiden Fällen der Prozess als Zombie.

Das Remotesystem ist übrigens ein frisch aufgesetzter RasPi2 mit Raspbian/Stretch ohne eigenen Code. Es läuft noch ser2net mit einem cul und einem usb310 und ein mpd. ansonsten ist fröhliches idlen angesagt.

Wenn ich vom fhem den Aufruf machen (timeout -s 15 -k 15 5 ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null' and loop 0) dann bekomme ich mal keine Antwort, mal die Meldung keine Verbindung und auch mal Daten. Was aber noch nie passiert ist, dass der remote-Prozess stehen bleibt.  :o

Ich hab mal wild das selbe Kommando mehrfach vom fhem abgesetzt. Zeitweise waren zwei Tasks im Remote-System. Das habe ich so beim Modul noch nicht beobachtet. Allerdings ist bei diesem Versuch auch ein Zombie entstanden.

Theorie: mehrere Aufrufe aus dem Modul ohne eine Pause dazwischen führen zum Zombie?! Ich weiß, ist wild. Weiß ja nicht mal, wie genau die (mehrfachen) aÁufrufe im Modul getimed sind. Aber langsam gehen mir die Erklärungen aus :/

ich raff es einfach nicht.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 27 Januar 2018, 20:57:27
Magst bitte noch mal testen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 27 Januar 2018, 21:09:21
Zitat von: CoolTux am 27 Januar 2018, 20:57:27
Magst bitte noch mal testen.

Leider ohne Erfolg:
2018.01.27 21:03:17 3: XiaomiBTLESens (xbtle.temp.eg.flur) - enabled
2018.01.27 21:03:17 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: read
2018.01.27 21:03:17 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Read XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|read|0x18
2018.01.27 21:03:17 4: XiaomiBTLESens (xbtle.temp.eg.flur) - stateRequestTimer: Call Request Timer
2018.01.27 21:03:18 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x18 2>&1 /dev/null' and loop 0
2018.01.27 21:03:21 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,60

2018.01.27 21:03:21 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,60

2018.01.27 21:03:21 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x18|{"gtResult":"60 "}
2018.01.27 21:03:21 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.27 21:03:21 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification: handle 0x18
2018.01.27 21:03:21 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Thermo/Hygro Sens Handle0x18
2018.01.27 21:03:21 1: PERL WARNING: Illegal hexadecimal digit ' ' ignored at ./FHEM/74_XiaomiBTLESens.pm line 682.
2018.01.27 21:03:21 3: eval: {XiaomiBTLESens_ExecGatttool_Done('xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x18|{"gtResult":"60 "}')}
2018.01.27 21:03:21 1: PERL WARNING: Illegal hexadecimal digit ' ' ignored at ./FHEM/74_XiaomiBTLESens.pm line 683.
2018.01.27 21:03:21 3: eval: {XiaomiBTLESens_ExecGatttool_Done('xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x18|{"gtResult":"60 "}')}
2018.01.27 21:03:21 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.27 21:03:21 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.27 21:03:21 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.27 21:03:22 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command timeout -s 9 10 ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null' and loop 0
Killed
2018.01.27 21:03:32 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 32 2e 31 20 48 3d 34 32 2e 32 00
Notification handle = 0x000e value,54 3d 32 32 2e 31 20 48 3d 34 32 2e 31 00
Notification handle = 0x000e value,54 3d 32 32 2e 31 20 48 3d 34 32 2e 33 00
Notification handle = 0x000e value,54 3d 32 32 2e 32 20 48 3d 34 32 2e 33 00
Notification handle = 0x000e value,54 3d 32 32 2e 32 20 48 3d 34 32 2e 32 00

2018.01.27 21:03:32 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 32 2e 31 20 48 3d 34 32 2e 32 00
Notification handle = 0x000e value,54 3d 32 32 2e 31 20 48 3d 34 32 2e 31 00
Notification handle = 0x000e value,54 3d 32 32 2e 31 20 48 3d 34 32 2e 33 00
Notification handle = 0x000e value,54 3d 32 32 2e 32 20 48 3d 34 32 2e 33 00
Notification handle = 0x000e value,54 3d 32 32 2e 32 20 48 3d 34 32 2e 32 00

2018.01.27 21:03:33 3: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: another gatttool process is running. waiting...
[...]
2018.01.27 21:04:16 3: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: another gatttool process is running. waiting...

==> Prozess auf Remote-system abgeschossen

2018.01.27 21:04:18 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.27 21:04:22 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 21:04:22 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,08 36 00 10 00

2018.01.27 21:04:22 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x35|{"gtResult":"08 36 00 10 00 "}
2018.01.27 21:04:22 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.27 21:04:22 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written


*sigh*
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 27 Januar 2018, 21:23:43
Dann bin ich erstmal Ratlos.

Kannst Du bitte mal etwas testen. Und zwar in der Shell folgendes ausführen

gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100

und dann gleich danach

gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x10
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 27 Januar 2018, 21:31:16
Zitat von: CoolTux am 27 Januar 2018, 21:23:43
Dann bin ich erstmal Ratlos
Da mach ich mit. Werde testen, aber nicht mehr heute... Muss die Depression runterspülen. Ich danke dir jedenfalls für deine Geduld und schnelle Reaktion. Ich hab die Hoffnung noch nicht komplett an den Nagel gehängt - nur für heute Abend ;-)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 27 Januar 2018, 21:41:13
Ich bin so ein Doofi. Fehler gefunden. Bekommst morgen was zum testen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 27 Januar 2018, 21:53:13
So Du kannst dann mal bitte noch einmal testen. Danke Dir
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 28 Januar 2018, 13:08:40
Zitat von: CoolTux am 27 Januar 2018, 21:53:13
So Du kannst dann mal bitte noch einmal testen. Danke Dir

Jetzt bin ich mindestens 50% glücklicher. Warum nur 50%? Nun, keine Zombies mehr! Yay! Aber: auch keine Readings! Hmmm! Da die Werte aber ankommen (siehe Log unten) kann das (hoffentlich) nicht so ein Kracher wie unreproduzierbare Zombies sein :-)

2018.01.28 10:40:45 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.28 10:40:45 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.28 10:40:47 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'timeout 15 gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null' and loop 0
2018.01.28 10:40:48 3: XiaomiBTLESens (xbtle.temp.eg.flur) - disabled
2018.01.28 10:41:02 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 32 2e 30 20 48 3d 34 37 2e 31 00
Notification handle = 0x000e value,54 3d 32 31 2e 39 20 48 3d 34 37 2e 33 00
Notification handle = 0x000e value,54 3d 32 32 2e 30 20 48 3d 34 37 2e 31 00
Notification handle = 0x000e value,54 3d 32 32 2e 30 20 48 3d 34 37 2e 32 00
Notification handle = 0x000e value,54 3d 32 32 2e 30 20 48 3d 34 37 2e 30 00
Notification handle = 0x000e value,54 3d 32 31 2e 39 20 48 3d 34 37 2e 32 00
Notification handle = 0x000e value,54 3d 32 32 2e 30 20 48 3d 34 37 2e 32 00
Notification handle = 0x000e value,54 3d 32 31 2e 39 20 48 3d 34 37 2e 32 00

2018.01.28 10:41:02 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 32 2e 30 20 48 3d 34 37 2e 31 00
Notification handle = 0x000e value,54 3d 32 31 2e 39 20 48 3d 34 37 2e 33 00
Notification handle = 0x000e value,54 3d 32 32 2e 30 20 48 3d 34 37 2e 31 00
Notification handle = 0x000e value,54 3d 32 32 2e 30 20 48 3d 34 37 2e 32 00
Notification handle = 0x000e value,54 3d 32 32 2e 30 20 48 3d 34 37 2e 30 00
Notification handle = 0x000e value,54 3d 32 31 2e 39 20 48 3d 34 37 2e 32 00
Notification handle = 0x000e value,54 3d 32 32 2e 30 20 48 3d 34 37 2e 32 00
Notification handle = 0x000e value,54 3d 32 31 2e 39 20 48 3d 34 37 2e 32 00

2018.01.28 10:41:03 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.01.28 10:41:10 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,08 36 00 10 00

2018.01.28 10:41:10 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,08 36 00 10 00

2018.01.28 10:41:10 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|read|0x35|{"gtResult":"08 36 00 10 00 "}
2018.01.28 10:41:10 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.28 10:41:10 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written


Ich seh grad, in den log hat sich das 'disabled' dazwischengemogelt. Ist bei den vorhergehenden Durchläufen aber genauso gewesen.

Habs noch etwas laufen lassen und es hat tatsächlich auch mal eine Aktualisierung der Messwerte gegeben. Zum Unterschied gibt es hier nur eine Zeile Rückmeldung:

2018.01.29 15:30:13 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
2018.01.29 15:30:13 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Run CreateParamGatttool with mod: write
2018.01.29 15:30:13 5: XiaomiBTLESens (xbtle.temp.eg.flur) - Write XiaomiBTLESens_ExecGatttool_Run xbtle.temp.eg.flur|4C:65:A8:D0:42:63|write|0x10|0100
2018.01.29 15:30:14 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'timeout 15 gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null' and loop 0
2018.01.29 15:30:29 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 31 2e 39 20 48 3d 34 38 2e 31 00

2018.01.29 15:30:29 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 31 2e 39 20 48 3d 34 38 2e 31 00

2018.01.29 15:30:29 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|write|0x10|{"gtResult":"54 3d 32 31 2e 39 20 48 3d 34 38 2e 31 00 "}
2018.01.29 15:30:29 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification
2018.01.29 15:30:29 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ProcessingNotification: handle 0x10
2018.01.29 15:30:29 4: XiaomiBTLESens (xbtle.temp.eg.flur) - Thermo/Hygro Sens Handle0x10
2018.01.29 15:30:29 4: XiaomiBTLESens (xbtle.temp.eg.flur) - WriteReadings: Readings were written
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: trinitywhm am 29 Januar 2018, 20:58:56
Zitat von: trinitywhm am 26 Januar 2018, 19:42:17
Ich habe hier auch vermehrt Fehler nach der Umstellung. Im Device das Reading
lastGattError
The BlockingCall Process terminated unexpectedly. Timedout


Im Log mit verbose 5 nach einem "get sensorData"
2018.01.26 19:21:06 4: XiaomiBTLESens (WZ_Pflanze1) - Run CreateParamGatttool with mod: read
2018.01.26 19:21:06 4: XiaomiBTLESens (WZ_Pflanze1) - Read XiaomiBTLESens_ExecGatttool_Run WZ_Pflanze1|C4:7C:8D:63:6D:E9|read|0x38
2018.01.26 19:21:34 5: XiaomiBTLESens (WZ_Pflanze1) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)

2018.01.26 19:21:34 5: XiaomiBTLESens (WZ_Pflanze1) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b C4:7C:8D:63:6D:E9 --char-read -a 0x38 2>&1 /dev/null and loop 1
2018.01.26 19:21:53 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 3521
2018.01.26 19:21:54 4: XiaomiBTLESens (WZ_Pflanze1) - WriteReadings: Readings were written
2018.01.26 19:21:54 4: XiaomiBTLESens (WZ_Pflanze1) - ExecGatttool_Aborted: The BlockingCall Process terminated unexpectedly. Timedout
2018.01.26 19:24:50 4: XiaomiBTLESens (WZ_Pflanze1) - Run CreateParamGatttool with mod: read
2018.01.26 19:24:51 4: XiaomiBTLESens (WZ_Pflanze1) - Read XiaomiBTLESens_ExecGatttool_Run WZ_Pflanze1|C4:7C:8D:63:6D:E9|read|0x38
2018.01.26 19:24:51 4: XiaomiBTLESens (WZ_Pflanze1) - stateRequestTimer: Call Request Timer
2018.01.26 19:24:51 5: XiaomiBTLESens (WZ_Pflanze1) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b C4:7C:8D:63:6D:E9 --char-read -a 0x38 2>&1 /dev/null and loop 0
2018.01.26 19:25:31 5: XiaomiBTLESens (WZ_Pflanze1) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)
2018.01.26 19:25:31 5: XiaomiBTLESens (WZ_Pflanze1) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b C4:7C:8D:63:6D:E9 --char-read -a 0x38 2>&1 /dev/null and loop 1
2018.01.26 19:25:50 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 3798
2018.01.26 19:25:51 4: XiaomiBTLESens (WZ_Pflanze1) - WriteReadings: Readings were written
2018.01.26 19:25:51 4: XiaomiBTLESens (WZ_Pflanze1) - ExecGatttool_Aborted: The BlockingCall Process terminated unexpectedly. Timedout
2018.01.26 19:26:29 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 3921
2018.01.26 19:27:13 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 3965

Und diese letzte Timeout-Meldung zieht sich schon durch den ganzen Tag, mal sporadisch, mal im Abstand von ein bis zwei Minuten.

Auch wenn das zwei verschiedene Probleme sein mögen, habe ich dennoch immernoch o.g. Meldungen im Log. Auch mit verbose 0 auf allen Pflanzensensoren kommen die Timeout-Meldungen im Log. Habe die Pflanzensensoren nun alle disabled.
@CoolTux: Ist denn hier eine Lösung in Sicht, oder soll ich zunächst wieder auf das alte Modul zurückgehen?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 29 Januar 2018, 21:12:48
Bei den ganzen Logs was Du mir gegeben hast sehe ich ausschließlich das Abrufen der Firmware und der Batterie.
Wie ist es wenn Du (nur zu Testzwecken) eine Pflanze näher ran holst?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: trinitywhm am 29 Januar 2018, 21:43:08
Hatte ich gestern auch schon gemacht. Pflanze stand den ganzen Abend auf dem Schreibtisch auf dem auch der raspi3 liegt. Log sah dabei genauso aus.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 29 Januar 2018, 21:49:01
Gib Mal bitte ein list von einer Pflanze.

Am Code hat sich nichts geändert für den Pflanzensensor. Einzig alte Firmwareversionen werden nicht mehr unterstützt.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: trinitywhm am 29 Januar 2018, 22:16:51
List einer Pflanze

Internals:
   BTMAC      C4:7C:8D:65:B8:76
   DEF        C4:7C:8D:65:B8:76
   INTERVAL   300
   NAME       BAD_Pflanze5
   NOTIFYDEV  global,BAD_Pflanze5
   NR         337
   NTFY_ORDER 50-BAD_Pflanze5
   STATE      disabled
   TYPE       XiaomiBTLESens
   VERSION    2.0.5
   loglevel   4
   READINGS:
     2018-01-26 10:35:15   battery         ok
     2018-01-26 10:35:15   batteryLevel    99
     2018-01-26 14:14:51   fertility       587
     2018-01-26 10:35:15   firmware        3.1.8
     2018-01-28 09:04:16   lastGattError   The BlockingCall Process terminated unexpectedly. Timedout
     2018-01-26 14:14:51   lux             55
     2018-01-26 14:14:51   moisture        31
     2018-01-28 11:51:36   state           disabled
     2018-01-26 14:14:51   temperature     20.7
     2018-01-28 09:04:21   uistate         ok
   helper:
     CallBattery 0
     CallSensDataCounter 0
Attributes:
   DbLogExclude .*
   DbLogInclude state,battery,batteryLevel,temperature,moisture,fertility,lux
   alias      Efeu
   disable    1
   event-min-interval state:3600,battery:3600,batteryLevel:3600,temperature:600,moisture:600,fertility:600,lux:300
   event-on-change-reading state
   event-on-update-reading .*
   icon       hue_room_garden
   maxFertility 2000
   maxLux     3500
   maxMoisture 60
   maxTemp    32
   minFertility 350
   minLux     1400
   minMoisture 15
   minTemp    10
   model      flowerSens
   room       70_Bad
   stateFormat {"Feuchte: ".AttrVal($name,"minMoisture","")." / ".ReadingsVal($name,"moisture","")." / ".AttrVal($name,"maxMoisture","")."</br>".
"Dünger: ".AttrVal($name,"minFertility","")." / ".ReadingsVal($name,"fertility","")." / ".AttrVal($name,"maxFertility","")."</br>".
"Temperatur: ".AttrVal($name,"minTemp","")." / ".ReadingsVal($name,"temperature","")." / ".AttrVal($name,"maxTemp","")."</br>"}
   userReadings uistate {my $moist = ReadingsVal($name, "moisture",0);; my $minmoist = AttrVal($name,"minMoisture",10);; my $fert = ReadingsVal($name, "fertility",0);; my $minfert = AttrVal($name,"minFertility",50);; if ($moist < $minmoist && $fert < $minfert) {return "durstig+hungrig"} elsif ($moist < $minmoist) {return "durstig"} elsif ($fert < $minfert) {return "hungrig"} else {return "ok"}}
   verbose    0


Welche Firmware wird nicht mehr unterstützt?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: trinitywhm am 30 Januar 2018, 08:24:14
So, Pflanze steht dicht am raspi. Device enabled. Verbose 5. Und dann get SensorData. Das ist das Ergebnis im Log
2018.01.30 08:17:19 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 25362
2018.01.30 08:20:13 4: XiaomiBTLESens (BAD_Pflanze5) - Run CreateParamGatttool with mod: read
2018.01.30 08:20:13 4: XiaomiBTLESens (BAD_Pflanze5) - Read XiaomiBTLESens_ExecGatttool_Run BAD_Pflanze5|C4:7C:8D:65:B8:76|read|0x38
2018.01.30 08:20:14 5: XiaomiBTLESens (BAD_Pflanze5) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b C4:7C:8D:65:B8:76 --char-read -a 0x38 2>&1 /dev/null and loop 0
2018.01.30 08:20:54 5: XiaomiBTLESens (BAD_Pflanze5) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)

2018.01.30 08:20:54 5: XiaomiBTLESens (BAD_Pflanze5) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b C4:7C:8D:65:B8:76 --char-read -a 0x38 2>&1 /dev/null and loop 1
2018.01.30 08:21:13 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 25599
2018.01.30 08:21:14 4: XiaomiBTLESens (BAD_Pflanze5) - WriteReadings: Readings were written
2018.01.30 08:21:14 4: XiaomiBTLESens (BAD_Pflanze5) - ExecGatttool_Aborted: The BlockingCall Process terminated unexpectedly. Timedout
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 30 Januar 2018, 09:17:05

2018.01.30 08:20:14 5: XiaomiBTLESens (BAD_Pflanze5) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b C4:7C:8D:65:B8:76 --char-read -a 0x38 2>&1 /dev/null and loop 0
2018.01.30 08:20:54 5: XiaomiBTLESens (BAD_Pflanze5) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)


Schau mal auf die Zeiten. gatttool lässt sich 40s Zeit um sich eine Antwort ab zu ringen. Das ist natürlich übelst.
Und mit der anderen Version geht das. Installiert die mal parallel und deaktiviere die Pflanze5 mit dem neuen Modul und aktiviere Pflanze5 mit dem alten Modul.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: trinitywhm am 30 Januar 2018, 09:39:06
Ha, die Idee hatte ich auch schon. Hier das Ergebnis:
2018.01.30 09:34:06 4: XiaomiFlowerSens (BAD_Pflanze55) - CallBatteryFirmware: call function ExecGatttool_Run
2018.01.30 09:34:06 5: XiaomiFlowerSens (BAD_Pflanze55) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b C4:7C:8D:65:B8:76 --char-read -a 0x38 2>&1 /dev/null and loop 0
2018.01.30 09:34:47 5: XiaomiFlowerSens (BAD_Pflanze55) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)

2018.01.30 09:34:47 5: XiaomiFlowerSens (BAD_Pflanze55) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b C4:7C:8D:65:B8:76 --char-read -a 0x38 2>&1 /dev/null and loop 1
2018.01.30 09:35:06 1: Timeout for XiaomiFlowerSens_ExecGatttool_Run reached, terminated process 30431
2018.01.30 09:35:06 4: XiaomiFlowerSens (BAD_Pflanze55) - WriteReadings: Readings were written
2018.01.30 09:35:06 4: XiaomiFlowerSens (BAD_Pflanze55) - ExecGatttool_Aborted: The BlockingCall Process terminated unexpectedly. Timedout


Bevor ich gewechselt bin, hatte ich diese Probleme nicht. Und wie man sieht, "never change a running system".....
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 30 Januar 2018, 09:54:35
Hast Du in der Zeit auch ein Distributions Update gemacht? welche gatttool Version hast Du?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: trinitywhm am 30 Januar 2018, 10:56:37
Nein, ich habe kein Distributionsupdate gemacht. Wie finde ich die Version von gatttool heraus?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 30 Januar 2018, 11:38:43
gatttool --version
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: trinitywhm am 30 Januar 2018, 11:50:42
Das hatte ich auch versucht, aber den Aufruf gibt es wohl nicht. Hab Debian jessie.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 30 Januar 2018, 13:29:17
Zitat von: trinitywhm am 30 Januar 2018, 11:50:42
Das hatte ich auch versucht, aber den Aufruf gibt es wohl nicht. Hab Debian jessie.

bluetoothctl --version
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: trinitywhm am 30 Januar 2018, 18:21:26
Zitat von: CoolTux am 30 Januar 2018, 13:29:17
bluetoothctl --version

OK, danke. Das funktioniert.
Version 5.23
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 30 Januar 2018, 19:09:10
Zitat von: CoolTux am 30 Januar 2018, 13:29:17
bluetoothctl --version
Mein RasPi (der remote Rechner) hat 5.43 der NUC 5.37.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 30 Januar 2018, 19:28:21
Ich habe 5.43

Welche distribution plus Version hast du?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 30 Januar 2018, 19:33:50
Zitat von: CoolTux am 30 Januar 2018, 19:28:21
Ich habe 5.43
5.43 ist bei mir ein RasPi 2 mit Rasbian Stretch
5.37 ist der NUC mit Ubuntu 16.04.3 LTS
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 30 Januar 2018, 19:37:10
Mal schauen was trinitywhm hat.
Habe schon öfters über Probleme mit älteren bluez Versionen gelesen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: trinitywhm am 30 Januar 2018, 21:09:27
Ich habe ein Raspi 3 mit raspbian jessie
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 30 Januar 2018, 21:14:13
Dann schlage ich vor einfach mal auf Stretch zu gehen und dann zu schauen. Versprechen kann ich nichts aber es wäre ein Anfang.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: trinitywhm am 30 Januar 2018, 21:27:00
Die Antwort habe ich befürchtet. Aber ich weiß dass das der nächste sinnvolle Schritt ist.
Wir allerdings adhoc jetzt nix, melde mich wenn ich damit durch bin und ob es was gebracht hat.
Danke bis hierhin.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 30 Januar 2018, 21:34:04
Ich danke Dir fürs fleißige testen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 31 Januar 2018, 08:42:48
Hi,

das Thema hier hast Du noch auf dem Schirm? https://forum.fhem.de/index.php/topic,82572.msg757022.html#msg757022 (https://forum.fhem.de/index.php/topic,82572.msg757022.html#msg757022)

Kurzfassung:
- Keine Zombies mehr
- selten klappt das Verarbeiten der Rückmeldung (beobachtet, wenn nur eine Zeile als Antwort kommt)
- häufig klappt das Verarbeiten der Rückmeldung nicht (beobachtet, wenn mehr als eine Zeile als Antwort kommt)

Gruß Dirk
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 31 Januar 2018, 08:56:20
Hab ich auf dem Schirm. Glaube habe auch schon was gemacht.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 31 Januar 2018, 08:58:40
Zitat von: trinitywhm am 29 Januar 2018, 20:58:56
Auch wenn das zwei verschiedene Probleme sein mögen, habe ich dennoch immernoch o.g. Meldungen im Log. Auch mit verbose 0 auf allen Pflanzensensoren kommen die Timeout-Meldungen im Log. Habe die Pflanzensensoren nun alle disabled.
@CoolTux: Ist denn hier eine Lösung in Sicht, oder soll ich zunächst wieder auf das alte Modul zurückgehen?

Kannst Du mir ein Gefallen tun und das ganze bitte einmal ohne SSH testen?


Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 31 Januar 2018, 12:36:30
Zitat von: CoolTux am 31 Januar 2018, 08:56:20
Hab ich auf dem Schirm. Glaube habe auch schon was gemacht.
Dann schaul ich mal am Abend und zieh die aktuelle devel.zip drauf. Vielleicht ist ja schon alles gut :)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 31 Januar 2018, 12:39:29
Zitat von: distel am 31 Januar 2018, 12:36:30
Dann schaul ich mal am Abend und zieh die aktuelle devel.zip drauf. Vielleicht ist ja schon alles gut :)

Sei mal so nett. Mich interessiert gerade ob das vom SSH kommt oder generell so nicht ganz sauber läuft.
Danke Dir.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 31 Januar 2018, 21:04:05
Zitat von: CoolTux am 31 Januar 2018, 12:39:29
Sei mal so nett. Mich interessiert gerade ob das vom SSH kommt oder generell so nicht ganz sauber läuft.
Danke Dir.
So, hab die aktuelle devel5 nochmal gezogen und probiert. Es scheint wirklich daran zu liegen, dass die Abfragen auf das gelieferte Ergebnis nicht funktionieren, wenn mehr als eine "Antwortzeile" kommt.

Mit dieser Rückgabe klappt es:
2018.01.31 20:30:12 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'timeout 15 gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null' and loop 0
2018.01.31 20:30:27 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 31 2e 39 20 48 3d 34 36 2e 36 00

2018.01.31 20:30:27 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 31 2e 39 20 48 3d 34 36 2e 36 00

2018.01.31 20:30:27 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|write|0x10|{"gtResult":"54 3d 32 31 2e 39 20 48 3d 34 36 2e 36 00 "}


Sekunden später klappt es nicht:
2018.01.31 20:33:38 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'timeout 15 gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null' and loop 0
2018.01.31 20:33:54 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 31 2e 39 20 48 3d 34 36 2e 37 00
...
Notification handle = 0x000e value,54 3d 32 31 2e 39 20 48 3d 34 36 2e 35 00

2018.01.31 20:33:54 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 31 2e 39 20 48 3d 34 36 2e 37 00
...
Notification handle = 0x000e value,54 3d 32 31 2e 39 20 48 3d 34 36 2e 35 00

2018.01.31 20:33:55 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 0


Das Thermometer hat halt die "Angewohnheit", seine Messwerte bis ca. 10x rauszuposaunen. :-/

Hab in Deinen Code geschaut, und bin irgendwo in der Ecke Zeile 490 hängen geblieben. Leider habe ich keine Ahnung vom Array/String-Handling in Perl, daher kann ich nicht beurteilen, was im jeweiligen Falle in $gtResult[1] drin ist. Daher hab ich zwei Log3 Aufrufe eingefügt:
2018.01.31 20:44:34 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 31 2e 39 20 48 3d 34 36 2e 36 00
Notification handle = 0x000e value,54 3d 32 31 2e 39 20 48 3d 34 36 2e 35 00

2018.01.31 20:44:34 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 31 2e 39 20 48 3d 34 36 2e 36 00
Notification handle = 0x000e value,54 3d 32 31 2e 39 20 48 3d 34 36 2e 35 00

2018.01.31 20:44:34 5: XiaomiBTLESens (xbtle.temp.eg.flur) - gtResult[1]: 54 3d 32 31 2e 39 20 48 3d 34 36 2e 36 00
Notification handle = 0x000e value
2018.01.31 20:44:34 5: XiaomiBTLESens (xbtle.temp.eg.flur) - json_notification: {"gtResult":"54 3d 32 31 2e 39 20 48 3d 34 36 2e 36 00 \nNotification handle = 0x000e value"}
2018.01.31 20:44:36 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatt


Knackpunkt dürfte sein, dass im Element [1] nicht nut der "Response"-Teil "54 3d 32 31 2e 39 20 48 3d 34 36 2e 36 00" sondern nach einem Umbruch o.ä. auch noch der Führungstext der nächsten Zeile "Notification handle = 0x000e value" drin ist.

Die folgende RegEx "if($gtResult[1] =~ /^([0-9a-f]{2}(\s?))*$/) {" refrenziert aber auf das Ende des Strings, dass erst nach dem zweiten Teil (Führungstext) erreicht ist. Somit scheint mir klar, warum es funktioniert, wenn nur genau eine Antwortzeile zurückkommt.

Das Zeichen, das für den Umbruch sorgt ist ein "0A" in Hex - also klassischer LineFeed. den müsstest Du noch irgendwie ausfiltern/ersetzen, so dass die Antwort tatsächlich "frei" steht. Ich habe eine Ausgabe vom gatttool angehängt, da dort auch noch ein Leerzeichen vor dem 0A steht. Dann kannst Du dagegen prüfen.

Gruß

Dirk
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 31 Januar 2018, 22:15:24
Danke Dir, das schaue ich mir morgen Vormittag mal an.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 01 Februar 2018, 13:57:19
Zitat von: distel am 31 Januar 2018, 21:04:05
So, hab die aktuelle devel5 nochmal gezogen und probiert. Es scheint wirklich daran zu liegen, dass die Abfragen auf das gelieferte Ergebnis nicht funktionieren, wenn mehr als eine "Antwortzeile" kommt.

Mit dieser Rückgabe klappt es:
2018.01.31 20:30:12 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'timeout 15 gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null' and loop 0
2018.01.31 20:30:27 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 31 2e 39 20 48 3d 34 36 2e 36 00

2018.01.31 20:30:27 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 31 2e 39 20 48 3d 34 36 2e 36 00

2018.01.31 20:30:27 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Done: gatttool return string: xbtle.temp.eg.flur|4C:65:A8:D0:42:63|ok|write|0x10|{"gtResult":"54 3d 32 31 2e 39 20 48 3d 34 36 2e 36 00 "}


Sekunden später klappt es nicht:
2018.01.31 20:33:38 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'timeout 15 gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null' and loop 0
2018.01.31 20:33:54 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 31 2e 39 20 48 3d 34 36 2e 37 00
...
Notification handle = 0x000e value,54 3d 32 31 2e 39 20 48 3d 34 36 2e 35 00

2018.01.31 20:33:54 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 31 2e 39 20 48 3d 34 36 2e 37 00
...
Notification handle = 0x000e value,54 3d 32 31 2e 39 20 48 3d 34 36 2e 35 00

2018.01.31 20:33:55 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatttool -i hci0 -b 4C:65:A8:D0:42:63 --char-read -a 0x35 2>&1 /dev/null' and loop 0


Das Thermometer hat halt die "Angewohnheit", seine Messwerte bis ca. 10x rauszuposaunen. :-/

Hab in Deinen Code geschaut, und bin irgendwo in der Ecke Zeile 490 hängen geblieben. Leider habe ich keine Ahnung vom Array/String-Handling in Perl, daher kann ich nicht beurteilen, was im jeweiligen Falle in $gtResult[1] drin ist. Daher hab ich zwei Log3 Aufrufe eingefügt:
2018.01.31 20:44:34 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 31 2e 39 20 48 3d 34 36 2e 36 00
Notification handle = 0x000e value,54 3d 32 31 2e 39 20 48 3d 34 36 2e 35 00

2018.01.31 20:44:34 4: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 31 2e 39 20 48 3d 34 36 2e 36 00
Notification handle = 0x000e value,54 3d 32 31 2e 39 20 48 3d 34 36 2e 35 00

2018.01.31 20:44:34 5: XiaomiBTLESens (xbtle.temp.eg.flur) - gtResult[1]: 54 3d 32 31 2e 39 20 48 3d 34 36 2e 36 00
Notification handle = 0x000e value
2018.01.31 20:44:34 5: XiaomiBTLESens (xbtle.temp.eg.flur) - json_notification: {"gtResult":"54 3d 32 31 2e 39 20 48 3d 34 36 2e 36 00 \nNotification handle = 0x000e value"}
2018.01.31 20:44:36 5: XiaomiBTLESens (xbtle.temp.eg.flur) - ExecGatttool_Run: call gatttool with command ssh fhem@radiohub-1.home 'gatt


Knackpunkt dürfte sein, dass im Element [1] nicht nut der "Response"-Teil "54 3d 32 31 2e 39 20 48 3d 34 36 2e 36 00" sondern nach einem Umbruch o.ä. auch noch der Führungstext der nächsten Zeile "Notification handle = 0x000e value" drin ist.

Die folgende RegEx "if($gtResult[1] =~ /^([0-9a-f]{2}(\s?))*$/) {" refrenziert aber auf das Ende des Strings, dass erst nach dem zweiten Teil (Führungstext) erreicht ist. Somit scheint mir klar, warum es funktioniert, wenn nur genau eine Antwortzeile zurückkommt.

Das Zeichen, das für den Umbruch sorgt ist ein "0A" in Hex - also klassischer LineFeed. den müsstest Du noch irgendwie ausfiltern/ersetzen, so dass die Antwort tatsächlich "frei" steht. Ich habe eine Ausgabe vom gatttool angehängt, da dort auch noch ein Leerzeichen vor dem 0A steht. Dann kannst Du dagegen prüfen.

Gruß

Dirk

Ich bilde mir ein jetzt habe ich es. Kannst Du bitte einmal die neuste Develversion Dir holen.


Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 01 Februar 2018, 21:12:32
Zitat von: CoolTux am 01 Februar 2018, 13:57:19
Ich bilde mir ein jetzt habe ich es. Kannst Du bitte einmal die neuste Develversion Dir holen.

Hmm, leider funktioniert es damit nicht.
Ich weiß leider nicht, was die Blumen-Sensoren an Rückgabe liefern, daher fällt es mir schwer, etwas zu ersinnen, was für beide funktioniert.

Das Thermometer liefert wie folgt (Beispiel mit mehr als einer Antwortzeile:
Characteristic value was written successfully\n
Notification handle = 0x000e value: 54 3d 32 31 2e 39 20 48 3d 34 36 2e 35 00\n
Notification handle = 0x000e value: 54 3d 32 31 2e 39 20 48 3d 34 36 2e 36 00\n
Notification handle = 0x000e value: 54 3d 32 31 2e 39 20 48 3d 34 36 2e 35 00\n


Wenn du das jetzt Anhand des ": " splittest, bekommst du

Index 0Characteristic value was written successfully\n
Notification handle = 0x000e value
Index 154 3d 32 31 2e 39 20 48 3d 34 36 2e 35 00\n
Notification handle = 0x000e value
Index 254 3d 32 31 2e 39 20 48 3d 34 36 2e 36 00\n
Notification handle = 0x000e value
Index 354 3d 32 31 2e 39 20 48 3d 34 36 2e 35 00\n

Dann greifst Du auf Index 1 zu, hast da aber am Ende noch "zuviel" drinstehen und deine RegEx greift nicht.

Du könntest vor dem splitten die Umbrüche via RegEx durch ": "  ersetzen: ...  =~ s/\n/: /g;
Characteristic value was written successfully: Notification handle = 0x000e value: 54 3d 32 31 2e 39 20 48 3d 34 36 2e 35 00: Notification handle = 0x000e value: 54 3d 32 31 2e 39 20 48 3d 34 36 2e 36 00: Notification handle = 0x000e value: 54 3d 32 31 2e 39 20 48 3d 34 36 2e 35 00:

Und dann wie gehabt anhand von ": " splitten:

Index 0Characteristic value was written successfully
Index 1Notification handle = 0x000e value
Index 254 3d 32 31 2e 39 20 48 3d 34 36 2e 35 00
Index 3Notification handle = 0x000e value
Index 454 3d 32 31 2e 39 20 48 3d 34 36 2e 36 00
Index 5Notification handle = 0x000e value
Index 654 3d 32 31 2e 39 20 48 3d 34 36 2e 35 00
Index 7

Dann musst Du aber auf Index 2 zugreifen, nicht 1. Und da liegt die Crux: Wie genau (also inkl. \n oder ähnlichem sieht die Antwort vom FlowerSensor aus?

Alternativ könntest Du zwei Zweige einbauen, aus denen jeweils nur ein String herauskommt (ähnlich, wie du es mit der aktuellen Fallunterscheidung drin hast. Dann könnte ich "gefahrlos" ergänzen und dir den Teil zukommen lassen.

Gruß Dirk


Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 02 Februar 2018, 06:15:44
Guten Morgen Dirk,

Vielen Dank für Deine ausführliche Erklärung. Ich werde mal schauen das ich mir das die Tage anschaue. Denke ich habe da schon eine Idee.


Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 02 Februar 2018, 15:11:47
Zitat von: CoolTux am 02 Februar 2018, 06:15:44
Vielen Dank für Deine ausführliche Erklärung. Ich werde mal schauen das ich mir das die Tage anschaue. Denke ich habe da schon eine Idee.
Eine mögliche Option wäre (für das Thermometer) auch noch statt auf einen fixen Index auf das letzte Element zuzugreifen. Ich weiß aber nicht, ob Perl einfach ein MaxIndex(Array) bereitstellt...
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 02 Februar 2018, 19:04:54
Zitat von: distel am 02 Februar 2018, 15:11:47
Eine mögliche Option wäre (für das Thermometer) auch noch statt auf einen fixen Index auf das letzte Element zuzugreifen. Ich weiß aber nicht, ob Perl einfach ein MaxIndex(Array) bereitstellt...

Perl kann sowas. Aber ich schaue mir das die Tage in Ruhe an. Sind ja Ferien und ich hab Urlaub.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 02 Februar 2018, 19:07:34
Zitat von: CoolTux am 02 Februar 2018, 19:04:54
Sind ja Ferien und ich hab Urlaub.
Oh, hier in NRW nicht - sorry! Aber: ich bin (nicht mehr ganz) jung, ich kann (trotzdem) warten :-)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 05 Februar 2018, 09:08:17
Bitte noch mal vorsichtig testen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 05 Februar 2018, 20:38:04
Zitat von: CoolTux am 05 Februar 2018, 09:08:17
Bitte noch mal vorsichtig testen.
Hi, hab erst vorsichtig, dann etwas mutiger getestet... Läuft! Daumen hoch!
Aktuell habe ich keine besonderen Vorkommnisse. Die Auswertung der SensorData-Antwort klappt. Auch get/set deviceName hauen hin (Regressionstests ;))

Also wenn es seitens der Flower-Sensor-Fraktion keine Einwände gibt :)


Gruß Dirk

PS: Habe jetzt zwei dran hängen und schaue mal, wie es sich so schlägt. lasse vorsichtshalber mal verbose 5 an  ::)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 06 Februar 2018, 08:31:23
Aktuell läuft alles stabil, auch mit zwei Thermo-/Hygrometern. Die sensorData-Werte werden gelesen/ausgewertet/geloggt. Es gibt zwar keinen Garant dafür, dass die Dinger (recht-)zeitig Antworten, aber Code handelt das, ohne Zombies und andere Unschönheiten.

Vielen Dankan @CoolTux!
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Astrofreak85 am 06 Februar 2018, 19:02:58
Hi,

hab nun endlich meinen Sensor bekommen....am Handy läuft alles, aber beim einbinden in FHEM bekomme ich leider nur Errors:

2018.02.06 18:58:15 4: XiaomiBTLESens (Pflanzen) - Run CreateParamGatttool with mod: read
2018.02.06 18:58:15 4: XiaomiBTLESens (Pflanzen) - Read XiaomiBTLESens_ExecGatttool_Run Pflanzen|C4:7C:8D:65:D4:09|read|0x38
2018.02.06 18:58:40 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 3723
2018.02.06 18:58:40 4: XiaomiBTLESens (Pflanzen) - WriteReadings: Readings were written
2018.02.06 18:58:40 4: XiaomiBTLESens (Pflanzen) - ExecGatttool_Aborted: The BlockingCall Process terminated unexpectedly. Timedout
2018.02.06 18:59:56 4: XiaomiBTLESens (Pflanzen) - Run CreateParamGatttool with mod: read
2018.02.06 18:59:56 4: XiaomiBTLESens (Pflanzen) - Read XiaomiBTLESens_ExecGatttool_Run Pflanzen|C4:7C:8D:65:D4:09|read|0x38
2018.02.06 18:59:56 5: XiaomiBTLESens (Pflanzen) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b C4:7C:8D:65:D4:09 --char-read -a 0x38 2>&1 /dev/null and loop 0
2018.02.06 19:00:37 5: XiaomiBTLESens (Pflanzen) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)

2018.02.06 19:00:37 5: XiaomiBTLESens (Pflanzen) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b C4:7C:8D:65:D4:09 --char-read -a 0x38 2>&1 /dev/null and loop 1
2018.02.06 19:00:56 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 3967
2018.02.06 19:00:56 4: XiaomiBTLESens (Pflanzen) - WriteReadings: Readings were written
2018.02.06 19:00:56 4: XiaomiBTLESens (Pflanzen) - ExecGatttool_Aborted: The BlockingCall Process terminated unexpectedly. Timedout


Jemand ne Idee was ich falsch mache?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 06 Februar 2018, 19:35:35
Ich gehe davon aus daß er neu ist und noch die alte Firmware besitzt. Diese wird nicht mehr unterstützt. Bitte mache zu erst ein Firmware-Update
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Astrofreak85 am 06 Februar 2018, 20:14:18
hab ich, mit der App,
App sagt: 3.1.8 aktuelle und neueste Version
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 06 Februar 2018, 20:44:16
Dann sollte eigentlich gehen. Zeig mal bitte ein List vom Device
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Astrofreak85 am 06 Februar 2018, 22:07:14
Internals:
   BTMAC      C4:7C:8D:65:D4:09
   DEF        C4:7C:8D:65:D4:09
   INTERVAL   300
   NAME       Pflanzen
   NOTIFYDEV  global,Pflanzen
   NR         412
   NTFY_ORDER 50-Pflanzen
   STATE      error
   TYPE       XiaomiBTLESens
   VERSION    2.0.5
   loglevel   4
   READINGS:
     2018-02-06 21:03:51   battery         ok
     2018-02-06 21:03:51   batteryLevel    99
     2018-02-06 21:36:18   fertility       59
     2018-02-06 21:03:51   firmware        3.1.8
     2018-02-06 22:02:26   lastGattError   The BlockingCall Process terminated unexpectedly. Timedout
     2018-02-06 21:36:18   lux             43
     2018-02-06 21:36:18   moisture        25
     2018-02-06 22:02:26   state           error
     2018-02-06 21:36:18   temperature     19.6
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1517947431.6527
     updateTimestampCallBattery 2018-02-06 21:03:51
Attributes:
   model      flowerSens
   room       XiaomiBTLESens
   verbose    5
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 07 Februar 2018, 00:09:27
Scheint aber mal funktioniert zu haben. Kannst du zu Testzwecken den Sensor näher an den BT Dongle holen?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: oko am 07 Februar 2018, 08:03:52
Zitat von: distel am 05 Februar 2018, 20:38:04
Also wenn es seitens der Flower-Sensor-Fraktion keine Einwände gibt :)
Sorry, wenn ich hier rein grätsche, aber ich hätte nen Einwand ;-)

Habe jetzt meine 3 Sensoren vom alten Flower-Sens auf's neue Modul umgestellt.

Im großen und ganzen funktioniert es, allerdings bekomme ich mehrmals am Tag extrem falsche Temperaturwerte.
Im SVG-Plot sind sie als einzelne Nadeln sichtbar, laut Statistikmodul ist der Wert dann 58981.5 °C.
Da der Sensor nicht zu Forschungszwecken in Sonnennähe platziert ist also eher unplausibel...

Wie gesagt, die Sensoren laufen seit letztem Jahr zuverlässig mit dem alten Modul und sie zeigen jetzt alle drei diese Ausreißer.

Welche Daten braucht ihr zur Eingrenzung des Fehlers?

Grüße
Olaf
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 07 Februar 2018, 08:42:26
Interessant wären Logs mit den Rohdaten zum Zeitpunkt der Ausreißer.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: oko am 07 Februar 2018, 09:35:42
Also Attribut "verbose" des Sensors auf 5, richtig?

Dann lass ich das mal den Tag über laufen und schau heute Abend die Logs durch...
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 07 Februar 2018, 09:49:26
Richtig. Und dann mal schauen um welche Uhrzeit der Fehler war und im Log nach schauen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Astrofreak85 am 07 Februar 2018, 09:53:25
so, 1,5m war wohl zu viel, der BT-Empfänger ist jetzt auch 20cm ran zum Sensor, und siehe da, geht...thx :)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 07 Februar 2018, 09:55:34
Ich habe einen Recht starken BT Empfänger. So rund 5m ist maximum. Liegt dann aber eher am Sensor. Der BT Empfänger kann wohl 40m im Freien.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 07 Februar 2018, 10:28:09
Zitat von: oko am 07 Februar 2018, 08:03:52
Sorry, wenn ich hier rein grätsche, aber ich hätte nen Einwand ;-)
Du sprichst wie ich von 74_XiaomiBTLESensor in der Version 2.0.6debug10?

Deine Schilderung lässt aber eher auf Fehler in der BT-Kommunikation, denn auf Verarbeitungsfehler im Modul schließen. Um das zu analysieren wären entsprechende logs von den fraglichen Zeitpunkten notwendig. Dort ist ersichtlich, was der Sensor via BT meldet und was das Modul draus gemacht hat.

Gruß Dirk
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 07 Februar 2018, 10:32:51
Zitat von: CoolTux am 07 Februar 2018, 09:55:34
Ich habe einen Recht starken BT Empfänger. So rund 5m ist maximum. Liegt dann aber eher am Sensor. Der BT Empfänger kann wohl 40m im Freien.
Hab den BT-Stick von Pearl (PX-1632-953) - der soll 100m Reichweite haben. Nach einer massiven Wand ist allerdings recht schnell Schluss. Wird aber wie schon anderswo festgestellt mehr am Sensor liegen. Xiaomi hatte hier wohl auch mehr im Sinne, dass in jedem Zimmer ne WLAN-Lampe mit Bluetooth steht und somit nur "die letzte Meile" in Bluetooth gehandelt wird.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: oko am 07 Februar 2018, 11:36:59
Zitat von: distel am 07 Februar 2018, 10:28:09
Du sprichst wie ich von 74_XiaomiBTLESensor in der Version 2.0.6debug10?
Ähm, jetzt wo du es erwähnst...
74_XiaomiBTLESensor natürlich schon, aber nicht debug sondern die normale Version.
Ich hab gerade im Log geschaut, da kommen auch keine Roh-Daten.

Dann werde ich mal die Debug-Version laden und installieren...
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: mod25 am 07 Februar 2018, 21:34:41
hallo zusammen ich hab das problem das bei meine sensoren die temperature 58974.5 angezeigt wird.
ich nutze die 2.0.6 debug10

anbei ein log
2018.02.07 21:23:26 5: XiaomiBTLESens (oregano) - ExecGatttool_Run: gatttool loop result connect error,Transport endpoint is not connected (107)

2018.02.07 21:23:26 5: XiaomiBTLESens (oregano) - ExecGatttool_Run: call gatttool with command ssh home.fritz.box 'gatttool -i hci0 -b C4:7C:8D:65:EA:65 --char-read -a 0x38 2>&1 /dev/null' and loop 1
2018.02.07 21:23:38 5: XiaomiBTLESens (oregano) - ExecGatttool_Run: gatttool loop result connect error,Transport endpoint is not connected (107)

2018.02.07 21:23:38 5: XiaomiBTLESens (oregano) - ExecGatttool_Run: call gatttool with command ssh home.fritz.box 'gatttool -i hci0 -b C4:7C:8D:65:EA:65 --char-read -a 0x38 2>&1 /dev/null' and loop 2
2018.02.07 21:23:49 5: XiaomiBTLESens (oregano) - ExecGatttool_Run: gatttool loop result connect error,Transport endpoint is not connected (107)

2018.02.07 21:23:49 5: XiaomiBTLESens (oregano) - ExecGatttool_Run: call gatttool with command ssh home.fritz.box 'gatttool -i hci0 -b C4:7C:8D:65:EA:65 --char-read -a 0x38 2>&1 /dev/null' and loop 3
2018.02.07 21:24:02 5: XiaomiBTLESens (oregano) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,63 27 33 2e 31 2e 38

2018.02.07 21:24:02 4: XiaomiBTLESens (oregano) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,63 27 33 2e 31 2e 38

2018.02.07 21:24:02 5: XiaomiBTLESens (oregano) - ExecGatttool_Done: gatttool return string: oregano|C4:7C:8D:65:EA:65|ok|read|0x38|{"gtResult":"63 27 33 2e 31 2e 38 "}
2018.02.07 21:24:02 4: XiaomiBTLESens (oregano) - ProcessingNotification
2018.02.07 21:24:02 4: XiaomiBTLESens (oregano) - ProcessingNotification: handle 0x38
2018.02.07 21:24:02 4: XiaomiBTLESens (oregano) - FlowerSens Handle0x38
2018.02.07 21:24:02 4: XiaomiBTLESens (oregano) - WriteReadings: Readings were written
2018.02.07 21:24:02 4: XiaomiBTLESens (oregano) - Run CreateParamGatttool with mod: write
2018.02.07 21:24:02 5: XiaomiBTLESens (oregano) - Write XiaomiBTLESens_ExecGatttool_Run oregano|C4:7C:8D:65:EA:65|write|0x33|A01F
2018.02.07 21:24:03 5: XiaomiBTLESens (oregano) - ExecGatttool_Run: call gatttool with command ssh home.fritz.box 'gatttool -i hci0 -b C4:7C:8D:65:EA:65 --char-write-req -a 0x33 -n A01F && gatttool -i hci0 -b C4:7C:8D:65:EA:65 --char-read -a 0x35 2>&1 /dev/null' and loop 0
2018.02.07 21:24:04 5: XiaomiBTLESens (oregano) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Characteristic value/descriptor,f8 ff 00 83 00 00 00 0f 17 00 02 3c 00 fb 34 9b

2018.02.07 21:24:04 4: XiaomiBTLESens (oregano) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Characteristic value/descriptor,f8 ff 00 83 00 00 00 0f 17 00 02 3c 00 fb 34 9b

2018.02.07 21:24:04 5: XiaomiBTLESens (oregano) - ExecGatttool_Done: gatttool return string: oregano|C4:7C:8D:65:EA:65|ok|read|0x35|{"gtResult":"f8 ff 00 83 00 00 00 0f 17 00 02 3c 00 fb 34 9b "}
2018.02.07 21:24:04 4: XiaomiBTLESens (oregano) - ProcessingNotification
2018.02.07 21:24:04 4: XiaomiBTLESens (oregano) - ProcessingNotification: handle 0x35
2018.02.07 21:24:04 4: XiaomiBTLESens (oregano) - FlowerSens Handle0x35
2018.02.07 21:24:04 4: XiaomiBTLESens (oregano) - WriteReadings: Readings were written

ich hoffe ihr könnt mir helfen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 08 Februar 2018, 16:55:16
Kann es sein das Du minus Gerade bei Deiner Pflanze hast? Denn genau das würde Dein Wert her geben. -3.5 Grad
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 08 Februar 2018, 17:03:01
Ok ich habe es gefixt und die aktuelle Version ist nun im Master Branch und wird auch morgen früh per SVN verteilt.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: kroonen am 08 Februar 2018, 21:43:30
Hi,

Today I got my bluetooth temp/sensor. In the living room de module works ok, but when I put it in de garage, where the temp is around 6 degrees I get wrong humidity 7.4. On the display it is also 06.3, so an 0 add.

I got this in my logging

2018.02.08 21:33:57 1: PERL WARNING: Illegal hexadecimal digit ' ' ignored at ./FHEM/74_XiaomiBTLESens.pm line 682.
2018.02.08 21:33:57 3: eval: {XiaomiBTLESens_ExecGatttool_Done('zoldertem|4C:65:A8:D1:7D:DC|ok|read|0x18|{"gtResult":"64 "}')}
2018.02.08 21:33:57 1: PERL WARNING: Illegal hexadecimal digit ' ' ignored at ./FHEM/74_XiaomiBTLESens.pm line 683.
2018.02.08 21:33:57 3: eval: {XiaomiBTLESens_ExecGatttool_Done('zoldertem|4C:65:A8:D1:7D:DC|ok|read|0x18|{"gtResult":"64 "}')}

Internals:
   BTMAC      4C:65:A8:D1:7D:DC
   DEF        4C:65:A8:D1:7D:DC
   INTERVAL   300
   NAME       zoldertem
   NOTIFYDEV  global,zoldertem
   NR         21
   NTFY_ORDER 50-zoldertem
   STATE      active
   TYPE       XiaomiBTLESens
   VERSION    2.0.5
   loglevel   4
   READINGS:
     2018-02-08 21:33:57   battery         ok
     2018-02-08 21:33:57   batteryLevel    100
     2018-02-08 15:18:45   firmware        00.00.66
     2018-02-08 21:34:12   humidity        7.4
     2018-02-08 21:02:58   lastGattError   charWrite faild
     2018-02-08 21:34:12   state           active
     2018-02-08 21:34:12   temperature     6.3
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1518122037.51622
     updateTimestampCallBattery 2018-02-08 21:33:57
Attributes:
   interval   300
   model      thermoHygroSens
   room       XiaomiBTLESens

Any idea what goes wrong??

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: kroonen am 08 Februar 2018, 21:51:41
Some details debug, but don't see hum in log?

2018.02.08 21:46:40 4: XiaomiBTLESens (zoldertem) - Run CreateParamGatttool with mod: read
2018.02.08 21:46:40 4: BlockingCall (XiaomiBTLESens_ExecGatttool_Run): created child (923), uses telnetPort to connect back
2018.02.08 21:46:40 5: Starting notify loop for zoldertem, 1 event(s), first is read sensor data
2018.02.08 21:46:40 5: End notify loop for zoldertem
2018.02.08 21:46:40 4: XiaomiBTLESens (zoldertem) - Read XiaomiBTLESens_ExecGatttool_Run zoldertem|4C:65:A8:D1:7D:DC|read|0x18
2018.02.08 21:46:40 4: XiaomiBTLESens (zoldertem) - stateRequestTimer: Call Request Timer
2018.02.08 21:46:40 5: End notify loop for global
2018.02.08 21:46:40 0: Featurelevel: 5.8
2018.02.08 21:46:40 0: Server started with 10 defined entities (fhem.pl:16107/2018-02-07 perl:5.024001 os:linux user:fhem pid:915)
2018.02.08 21:46:40 4: Connection accepted from WEB_192.168.180.35_54728
2018.02.08 21:46:40 4: Connection accepted from telnetPort_127.0.0.1_59626
2018.02.08 21:46:41 4: WEB_192.168.180.35_54728 GET /fhem?XHR=1&inform=type=status;filter=;since=1518122782.584;fmt=JSON&fw_id=26&timestamp=1518122794778; BUFLEN:0
2018.02.08 21:46:41 5: Cmd: >{BlockingRegisterTelnet($cl,1)}<
2018.02.08 21:46:41 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b 4C:65:A8:D1:7D:DC --char-read -a 0x18 2>&1 /dev/null and loop 0
2018.02.08 21:46:45 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,64

2018.02.08 21:46:45 4: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,64

2018.02.08 21:46:45 5: Cmd: >{BlockingStart('1')}<
2018.02.08 21:46:45 5: Cmd: >{XiaomiBTLESens_ExecGatttool_Done('zoldertem|4C:65:A8:D1:7D:DC|ok|read|0x18|{"gtResult":"64 "}')}<
2018.02.08 21:46:45 4: XiaomiBTLESens (zoldertem) - ExecGatttool_Done: gatttool return string: zoldertem|4C:65:A8:D1:7D:DC|ok|read|0x18|{"gtResult":"64 "}
2018.02.08 21:46:45 5: XiaomiBTLESens (zoldertem) - ProcessingNotification
2018.02.08 21:46:45 4: XiaomiBTLESens (zoldertem) - ProcessingNotification: handle 0x18
2018.02.08 21:46:45 5: XiaomiBTLESens (zoldertem) - Thermo/Hygro Sens Handle0x18
2018.02.08 21:46:45 1: PERL WARNING: Illegal hexadecimal digit ' ' ignored at ./FHEM/74_XiaomiBTLESens.pm line 682.
2018.02.08 21:46:45 3: eval: {XiaomiBTLESens_ExecGatttool_Done('zoldertem|4C:65:A8:D1:7D:DC|ok|read|0x18|{"gtResult":"64 "}')}
2018.02.08 21:46:45 1: PERL WARNING: Illegal hexadecimal digit ' ' ignored at ./FHEM/74_XiaomiBTLESens.pm line 683.
2018.02.08 21:46:45 3: eval: {XiaomiBTLESens_ExecGatttool_Done('zoldertem|4C:65:A8:D1:7D:DC|ok|read|0x18|{"gtResult":"64 "}')}
2018.02.08 21:46:45 5: Starting notify loop for zoldertem, 3 event(s), first is battery: ok
2018.02.08 21:46:45 5: createNotifyHash
2018.02.08 21:46:45 5: End notify loop for zoldertem
2018.02.08 21:46:45 4: XiaomiBTLESens (zoldertem) - WriteReadings: Readings were written
2018.02.08 21:46:45 4: XiaomiBTLESens (zoldertem) - Run CreateParamGatttool with mod: write
2018.02.08 21:46:45 4: BlockingCall (XiaomiBTLESens_ExecGatttool_Run): created child (933), uses telnetPort to connect back
2018.02.08 21:46:45 5: Starting notify loop for zoldertem, 1 event(s), first is write sensor data
2018.02.08 21:46:45 5: End notify loop for zoldertem
2018.02.08 21:46:45 4: XiaomiBTLESens (zoldertem) - Write XiaomiBTLESens_ExecGatttool_Run zoldertem|4C:65:A8:D1:7D:DC|write|0x10|0100
2018.02.08 21:46:45 4: Connection accepted from telnetPort_127.0.0.1_59628
2018.02.08 21:46:45 5: Cmd: >{BlockingRegisterTelnet($cl,2)}<
2018.02.08 21:46:45 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: call gatttool with command timeout 15 gatttool -i hci0 -b 4C:65:A8:D1:7D:DC --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.02.08 21:47:00 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 36 2e 31 20 48 3d 36 38 2e 37 00
Notification handle = 0x000e value,54 3d 36 2e 32 20 48 3d 36 37 2e 39 00
Notification handle = 0x000e value,54 3d 36 2e 31 20 48 3d 36 39 2e 30 00
Notification handle = 0x000e value,54 3d 36 2e 33 20 48 3d 36 37 2e 39 00
Notification handle = 0x000e value,54 3d 36 2e 31 20 48 3d 36 38 2e 37 00
Notification handle = 0x000e value,54 3d 36 2e 32 20 48 3d 36 37 2e 39 00
Notification handle = 0x000e value,54 3d 36 2e 31 20 48 3d 36 38 2e 38 00
Notification handle = 0x000e value,54 3d 36 2e 32 20 48 3d 36 38 2e 30 00
Notification handle = 0x000e value,54 3d 36 2e 30 20 48 3d 36 38 2e 37 00
Notification handle = 0x000e value,54 3d 36 2e 32 20 48 3d 36 37 2e 39 00
Notification handle = 0x000e value,54 3d 36 2e 31 20 48 3d 36 39 2e 30 00
Notification handle = 0x000e value,54 3d 36 2e 33 20 48 3d 36 37 2e 39 00

2018.02.08 21:47:00 4: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 36 2e 31 20 48 3d 36 38 2e 37 00
Notification handle = 0x000e value,54 3d 36 2e 32 20 48 3d 36 37 2e 39 00
Notification handle = 0x000e value,54 3d 36 2e 31 20 48 3d 36 39 2e 30 00
Notification handle = 0x000e value,54 3d 36 2e 33 20 48 3d 36 37 2e 39 00
Notification handle = 0x000e value,54 3d 36 2e 31 20 48 3d 36 38 2e 37 00
Notification handle = 0x000e value,54 3d 36 2e 32 20 48 3d 36 37 2e 39 00
Notification handle = 0x000e value,54 3d 36 2e 31 20 48 3d 36 38 2e 38 00
Notification handle = 0x000e value,54 3d 36 2e 32 20 48 3d 36 38 2e 30 00
Notification handle = 0x000e value,54 3d 36 2e 30 20 48 3d 36 38 2e 37 00
Notification handle = 0x000e value,54 3d 36 2e 32 20 48 3d 36 37 2e 39 00
Notification handle = 0x000e value,54 3d 36 2e 31 20 48 3d 36 39 2e 30 00
Notification handle = 0x000e value,54 3d 36 2e 33 20 48 3d 36 37 2e 39 00

2018.02.08 21:47:00 5: Cmd: >{BlockingStart('2')}<
2018.02.08 21:47:00 5: Cmd: >{XiaomiBTLESens_ExecGatttool_Done('zoldertem|4C:65:A8:D1:7D:DC|ok|write|0x10|{"gtResult":"54 3d 36 2e 31 20 48 3d 36 38 2e 37 00 \nNotification handle = 0x000e value"}')}<
2018.02.08 21:47:00 4: XiaomiBTLESens (zoldertem) - ExecGatttool_Done: gatttool return string: zoldertem|4C:65:A8:D1:7D:DC|ok|write|0x10|{"gtResult":"54 3d 36 2e 31 20 48 3d 36 38 2e 37 00 \nNotification handle = 0x000e value"}
2018.02.08 21:47:00 5: XiaomiBTLESens (zoldertem) - ProcessingNotification
2018.02.08 21:47:00 4: XiaomiBTLESens (zoldertem) - ProcessingNotification: handle 0x10
2018.02.08 21:47:00 5: XiaomiBTLESens (zoldertem) - Thermo/Hygro Sens Handle0x10
2018.02.08 21:47:00 5: Starting notify loop for zoldertem, 3 event(s), first is temperature: 6.1
2018.02.08 21:47:00 5: End notify loop for zoldertem
2018.02.08 21:47:00 4: XiaomiBTLESens (zoldertem) - WriteReadings: Readings were written

Internals:
   BTMAC      4C:65:A8:D1:7D:DC
   DEF        4C:65:A8:D1:7D:DC
   INTERVAL   300
   NAME       zoldertem
   NOTIFYDEV  global,zoldertem
   NR         21
   NTFY_ORDER 50-zoldertem
   STATE      active
   TYPE       XiaomiBTLESens
   VERSION    2.0.5
   loglevel   4
   READINGS:
     2018-02-08 21:46:45   battery         ok
     2018-02-08 21:46:45   batteryLevel    100
     2018-02-08 15:18:45   firmware        00.00.66
     2018-02-08 21:47:00   humidity        8.7
     2018-02-08 21:02:58   lastGattError   charWrite faild
     2018-02-08 21:47:00   state           active
     2018-02-08 21:47:00   temperature     6.1
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1518122805.32754
     updateTimestampCallBattery 2018-02-08 21:46:45
Attributes:
   interval   300
   model      thermoHygroSens
   room       XiaomiBTLESens
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 09 Februar 2018, 12:58:45
Zitat von: kroonen am 08 Februar 2018, 21:43:30
Hi,

Today I got my bluetooth temp/sensor. In the living room de module works ok, but when I put it in de garage, where the temp is around 6 degrees I get wrong humidity 7.4. On the display it is also 06.3, so an 0 add.

I got this in my logging

2018.02.08 21:33:57 1: PERL WARNING: Illegal hexadecimal digit ' ' ignored at ./FHEM/74_XiaomiBTLESens.pm line 682.
2018.02.08 21:33:57 3: eval: {XiaomiBTLESens_ExecGatttool_Done('zoldertem|4C:65:A8:D1:7D:DC|ok|read|0x18|{"gtResult":"64 "}')}
2018.02.08 21:33:57 1: PERL WARNING: Illegal hexadecimal digit ' ' ignored at ./FHEM/74_XiaomiBTLESens.pm line 683.
2018.02.08 21:33:57 3: eval: {XiaomiBTLESens_ExecGatttool_Done('zoldertem|4C:65:A8:D1:7D:DC|ok|read|0x18|{"gtResult":"64 "}')}

Internals:
   BTMAC      4C:65:A8:D1:7D:DC
   DEF        4C:65:A8:D1:7D:DC
   INTERVAL   300
   NAME       zoldertem
   NOTIFYDEV  global,zoldertem
   NR         21
   NTFY_ORDER 50-zoldertem
   STATE      active
   TYPE       XiaomiBTLESens
   VERSION    2.0.5
   loglevel   4
   READINGS:
     2018-02-08 21:33:57   battery         ok
     2018-02-08 21:33:57   batteryLevel    100
     2018-02-08 15:18:45   firmware        00.00.66
     2018-02-08 21:34:12   humidity        7.4
     2018-02-08 21:02:58   lastGattError   charWrite faild
     2018-02-08 21:34:12   state           active
     2018-02-08 21:34:12   temperature     6.3
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1518122037.51622
     updateTimestampCallBattery 2018-02-08 21:33:57
Attributes:
   interval   300
   model      thermoHygroSens
   room       XiaomiBTLESens

Any idea what goes wrong??

Are you sure that you do not mix temperature and humidity? because in this list of your device temperature 6.3 and humidity 7.4
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: mod25 am 09 Februar 2018, 13:01:16
Zitat von: CoolTux am 08 Februar 2018, 17:03:01
Ok ich habe es gefixt und die aktuelle Version ist nun im Master Branch und wird auch morgen früh per SVN verteilt.
Wunderbar. Habe die neue Version schon eingespielt und die Minus Grade werden jetzt auch angezeigt. Vielen Dank
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: kroonen am 09 Februar 2018, 19:03:12
I updated today to 2.0.7 but now nothing works, it look like ssh, but I don't use ssh , I have also no options of ssh set. It keep logging and stays on write sensor date, and last gaterror, no data response

2018.02.09 19:20:51 4: XiaomiBTLESens (zoldertem) - Run CreateParamGatttool with mod: read
2018.02.09 19:20:51 4: BlockingCall (XiaomiBTLESens_ExecGatttool_Run): created child (12713), uses telnetPort to connect back
2018.02.09 19:20:51 5: Starting notify loop for zoldertem, 1 event(s), first is read sensor data
2018.02.09 19:20:51 5: End notify loop for zoldertem
2018.02.09 19:20:51 5: XiaomiBTLESens (zoldertem) - Read XiaomiBTLESens_ExecGatttool_Run zoldertem|4C:65:A8:D1:7D:DC|read|0x18
2018.02.09 19:20:51 4: XiaomiBTLESens (zoldertem) - stateRequestTimer: Call Request Timer
2018.02.09 19:20:51 5: End notify loop for global
2018.02.09 19:20:51 0: Featurelevel: 5.8
2018.02.09 19:20:51 0: Server started with 10 defined entities (fhem.pl:16107/2018-02-07 perl:5.024001 os:linux user:fhem pid:12700)
2018.02.09 19:20:51 4: Connection accepted from telnetPort_127.0.0.1_41082
2018.02.09 19:20:51 5: Cmd: >{BlockingRegisterTelnet($cl,1)}<
2018.02.09 19:20:51 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b 4C:65:A8:D1:7D:DC --char-read -a 0x18 2>&1 /dev/null and loop 0
2018.02.09 19:20:55 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,64

2018.02.09 19:20:55 4: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,64

2018.02.09 19:20:55 5: Cmd: >{BlockingStart('1')}<
2018.02.09 19:20:55 5: Cmd: >{XiaomiBTLESens_ExecGatttool_Done('zoldertem|4C:65:A8:D1:7D:DC|ok|read|0x18|{"gtResult":"64 "}')}<
2018.02.09 19:20:55 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Done: gatttool return string: zoldertem|4C:65:A8:D1:7D:DC|ok|read|0x18|{"gtResult":"64 "}
2018.02.09 19:20:55 4: XiaomiBTLESens (zoldertem) - ProcessingNotification
2018.02.09 19:20:55 4: XiaomiBTLESens (zoldertem) - ProcessingNotification: handle 0x18
2018.02.09 19:20:55 4: XiaomiBTLESens (zoldertem) - Thermo/Hygro Sens Handle0x18
2018.02.09 19:20:55 1: PERL WARNING: Illegal hexadecimal digit ' ' ignored at ./FHEM/74_XiaomiBTLESens.pm line 686.
2018.02.09 19:20:55 3: eval: {XiaomiBTLESens_ExecGatttool_Done('zoldertem|4C:65:A8:D1:7D:DC|ok|read|0x18|{"gtResult":"64 "}')}
2018.02.09 19:20:55 1: PERL WARNING: Illegal hexadecimal digit ' ' ignored at ./FHEM/74_XiaomiBTLESens.pm line 687.
2018.02.09 19:20:55 3: eval: {XiaomiBTLESens_ExecGatttool_Done('zoldertem|4C:65:A8:D1:7D:DC|ok|read|0x18|{"gtResult":"64 "}')}
2018.02.09 19:20:55 5: Starting notify loop for zoldertem, 3 event(s), first is battery: ok
2018.02.09 19:20:55 5: createNotifyHash
2018.02.09 19:20:55 5: End notify loop for zoldertem
2018.02.09 19:20:55 4: XiaomiBTLESens (zoldertem) - WriteReadings: Readings were written
2018.02.09 19:20:55 4: XiaomiBTLESens (zoldertem) - Run CreateParamGatttool with mod: write
2018.02.09 19:20:55 4: BlockingCall (XiaomiBTLESens_ExecGatttool_Run): created child (12726), uses telnetPort to connect back
2018.02.09 19:20:55 5: Starting notify loop for zoldertem, 1 event(s), first is write sensor data
2018.02.09 19:20:55 5: End notify loop for zoldertem
2018.02.09 19:20:55 5: XiaomiBTLESens (zoldertem) - Write XiaomiBTLESens_ExecGatttool_Run zoldertem|4C:65:A8:D1:7D:DC|write|0x10|0100
2018.02.09 19:20:55 4: Connection accepted from telnetPort_127.0.0.1_41084
2018.02.09 19:20:55 5: Cmd: >{BlockingRegisterTelnet($cl,2)}<
2018.02.09 19:20:55 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: call gatttool with command ssh none 'timeout 5 gatttool -i hci0 -b 4C:65:A8:D1:7D:DC --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null' and loop 0
ssh: Could not resolve hostname none: Name or service not known
2018.02.09 19:20:55 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: gatttool loop result
2018.02.09 19:20:55 1: PERL WARNING: Use of uninitialized value in split at ./FHEM/74_XiaomiBTLESens.pm line 482.
2018.02.09 19:20:55 3: eval: {XiaomiBTLESens_ExecGatttool_Done('zoldertem|4C:65:A8:D1:7D:DC|ok|read|0x18|{"gtResult":"64 "}')}
2018.02.09 19:20:55 1: PERL WARNING: Use of uninitialized value $gtResult[1] in substitution (s///) at ./FHEM/74_XiaomiBTLESens.pm line 483.
2018.02.09 19:20:55 3: eval: {XiaomiBTLESens_ExecGatttool_Done('zoldertem|4C:65:A8:D1:7D:DC|ok|read|0x18|{"gtResult":"64 "}')}
2018.02.09 19:20:55 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: call gatttool with command ssh none 'timeout 5 gatttool -i hci0 -b 4C:65:A8:D1:7D:DC --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null' and loop 1
ssh: Could not resolve hostname none: Name or service not known
2018.02.09 19:20:55 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: gatttool loop result
2018.02.09 19:20:55 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: call gatttool with command ssh none 'timeout 5 gatttool -i hci0 -b 4C:65:A8:D1:7D:DC --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null' and loop 2
ssh: Could not resolve hostname none: Name or service not known
2018.02.09 19:20:55 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: gatttool loop result
2018.02.09 19:20:55 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: call gatttool with command ssh none 'timeout 5 gatttool -i hci0 -b 4C:65:A8:D1:7D:DC --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null' and loop 3
ssh: Could not resolve hostname none: Name or service not known
2018.02.09 19:20:55 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: gatttool loop result
2018.02.09 19:20:55 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: call gatttool with command ssh none 'timeout 5 gatttool -i hci0 -b 4C:65:A8:D1:7D:DC --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null' and loop 4
ssh: Could not resolve hostname none: Name or service not known
2018.02.09 19:20:56 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: gatttool loop result
2018.02.09 19:20:56 1: PERL WARNING: Use of uninitialized value $gtResult[1] in join or string at ./FHEM/74_XiaomiBTLESens.pm line 490.
2018.02.09 19:20:56 3: eval: {XiaomiBTLESens_ExecGatttool_Done('zoldertem|4C:65:A8:D1:7D:DC|ok|read|0x18|{"gtResult":"64 "}')}
2018.02.09 19:20:56 4: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: gatttool result connect error,
2018.02.09 19:20:56 5: Cmd: >{BlockingStart('2')}<
2018.02.09 19:20:56 5: Cmd: >{XiaomiBTLESens_ExecGatttool_Done('zoldertem|4C:65:A8:D1:7D:DC|error|write|0x10|{"gtResult":"no data response"}')}<
2018.02.09 19:20:56 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Done: gatttool return string: zoldertem|4C:65:A8:D1:7D:DC|error|write|0x10|{"gtResult":"no data response"}
2018.02.09 19:20:56 4: XiaomiBTLESens (zoldertem) - ProcessingErrors
2018.02.09 19:20:56 5: Starting notify loop for zoldertem, 2 event(s), first is lastGattError: no data response
2018.02.09 19:20:56 5: End notify loop for zoldertem
2018.02.09 19:20:56 4: XiaomiBTLESens (zoldertem) - WriteReadings: Readings were written
2018.02.09 19:20:56 4: XiaomiBTLESens (zoldertem) - Run CreateParamGatttool with mod: write
2018.02.09 19:20:56 4: BlockingCall (XiaomiBTLESens_ExecGatttool_Run): created child (12742), uses telnetPort to connect back
2018.02.09 19:20:56 5: Starting notify loop for zoldertem, 1 event(s), first is write sensor data
2018.02.09 19:20:56 5: End notify loop for zoldertem
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 09 Februar 2018, 19:53:46
please can you test this version of the modul

https://github.com/LeonGaultier/fhem-XiaomiBTLESens/archive/master.zip
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: kroonen am 09 Februar 2018, 20:24:27
Hi,

This one works again, inside (attic)  it is working, see output. I'm also going to try again in the garage, and let you know if humidity is working ok

fhem> l zoldertem
Internals:
   BTMAC      4C:65:A8:D1:7D:DC
   DEF        4C:65:A8:D1:7D:DC
   INTERVAL   300
   NAME       zoldertem
   NOTIFYDEV  global,zoldertem
   NR         21
   NTFY_ORDER 50-zoldertem
   STATE      active
   TYPE       XiaomiBTLESens
   VERSION    2.0.8
   loglevel   4
   READINGS:
     2018-02-09 20:19:52   battery         ok
     2018-02-09 20:19:52   batteryLevel    100
     2018-02-09 08:59:59   firmware        00.00.66
     2018-02-09 20:19:57   humidity        64.3
     2018-02-09 19:26:34   lastGattError   no data response
     2018-02-09 20:19:57   state           active
     2018-02-09 20:19:57   temperature     16.1
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1518203992.10542
     updateTimestampCallBattery 2018-02-09 20:19:52
Attributes:
   interval   300
   model      thermoHygroSens
   room       XiaomiBTLESens

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: kroonen am 09 Februar 2018, 20:36:14
Hi,

Below 10 degrees, the humidity looks like failing again. Herre the first when placed in the garage, after couple minutes, it goes wrong

fhem> l zoldertem
Internals:
   BTMAC      4C:65:A8:D1:7D:DC
   DEF        4C:65:A8:D1:7D:DC
   INTERVAL   300
   NAME       zoldertem
   NOTIFYDEV  global,zoldertem
   NR         21
   NTFY_ORDER 50-zoldertem
   STATE      active
   TYPE       XiaomiBTLESens
   VERSION    2.0.8
   loglevel   4
   READINGS:
     2018-02-09 20:24:58   battery         ok
     2018-02-09 20:24:58   batteryLevel    100
     2018-02-09 08:59:59   firmware        00.00.66
     2018-02-09 20:25:04   humidity        55.5
     2018-02-09 19:26:34   lastGattError   no data response
     2018-02-09 20:25:04   state           active
     2018-02-09 20:25:04   temperature     13.6
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1518204298.91355
     updateTimestampCallBattery 2018-02-09 20:24:58
Attributes:
   interval   300
   model      thermoHygroSens
   room       XiaomiBTLESens

fhem> l zoldertem
Internals:
   BTMAC      4C:65:A8:D1:7D:DC
   DEF        4C:65:A8:D1:7D:DC
   INTERVAL   300
   NAME       zoldertem
   NOTIFYDEV  global,zoldertem
   NR         21
   NTFY_ORDER 50-zoldertem
   STATE      active
   TYPE       XiaomiBTLESens
   VERSION    2.0.8
   loglevel   4
   READINGS:
     2018-02-09 20:24:58   battery         ok
     2018-02-09 20:24:58   batteryLevel    100
     2018-02-09 08:59:59   firmware        00.00.66
     2018-02-09 20:31:20   humidity        0.1
     2018-02-09 19:26:34   lastGattError   no data response
     2018-02-09 20:31:20   state           active
     2018-02-09 20:31:20   temperature     9.3
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1518204298.91355
     updateTimestampCallBattery 2018-02-09 20:24:58
Attributes:
   interval   300
   model      thermoHygroSens
   room       XiaomiBTLESens

here the logging:

2018.02.09 20:32:57 4: XiaomiBTLESens (zoldertem) - Run CreateParamGatttool with mod: write
2018.02.09 20:32:57 4: BlockingCall (XiaomiBTLESens_ExecGatttool_Run): created child (535), uses telnetPort to connect back
2018.02.09 20:32:57 5: Starting notify loop for zoldertem, 1 event(s), first is write sensor data
2018.02.09 20:32:57 5: createNotifyHash
2018.02.09 20:32:57 5: End notify loop for zoldertem
2018.02.09 20:32:57 5: XiaomiBTLESens (zoldertem) - Write XiaomiBTLESens_ExecGatttool_Run zoldertem|4C:65:A8:D1:7D:DC|write|0x10|0100
2018.02.09 20:32:57 4: XiaomiBTLESens (zoldertem) - stateRequestTimer: Call Request Timer
2018.02.09 20:32:57 4: Connection accepted from telnetPort_127.0.0.1_41188
2018.02.09 20:32:57 5: Cmd: >{BlockingRegisterTelnet($cl,4)}<
2018.02.09 20:32:57 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: call gatttool with command timeout 5 gatttool -i hci0 -b 4C:65:A8:D1:7D:DC --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.02.09 20:33:02 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: gatttool loop result
2018.02.09 20:33:02 1: PERL WARNING: Use of uninitialized value in split at ./FHEM/74_XiaomiBTLESens.pm line 487.
2018.02.09 20:33:02 1: PERL WARNING: Use of uninitialized value $gtResult[1] in substitution (s///) at ./FHEM/74_XiaomiBTLESens.pm line 488.
2018.02.09 20:33:02 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: call gatttool with command timeout 5 gatttool -i hci0 -b 4C:65:A8:D1:7D:DC --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 1
2018.02.09 20:33:07 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: gatttool loop result
2018.02.09 20:33:07 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: call gatttool with command timeout 5 gatttool -i hci0 -b 4C:65:A8:D1:7D:DC --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 2
2018.02.09 20:33:12 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 38 2e 34 20 48 3d 37 32 2e 35 00
Notification handle = 0x000e value,54 3d 31 31 2e 36 20 48 3d 35 38 2e 38 00
Notification handle = 0x000e value,54 3d 38 2e 35 20 48 3d 37 32 2e 36 00
Notification handle = 0x000e value,54 3d 31 31 2e 36 20 48 3d 35 38 2e 38 00
Notification handle = 0x000e value,54 3d 38 2e 35 20 48 3d 37 32 2e 37 00
Notification handle = 0x000e value,54 3d 31 31 2e 36 20 48 3d 35 38 2e 39 00
Notification handle = 0x000e value,54 3d 38 2e 35 20 48 3d 37 32 2e 38 00
Notification handle = 0x000e value,54 3d 31 31 2e 36 20 48 3d 35 39 2e 30 00
Notification handle = 0x000e value,54 3d 38 2e 34 20 48 3d 37 32 2e 34 00
Notification handle = 0x000e value,54 3d 31 31 2e 35 20 48 3d 35 39 2e 30 00

2018.02.09 20:33:12 4: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 38 2e 34 20 48 3d 37 32 2e 35 00 ,54 3d 31 31 2e 36 20 48 3d 35 38 2e 38 00
Notification handle = 0x000e value,54 3d 38 2e 35 20 48 3d 37 32 2e 36 00
Notification handle = 0x000e value,54 3d 31 31 2e 36 20 48 3d 35 38 2e 38 00
Notification handle = 0x000e value,54 3d 38 2e 35 20 48 3d 37 32 2e 37 00
Notification handle = 0x000e value,54 3d 31 31 2e 36 20 48 3d 35 38 2e 39 00
Notification handle = 0x000e value,54 3d 38 2e 35 20 48 3d 37 32 2e 38 00
Notification handle = 0x000e value,54 3d 31 31 2e 36 20 48 3d 35 39 2e 30 00
Notification handle = 0x000e value,54 3d 38 2e 34 20 48 3d 37 32 2e 34 00
Notification handle = 0x000e value,54 3d 31 31 2e 35 20 48 3d 35 39 2e 30 00

2018.02.09 20:33:12 5: Cmd: >{BlockingStart('4')}<
2018.02.09 20:33:12 5: Cmd: >{XiaomiBTLESens_ExecGatttool_Done('zoldertem|4C:65:A8:D1:7D:DC|ok|write|0x10|{"gtResult":"54 3d 38 2e 34 20 48 3d 37 32 2e 35 00 "}')}<
2018.02.09 20:33:12 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Done: gatttool return string: zoldertem|4C:65:A8:D1:7D:DC|ok|write|0x10|{"gtResult":"54 3d 38 2e 34 20 48 3d 37 32 2e 35 00 "}
2018.02.09 20:33:12 4: XiaomiBTLESens (zoldertem) - ProcessingNotification
2018.02.09 20:33:12 4: XiaomiBTLESens (zoldertem) - ProcessingNotification: handle 0x10
2018.02.09 20:33:12 4: XiaomiBTLESens (zoldertem) - Thermo/Hygro Sens Handle0x10
2018.02.09 20:33:12 5: Starting notify loop for zoldertem, 3 event(s), first is temperature: 8.4
2018.02.09 20:33:12 5: End notify loop for zoldertem
2018.02.09 20:33:12 4: XiaomiBTLESens (zoldertem) - WriteReadings: Readings were written
2018.02.09 20:34:18 5: Cmd: >q<
2018.02.09 20:34:18 5: AnalyzeCommand: trying quit for q
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 10 Februar 2018, 03:12:16
please can you test this version https://github.com/LeonGaultier/fhem-XiaomiBTLESens/archive/master.zip.
this is not the solution for your problem, put i will see is the change code running.

can you tell me what was the value of the humidity at your last log?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: kroonen am 10 Februar 2018, 11:16:23
Hi,

This reading humidity 84.0 (or maybe 83.9), and temperature 05.7 read from the physical display. I used the testversion module

fhem> l zoldertem
Internals:
   BTMAC      4C:65:A8:D1:7D:DC
   DEF        4C:65:A8:D1:7D:DC
   INTERVAL   300
   NAME       zoldertem
   NOTIFYDEV  global,zoldertem
   NR         21
   NTFY_ORDER 50-zoldertem
   STATE      active
   TYPE       XiaomiBTLESens
   VERSION    2.0.8
   loglevel   4
   READINGS:
     2018-02-10 11:07:04   battery         ok
     2018-02-10 11:07:04   batteryLevel    100
     2018-02-09 08:59:59   firmware        00.00.66
     2018-02-10 11:07:09   humidity        2.7
     2018-02-10 11:04:47   lastGattError   no data response
     2018-02-10 11:07:09   state           active
     2018-02-10 11:07:09   temperature     5.7
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1518257224.41969
     updateTimestampCallBattery 2018-02-10 11:07:04
Attributes:
   interval   300
   model      thermoHygroSens
   room       XiaomiBTLESens


2018.02.10 11:06:58 4: XiaomiBTLESens (zoldertem) - Run CreateParamGatttool with mod: read
2018.02.10 11:06:58 4: BlockingCall (XiaomiBTLESens_ExecGatttool_Run): created child (2842), uses telnetPort to connect back
2018.02.10 11:06:58 5: Starting notify loop for zoldertem, 1 event(s), first is read sensor data
2018.02.10 11:06:58 5: End notify loop for zoldertem
2018.02.10 11:06:58 5: XiaomiBTLESens (zoldertem) - Read XiaomiBTLESens_ExecGatttool_Run zoldertem|4C:65:A8:D1:7D:DC|read|0x18
2018.02.10 11:06:58 4: XiaomiBTLESens (zoldertem) - stateRequestTimer: Call Request Timer
2018.02.10 11:06:58 5: End notify loop for global
2018.02.10 11:06:58 0: Featurelevel: 5.8
2018.02.10 11:06:58 0: Server started with 11 defined entities (fhem.pl:16107/2018-02-07 perl:5.024001 os:linux user:fhem pid:2835)
2018.02.10 11:06:58 4: Connection accepted from telnetPort_127.0.0.1_41396
2018.02.10 11:06:58 5: Cmd: >{BlockingRegisterTelnet($cl,1)}<
2018.02.10 11:06:58 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: call gatttool with command gatttool -i hci0 -b 4C:65:A8:D1:7D:DC --char-read -a 0x18 2>&1 /dev/null and loop 0
2018.02.10 11:06:59 4: Connection accepted from WEB_192.168.180.35_65058
2018.02.10 11:06:59 4: Connection accepted from WEB_192.168.180.35_65061
2018.02.10 11:07:00 4: WEB_192.168.180.35_65058 GET /; BUFLEN:0
2018.02.10 11:07:00 4: WEB: redirecting / to /fhem
2018.02.10 11:07:00 4: Connection accepted from WEB_192.168.180.35_65062
2018.02.10 11:07:00 4: WEB_192.168.180.35_65061 GET /fhem/pgm2/jquery.min.js; BUFLEN:0
2018.02.10 11:07:00 4: Connection accepted from WEB_192.168.180.35_65063
2018.02.10 11:07:00 4: WEB_192.168.180.35_65058 GET /fhem/pgm2/defaultCommon.css; BUFLEN:0
2018.02.10 11:07:00 4: WEB_192.168.180.35_65058 => 304 Not Modified
2018.02.10 11:07:00 4: WEB_192.168.180.35_65062 GET /fhem/images/default/icoEverything.png; BUFLEN:0
2018.02.10 11:07:00 4: WEB_192.168.180.35_65061 GET /fhem/images/default/fhemicon.png; BUFLEN:0
2018.02.10 11:07:00 4: WEB_192.168.180.35_65061 => 304 Not Modified
2018.02.10 11:07:00 4: WEB_192.168.180.35_65063 GET /fhem/pgm2/dashboard_style.css; BUFLEN:0
2018.02.10 11:07:00 4: Connection accepted from WEB_192.168.180.35_65064
2018.02.10 11:07:00 4: WEB_192.168.180.35_65058 GET /fhem/pgm2/fhemweb.js; BUFLEN:0
2018.02.10 11:07:00 4: WEB_192.168.180.35_65058 => 304 Not Modified
2018.02.10 11:07:00 4: Connection accepted from WEB_192.168.180.35_65065
2018.02.10 11:07:00 4: WEB_192.168.180.35_65064 GET /fhem/pgm2/jquery-ui.min.css; BUFLEN:0
2018.02.10 11:07:00 4: WEB_192.168.180.35_65064 => 304 Not Modified
2018.02.10 11:07:00 4: WEB_192.168.180.35_65062 GET /fhem; BUFLEN:0
2018.02.10 11:07:00 4: WEB: /fhem / RL:1388 / text/html; charset=UTF-8 / Content-Encoding: gzip
/
2018.02.10 11:07:00 4: WEB_192.168.180.35_65065 GET /fhem/pgm2/jquery-ui.min.js; BUFLEN:0
2018.02.10 11:07:00 4: WEB_192.168.180.35_65065 => 304 Not Modified
2018.02.10 11:07:00 4: WEB_192.168.180.35_65058 GET /fhem/pgm2/style.css?v=1518257209; BUFLEN:0
2018.02.10 11:07:00 4: WEB_192.168.180.35_65058 GET /fhem?XHR=1&inform=type=status;filter=;since=1518257219;fmt=JSON&fw_id=27&timestamp=1518257220830; BUFLEN:0
2018.02.10 11:07:02 4: Connection closed for WEB_192.168.180.35_65058: EOF
2018.02.10 11:07:02 4: WEB_192.168.180.35_65061 GET /fhem?room=XiaomiBTLESens; BUFLEN:0
2018.02.10 11:07:02 4: WEB: /fhem?room=XiaomiBTLESens / RL:1403 / text/html; charset=UTF-8 / Content-Encoding: gzip
/
2018.02.10 11:07:04 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,64

2018.02.10 11:07:04 4: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,64

2018.02.10 11:07:04 5: Cmd: >{BlockingStart('1')}<
2018.02.10 11:07:04 5: Cmd: >{XiaomiBTLESens_ExecGatttool_Done('zoldertem|4C:65:A8:D1:7D:DC|ok|read|0x18|{"gtResult":"64 "}')}<
2018.02.10 11:07:04 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Done: gatttool return string: zoldertem|4C:65:A8:D1:7D:DC|ok|read|0x18|{"gtResult":"64 "}
2018.02.10 11:07:04 4: XiaomiBTLESens (zoldertem) - ProcessingNotification
2018.02.10 11:07:04 4: XiaomiBTLESens (zoldertem) - ProcessingNotification: handle 0x18
2018.02.10 11:07:04 4: XiaomiBTLESens (zoldertem) - Thermo/Hygro Sens Handle0x18
2018.02.10 11:07:04 1: PERL WARNING: Illegal hexadecimal digit ' ' ignored at ./FHEM/74_XiaomiBTLESens.pm line 691.
2018.02.10 11:07:04 3: eval: {XiaomiBTLESens_ExecGatttool_Done('zoldertem|4C:65:A8:D1:7D:DC|ok|read|0x18|{"gtResult":"64 "}')}
2018.02.10 11:07:04 1: PERL WARNING: Illegal hexadecimal digit ' ' ignored at ./FHEM/74_XiaomiBTLESens.pm line 692.
2018.02.10 11:07:04 3: eval: {XiaomiBTLESens_ExecGatttool_Done('zoldertem|4C:65:A8:D1:7D:DC|ok|read|0x18|{"gtResult":"64 "}')}
2018.02.10 11:07:04 5: Starting notify loop for zoldertem, 3 event(s), first is battery: ok
2018.02.10 11:07:04 5: createNotifyHash
2018.02.10 11:07:04 5: End notify loop for zoldertem
2018.02.10 11:07:04 4: XiaomiBTLESens (zoldertem) - WriteReadings: Readings were written
2018.02.10 11:07:04 4: XiaomiBTLESens (zoldertem) - Run CreateParamGatttool with mod: write
2018.02.10 11:07:04 4: BlockingCall (XiaomiBTLESens_ExecGatttool_Run): created child (2852), uses telnetPort to connect back
2018.02.10 11:07:04 5: Starting notify loop for zoldertem, 1 event(s), first is write sensor data
2018.02.10 11:07:04 5: End notify loop for zoldertem
2018.02.10 11:07:04 5: XiaomiBTLESens (zoldertem) - Write XiaomiBTLESens_ExecGatttool_Run zoldertem|4C:65:A8:D1:7D:DC|write|0x10|0100
2018.02.10 11:07:04 4: Connection accepted from telnetPort_127.0.0.1_41398
2018.02.10 11:07:04 5: Cmd: >{BlockingRegisterTelnet($cl,2)}<
2018.02.10 11:07:04 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: call gatttool with command timeout 5 gatttool -i hci0 -b 4C:65:A8:D1:7D:DC --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.02.10 11:07:05 4: WEB_192.168.180.35_65061 GET /fhem?XHR=1&inform=type=status;filter=room=XiaomiBTLESens;since=1518257221;fmt=JSON&fw_id=26&timestamp=1518257225135; BUFLEN:0
2018.02.10 11:07:09 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 35 2e 37 20 48 3d 38 32 2e 37 00
Notification handle = 0x000e value,54 3d 35 2e 35 20 48 3d 38 34 2e 30 00
Notification handle = 0x000e value,54 3d 35 2e 38 20 48 3d 38 33 2e 30 00
Notification handle = 0x000e value,54 3d 35 2e 36 20 48 3d 38 34 2e 30 00
Notification handle = 0x000e value,54 3d 35 2e 37 20 48 3d 38 32 2e 37 00
Notification handle = 0x000e value,54 3d 35 2e 35 20 48 3d 38 34 2e 31 00
Notification handle = 0x000e value,54 3d 35 2e 37 20 48 3d 38 32 2e 39 00
Notification handle = 0x000e value,54 3d 35 2e 35 20 48 3d 38 34 2e 30 00
Notification handle = 0x000e value,54 3d 35 2e 37 20 48 3d 38 32 2e 38 00
Notification handle = 0x000e value,54 3d 35 2e 35 20 48 3d 38 34 2e 30 00

2018.02.10 11:07:09 4: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 35 2e 37 20 48 3d 38 32 2e 37 00 ,54 3d 35 2e 35 20 48 3d 38 34 2e 30 00
Notification handle = 0x000e value,54 3d 35 2e 38 20 48 3d 38 33 2e 30 00
Notification handle = 0x000e value,54 3d 35 2e 36 20 48 3d 38 34 2e 30 00
Notification handle = 0x000e value,54 3d 35 2e 37 20 48 3d 38 32 2e 37 00
Notification handle = 0x000e value,54 3d 35 2e 35 20 48 3d 38 34 2e 31 00
Notification handle = 0x000e value,54 3d 35 2e 37 20 48 3d 38 32 2e 39 00
Notification handle = 0x000e value,54 3d 35 2e 35 20 48 3d 38 34 2e 30 00
Notification handle = 0x000e value,54 3d 35 2e 37 20 48 3d 38 32 2e 38 00
Notification handle = 0x000e value,54 3d 35 2e 35 20 48 3d 38 34 2e 30 00

2018.02.10 11:07:09 5: Cmd: >{BlockingStart('2')}<
2018.02.10 11:07:09 5: Cmd: >{XiaomiBTLESens_ExecGatttool_Done('zoldertem|4C:65:A8:D1:7D:DC|ok|write|0x10|{"gtResult":"54 3d 35 2e 37 20 48 3d 38 32 2e 37 00 "}')}<
2018.02.10 11:07:09 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Done: gatttool return string: zoldertem|4C:65:A8:D1:7D:DC|ok|write|0x10|{"gtResult":"54 3d 35 2e 37 20 48 3d 38 32 2e 37 00 "}
2018.02.10 11:07:09 4: XiaomiBTLESens (zoldertem) - ProcessingNotification
2018.02.10 11:07:09 4: XiaomiBTLESens (zoldertem) - ProcessingNotification: handle 0x10
2018.02.10 11:07:09 4: XiaomiBTLESens (zoldertem) - Thermo/Hygro Sens Handle0x10
2018.02.10 11:07:09 5: Starting notify loop for zoldertem, 3 event(s), first is humidity: 2.7\000
2018.02.10 11:07:09 5: createNotifyHash
2018.02.10 11:07:09 5: End notify loop for zoldertem
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 10 Februar 2018, 12:30:52
Ok. i need a log the temperature is greater than 10.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 10 Februar 2018, 12:53:14
ok i have find the problem and evaluateted the solution. give me one day.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 10 Februar 2018, 14:45:35
new version online. hope fix the problem
https://github.com/LeonGaultier/fhem-XiaomiBTLESens/archive/master.zip
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: kroonen am 10 Februar 2018, 18:55:03
almost, the humidity it gives 8.9 and should give 78.9


fhem> l zoldertem 
Internals:
   BTMAC      4C:65:A8:D1:7D:DC
   DEF        4C:65:A8:D1:7D:DC
   INTERVAL   300
   NAME       zoldertem
   NOTIFYDEV  global,zoldertem
   NR         21
   NTFY_ORDER 50-zoldertem
   STATE      active
   TYPE       XiaomiBTLESens
   VERSION    2.0.8pri1
   loglevel   4
   READINGS:
     2018-02-10 18:51:41   battery         ok
     2018-02-10 18:51:41   batteryLevel    100
     2018-02-09 08:59:59   firmware        00.00.66
     2018-02-10 18:51:46   humidity        8.9
     2018-02-10 13:13:46   lastGattError   no data response
     2018-02-10 18:51:46   state           active
     2018-02-10 18:51:46   temperature     6.9
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1518285101.49253
     updateTimestampCallBattery 2018-02-10 18:51:41
Attributes:
   interval   300
   model      thermoHygroSens
   room       XiaomiBTLESens



2018.02.10 18:47:54 5: Cmd: >get zoldertem sensorData<
2018.02.10 18:47:54 4: XiaomiBTLESens (zoldertem) - Run CreateParamGatttool with mod: write
2018.02.10 18:47:54 4: BlockingCall (XiaomiBTLESens_ExecGatttool_Run): created child (1290), uses telnetPort to connect back
2018.02.10 18:47:54 5: Starting notify loop for zoldertem, 1 event(s), first is write sensor data
2018.02.10 18:47:54 5: createNotifyHash
2018.02.10 18:47:54 5: End notify loop for zoldertem
2018.02.10 18:47:54 5: XiaomiBTLESens (zoldertem) - Write XiaomiBTLESens_ExecGatttool_Run zoldertem|4C:65:A8:D1:7D:DC|write|0x10|0100
2018.02.10 18:47:54 4: WEB: /fhem?detail=zoldertem&dev.getzoldertem=zoldertem&cmd.getzoldertem=get&arg.getzoldertem=sensorData&val.getzoldertem=&XHR=1&addLinks=1&fwcsrf=csrf_204325950458568&fw_id=50 / RL:20 / text/plain; charset=UTF-8 / Content-Encoding: gzip
/
2018.02.10 18:47:54 4: Connection accepted from telnetPort_127.0.0.1_36184
2018.02.10 18:47:54 5: Cmd: >{BlockingRegisterTelnet($cl,4)}<
2018.02.10 18:47:54 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: call gatttool with command - timeout 5 gatttool -i hci0 -b 4C:65:A8:D1:7D:DC --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop - 0
2018.02.10 18:47:59 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: gatttool loop result
2018.02.10 18:47:59 1: PERL WARNING: Use of uninitialized value in split at ./FHEM/74_XiaomiBTLESens.pm line 485.
2018.02.10 18:47:59 1: PERL WARNING: Use of uninitialized value $gtResult[1] in substitution (s///) at ./FHEM/74_XiaomiBTLESens.pm line 486.
2018.02.10 18:47:59 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: call gatttool with command - timeout 5 gatttool -i hci0 -b 4C:65:A8:D1:7D:DC --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop - 1
2018.02.10 18:48:04 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 36 2e 39 20 48 3d 37 38 2e 39 00
Notification handle = 0x000e value,54 3d 36 2e 39 20 48 3d 37 38 2e 38 00
Notification handle = 0x000e value,54 3d 36 2e 38 20 48 3d 37 38 2e 33 00
Notification handle = 0x000e value,54 3d 36 2e 38 20 48 3d 37 38 2e 37 00
Notification handle = 0x000e value,54 3d 36 2e 38 20 48 3d 37 38 2e 35 00
Notification handle = 0x000e value,54 3d 36 2e 38 20 48 3d 37 38 2e 38 00

2018.02.10 18:48:04 4: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 36 2e 39 20 48 3d 37 38 2e 39 00 ,54 3d 36 2e 39 20 48 3d 37 38 2e 38 00
Notification handle = 0x000e value,54 3d 36 2e 38 20 48 3d 37 38 2e 33 00
Notification handle = 0x000e value,54 3d 36 2e 38 20 48 3d 37 38 2e 37 00
Notification handle = 0x000e value,54 3d 36 2e 38 20 48 3d 37 38 2e 35 00
Notification handle = 0x000e value,54 3d 36 2e 38 20 48 3d 37 38 2e 38 00

2018.02.10 18:48:04 5: Cmd: >{BlockingStart('4')}<
2018.02.10 18:48:04 5: Cmd: >{XiaomiBTLESens_ExecGatttool_Done('zoldertem|4C:65:A8:D1:7D:DC|ok|write|0x10|{"gtResult":"54 3d 36 2e 39 20 48 3d 37 38 2e 39 00 "}')}<
2018.02.10 18:48:04 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Done: gatttool return string: zoldertem|4C:65:A8:D1:7D:DC|ok|write|0x10|{"gtResult":"54 3d 36 2e 39 20 48 3d 37 38 2e 39 00 "}
2018.02.10 18:48:04 4: XiaomiBTLESens (zoldertem) - ProcessingNotification
2018.02.10 18:48:04 4: XiaomiBTLESens (zoldertem) - ProcessingNotification: handle 0x10
2018.02.10 18:48:04 4: XiaomiBTLESens (zoldertem) - Thermo/Hygro Sens Handle0x10
2018.02.10 18:48:04 5: Starting notify loop for zoldertem, 3 event(s), first is humidity: 8.9\000
2018.02.10 18:48:04 5: End notify loop for zoldertem
2018.02.10 18:48:04 4: XiaomiBTLESens (zoldertem) - WriteReadings: Readings were written
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 10 Februar 2018, 19:51:17
exchanged numbers, sorry.
the humidity bug is fixed but i have change code from loop to outside of the loop. can you please test it? thanks

https://github.com/LeonGaultier/fhem-XiaomiBTLESens/archive/master.zip


tip. verbose not global, set verbose attribut at the sensor device to 5.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: kroonen am 10 Februar 2018, 20:29:29
It works, thnx for the support.

Another question, is there a reason why the interval can't be smaller than 300 sec. Is this for battery saving??? I like to set it to 150 sec

regards Richard
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 10 Februar 2018, 20:59:30
i have change the minimum inteval to 120s, but you have interval + random 90
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 10 Februar 2018, 21:17:15
Morgen früh wird es eine neue Version geben wo alle relevanten Änderungen welche sich in Zusammenarbeit mit kroonen ergeben haben.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: kroonen am 10 Februar 2018, 21:41:43
Hi,

I get sometimes in the logging some strange values, signs (ھɇ). I will try to debug if I get again one again.



2018-02-10_21:32:55 zoldertem write sensor data
2018-02-10_21:33:00 zoldertem temperature: ھɇ
2018-02-10_21:33:00 zoldertem humidity:
2018-02-10_21:33:00 zoldertem active
2018-02-10_21:34:45 zoldertem read sensor data
2018-02-10_21:34:49 zoldertem batteryLevel: 100
2018-02-10_21:34:49 zoldertem battery: ok
2018-02-10_21:34:49 zoldertem active
2018-02-10_21:34:49 zoldertem write sensor data
2018-02-10_21:34:54 zoldertem humidity: 79.8
2018-02-10_21:34:54 zoldertem temperature: 6.5
2018-02-10_21:34:54 zoldertem active
2018-02-10_21:38:03 zoldertem write sensor data
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: kroonen am 10 Februar 2018, 21:50:23
I got one, and some debug..


2018.02.10 21:46:09 4: XiaomiBTLESens (zoldertem) - Run CreateParamGatttool with mod: write
2018.02.10 21:46:09 4: BlockingCall (XiaomiBTLESens_ExecGatttool_Run): created child (2658), uses telnetPort to connect back
2018.02.10 21:46:09 5: Starting notify loop for zoldertem, 1 event(s), first is write sensor data
2018.02.10 21:46:09 5: End notify loop for zoldertem
2018.02.10 21:46:09 5: XiaomiBTLESens (zoldertem) - Write XiaomiBTLESens_ExecGatttool_Run zoldertem|4C:65:A8:D1:7D:DC|write|0x10|0100
2018.02.10 21:46:09 4: XiaomiBTLESens (zoldertem) - stateRequestTimer: Call Request Timer
2018.02.10 21:46:09 4: Connection accepted from telnetPort_127.0.0.1_36268
2018.02.10 21:46:09 5: Cmd: >{BlockingRegisterTelnet($cl,6)}<
2018.02.10 21:46:09 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: call gatttool with command: timeout 5 gatttool -i hci0 -b 4C:65:A8:D1:7D:DC --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.02.10 21:46:14 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: gatttool loop result
2018.02.10 21:46:14 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: call gatttool with command: timeout 5 gatttool -i hci0 -b 4C:65:A8:D1:7D:DC --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 1
2018.02.10 21:46:14 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: gatttool loop result connect error,Transport endpoint is not connected (107)

2018.02.10 21:46:14 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: call gatttool with command: timeout 5 gatttool -i hci0 -b 4C:65:A8:D1:7D:DC --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 2
2018.02.10 21:46:19 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.02.10 21:46:19 4: XiaomiBTLESens (zoldertem) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.02.10 21:46:19 5: Cmd: >{BlockingStart('6')}<
2018.02.10 21:46:19 5: Cmd: >{XiaomiBTLESens_ExecGatttool_Done('zoldertem|4C:65:A8:D1:7D:DC|ok|write|0x10|{"gtResult":"no data response"}')}<
2018.02.10 21:46:19 5: XiaomiBTLESens (zoldertem) - ExecGatttool_Done: gatttool return string: zoldertem|4C:65:A8:D1:7D:DC|ok|write|0x10|{"gtResult":"no data response"}
2018.02.10 21:46:19 4: XiaomiBTLESens (zoldertem) - ProcessingNotification
2018.02.10 21:46:19 4: XiaomiBTLESens (zoldertem) - ProcessingNotification: handle 0x10
2018.02.10 21:46:19 4: XiaomiBTLESens (zoldertem) - Thermo/Hygro Sens Handle0x10
2018.02.10 21:46:19 1: PERL WARNING: substr outside of string at ./FHEM/74_XiaomiBTLESens.pm line 718.
2018.02.10 21:46:19 3: eval: {XiaomiBTLESens_ExecGatttool_Done('zoldertem|4C:65:A8:D1:7D:DC|ok|write|0x10|{"gtResult":"no data response"}')}
2018.02.10 21:46:19 1: PERL WARNING: Use of uninitialized value in pack at ./FHEM/74_XiaomiBTLESens.pm line 718.
2018.02.10 21:46:19 3: eval: {XiaomiBTLESens_ExecGatttool_Done('zoldertem|4C:65:A8:D1:7D:DC|ok|write|0x10|{"gtResult":"no data response"}')}
2018.02.10 21:46:19 5: Starting notify loop for zoldertem, 3 event(s), first is temperature: ھɇ
2018.02.10 21:46:19 5: End notify loop for zoldertem
2018.02.10 21:46:19 4: XiaomiBTLESens (zoldertem) - WriteReadings: Readings were written
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 11 Februar 2018, 00:07:07
i have insert a better error handling. can you test it?

https://github.com/LeonGaultier/fhem-XiaomiBTLESens/archive/master.zip
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: kroonen am 11 Februar 2018, 11:42:05
thnx for the support, works fine right now no false readings anymore.

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ck-jusuf am 11 Februar 2018, 16:36:15
Hi,

ich bekomme trotz neuer Version (2.0.8.) weiterhin ca. bei jeder 2ten Intervall, irgendwelche chinesischen werten z.b. 큌 als Temperatur.


2018-02-11 16:27:35 XiaomiBTLESens XiaomiTemp write sensor data
2018-02-11 16:27:45 XiaomiBTLESens XiaomiTemp temperature: 23.4
2018-02-11 16:27:45 XiaomiBTLESens XiaomiTemp humidity: 42.4
2018-02-11 16:27:45 XiaomiBTLESens XiaomiTemp active
2018-02-11 16:30:54 XiaomiBTLESens XiaomiTemp write sensor data
2018-02-11 16:31:00 XiaomiBTLESens XiaomiTemp temperature: 큌
2018-02-11 16:31:00 XiaomiBTLESens XiaomiTemp humidity: 9
2018-02-11 16:31:00 XiaomiBTLESens XiaomiTemp active
018-02-11 16:32:32 XiaomiBTLESens XiaomiTemp write sensor data
2018-02-11 16:32:37 XiaomiBTLESens XiaomiTemp humidity:
2018-02-11 16:32:37 XiaomiBTLESens XiaomiTemp temperature: ھɇ
2018-02-11 16:32:37 XiaomiBTLESens XiaomiTemp active



Internals
BTMAC
xxxxxxxxx
CFGFN

DEF
xxxxxxxxx

INTERVAL
300
NAME
XiaomiTemp
NOTIFYDEV
global,XiaomiTemp
NR
256
NTFY_ORDER
50-XiaomiTemp
STATE
active
TYPE
XiaomiBTLESens
VERSION
2.0.8
loglevel
4
Readings
battery
ok
2018-02-11 16:04:33
batteryLevel
100
2018-02-11 16:04:33
devicename
MJ_HT_V1
2018-02-11 16:11:53
firmware
00.00.66
2018-02-11 16:00:00
humidity
9
2018-02-11 16:31:00
lastGattError
No route to host (113)
2018-02-11 16:12:09
state
active
2018-02-11 16:31:00
temperature

2018-02-11 16:31:00



Edit:

hab jetzt erst die Version über GitHub geladen, dachte das ist die gleiche wie übers Fhem update. Hat ja alles die Gleiche Versions NR.
Mit der Version hatte ich bisher keine Probleme.
Danke
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 11 Februar 2018, 18:02:14
Ich werde versuchen die aktuelle Gitversion heute noch ins FHEM SVN zu laden.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 11 Februar 2018, 20:18:14
Kleiner LifeHack für alle, die noch mit der Position des Thermometers experimentieren: Von der runden Trägerplatte einfach unten etwas absägen und dann mit PowerStrips montieren. Dabei die Zuglasche der Strips zwar zugänglich, aber unsichtbar dort positionieren, wo ihr das Teil abgesägt habt. :-)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Abercrombie1892 am 17 Februar 2018, 11:00:57
hallo,

gibt es denn auch eine möglichkeit mit dem modul die fernbedienung der yeelight Deckenlampen mit einzubeziehen. diese funken ja auch auf dem ble standard. ich würde diese gerne in verbindung mit fhem nutzen.

danke und mfg.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 17 Februar 2018, 11:07:01
Wenn Du mit entsprechende gatt Daten liefern kannst.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: trinitywhm am 17 Februar 2018, 12:06:21
Zitat von: trinitywhm am 30 Januar 2018, 21:27:00
Die Antwort habe ich befürchtet. Aber ich weiß dass das der nächste sinnvolle Schritt ist.
Wir allerdings adhoc jetzt nix, melde mich wenn ich damit durch bin und ob es was gebracht hat.
Danke bis hierhin.
Ich bin mittlerweile auf Stretch.
FHEM läuft immernoch auf nem raspi 3.
bluetoothctl --version ist nun 5.43

Die Probleme haben sich ein wenig verändert. Vorher mit Debian Jessie und der älteren bluetoothctl Version kamen ja zum Schlus gar keine Daten mehr an. Mittlerweile kommen wenigstens hin und wieder Messdaten an. Es kommt zwar jeden Tag zu Fehlern "charWrite faild" oder "he BlockingCall Process terminated unexpectedly. Timedout". Aber bei allen sechs Pflanzensensoren die ich im Einsatz habe kommen jeden Tag genügend Daten an, sodass die Plots über den Tag geschrieben werden können.

Das ist jetzt ein Zustand mit dem ich erstmal leben kann, aber ich dachte ich gebe hier nochmal Rückmeldung dass es halt noch immer nicht ohne Probleme funktioniert. @CoolTux: Woran könnte das denn noch liegen?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 17 Februar 2018, 16:59:28
Das kann ich Dir leider nicht sagen. Wird dann wohl an BTLE und/oder gatttool an sich liegen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: dan21 am 20 Februar 2018, 18:14:41
Ich habe das eckige Thermometer und bekomme es mit FHEM nicht ans laufen.
Hier das Log:

2018.02.20 18:10:54 5 : XiaomiBTLESens (MiTempD) - ExecGatttool_Done: gatttool return string: MiTempD|88:C6:26:8E:74:E2|ok|write|0x10|{"gtResult":"Attribute can't be written"}
2018.02.20 18:10:54 4 : XiaomiBTLESens (MiTempD) - ProcessingNotification
2018.02.20 18:10:54 4 : XiaomiBTLESens (MiTempD) - ProcessingNotification: handle 0x10
2018.02.20 18:10:54 4 : XiaomiBTLESens (MiTempD) - Thermo/Hygro Sens Handle0x10
2018-02-20 18:10:54 XiaomiBTLESens MiTempD lastGattError: charWrite faild
2018-02-20 18:10:54 XiaomiBTLESens MiTempD error
2018.02.20 18:10:54 4 : XiaomiBTLESens (MiTempD) - WriteReadings: Readings were written
2018.02.20 18:10:54 4 : XiaomiBTLESens (MiTempD) - Run CreateParamGatttool with mod: write
2018-02-20 18:10:54 XiaomiBTLESens MiTempD write sensor data
2018.02.20 18:10:54 5 : XiaomiBTLESens (MiTempD) - Write XiaomiBTLESens_ExecGatttool_Run MiTempD|88:C6:26:8E:74:E2|write|0x10|0100
2018-02-20 18:10:54 XiaomiBTLESens MiTempD active
2018.02.20 18:10:54 4 : XiaomiBTLESens (MiTempD) - WriteReadings: Readings were written
2018.02.20 18:10:54 4 : XiaomiBTLESens (MiTempD) - Run CreateParamGatttool with mod: write
2018-02-20 18:10:54 XiaomiBTLESens MiTempD write sensor data
2018.02.20 18:10:54 5 : XiaomiBTLESens (MiTempD) - Write XiaomiBTLESens_ExecGatttool_Run MiTempD|88:C6:26:8E:74:E2|write|0x10|0100

2018.02.20 18:11:04 5 : XiaomiBTLESens (MiTempD) - ExecGatttool_Done: gatttool return string: MiTempD|88:C6:26:8E:74:E2|ok|write|0x10|{"gtResult":"Attribute can't be written"}
2018.02.20 18:11:04 4 : XiaomiBTLESens (MiTempD) - ProcessingNotification
2018.02.20 18:11:04 4 : XiaomiBTLESens (MiTempD) - ProcessingNotification: handle 0x10
2018.02.20 18:11:04 4 : XiaomiBTLESens (MiTempD) - Thermo/Hygro Sens Handle0x10
2018-02-20 18:11:04 XiaomiBTLESens MiTempD lastGattError: charWrite faild
2018-02-20 18:11:04 XiaomiBTLESens MiTempD error
2018.02.20 18:11:04 4 : XiaomiBTLESens (MiTempD) - WriteReadings: Readings were written
2018.02.20 18:11:04 4 : XiaomiBTLESens (MiTempD) - Run CreateParamGatttool with mod: write
2018-02-20 18:11:04 XiaomiBTLESens MiTempD write sensor data
2018.02.20 18:11:04 5 : XiaomiBTLESens (MiTempD) - Write XiaomiBTLESens_ExecGatttool_Run MiTempD|88:C6:26:8E:74:E2|write|0x10|0100
2018-02-20 18:11:04 XiaomiBTLESens MiTempD active
2018.02.20 18:11:04 4 : XiaomiBTLESens (MiTempD) - WriteReadings: Readings were written
2018.02.20 18:11:04 4 : XiaomiBTLESens (MiTempD) - Run CreateParamGatttool with mod: write
2018-02-20 18:11:04 XiaomiBTLESens MiTempD write sensor data
2018.02.20 18:11:04 5 : XiaomiBTLESens (MiTempD) - Write XiaomiBTLESens_ExecGatttool_Run MiTempD|88:C6:26:8E:74:E2|write|0x10|0100
2018-02-20 18:11:04 XiaomiSmartHome xiaomiSH heartbeat: 34ce00fb676f
2018-02-20 18:11:04 XiaomiSmartHome xiaomiSH token: vRaOEFZZSe081gRY


Hat jemadn eine Idee was falsch laufen könnte?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 20 Februar 2018, 18:18:55
Zitat von: dan21 am 20 Februar 2018, 18:14:41
das eckige Thermometer
Hmm, das eckige hat Bluetooth? Ich dachte nicht.
Mit ePaper Display? Sollte kein BT haben
Ohne Display? Sollte nur mit dem Gateway und nicht per BT gehen (anderes Modul!)
Wie kommst du denn an die BT-MAC?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 20 Februar 2018, 18:19:41
Nicht kompatibel?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: frank_41 am 20 Februar 2018, 23:47:48
Hallo,
ich melde mich mal wieder wegen FlowerSens log message :
Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 22103

Die "zentrale" logdatei wird immer noch vollgemüllt damit.

ich meine, ich habe alle loglevel und verbose auf minimum gesetzt ?
was kann ich noch tun, um die Einträge nicht mehr zu bekommen ??

Internals:
   BTMAC      C4:7C:8D:65:C8:99
   DEF        C4:7C:8D:65:C8:99
   INTERVAL   604
   NAME       Bed_ananas
   NOTIFYDEV  global,Bed_ananas
   NR         515
   NTFY_ORDER 50-Bed_ananas
   STATE      error
   TYPE       XiaomiBTLESens
   VERSION    2.0.9
   loglevel   2
   Helper:
     DBLOG:
       battery:
         myDbLog:
           TIME       1519087815.52905
           VALUE      ok
       batteryLevel:
         myDbLog:
           TIME       1519087815.52905
           VALUE      99
       fertility:
         myDbLog:
           TIME       1519126846.28075
           VALUE      160
       firmware:
         myDbLog:
           TIME       1519087815.52905
           VALUE      3.1.8
       lastGattError:
         myDbLog:
           TIME       1519166415.03684
           VALUE      Internal application error
       lux:
         myDbLog:
           TIME       1519126846.28075
           VALUE      6218
       moisture:
         myDbLog:
           TIME       1519126846.28075
           VALUE      13
       state:
         myDbLog:
           TIME       1519166415.03684
           VALUE      error
       temperature:
         myDbLog:
           TIME       1519126846.28075
           VALUE      19.4
   READINGS:
     2018-02-20 01:50:15   battery         ok
     2018-02-20 01:50:15   batteryLevel    99
     2018-02-20 12:40:46   fertility       160
     2018-02-20 01:50:15   firmware        3.1.8
     2018-02-20 23:40:15   lastGattError   Internal application error
     2018-02-20 12:40:46   lux             6218
     2018-02-20 12:40:46   moisture        13
     2018-02-20 23:40:15   state           error
     2018-02-20 12:40:46   temperature     19.4
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1519087815.51568
     updateTimestampCallBattery 2018-02-20 01:50:15
Attributes:
   blockingCallLoglevel 2
   devStateIcon {my $w=int(ReadingsVal("$name","moisture",0));if($w < 10){'.*:sani_irrigation@red'}else{'.*:sani_irrigation@green'}}
   interval   604
   model      flowerSens
   room       FlowerSens,plants
   verbose    0
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 21 Februar 2018, 07:56:45
Bei einem BlockingKill wird diese Meldung immer aus gegeben, egal welches Loglevel man an gibt.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: trinitywhm am 24 Februar 2018, 09:10:24
Guten Morgen,
ich bekomme bei einem meiner Sensoren den Error "Invalid argument (22)".
Ein Log mit verbose 5 wenn ich ein get sensorData auf dem Device mache.
2018.02.24 09:06:55 4: XiaomiBTLESens (WZ_Pflanze2) - Run CreateParamGatttool with mod: write
2018.02.24 09:06:55 5: XiaomiBTLESens (WZ_Pflanze2) - Write XiaomiBTLESens_ExecGatttool_Run WZ_Pflanze2|C4:7C:8D:65:BD:DA|write|0x33|A01F
2018.02.24 09:06:56 5: XiaomiBTLESens (WZ_Pflanze2) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:65:BD:DA --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 0
2018.02.24 09:06:56 5: XiaomiBTLESens (WZ_Pflanze2) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.02.24 09:06:56 5: XiaomiBTLESens (WZ_Pflanze2) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:65:BD:DA --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 1
2018.02.24 09:06:56 5: XiaomiBTLESens (WZ_Pflanze2) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.02.24 09:06:56 5: XiaomiBTLESens (WZ_Pflanze2) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:65:BD:DA --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 2
2018.02.24 09:06:56 5: XiaomiBTLESens (WZ_Pflanze2) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.02.24 09:06:56 5: XiaomiBTLESens (WZ_Pflanze2) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:65:BD:DA --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 3
2018.02.24 09:06:56 5: XiaomiBTLESens (WZ_Pflanze2) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.02.24 09:06:56 5: XiaomiBTLESens (WZ_Pflanze2) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:65:BD:DA --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 4
2018.02.24 09:06:56 5: XiaomiBTLESens (WZ_Pflanze2) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.02.24 09:06:56 4: XiaomiBTLESens (WZ_Pflanze2) - ExecGatttool_Run: gatttool result connect error,Invalid argument (22)

2018.02.24 09:06:56 5: XiaomiBTLESens (WZ_Pflanze2) - ExecGatttool_Done: gatttool return string: WZ_Pflanze2|C4:7C:8D:65:BD:DA|error|write|0x33|{"gtResult":"Invalid argument (22)"}
2018.02.24 09:06:56 4: XiaomiBTLESens (WZ_Pflanze2) - ProcessingErrors
2018.02.24 09:06:56 4: XiaomiBTLESens (WZ_Pflanze2) - WriteReadings: Readings were written


Was läuft hier schief?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 24 Februar 2018, 09:27:10
Zitat von: trinitywhm am 24 Februar 2018, 09:10:24
Guten Morgen,
ich bekomme bei einem meiner Sensoren den Error "Invalid argument (22)".
Ein Log mit verbose 5 wenn ich ein get sensorData auf dem Device mache.
2018.02.24 09:06:55 4: XiaomiBTLESens (WZ_Pflanze2) - Run CreateParamGatttool with mod: write
2018.02.24 09:06:55 5: XiaomiBTLESens (WZ_Pflanze2) - Write XiaomiBTLESens_ExecGatttool_Run WZ_Pflanze2|C4:7C:8D:65:BD:DA|write|0x33|A01F
2018.02.24 09:06:56 5: XiaomiBTLESens (WZ_Pflanze2) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:65:BD:DA --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 0
2018.02.24 09:06:56 5: XiaomiBTLESens (WZ_Pflanze2) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.02.24 09:06:56 5: XiaomiBTLESens (WZ_Pflanze2) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:65:BD:DA --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 1
2018.02.24 09:06:56 5: XiaomiBTLESens (WZ_Pflanze2) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.02.24 09:06:56 5: XiaomiBTLESens (WZ_Pflanze2) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:65:BD:DA --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 2
2018.02.24 09:06:56 5: XiaomiBTLESens (WZ_Pflanze2) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.02.24 09:06:56 5: XiaomiBTLESens (WZ_Pflanze2) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:65:BD:DA --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 3
2018.02.24 09:06:56 5: XiaomiBTLESens (WZ_Pflanze2) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.02.24 09:06:56 5: XiaomiBTLESens (WZ_Pflanze2) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:65:BD:DA --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 4
2018.02.24 09:06:56 5: XiaomiBTLESens (WZ_Pflanze2) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.02.24 09:06:56 4: XiaomiBTLESens (WZ_Pflanze2) - ExecGatttool_Run: gatttool result connect error,Invalid argument (22)

2018.02.24 09:06:56 5: XiaomiBTLESens (WZ_Pflanze2) - ExecGatttool_Done: gatttool return string: WZ_Pflanze2|C4:7C:8D:65:BD:DA|error|write|0x33|{"gtResult":"Invalid argument (22)"}
2018.02.24 09:06:56 4: XiaomiBTLESens (WZ_Pflanze2) - ProcessingErrors
2018.02.24 09:06:56 4: XiaomiBTLESens (WZ_Pflanze2) - WriteReadings: Readings were written


Was läuft hier schief?

Lief der Sensor mal mit dem Modul oder ist das neu?
Klingt danach das das handle mit dem Argument nichts anfangen kann.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: trinitywhm am 24 Februar 2018, 14:37:56
Ja es hat schonmal funktioniert. Der Fehler ist mir erst heute aufgefallen (schließe aber nicht aus, dass er schon früher aufgetreten ist).Kurioserweise scheint es zwischendurch immer mal wieder zu funktionieren.
Hier ein List des Devices:


Internals:
   BTMAC      C4:7C:8D:65:BD:DA
   DEF        C4:7C:8D:65:BD:DA
   INTERVAL   300
   NAME       WZ_Pflanze2
   NOTIFYDEV  global,WZ_Pflanze2
   NR         28
   NTFY_ORDER 50-WZ_Pflanze2
   STATE      Feuchte: 15 / 19 / 65</br>Dünger: 350 / 302 / 2000</br>Temperatur: 15 / 19.2 / 32</br>
   TYPE       XiaomiBTLESens
   VERSION    2.0.9
   loglevel   4
   Helper:
     DBLOG:
       battery:
         DBLogging:
           TIME       1519468697.33605
           VALUE      ok
       batteryLevel:
         DBLogging:
           TIME       1519468697.33605
           VALUE      99
       fertility:
         DBLogging:
           TIME       1519476386.42621
           VALUE      302
       lux:
         DBLogging:
           TIME       1519476386.42621
           VALUE      90
       moisture:
         DBLogging:
           TIME       1519476386.42621
           VALUE      19
       state:
         DBLogging:
           TIME       1519476746.95788
           VALUE      error
       temperature:
         DBLogging:
           TIME       1519476386.42621
           VALUE      19.2
   READINGS:
     2018-02-24 11:38:17   battery         ok
     2018-02-24 11:38:17   batteryLevel    99
     2018-02-24 13:46:26   fertility       302
     2018-02-24 11:38:17   firmware        3.1.8
     2018-02-24 14:32:21   lastGattError   Invalid argument (22)
     2018-02-24 13:46:26   lux             90
     2018-02-24 13:46:26   moisture        19
     2018-02-24 14:32:21   state           error
     2018-02-24 13:46:26   temperature     19.2
     2018-02-24 14:32:21   uistate         hungrig
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1519468697.33218
     updateTimestampCallBattery 2018-02-24 11:38:17
Attributes:
   DbLogExclude .*
   DbLogInclude battery,batteryLevel,temperature,moisture,fertility,lux
   alias      Friedenslilie
   event-min-interval battery:21600,batteryLevel:21600,temperature:600,moisture:600,fertility:600,lux:300
   event-on-change-reading state
   event-on-update-reading .*
   icon       hue_room_garden
   maxFertility 2000
   maxLux     3200
   maxMoisture 65
   maxTemp    32
   minFertility 350
   minLux     1600
   minMoisture 15
   minTemp    15
   model      flowerSens
   room       20_Wohnzimmer
   stateFormat {"Feuchte: ".AttrVal($name,"minMoisture","")." / ".ReadingsVal($name,"moisture","")." / ".AttrVal($name,"maxMoisture","")."</br>".
"Dünger: ".AttrVal($name,"minFertility","")." / ".ReadingsVal($name,"fertility","")." / ".AttrVal($name,"maxFertility","")."</br>".
"Temperatur: ".AttrVal($name,"minTemp","")." / ".ReadingsVal($name,"temperature","")." / ".AttrVal($name,"maxTemp","")."</br>"}
   userReadings uistate {my $moist = ReadingsVal($name, "moisture",0);; my $minmoist = AttrVal($name,"minMoisture",10);; my $fert = ReadingsVal($name, "fertility",0);; my $minfert = AttrVal($name,"minFertility",50);; if ($moist < $minmoist && $fert < $minfert) {return "durstig+hungrig"} elsif ($moist < $minmoist) {return "durstig"} elsif ($fert < $minfert) {return "hungrig"} else {return "ok"}}
   verbose    3

Das fiel mir zunächst auf weil es keinen Plotabriss gab. Und auch in der DB stehen aktuelle Werte über den Tag verteilt. Dazwischen dann immer mal wieder ein Error.

Aber die Timeout-Meldungen im Log häufen sich heute auch wieder mehr als an anderen Tagen. Vielleicht hängt es ja auch damit zusammen:
2018.02.24 14:30:14 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 6124
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 24 Februar 2018, 14:55:50
Kannst Du den Sensor näher an den BT Dongle holen?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: gent am 02 März 2018, 19:40:28
Hallo,

kann ich irgendwie das XiaomiFlowerSens Modul durch das XiaomiBTLESens Modul austauschen, ohne alles neu konfigurieren zu müssen und auch meine logs zu verlieren?

Viele Grüße, Holger
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 02 März 2018, 19:59:24
Ohne Dir jetzt zu Nahe zu treten und bitte nicht sauer sein, aber wenn Du fragst dann muss ich mit Nein antworten. Die Definition und alles ist ja so geblieben es hat sich nur der Type geändert. Das define wäre also an zu passen. Wenn du nicht weißt wie dann mach es bitte einfach neu. Ist besser als wenn irgendwas kaputt geht.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: distel am 02 März 2018, 20:40:58
Zitat von: gent am 02 März 2018, 19:40:28
auch meine logs zu verlieren?
Ohne genaue Kenntnis deiner Config ist das natürlich schwer zu sagen. Wie loggst du? Wie ist das/sind die Log Device(s) konfiguriert? Wie willst du migrieren? ...einen Automatismus gibt  es nicht. Backup vorher wäre wohl angeraten!
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: gent am 04 März 2018, 20:17:59
Zitat von: CoolTux am 02 März 2018, 19:59:24
Ohne Dir jetzt zu Nahe zu treten und bitte nicht sauer sein, aber wenn Du fragst dann muss ich mit Nein antworten. Die Definition und alles ist ja so geblieben es hat sich nur der Type geändert. Das define wäre also an zu passen. Wenn du nicht weißt wie dann mach es bitte einfach neu. Ist besser als wenn irgendwas kaputt geht.

Hi, also wenn das alles ist, dann kriege ich das natürlich hin. Dann erübrigt sich natürlich die Frage nach den log-Devices und so. Und ich bin natürlich nicht sauer. Der Schubser in die richtige Richtung hat ja gereicht. Ich war mir halt nicht sicher, ob das alles ist.


Gesendet von iPad mit Tapatalk Pro
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 17 März 2018, 11:59:50
Heute stand bei mir nach langer Zeit ein Batteriewechsel an. Leider habe ich nicht sofort den neuen Batteriestatus gesehen da der Timestamp für den Batteriewechsel noch nicht alt genug war.
Daher gibt es nun ein
set resetBatteryTimestamp

Damit wird automatisch ein neu einlesen des Batteriestatus erzwungen.
Update kommt die Tage


Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: HeikoS am 18 März 2018, 22:38:50
Ich habe heute Mittag ein FHEM-Update und damit auch ein Update des Moduls auf 2.0.10 gemacht.
Genau ab dem Zeitpunkt bekomme ich keine Werte mehr von meinem FlowerSensor. Mit der Mi Flower Care App lässt er sich ganz normal auslesen. Hardware-Firmware ist laut App 3.1.8 (aktuell).

Log mit Verbose 5
2018.03.18 22:18:53 4: XiaomiBTLESens (Wz_Palme) - Run CreateParamGatttool with mod: write
2018.03.18 22:18:53 5: XiaomiBTLESens (Wz_Palme) - Write XiaomiBTLESens_ExecGatttool_Run Wz_Palme|C4:7C:8D:65:C4:46|write|0x33|A01F
2018.03.18 22:18:53 5: XiaomiBTLESens (Wz_Palme) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:65:C4:46 --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 0
2018.03.18 22:18:56 5: XiaomiBTLESens (Wz_Palme) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.03.18 22:18:56 4: XiaomiBTLESens (Wz_Palme) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.03.18 22:18:56 5: XiaomiBTLESens (Wz_Palme) - ExecGatttool_Done: gatttool return string: Wz_Palme|C4:7C:8D:65:C4:46|ok|write|0x33|HASH(0x15c7040)
2018.03.18 22:18:56 4: XiaomiBTLESens (Wz_Palme) - ExecGatttool_Done: JSON error while request: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "HASH(0x15c7040)") at ./FHEM/74_XiaomiBTLESens.pm line 554.

2018.03.18 22:18:56 4: XiaomiBTLESens (Wz_Palme) - Run CreateParamGatttool with mod: read
2018.03.18 22:18:56 5: XiaomiBTLESens (Wz_Palme) - Read XiaomiBTLESens_ExecGatttool_Run Wz_Palme|C4:7C:8D:65:C4:46|read|0x35
2018.03.18 22:18:57 5: XiaomiBTLESens (Wz_Palme) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:65:C4:46 --char-read -a 0x35 2>&1 /dev/null and loop 0
2018.03.18 22:18:57 5: XiaomiBTLESens (Wz_Palme) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,ae 00 00 34 00 00 00 10 94 00 02 3c 00 fb 34 9b

2018.03.18 22:18:57 4: XiaomiBTLESens (Wz_Palme) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,ae 00 00 34 00 00 00 10 94 00 02 3c 00 fb 34 9b

2018.03.18 22:18:57 5: XiaomiBTLESens (Wz_Palme) - ExecGatttool_Done: gatttool return string: Wz_Palme|C4:7C:8D:65:C4:46|ok|read|0x35|HASH(0x15c7040)
2018.03.18 22:18:57 4: XiaomiBTLESens (Wz_Palme) - ExecGatttool_Done: JSON error while request: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "HASH(0x15c7040)") at ./FHEM/74_XiaomiBTLESens.pm line 554.

List des Devices
Internals:
   BTMAC      C4:7C:8D:65:C4:46
   DEF        C4:7C:8D:65:C4:46
   INTERVAL   7200
   NAME       Wz_Palme
   NOTIFYDEV  global,Wz_Palme
   NR         22
   NTFY_ORDER 50-Wz_Palme
   STATE      active
   TYPE       XiaomiBTLESens
   VERSION    2.0.10
   loglevel   4
   READINGS:
     2018-03-18 20:21:03   battery         low
     2018-03-18 20:21:03   batteryLevel    0
     2018-03-18 22:20:46   fertility       0
     2018-03-18 20:21:03   firmware        -30.-30.-30
     2018-03-04 03:52:09   lastGattError   charWrite faild
     2018-03-18 22:20:46   lux             0
     2018-03-18 22:20:46   moisture        0
     2018-03-18 22:20:46   state           active
     2018-03-18 22:20:46   temperature     0
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1521400863.01321
     updateTimestampCallBattery 2018-03-18 20:21:03
Attributes:
   event-on-change-reading state
   event-on-update-reading .*
   fp_Grundriss 352,922,3,moisture,Palme
   interval   7200
   minMoisture 10
   model      flowerSens
   room       Wohnen
   verbose    0
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 19 März 2018, 05:51:12
Guten morgen Heiko,

Und wenn Du wieder die Vorversion installierst geht es wieder?
Haben die anderen auch ein problem mit der neuen Version?


Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: hga am 19 März 2018, 06:21:29
Moin,

Habe auch Probleme mit der neuen Version, bin deswegen auf die ältere Version zurückgegangen ...
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 19 März 2018, 06:38:31
Zitat von: hga am 19 März 2018, 06:21:29
Moin,

Habe auch Probleme mit der neuen Version, bin deswegen auf die ältere Version zurückgegangen ...

Könntest Du mir ein log 5 mit der neuen version geben?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 19 März 2018, 06:48:38
Gibt es auch User bei dem die neue Version funktioniert?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: hga am 19 März 2018, 12:09:45
Moin!

Hier ein Log-Auszug für einen Sensor:


2018.03.19 11:59:12 5: Cmd: >get FlowerSens_A4 sensorData<
2018.03.19 11:59:12 4: XiaomiBTLESens (FlowerSens_A4) - Run CreateParamGatttool with mod: write
2018.03.19 11:59:12 4: BlockingCall (XiaomiBTLESens_ExecGatttool_Run): created child (15290), uses telnetPort to connect back
2018.03.19 11:59:12 5: Starting notify loop for FlowerSens_A4, 1 event(s), first is write sensor data
2018.03.19 11:59:12 5: createNotifyHash
2018.03.19 11:59:12 5: rg_flower: no longer visible, ignoring notify
2018.03.19 11:59:12 5: End notify loop for FlowerSens_A4
2018.03.19 11:59:12 5: XiaomiBTLESens (FlowerSens_A4) - Write XiaomiBTLESens_ExecGatttool_Run FlowerSens_A4|C4:7C:8D:64:47:A4|write|0x33|A01F
2018.03.19 11:59:12 4: Connection accepted from telnetPort_127.0.0.1_39620
2018.03.19 11:59:12 5: Cmd: >{BlockingRegisterTelnet($cl,43)}<
2018.03.19 11:59:13 5: XiaomiBTLESens (FlowerSens_A4) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:64:47:A4 --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 0
2018.03.19 11:59:15 5: Cmd: >get FlowerSens_A4 sensorData<
2018.03.19 11:59:15 5: Starting notify loop for FlowerSens_A4, 2 event(s), first is lastGattError: charWrite faild
2018.03.19 11:59:15 5: rg_flower: not on any display, ignoring notify
2018.03.19 11:59:15 5: End notify loop for FlowerSens_A4
2018.03.19 11:59:15 4: XiaomiBTLESens (FlowerSens_A4) - WriteReadings: Readings were written
2018.03.19 11:59:15 5: XiaomiBTLESens (FlowerSens_A4) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
2018.03.19 11:59:15 4: XiaomiBTLESens (FlowerSens_A4) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
2018.03.19 11:59:15 5: Cmd: >{BlockingStart('43')}<
2018.03.19 11:59:15 5: Cmd: >{XiaomiBTLESens_ExecGatttool_Done('FlowerSens_A4|C4:7C:8D:64:47:A4|ok|write|0x33|HASH(0x28806b0)')}<
2018.03.19 11:59:15 5: XiaomiBTLESens (FlowerSens_A4) - ExecGatttool_Done: gatttool return string: FlowerSens_A4|C4:7C:8D:64:47:A4|ok|write|0x33|HASH(0x28806b0)
2018.03.19 11:59:15 4: XiaomiBTLESens (FlowerSens_A4) - ExecGatttool_Done: JSON error while request: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "HASH(0x28806b0)") at ./FHEM/74_XiaomiBTLESens.pm line 554.

2018.03.19 11:59:15 4: XiaomiBTLESens (FlowerSens_A4) - Run CreateParamGatttool with mod: read
2018.03.19 11:59:15 4: BlockingCall (XiaomiBTLESens_ExecGatttool_Run): created child (15299), uses telnetPort to connect back
2018.03.19 11:59:15 5: Starting notify loop for FlowerSens_A4, 1 event(s), first is read sensor data
2018.03.19 11:59:15 5: rg_flower: not on any display, ignoring notify
2018.03.19 11:59:15 5: End notify loop for FlowerSens_A4
2018.03.19 11:59:15 5: XiaomiBTLESens (FlowerSens_A4) - Read XiaomiBTLESens_ExecGatttool_Run FlowerSens_A4|C4:7C:8D:64:47:A4|read|0x35
2018.03.19 11:59:15 4: Connection accepted from telnetPort_127.0.0.1_39622
2018.03.19 11:59:15 5: Cmd: >{BlockingRegisterTelnet($cl,44)}<
2018.03.19 11:59:16 5: XiaomiBTLESens (FlowerSens_A4) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:64:47:A4 --char-read -a 0x35 2>&1 /dev/null and loop 0
2018.03.19 11:59:16 5: XiaomiBTLESens (FlowerSens_A4) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,c3 00 00 f6 06 00 00 11 66 00 02 3c 00 fb 34 9b

2018.03.19 11:59:16 4: XiaomiBTLESens (FlowerSens_A4) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,c3 00 00 f6 06 00 00 11 66 00 02 3c 00 fb 34 9b

2018.03.19 11:59:16 5: Cmd: >{BlockingStart('44')}<
2018.03.19 11:59:16 5: Cmd: >{XiaomiBTLESens_ExecGatttool_Done('FlowerSens_A4|C4:7C:8D:64:47:A4|ok|read|0x35|HASH(0x28806b0)')}<
2018.03.19 11:59:16 5: XiaomiBTLESens (FlowerSens_A4) - ExecGatttool_Done: gatttool return string: FlowerSens_A4|C4:7C:8D:64:47:A4|ok|read|0x35|HASH(0x28806b0)
2018.03.19 11:59:16 4: XiaomiBTLESens (FlowerSens_A4) - ExecGatttool_Done: JSON error while request: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "HASH(0x28806b0)") at ./FHEM/74_XiaomiBTLESens.pm line 554.

2018.03.19 11:59:16 4: XiaomiBTLESens (FlowerSens_A4) - ProcessingNotification
2018.03.19 11:59:16 4: XiaomiBTLESens (FlowerSens_A4) - ProcessingNotification: handle 0x35
2018.03.19 11:59:16 4: XiaomiBTLESens (FlowerSens_A4) - FlowerSens Handle0x35
2018.03.19 11:59:16 5: Starting notify loop for FlowerSens_A4, 5 event(s), first is moisture: 0
2018.03.19 11:59:16 5: rg_flower: not on any display, ignoring notify
2018.03.19 11:59:16 5: End notify loop for FlowerSens_A4
2018.03.19 11:59:16 5: Starting notify loop for FlowerSens_A4, 1 event(s), first is minMoisture low
2018.03.19 11:59:16 5: rg_flower: not on any display, ignoring notify
2018.03.19 11:59:16 5: End notify loop for FlowerSens_A4
2018.03.19 11:59:16 4: XiaomiBTLESens (FlowerSens_A4) - WriteReadings: Readings were written
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: HeikoS am 19 März 2018, 12:26:20
Ich denke das hier ist der gemeinsame Fehler: "JSON error while request: malformed JSON string"

Peinliche Frage: wie bekomme ich eine ältere Version des Moduls? ^^
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 19 März 2018, 12:31:04
Im restorDir sollte die ältere Version sein.

Das ist die Gemeinsamkeit das stimmt, aber das liegt daran weil etwas davor nicht geklappt hat.
Frage, habt Ihr beide komplett neu gestartet? Irgendwas scheint mit dem laden des JSON Modules im eval Aufruf nicht geklappt zu haben. Ich brauche daher also bitte den Logauszug des FHEM Startvorganges ab dem Punkt wo ein Sensor definiert wird.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: HeikoS am 19 März 2018, 13:03:14
Ich hatte nach dem Update ein "shutdown restart" gemacht und dann nachdem mir aufgefallen war, dass keine Daten mehr kommen, den RaspberryPI komplett neu gestartet.
Hab jetzt nochmal neugestartet mit verbose 5 beim Sensor, hoffe ich habe alles erwischt bzw. nicht zuviel aus dem Log gelöscht:
2018.03.19 12:48:03 0: Server shutdown
2018.03.19 12:48:13 1: PERL WARNING: Backslash found where operator expected at ./FHEM/74_XiaomiBTLESens.pm line 852, near "encode_json \"
2018.03.19 12:48:13 1: PERL WARNING: (Do you need to predeclare encode_json?)
2018.03.19 12:48:13 3: XiaomiBTLESens (Wz_Palme) - defined with BTMAC C4:7C:8D:65:C4:46
2018.03.19 12:48:13 3: XiaomiBTLESens (Wz_Palme) - set interval to 7200
2018.03.19 12:48:20 4: XiaomiBTLESens (Wz_Palme) - Run CreateParamGatttool with mod: read
2018.03.19 12:48:20 5: XiaomiBTLESens (Wz_Palme) - Read XiaomiBTLESens_ExecGatttool_Run Wz_Palme|C4:7C:8D:65:C4:46|read|0x38
2018.03.19 12:48:20 4: XiaomiBTLESens (Wz_Palme) - stateRequestTimer: Call Request Timer
2018.03.19 12:48:27 0: Server started with 117 defined entities (fhem.pl:16426/2018-03-17 perl:5.024001 os:linux user:fhem pid:498)
Creating socket: Invalid argument
2018.03.19 12:48:28 5: XiaomiBTLESens (Wz_Palme) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:65:C4:46 --char-read -a 0x38 2>&1 /dev/null and loop 0
2018.03.19 12:48:30 5: XiaomiBTLESens (Wz_Palme) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,63 27 33 2e 31 2e 38

2018.03.19 12:48:30 4: XiaomiBTLESens (Wz_Palme) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,63 27 33 2e 31 2e 38
2018.03.19 12:50:19 1: PERL WARNING: Backslash found where operator expected at ./FHEM/74_XiaomiBTLESens.pm line 852, near "encode_json \"
2018.03.19 12:50:19 1: PERL WARNING: (Do you need to predeclare encode_json?)
2018.03.19 12:50:19 3: XiaomiBTLESens (Wz_Palme) - defined with BTMAC C4:7C:8D:65:C4:46
2018.03.19 12:50:19 3: XiaomiBTLESens (Wz_Palme) - set interval to 7200
2018.03.19 12:50:24 4: XiaomiBTLESens (Wz_Palme) - Run CreateParamGatttool with mod: read
2018.03.19 12:50:24 5: XiaomiBTLESens (Wz_Palme) - Read XiaomiBTLESens_ExecGatttool_Run Wz_Palme|C4:7C:8D:65:C4:46|read|0x38
2018.03.19 12:50:24 4: XiaomiBTLESens (Wz_Palme) - stateRequestTimer: Call Request Timer
2018.03.19 12:50:31 0: Server started with 117 defined entities (fhem.pl:16426/2018-03-17 perl:5.024001 os:linux user:fhem pid:1591)
2018.03.19 12:50:31 5: XiaomiBTLESens (Wz_Palme) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:65:C4:46 --char-read -a 0x38 2>&1 /dev/null and loop 0
2018.03.19 12:50:36 5: XiaomiBTLESens (Wz_Palme) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,63 27 33 2e 31 2e 38

2018.03.19 12:50:36 4: XiaomiBTLESens (Wz_Palme) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,63 27 33 2e 31 2e 38

2018.03.19 12:50:36 5: XiaomiBTLESens (Wz_Palme) - ExecGatttool_Done: gatttool return string: Wz_Palme|C4:7C:8D:65:C4:46|ok|read|0x38|HASH(0x117a2e0)
2018.03.19 12:50:36 4: XiaomiBTLESens (Wz_Palme) - ExecGatttool_Done: JSON error while request: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "HASH(0x117a2e0)") at ./FHEM/74_XiaomiBTLESens.pm line 554.

2018.03.19 12:50:36 4: XiaomiBTLESens (Wz_Palme) - ProcessingNotification
2018.03.19 12:50:36 4: XiaomiBTLESens (Wz_Palme) - ProcessingNotification: handle 0x38
2018.03.19 12:50:36 4: XiaomiBTLESens (Wz_Palme) - FlowerSens Handle0x38
2018.03.19 12:50:36 1: PERL WARNING: Use of uninitialized value $notification in split at ./FHEM/74_XiaomiBTLESens.pm line 655.
2018.03.19 12:50:36 3: eval: {XiaomiBTLESens_ExecGatttool_Done('Wz_Palme|C4:7C:8D:65:C4:46|ok|read|0x38|HASH(0x117a2e0)')}
2018.03.19 12:50:36 1: PERL WARNING: Use of uninitialized value $dataBatFw[0] in concatenation (.) or string at ./FHEM/74_XiaomiBTLESens.pm line 657.
2018.03.19 12:50:36 3: eval: {XiaomiBTLESens_ExecGatttool_Done('Wz_Palme|C4:7C:8D:65:C4:46|ok|read|0x38|HASH(0x117a2e0)')}
2018.03.19 12:50:36 1: PERL WARNING: Use of uninitialized value $dataBatFw[0] in concatenation (.) or string at ./FHEM/74_XiaomiBTLESens.pm line 658.
2018.03.19 12:50:36 3: eval: {XiaomiBTLESens_ExecGatttool_Done('Wz_Palme|C4:7C:8D:65:C4:46|ok|read|0x38|HASH(0x117a2e0)')}
2018.03.19 12:50:36 1: PERL WARNING: Use of uninitialized value $dataBatFw[2] in subtraction (-) at ./FHEM/74_XiaomiBTLESens.pm line 659.
2018.03.19 12:50:36 3: eval: {XiaomiBTLESens_ExecGatttool_Done('Wz_Palme|C4:7C:8D:65:C4:46|ok|read|0x38|HASH(0x117a2e0)')}
2018.03.19 12:50:36 1: PERL WARNING: Use of uninitialized value $dataBatFw[4] in subtraction (-) at ./FHEM/74_XiaomiBTLESens.pm line 659.
2018.03.19 12:50:36 3: eval: {XiaomiBTLESens_ExecGatttool_Done('Wz_Palme|C4:7C:8D:65:C4:46|ok|read|0x38|HASH(0x117a2e0)')}
2018.03.19 12:50:36 1: PERL WARNING: Use of uninitialized value $dataBatFw[6] in subtraction (-) at ./FHEM/74_XiaomiBTLESens.pm line 659.
2018.03.19 12:50:36 3: eval: {XiaomiBTLESens_ExecGatttool_Done('Wz_Palme|C4:7C:8D:65:C4:46|ok|read|0x38|HASH(0x117a2e0)')}
2018.03.19 12:50:36 4: XiaomiBTLESens (Wz_Palme) - WriteReadings: Readings were written
2018.03.19 12:50:36 4: XiaomiBTLESens (Wz_Palme) - Run CreateParamGatttool with mod: write
2018.03.19 12:50:36 5: XiaomiBTLESens (Wz_Palme) - Write XiaomiBTLESens_ExecGatttool_Run Wz_Palme|C4:7C:8D:65:C4:46|write|0x33|A01F
2018.03.19 12:50:36 5: XiaomiBTLESens (Wz_Palme) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:65:C4:46 --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 0
2018.03.19 12:50:36 5: XiaomiBTLESens (Wz_Palme) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.03.19 12:50:36 4: XiaomiBTLESens (Wz_Palme) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.03.19 12:50:36 5: XiaomiBTLESens (Wz_Palme) - ExecGatttool_Done: gatttool return string: Wz_Palme|C4:7C:8D:65:C4:46|ok|write|0x33|HASH(0x117a2e0)
2018.03.19 12:50:36 4: XiaomiBTLESens (Wz_Palme) - ExecGatttool_Done: JSON error while request: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "HASH(0x117a2e0)") at ./FHEM/74_XiaomiBTLESens.pm line 554.

2018.03.19 12:50:36 4: XiaomiBTLESens (Wz_Palme) - Run CreateParamGatttool with mod: read
2018.03.19 12:50:36 5: XiaomiBTLESens (Wz_Palme) - Read XiaomiBTLESens_ExecGatttool_Run Wz_Palme|C4:7C:8D:65:C4:46|read|0x35
2018.03.19 12:50:36 5: XiaomiBTLESens (Wz_Palme) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:65:C4:46 --char-read -a 0x35 2>&1 /dev/null and loop 0
2018.03.19 12:50:36 5: XiaomiBTLESens (Wz_Palme) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,b0 00 00 ee 00 00 00 10 8a 00 02 3c 00 fb 34 9b

2018.03.19 12:50:36 4: XiaomiBTLESens (Wz_Palme) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,b0 00 00 ee 00 00 00 10 8a 00 02 3c 00 fb 34 9b

2018.03.19 12:50:36 5: XiaomiBTLESens (Wz_Palme) - ExecGatttool_Done: gatttool return string: Wz_Palme|C4:7C:8D:65:C4:46|ok|read|0x35|HASH(0x117a2e0)
2018.03.19 12:50:36 4: XiaomiBTLESens (Wz_Palme) - ExecGatttool_Done: JSON error while request: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "HASH(0x117a2e0)") at ./FHEM/74_XiaomiBTLESens.pm line 554.

2018.03.19 12:50:36 4: XiaomiBTLESens (Wz_Palme) - ProcessingNotification
2018.03.19 12:50:36 4: XiaomiBTLESens (Wz_Palme) - ProcessingNotification: handle 0x35
2018.03.19 12:50:36 4: XiaomiBTLESens (Wz_Palme) - FlowerSens Handle0x35
2018.03.19 12:50:36 1: PERL WARNING: Use of uninitialized value $notification in split at ./FHEM/74_XiaomiBTLESens.pm line 676.
2018.03.19 12:50:36 3: eval: {XiaomiBTLESens_ExecGatttool_Done('Wz_Palme|C4:7C:8D:65:C4:46|ok|read|0x35|HASH(0x117a2e0)')}
2018.03.19 12:50:36 1: PERL WARNING: Use of uninitialized value $dataSensor[0] in string ne at ./FHEM/74_XiaomiBTLESens.pm line 679.
2018.03.19 12:50:36 3: eval: {XiaomiBTLESens_ExecGatttool_Done('Wz_Palme|C4:7C:8D:65:C4:46|ok|read|0x35|HASH(0x117a2e0)')}
2018.03.19 12:50:36 1: PERL WARNING: Use of uninitialized value $dataSensor[1] in string ne at ./FHEM/74_XiaomiBTLESens.pm line 679.
2018.03.19 12:50:36 3: eval: {XiaomiBTLESens_ExecGatttool_Done('Wz_Palme|C4:7C:8D:65:C4:46|ok|read|0x35|HASH(0x117a2e0)')}
2018.03.19 12:50:36 1: PERL WARNING: Use of uninitialized value $dataSensor[2] in string ne at ./FHEM/74_XiaomiBTLESens.pm line 679.
2018.03.19 12:50:36 3: eval: {XiaomiBTLESens_ExecGatttool_Done('Wz_Palme|C4:7C:8D:65:C4:46|ok|read|0x35|HASH(0x117a2e0)')}
2018.03.19 12:50:36 1: PERL WARNING: Use of uninitialized value $dataSensor[3] in string ne at ./FHEM/74_XiaomiBTLESens.pm line 679.
2018.03.19 12:50:36 3: eval: {XiaomiBTLESens_ExecGatttool_Done('Wz_Palme|C4:7C:8D:65:C4:46|ok|read|0x35|HASH(0x117a2e0)')}
2018.03.19 12:50:36 1: PERL WARNING: Use of uninitialized value $dataSensor[4] in string ne at ./FHEM/74_XiaomiBTLESens.pm line 679.
2018.03.19 12:50:36 3: eval: {XiaomiBTLESens_ExecGatttool_Done('Wz_Palme|C4:7C:8D:65:C4:46|ok|read|0x35|HASH(0x117a2e0)')}
2018.03.19 12:50:36 1: PERL WARNING: Use of uninitialized value $dataSensor[5] in string ne at ./FHEM/74_XiaomiBTLESens.pm line 679.
2018.03.19 12:50:36 3: eval: {XiaomiBTLESens_ExecGatttool_Done('Wz_Palme|C4:7C:8D:65:C4:46|ok|read|0x35|HASH(0x117a2e0)')}
2018.03.19 12:50:36 1: PERL WARNING: Use of uninitialized value $dataSensor[1] in string eq at ./FHEM/74_XiaomiBTLESens.pm line 682.
2018.03.19 12:50:36 3: eval: {XiaomiBTLESens_ExecGatttool_Done('Wz_Palme|C4:7C:8D:65:C4:46|ok|read|0x35|HASH(0x117a2e0)')}
2018.03.19 12:50:36 1: PERL WARNING: Use of uninitialized value $dataSensor[1] in concatenation (.) or string at ./FHEM/74_XiaomiBTLESens.pm line 685.
2018.03.19 12:50:36 3: eval: {XiaomiBTLESens_ExecGatttool_Done('Wz_Palme|C4:7C:8D:65:C4:46|ok|read|0x35|HASH(0x117a2e0)')}
2018.03.19 12:50:36 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/74_XiaomiBTLESens.pm line 685.
2018.03.19 12:50:36 3: eval: {XiaomiBTLESens_ExecGatttool_Done('Wz_Palme|C4:7C:8D:65:C4:46|ok|read|0x35|HASH(0x117a2e0)')}
2018.03.19 12:50:36 1: PERL WARNING: Use of uninitialized value $dataSensor[4] in concatenation (.) or string at ./FHEM/74_XiaomiBTLESens.pm line 688.
2018.03.19 12:50:36 3: eval: {XiaomiBTLESens_ExecGatttool_Done('Wz_Palme|C4:7C:8D:65:C4:46|ok|read|0x35|HASH(0x117a2e0)')}
2018.03.19 12:50:36 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/74_XiaomiBTLESens.pm line 688.
2018.03.19 12:50:36 3: eval: {XiaomiBTLESens_ExecGatttool_Done('Wz_Palme|C4:7C:8D:65:C4:46|ok|read|0x35|HASH(0x117a2e0)')}
2018.03.19 12:50:36 1: PERL WARNING: Use of uninitialized value $dataSensor[7] in concatenation (.) or string at ./FHEM/74_XiaomiBTLESens.pm line 689.
2018.03.19 12:50:36 3: eval: {XiaomiBTLESens_ExecGatttool_Done('Wz_Palme|C4:7C:8D:65:C4:46|ok|read|0x35|HASH(0x117a2e0)')}
2018.03.19 12:50:36 1: PERL WARNING: Use of uninitialized value $dataSensor[9] in concatenation (.) or string at ./FHEM/74_XiaomiBTLESens.pm line 690.
2018.03.19 12:50:36 3: eval: {XiaomiBTLESens_ExecGatttool_Done('Wz_Palme|C4:7C:8D:65:C4:46|ok|read|0x35|HASH(0x117a2e0)')}
2018.03.19 12:50:36 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/74_XiaomiBTLESens.pm line 690.
2018.03.19 12:50:36 3: eval: {XiaomiBTLESens_ExecGatttool_Done('Wz_Palme|C4:7C:8D:65:C4:46|ok|read|0x35|HASH(0x117a2e0)')}
2018.03.19 12:50:36 4: XiaomiBTLESens (Wz_Palme) - WriteReadings: Readings were written
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 19 März 2018, 13:24:50
Ich habe da was gefunden. Genau wie ich es mir dacht.
Könnt Ihr mir sagen welche Perlversion Ihr habt?



Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: HeikoS am 19 März 2018, 13:31:05
This is perl 5, version 24, subversion 1 (v5.24.1) built for arm-linux-gnueabihf-thread-multi-64int
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 19 März 2018, 13:36:47
Verstehe ich nicht. ist bei mir genau die selbe Perlversion.

Habe in meinem Git im master branch eine neue Version. Kannst Du die mal bitte testen?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: HeikoS am 19 März 2018, 13:45:16
Klappt perfekt. Vielen Dank.
Internals:
   BTMAC      C4:7C:8D:65:C4:46
   DEF        C4:7C:8D:65:C4:46
   INTERVAL   7200
   NAME       Wz_Palme
   NOTIFYDEV  global,Wz_Palme
   NR         22
   NTFY_ORDER 50-Wz_Palme
   STATE      active
   TYPE       XiaomiBTLESens
   VERSION    2.0.11
   loglevel   4
   READINGS:
     2018-03-19 13:42:37   battery         ok
     2018-03-19 13:42:37   batteryLevel    99
     2018-03-19 13:43:08   fertility       135
     2018-03-19 13:42:37   firmware        3.1.8
     2018-03-04 03:52:09   lastGattError   charWrite faild
     2018-03-19 13:43:08   lux             285
     2018-03-19 13:43:08   moisture        16
     2018-03-19 13:43:08   state           active
     2018-03-19 13:43:08   temperature     17.7
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1521463357.96292
     updateTimestampCallBattery 2018-03-19 13:42:37
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 19 März 2018, 13:53:57
super. checke ich ein. Kommt morgen per fhem Update
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Loki am 30 März 2018, 13:07:44
Hallo,
ich bekomme leider von meinen beiden Sensoren folgenden Fehler:
2018.03.30 12:59:20 1 : Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 25562
2018-03-30 12:59:20 XiaomiBTLESens Drakena unreachable
2018-03-30 12:59:20 XiaomiBTLESens Drakena lastGattError: The BlockingCall Process terminated unexpectedly. Timedout
2018-03-30 12:59:20 XiaomiBTLESens Drakena error


2018-03-30 13:00:25 XiaomiBTLESens Gummibaum read sensor data
2018-03-30 13:00:25 XiaomiBTLESens Gummibaum lastGattError: Invalid argument (22)
2018-03-30 13:00:25 XiaomiBTLESens Gummibaum error


Bis zur letzten Woche liefen sie eigentlich noch. Allerdings auch mit dem alten Modul...

Hier die Devices:
Internals:
   BTMAC      C4:7C:8D:66:16:30
   CFGFN     
   DEF        C4:7C:8D:66:16:30
   INTERVAL   300
   NAME       Drakena
   NOTIFYDEV  global,Drakena
   NR         44811
   NTFY_ORDER 50-Drakena
   STATE      error
   TYPE       XiaomiBTLESens
   VERSION    2.0.12
   loglevel   4
   READINGS:
     2018-03-30 13:05:16   lastGattError   The BlockingCall Process terminated unexpectedly. Timedout
     2018-03-30 13:05:16   state           error
   helper:
     CallBattery 0
     CallSensDataCounter 0
Attributes:
   model      flowerSens
   room       XiaomiBTLESens


Internals:
   BTMAC      C4:7C:8D:62:42:6F
   CFGFN     
   DEF        C4:7C:8D:62:42:6F
   INTERVAL   300
   NAME       Gummibaum
   NOTIFYDEV  global,Gummibaum
   NR         43149
   NTFY_ORDER 50-Gummibaum
   STATE      error
   TYPE       XiaomiBTLESens
   VERSION    2.0.12
   loglevel   4
   READINGS:
     2018-03-30 13:06:48   lastGattError   Invalid argument (22)
     2018-03-30 13:06:48   state           error
   helper:
     CallBattery 0
     CallSensDataCounter 0
Attributes:
   model      flowerSens
   room       XiaomiBTLESens
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 30 März 2018, 13:22:50
Da brauche ich ein verbose 5
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Loki am 30 März 2018, 20:25:19
2018.03.30 20:19:20 4: XiaomiBTLESens (Drakena) - Run CreateParamGatttool with mod: read
2018.03.30 20:19:20 5: XiaomiBTLESens (Drakena) - Read XiaomiBTLESens_ExecGatttool_Run Drakena|C4:7C:8D:66:16:30|read|0x38
2018.03.30 20:19:20 4: XiaomiBTLESens (Drakena) - stateRequestTimer: Call Request Timer
2018.03.30 20:19:21 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:16:30 --char-read -a 0x38 2>&1 /dev/null and loop 0
2018.03.30 20:20:01 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)

2018.03.30 20:20:01 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:16:30 --char-read -a 0x38 2>&1 /dev/null and loop 1
2018.03.30 20:20:01 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.03.30 20:20:01 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:16:30 --char-read -a 0x38 2>&1 /dev/null and loop 2
2018.03.30 20:20:41 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)

2018.03.30 20:20:41 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:16:30 --char-read -a 0x38 2>&1 /dev/null and loop 3
2018.03.30 20:20:42 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.03.30 20:20:42 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:16:30 --char-read -a 0x38 2>&1 /dev/null and loop 4
2018.03.30 20:20:43 4: XiaomiBTLESens (Drakena) - Run CreateParamGatttool with mod: read
2018.03.30 20:20:43 5: XiaomiBTLESens (Drakena) - Read XiaomiBTLESens_ExecGatttool_Run Drakena|C4:7C:8D:66:16:30|read|0x38
2018.03.30 20:20:43 4: XiaomiBTLESens (Drakena) - stateRequestTimer: Call Request Timer
2018.03.30 20:20:50 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 4163
2018.03.30 20:20:50 4: XiaomiBTLESens (Drakena) - WriteReadings: Readings were written
2018.03.30 20:20:50 4: XiaomiBTLESens (Drakena) - ExecGatttool_Aborted: The BlockingCall Process terminated unexpectedly. Timedout
2018.03.30 20:21:44 4: XiaomiBTLESens (Gummibaum) - Run CreateParamGatttool with mod: read
2018.03.30 20:21:44 5: XiaomiBTLESens (Gummibaum) - Read XiaomiBTLESens_ExecGatttool_Run Gummibaum|C4:7C:8D:62:42:6F|read|0x38
2018.03.30 20:21:44 4: XiaomiBTLESens (Gummibaum) - stateRequestTimer: Call Request Timer
2018.03.30 20:21:44 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 0
2018.03.30 20:21:44 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.03.30 20:21:44 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 1
2018.03.30 20:21:44 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.03.30 20:21:44 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 2
2018.03.30 20:21:44 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.03.30 20:21:44 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 3
2018.03.30 20:21:44 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.03.30 20:21:44 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 4
2018.03.30 20:21:44 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.03.30 20:21:44 4: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool result connect error,Invalid argument (22)

2018.03.30 20:21:44 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Done: gatttool return string: Gummibaum|C4:7C:8D:62:42:6F|error|read|0x38|{"gtResult":"Invalid argument (22)"}
2018.03.30 20:21:44 4: XiaomiBTLESens (Gummibaum) - ProcessingErrors
2018.03.30 20:21:44 4: XiaomiBTLESens (Gummibaum) - WriteReadings: Readings were written
2018.03.30 20:22:45 4: XiaomiBTLESens (Gummibaum) - Run CreateParamGatttool with mod: read
2018.03.30 20:22:45 5: XiaomiBTLESens (Gummibaum) - Read XiaomiBTLESens_ExecGatttool_Run Gummibaum|C4:7C:8D:62:42:6F|read|0x38
2018.03.30 20:22:45 4: XiaomiBTLESens (Gummibaum) - stateRequestTimer: Call Request Timer
2018.03.30 20:22:45 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 0
2018.03.30 20:22:45 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.03.30 20:22:45 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 1
2018.03.30 20:22:45 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.03.30 20:22:45 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 2
2018.03.30 20:22:45 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.03.30 20:22:45 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 3
2018.03.30 20:22:45 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.03.30 20:22:45 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 4
2018.03.30 20:22:46 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.03.30 20:22:46 4: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool result connect error,Invalid argument (22)

2018.03.30 20:22:46 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Done: gatttool return string: Gummibaum|C4:7C:8D:62:42:6F|error|read|0x38|{"gtResult":"Invalid argument (22)"}
2018.03.30 20:22:46 4: XiaomiBTLESens (Gummibaum) - ProcessingErrors
2018.03.30 20:22:46 4: XiaomiBTLESens (Gummibaum) - WriteReadings: Readings were written
2018.03.30 20:24:45 4: XiaomiBTLESens (Drakena) - Run CreateParamGatttool with mod: read
2018.03.30 20:24:46 5: XiaomiBTLESens (Drakena) - Read XiaomiBTLESens_ExecGatttool_Run Drakena|C4:7C:8D:66:16:30|read|0x38
2018.03.30 20:24:46 4: XiaomiBTLESens (Drakena) - stateRequestTimer: Call Request Timer
2018.03.30 20:24:46 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:16:30 --char-read -a 0x38 2>&1 /dev/null and loop 0
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 30 März 2018, 20:39:34
Kannst Du Mal bitte den BT Stack zurück setzen? Also entweder über systemd oder Pi neustarten.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Loki am 30 März 2018, 21:08:27
hab den Raspi neu gestartet, einmal hat der Drakena-Sensor etwas gelesen, dann wieder Error:

2018.03.30 20:49:20 4: XiaomiBTLESens (Gummibaum) - Run CreateParamGatttool with mod: read
2018.03.30 20:49:20 5: XiaomiBTLESens (Gummibaum) - Read XiaomiBTLESens_ExecGatttool_Run Gummibaum|C4:7C:8D:62:42:6F|read|0x38
2018.03.30 20:49:20 4: XiaomiBTLESens (Gummibaum) - stateRequestTimer: Call Request Timer
2018.03.30 20:49:20 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 0
2018.03.30 20:49:47 4: XiaomiBTLESens (Drakena) - Run CreateParamGatttool with mod: write
2018.03.30 20:49:47 5: XiaomiBTLESens (Drakena) - Write XiaomiBTLESens_ExecGatttool_Run Drakena|C4:7C:8D:66:16:30|write|0x33|A01F
2018.03.30 20:49:47 4: XiaomiBTLESens (Drakena) - stateRequestTimer: Call Request Timer
2018.03.30 20:49:47 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:16:30 --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 0
2018.03.30 20:49:51 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.03.30 20:49:51 4: XiaomiBTLESens (Drakena) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.03.30 20:49:51 5: XiaomiBTLESens (Drakena) - ExecGatttool_Done: gatttool return string: Drakena|C4:7C:8D:66:16:30|ok|write|0x33|{"gtResult":"no data response"}
2018.03.30 20:49:51 4: XiaomiBTLESens (Drakena) - Run CreateParamGatttool with mod: read
2018.03.30 20:49:51 5: XiaomiBTLESens (Drakena) - Read XiaomiBTLESens_ExecGatttool_Run Drakena|C4:7C:8D:66:16:30|read|0x35
2018.03.30 20:49:51 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:16:30 --char-read -a 0x35 2>&1 /dev/null and loop 0
2018.03.30 20:49:51 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,d1 00 00 97 00 00 00 0e 7f 00 02 3c 00 fb 34 9b

2018.03.30 20:49:51 4: XiaomiBTLESens (Drakena) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,d1 00 00 97 00 00 00 0e 7f 00 02 3c 00 fb 34 9b

2018.03.30 20:49:51 5: XiaomiBTLESens (Drakena) - ExecGatttool_Done: gatttool return string: Drakena|C4:7C:8D:66:16:30|ok|read|0x35|{"gtResult":"d1 00 00 97 00 00 00 0e 7f 00 02 3c 00 fb 34 9b "}
2018.03.30 20:49:51 4: XiaomiBTLESens (Drakena) - ProcessingNotification
2018.03.30 20:49:51 4: XiaomiBTLESens (Drakena) - ProcessingNotification: handle 0x35
2018.03.30 20:49:51 4: XiaomiBTLESens (Drakena) - FlowerSens Handle0x35
2018.03.30 20:49:51 4: XiaomiBTLESens (Drakena) - WriteReadings: Readings were written
2018.03.30 20:50:01 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)

2018.03.30 20:50:01 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 1
2018.03.30 20:50:01 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.03.30 20:50:01 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 2
2018.03.30 20:50:01 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.03.30 20:50:01 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 3
2018.03.30 20:50:01 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.03.30 20:50:01 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 4
2018.03.30 20:50:01 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.03.30 20:50:01 4: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool result connect error,Invalid argument (22)

2018.03.30 20:50:01 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Done: gatttool return string: Gummibaum|C4:7C:8D:62:42:6F|error|read|0x38|{"gtResult":"Invalid argument (22)"}
2018.03.30 20:50:01 4: XiaomiBTLESens (Gummibaum) - ProcessingErrors
2018.03.30 20:50:01 4: XiaomiBTLESens (Gummibaum) - WriteReadings: Readings were written
2018.03.30 20:55:25 4: XiaomiBTLESens (Gummibaum) - Run CreateParamGatttool with mod: read
2018.03.30 20:55:25 5: XiaomiBTLESens (Gummibaum) - Read XiaomiBTLESens_ExecGatttool_Run Gummibaum|C4:7C:8D:62:42:6F|read|0x38
2018.03.30 20:55:25 4: XiaomiBTLESens (Gummibaum) - stateRequestTimer: Call Request Timer
2018.03.30 20:55:26 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 0
2018.03.30 20:55:26 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.03.30 20:55:26 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 1
2018.03.30 20:55:26 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.03.30 20:55:26 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 2
2018.03.30 20:55:26 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.03.30 20:55:26 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 3
2018.03.30 20:55:26 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.03.30 20:55:26 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 4
2018.03.30 20:55:26 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.03.30 20:55:26 4: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool result connect error,Invalid argument (22)

2018.03.30 20:55:26 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Done: gatttool return string: Gummibaum|C4:7C:8D:62:42:6F|error|read|0x38|{"gtResult":"Invalid argument (22)"}
2018.03.30 20:55:26 4: XiaomiBTLESens (Gummibaum) - ProcessingErrors
2018.03.30 20:55:26 4: XiaomiBTLESens (Gummibaum) - WriteReadings: Readings were written
2018.03.30 20:55:54 4: XiaomiBTLESens (Drakena) - Run CreateParamGatttool with mod: write
2018.03.30 20:55:54 5: XiaomiBTLESens (Drakena) - Write XiaomiBTLESens_ExecGatttool_Run Drakena|C4:7C:8D:66:16:30|write|0x33|A01F
2018.03.30 20:55:54 4: XiaomiBTLESens (Drakena) - stateRequestTimer: Call Request Timer
2018.03.30 20:55:55 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:16:30 --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 0
2018.03.30 20:56:35 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)

2018.03.30 20:56:35 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:16:30 --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 1
2018.03.30 20:56:35 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.03.30 20:56:35 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:16:30 --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 2
2018.03.30 20:57:15 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)

2018.03.30 20:57:15 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:16:30 --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 3
2018.03.30 20:57:15 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.03.30 20:57:15 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:16:30 --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 4
2018.03.30 20:57:24 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 1297
2018.03.30 20:57:24 4: XiaomiBTLESens (Drakena) - WriteReadings: Readings were written
2018.03.30 20:57:24 4: XiaomiBTLESens (Drakena) - ExecGatttool_Aborted: The BlockingCall Process terminated unexpectedly. Timedout
2018.03.30 21:01:53 4: XiaomiBTLESens (Gummibaum) - Run CreateParamGatttool with mod: read
2018.03.30 21:01:53 5: XiaomiBTLESens (Gummibaum) - Read XiaomiBTLESens_ExecGatttool_Run Gummibaum|C4:7C:8D:62:42:6F|read|0x38
2018.03.30 21:01:53 4: XiaomiBTLESens (Gummibaum) - stateRequestTimer: Call Request Timer
2018.03.30 21:01:54 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 0
2018.03.30 21:01:54 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.03.30 21:01:54 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 1
2018.03.30 21:01:54 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.03.30 21:01:54 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 2
2018.03.30 21:01:54 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.03.30 21:01:54 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 3
2018.03.30 21:01:54 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.03.30 21:01:54 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 4
2018.03.30 21:01:54 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.03.30 21:01:54 4: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool result connect error,Invalid argument (22)

2018.03.30 21:01:54 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Done: gatttool return string: Gummibaum|C4:7C:8D:62:42:6F|error|read|0x38|{"gtResult":"Invalid argument (22)"}
2018.03.30 21:01:54 4: XiaomiBTLESens (Gummibaum) - ProcessingErrors
2018.03.30 21:01:54 4: XiaomiBTLESens (Gummibaum) - WriteReadings: Readings were written
2018.03.30 21:02:21 4: XiaomiBTLESens (Drakena) - Run CreateParamGatttool with mod: write
2018.03.30 21:02:21 5: XiaomiBTLESens (Drakena) - Write XiaomiBTLESens_ExecGatttool_Run Drakena|C4:7C:8D:66:16:30|write|0x33|A01F
2018.03.30 21:02:21 4: XiaomiBTLESens (Drakena) - stateRequestTimer: Call Request Timer
2018.03.30 21:02:22 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:16:30 --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 0
2018.03.30 21:03:02 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)

2018.03.30 21:03:02 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:16:30 --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 1
2018.03.30 21:03:02 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.03.30 21:03:02 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:16:30 --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 2
2018.03.30 21:03:42 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)

2018.03.30 21:03:42 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:16:30 --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 3
2018.03.30 21:03:42 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.03.30 21:03:42 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:16:30 --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 4
2018.03.30 21:03:51 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 1774
2018.03.30 21:03:51 4: XiaomiBTLESens (Drakena) - WriteReadings: Readings were written
2018.03.30 21:03:51 4: XiaomiBTLESens (Drakena) - ExecGatttool_Aborted: The BlockingCall Process terminated unexpectedly. Timedout


Evtl noch ein Hinweis - es ist ein neuer Raspi 3B+
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 30 März 2018, 21:15:37
Also nicht die selbe Hardware unter der das alte Modul ohne Probleme lief? Hast Du irgendwas verändert bei der Installation oder einfach nur Raspi drauf und FHEM?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Fede am 30 März 2018, 21:18:14
Mit neu Raspberry pi3+  bluetooth nicht stabil. Viele probleme auch fur mich.  Ensculdige fur schlechte Deutsch.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 30 März 2018, 21:22:29
https://m.youtube.com/watch?t=378s&v=izxQ8bpeEvE

Ich glaube der Kollege nimmt einen 3+
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Fede am 30 März 2018, 21:36:41
In crontab 10min sudo hciconfig hci0 down/up. Ein bischen  gut
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Loki am 30 März 2018, 21:58:09
ich habe ein bisschen was getestet, kann aber nicht viel damit anfangen:
pi@fhem:~ $ hcitool scan
Scanning ...
pi@fhem:~ $ sudo bluetoothctl
[NEW] Controller B8:27:EB:A7:8C:6F fhem [default]
[NEW] Device C4:7C:8D:66:16:30 Flower care
[NEW] Device C4:7C:8D:66:1B:42 Flower care
[bluetooth]# devices
Device C4:7C:8D:66:16:30 Flower care
Device C4:7C:8D:66:1B:42 Flower care
[bluetooth]# scan on
Discovery started
[CHG] Controller B8:27:EB:A7:8C:6F Discovering: yes
[NEW] Device 68:EF:07:64:07:51 68-EF-07-64-07-51
[NEW] Device 7D:B0:06:0B:94:CB 7D-B0-06-0B-94-CB
[NEW] Device DB:FE:22:C4:B7:42 Eve Energy 9694
[CHG] Device C4:7C:8D:66:16:30 RSSI: -76
[CHG] Device C4:7C:8D:66:16:30 ServiceData Key: 0000fe95-0000-1000-8000-00805f9b34fb
[CHG] Device C4:7C:8D:66:16:30 ServiceData Value: 0x71
[CHG] Device C4:7C:8D:66:16:30 ServiceData Value: 0x20
[CHG] Device C4:7C:8D:66:16:30 ServiceData Value: 0x98
...


Interessant finde ich die letzten log Einträge vom Service:
pi@fhem:~ $ systemctl status bluetooth
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2018-03-30 20:43:52 CEST; 1h 7min ago
     Docs: man:bluetoothd(8)
Main PID: 480 (bluetoothd)
   Status: "Running"
   CGroup: /system.slice/bluetooth.service
           └─480 /usr/lib/bluetooth/bluetoothd

Mär 30 20:43:52 fhem systemd[1]: Starting Bluetooth service...
Mär 30 20:43:52 fhem bluetoothd[480]: Bluetooth daemon 5.43
Mär 30 20:43:52 fhem systemd[1]: Started Bluetooth service.
Mär 30 20:43:52 fhem bluetoothd[480]: Starting SDP server
Mär 30 20:43:52 fhem bluetoothd[480]: Bluetooth management interface 1.14 initialized
[color=red][b]Mär 30 20:43:52 fhem bluetoothd[480]: Failed to obtain handles for "Service Changed" characteristic
Mär 30 20:43:52 fhem bluetoothd[480]: Sap driver initialization failed.
Mär 30 20:43:52 fhem bluetoothd[480]: sap-server: Operation not permitted[/b][/color] (1)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 30 März 2018, 22:02:35
Zitat von: Fede am 30 März 2018, 21:36:41
In crontab 10min sudo hciconfig hci0 down/up. Ein bischen  gut

Hast du das mal getestet?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Fede am 30 März 2018, 22:05:29
Jetz 4 stunde und geth weiter
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Loki am 30 März 2018, 22:26:04
Zitat von: Fede am 30 März 2018, 21:36:41
In crontab 10min sudo hciconfig hci0 down/up. Ein bischen  gut

wie meinst du das genau?

so etwa?
*/10 * * * * sudo hciconfig hci0 down/up
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Fede am 30 März 2018, 22:29:28

*/10 * * * * sudo hciconfig hci0 down ; sleep 1 ; sudo hciconfig hci0 up
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Loki am 30 März 2018, 23:13:36
2018.03.30 22:56:34 4: XiaomiBTLESens (Drakena) - Run CreateParamGatttool with mod: write
2018.03.30 22:56:34 5: XiaomiBTLESens (Drakena) - Write XiaomiBTLESens_ExecGatttool_Run Drakena|C4:7C:8D:66:16:30|write|0x33|A01F
2018.03.30 22:56:34 4: XiaomiBTLESens (Drakena) - stateRequestTimer: Call Request Timer
2018.03.30 22:56:34 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:16:30 --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 0
2018.03.30 22:56:34 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: gatttool loop result connect,No route to host (113)

2018.03.30 22:56:34 4: XiaomiBTLESens (Drakena) - ExecGatttool_Run: gatttool result connect,No route to host (113)

2018.03.30 22:56:34 5: XiaomiBTLESens (Drakena) - ExecGatttool_Done: gatttool return string: Drakena|C4:7C:8D:66:16:30|ok|write|0x33|{"gtResult":"No route to host (113)"}
2018.03.30 22:56:34 4: XiaomiBTLESens (Drakena) - Run CreateParamGatttool with mod: read
2018.03.30 22:56:34 5: XiaomiBTLESens (Drakena) - Read XiaomiBTLESens_ExecGatttool_Run Drakena|C4:7C:8D:66:16:30|read|0x35
2018.03.30 22:56:34 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:16:30 --char-read -a 0x35 2>&1 /dev/null and loop 0
2018.03.30 22:56:34 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: gatttool loop result connect,No route to host (113)

2018.03.30 22:56:34 4: XiaomiBTLESens (Drakena) - ExecGatttool_Run: gatttool result connect,No route to host (113)

2018.03.30 22:56:34 5: XiaomiBTLESens (Drakena) - ExecGatttool_Done: gatttool return string: Drakena|C4:7C:8D:66:16:30|error|read|0x35|{"gtResult":"No route to host (113)"}
2018.03.30 22:56:34 4: XiaomiBTLESens (Drakena) - ProcessingErrors
2018.03.30 22:56:34 4: XiaomiBTLESens (Drakena) - WriteReadings: Readings were written
2018.03.30 22:59:36 4: XiaomiBTLESens (Gummibaum) - Run CreateParamGatttool with mod: read
2018.03.30 22:59:36 5: XiaomiBTLESens (Gummibaum) - Read XiaomiBTLESens_ExecGatttool_Run Gummibaum|C4:7C:8D:62:42:6F|read|0x38
2018.03.30 22:59:36 4: XiaomiBTLESens (Gummibaum) - stateRequestTimer: Call Request Timer
2018.03.30 22:59:36 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 0
2018.03.30 22:59:36 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool loop result connect,No route to host (113)

2018.03.30 22:59:36 4: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool result connect,No route to host (113)

2018.03.30 22:59:36 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Done: gatttool return string: Gummibaum|C4:7C:8D:62:42:6F|error|read|0x38|{"gtResult":"No route to host (113)"}
2018.03.30 22:59:36 4: XiaomiBTLESens (Gummibaum) - ProcessingErrors
2018.03.30 22:59:36 4: XiaomiBTLESens (Gummibaum) - WriteReadings: Readings were written
2018.03.30 23:01:57 4: XiaomiBTLESens (Drakena) - Run CreateParamGatttool with mod: write
2018.03.30 23:01:57 5: XiaomiBTLESens (Drakena) - Write XiaomiBTLESens_ExecGatttool_Run Drakena|C4:7C:8D:66:16:30|write|0x33|A01F
2018.03.30 23:01:57 4: XiaomiBTLESens (Drakena) - stateRequestTimer: Call Request Timer
2018.03.30 23:01:57 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:16:30 --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 0
2018.03.30 23:01:57 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: gatttool loop result connect,No route to host (113)

2018.03.30 23:01:57 4: XiaomiBTLESens (Drakena) - ExecGatttool_Run: gatttool result connect,No route to host (113)

2018.03.30 23:01:57 5: XiaomiBTLESens (Drakena) - ExecGatttool_Done: gatttool return string: Drakena|C4:7C:8D:66:16:30|ok|write|0x33|{"gtResult":"No route to host (113)"}
2018.03.30 23:01:57 4: XiaomiBTLESens (Drakena) - Run CreateParamGatttool with mod: read
2018.03.30 23:01:57 5: XiaomiBTLESens (Drakena) - Read XiaomiBTLESens_ExecGatttool_Run Drakena|C4:7C:8D:66:16:30|read|0x35
2018.03.30 23:01:57 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:16:30 --char-read -a 0x35 2>&1 /dev/null and loop 0
2018.03.30 23:01:57 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: gatttool loop result connect,No route to host (113)

2018.03.30 23:01:57 4: XiaomiBTLESens (Drakena) - ExecGatttool_Run: gatttool result connect,No route to host (113)

2018.03.30 23:01:57 5: XiaomiBTLESens (Drakena) - ExecGatttool_Done: gatttool return string: Drakena|C4:7C:8D:66:16:30|error|read|0x35|{"gtResult":"No route to host (113)"}
2018.03.30 23:01:57 4: XiaomiBTLESens (Drakena) - ProcessingErrors
2018.03.30 23:01:57 4: XiaomiBTLESens (Drakena) - WriteReadings: Readings were written
2018.03.30 23:05:09 4: XiaomiBTLESens (Gummibaum) - Run CreateParamGatttool with mod: read
2018.03.30 23:05:09 5: XiaomiBTLESens (Gummibaum) - Read XiaomiBTLESens_ExecGatttool_Run Gummibaum|C4:7C:8D:62:42:6F|read|0x38
2018.03.30 23:05:09 4: XiaomiBTLESens (Gummibaum) - stateRequestTimer: Call Request Timer
2018.03.30 23:05:09 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 0
2018.03.30 23:05:09 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool loop result connect,No route to host (113)

2018.03.30 23:05:09 4: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool result connect,No route to host (113)

2018.03.30 23:05:09 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Done: gatttool return string: Gummibaum|C4:7C:8D:62:42:6F|error|read|0x38|{"gtResult":"No route to host (113)"}
2018.03.30 23:05:09 4: XiaomiBTLESens (Gummibaum) - ProcessingErrors
2018.03.30 23:05:09 4: XiaomiBTLESens (Gummibaum) - WriteReadings: Readings were written
2018.03.30 23:07:33 4: XiaomiBTLESens (Drakena) - Run CreateParamGatttool with mod: write
2018.03.30 23:07:33 5: XiaomiBTLESens (Drakena) - Write XiaomiBTLESens_ExecGatttool_Run Drakena|C4:7C:8D:66:16:30|write|0x33|A01F
2018.03.30 23:07:33 4: XiaomiBTLESens (Drakena) - stateRequestTimer: Call Request Timer
2018.03.30 23:07:33 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:16:30 --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 0
2018.03.30 23:07:33 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: gatttool loop result connect,No route to host (113)

2018.03.30 23:07:33 4: XiaomiBTLESens (Drakena) - ExecGatttool_Run: gatttool result connect,No route to host (113)

2018.03.30 23:07:33 5: XiaomiBTLESens (Drakena) - ExecGatttool_Done: gatttool return string: Drakena|C4:7C:8D:66:16:30|ok|write|0x33|{"gtResult":"No route to host (113)"}
2018.03.30 23:07:33 4: XiaomiBTLESens (Drakena) - Run CreateParamGatttool with mod: read
2018.03.30 23:07:33 5: XiaomiBTLESens (Drakena) - Read XiaomiBTLESens_ExecGatttool_Run Drakena|C4:7C:8D:66:16:30|read|0x35
2018.03.30 23:07:33 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:16:30 --char-read -a 0x35 2>&1 /dev/null and loop 0
2018.03.30 23:07:33 5: XiaomiBTLESens (Drakena) - ExecGatttool_Run: gatttool loop result connect,No route to host (113)

2018.03.30 23:07:33 4: XiaomiBTLESens (Drakena) - ExecGatttool_Run: gatttool result connect,No route to host (113)

2018.03.30 23:07:33 5: XiaomiBTLESens (Drakena) - ExecGatttool_Done: gatttool return string: Drakena|C4:7C:8D:66:16:30|error|read|0x35|{"gtResult":"No route to host (113)"}
2018.03.30 23:07:33 4: XiaomiBTLESens (Drakena) - ProcessingErrors
2018.03.30 23:07:33 4: XiaomiBTLESens (Drakena) - WriteReadings: Readings were written
2018.03.30 23:11:28 4: XiaomiBTLESens (Gummibaum) - Run CreateParamGatttool with mod: read
2018.03.30 23:11:28 5: XiaomiBTLESens (Gummibaum) - Read XiaomiBTLESens_ExecGatttool_Run Gummibaum|C4:7C:8D:62:42:6F|read|0x38
2018.03.30 23:11:28 4: XiaomiBTLESens (Gummibaum) - stateRequestTimer: Call Request Timer
2018.03.30 23:11:28 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 0
2018.03.30 23:11:28 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool loop result connect,No route to host (113)

2018.03.30 23:11:28 4: XiaomiBTLESens (Gummibaum) - ExecGatttool_Run: gatttool result connect,No route to host (113)

2018.03.30 23:11:28 5: XiaomiBTLESens (Gummibaum) - ExecGatttool_Done: gatttool return string: Gummibaum|C4:7C:8D:62:42:6F|error|read|0x38|{"gtResult":"No route to host (113)"}
2018.03.30 23:11:28 4: XiaomiBTLESens (Gummibaum) - ProcessingErrors
2018.03.30 23:11:28 4: XiaomiBTLESens (Gummibaum) - WriteReadings: Readings were written



leider alles ohne Erfolg...
der Hauptfehler scheint
"ExecGatttool_Run: gatttool result connect,No route to host (113)"
zu sein.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 31 März 2018, 07:04:38
Lösche erstmal wieder den crontab Eintrag und mache es erstmal von Hand.
Also in der Linuxkonsole eingeben

sudo hciconfig hci0  down


Und danach

sudo hciconfig hci0  up


Und dann testen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Loki am 31 März 2018, 16:49:52
Also der eine Sensor bringt nur noch ab und zu einen Fehler.

Aber der zweite will immer noch nicht.

Ich habe dann den ersten mal in FHEM abgeschaltet und den zweiten gelöscht und neu angelegt. Aber leider ohne Veränderung:
2018.03.31 16:21:47 5: XiaomiBTLESens (Gummibaum_neu) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 1
2018.03.31 16:22:27 5: XiaomiBTLESens (Gummibaum_neu) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)

2018.03.31 16:22:27 5: XiaomiBTLESens (Gummibaum_neu) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 2
2018.03.31 16:22:36 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 3455
2018.03.31 16:22:36 4: XiaomiBTLESens (Gummibaum_neu) - WriteReadings: Readings were written
2018.03.31 16:22:36 4: XiaomiBTLESens (Gummibaum_neu) - ExecGatttool_Aborted: The BlockingCall Process terminated unexpectedly. Timedout
2018.03.31 16:26:13 4: XiaomiBTLESens (Gummibaum_neu) - Run CreateParamGatttool with mod: read
2018.03.31 16:26:13 5: XiaomiBTLESens (Gummibaum_neu) - Read XiaomiBTLESens_ExecGatttool_Run Gummibaum_neu|C4:7C:8D:62:42:6F|read|0x38
2018.03.31 16:26:13 4: XiaomiBTLESens (Gummibaum_neu) - stateRequestTimer: Call Request Timer
2018.03.31 16:26:13 5: XiaomiBTLESens (Gummibaum_neu) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 0
2018.03.31 16:26:31 4: XiaomiBTLESens (Gummibaum_neu) - Run CreateParamGatttool with mod: read
2018.03.31 16:26:31 5: XiaomiBTLESens (Gummibaum_neu) - Read XiaomiBTLESens_ExecGatttool_Run Gummibaum_neu|C4:7C:8D:62:42:6F|read|0x38
2018.03.31 16:26:31 4: XiaomiBTLESens (Gummibaum_neu) - stateRequestTimer: Call Request Timer
2018.03.31 16:26:54 5: XiaomiBTLESens (Gummibaum_neu) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)

2018.03.31 16:26:54 5: XiaomiBTLESens (Gummibaum_neu) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 1
2018.03.31 16:27:19 5: XiaomiBTLESens (Gummibaum_neu) - ExecGatttool_Run: gatttool loop result connect error,Software caused connection abort (103)

2018.03.31 16:27:19 5: XiaomiBTLESens (Gummibaum_neu) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 2
2018.03.31 16:27:19 5: XiaomiBTLESens (Gummibaum_neu) - ExecGatttool_Run: gatttool loop result connect,No route to host (113)

2018.03.31 16:27:19 4: XiaomiBTLESens (Gummibaum_neu) - ExecGatttool_Run: gatttool result connect,No route to host (113)

2018.03.31 16:27:19 5: XiaomiBTLESens (Gummibaum_neu) - ExecGatttool_Done: gatttool return string: Gummibaum_neu|C4:7C:8D:62:42:6F|error|read|0x38|{"gtResult":"No route to host (113)"}
2018.03.31 16:27:19 4: XiaomiBTLESens (Gummibaum_neu) - ProcessingErrors
2018.03.31 16:27:19 4: XiaomiBTLESens (Gummibaum_neu) - WriteReadings: Readings were written
2018.03.31 16:27:56 1: Waschmaschine: Fertig - 0.37€
2018.03.31 16:28:01 1: Waschmaschine: Ausgeschaltet - 0.83 W
2018.03.31 16:31:47 4: XiaomiBTLESens (Gummibaum_neu) - Run CreateParamGatttool with mod: read
2018.03.31 16:31:47 5: XiaomiBTLESens (Gummibaum_neu) - Read XiaomiBTLESens_ExecGatttool_Run Gummibaum_neu|C4:7C:8D:62:42:6F|read|0x38
2018.03.31 16:31:47 4: XiaomiBTLESens (Gummibaum_neu) - stateRequestTimer: Call Request Timer
2018.03.31 16:31:47 5: XiaomiBTLESens (Gummibaum_neu) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 0
2018.03.31 16:32:18 4: XiaomiBTLESens (Gummibaum_neu) - Run CreateParamGatttool with mod: read
2018.03.31 16:32:18 5: XiaomiBTLESens (Gummibaum_neu) - Read XiaomiBTLESens_ExecGatttool_Run Gummibaum_neu|C4:7C:8D:62:42:6F|read|0x38
2018.03.31 16:32:18 4: XiaomiBTLESens (Gummibaum_neu) - stateRequestTimer: Call Request Timer
2018.03.31 16:32:27 5: XiaomiBTLESens (Gummibaum_neu) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)

2018.03.31 16:32:27 5: XiaomiBTLESens (Gummibaum_neu) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 1
2018.03.31 16:33:08 5: XiaomiBTLESens (Gummibaum_neu) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)

2018.03.31 16:33:08 5: XiaomiBTLESens (Gummibaum_neu) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 2
2018.03.31 16:33:17 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 4032
2018.03.31 16:33:17 4: XiaomiBTLESens (Gummibaum_neu) - WriteReadings: Readings were written
2018.03.31 16:33:17 4: XiaomiBTLESens (Gummibaum_neu) - ExecGatttool_Aborted: The BlockingCall Process terminated unexpectedly. Timedout
2018.03.31 16:35:10 1: Waschmaschine: Eingeschaltet - 0 W
2018.03.31 16:35:22 1: Trockner: Eingeschaltet - 0 W
2018.03.31 16:35:25 1: Trockner: Startet - 221.69 W
2018.03.31 16:35:25 1: Waschmaschine: Ausgeschaltet - 0.6 W
2018.03.31 16:35:33 1: Trockner: Läuft - 163.64 W
2018.03.31 16:37:27 4: XiaomiBTLESens (Gummibaum_neu) - Run CreateParamGatttool with mod: read
2018.03.31 16:37:27 5: XiaomiBTLESens (Gummibaum_neu) - Read XiaomiBTLESens_ExecGatttool_Run Gummibaum_neu|C4:7C:8D:62:42:6F|read|0x38
2018.03.31 16:37:27 4: XiaomiBTLESens (Gummibaum_neu) - stateRequestTimer: Call Request Timer
2018.03.31 16:37:27 5: XiaomiBTLESens (Gummibaum_neu) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 0
2018.03.31 16:38:05 4: XiaomiBTLESens (Gummibaum_neu) - Run CreateParamGatttool with mod: read
2018.03.31 16:38:05 5: XiaomiBTLESens (Gummibaum_neu) - Read XiaomiBTLESens_ExecGatttool_Run Gummibaum_neu|C4:7C:8D:62:42:6F|read|0x38
2018.03.31 16:38:05 4: XiaomiBTLESens (Gummibaum_neu) - stateRequestTimer: Call Request Timer
2018.03.31 16:38:07 5: XiaomiBTLESens (Gummibaum_neu) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)

2018.03.31 16:38:07 5: XiaomiBTLESens (Gummibaum_neu) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 1
2018.03.31 16:38:48 5: XiaomiBTLESens (Gummibaum_neu) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)

2018.03.31 16:38:48 5: XiaomiBTLESens (Gummibaum_neu) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 2
2018.03.31 16:38:57 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 4222
2018.03.31 16:38:57 4: XiaomiBTLESens (Gummibaum_neu) - WriteReadings: Readings were written
2018.03.31 16:38:57 4: XiaomiBTLESens (Gummibaum_neu) - ExecGatttool_Aborted: The BlockingCall Process terminated unexpectedly. Timedout
2018.03.31 16:43:18 4: XiaomiBTLESens (Gummibaum_neu) - Run CreateParamGatttool with mod: read
2018.03.31 16:43:18 5: XiaomiBTLESens (Gummibaum_neu) - Read XiaomiBTLESens_ExecGatttool_Run Gummibaum_neu|C4:7C:8D:62:42:6F|read|0x38
2018.03.31 16:43:18 4: XiaomiBTLESens (Gummibaum_neu) - stateRequestTimer: Call Request Timer
2018.03.31 16:43:18 5: XiaomiBTLESens (Gummibaum_neu) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 0
2018.03.31 16:43:42 4: XiaomiBTLESens (Gummibaum_neu) - Run CreateParamGatttool with mod: read
2018.03.31 16:43:42 5: XiaomiBTLESens (Gummibaum_neu) - Read XiaomiBTLESens_ExecGatttool_Run Gummibaum_neu|C4:7C:8D:62:42:6F|read|0x38
2018.03.31 16:43:42 4: XiaomiBTLESens (Gummibaum_neu) - stateRequestTimer: Call Request Timer
2018.03.31 16:43:59 5: XiaomiBTLESens (Gummibaum_neu) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)

2018.03.31 16:43:59 5: XiaomiBTLESens (Gummibaum_neu) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 1
2018.03.31 16:44:39 5: XiaomiBTLESens (Gummibaum_neu) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)

2018.03.31 16:44:39 5: XiaomiBTLESens (Gummibaum_neu) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 2
2018.03.31 16:44:48 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 4440
2018.03.31 16:44:48 4: XiaomiBTLESens (Gummibaum_neu) - WriteReadings: Readings were written
2018.03.31 16:44:48 4: XiaomiBTLESens (Gummibaum_neu) - ExecGatttool_Aborted: The BlockingCall Process terminated unexpectedly. Timedout


Hat eigentlich überhaupt jemand mehr als einen gleichzeitig laufen?

PS: In der App funktionieren beide ohne Probleme.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 31 März 2018, 17:18:29
Hast du den Sensor wieder vom Handy entkoppelt. Sonst bleibt die App mit dem Sensor verbunden und blockiert.
Ich habe 4 im Einsatz.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Loki am 31 März 2018, 18:23:12
Jetzt verwirrst du mich. Mit dem Handy ist keiner der Sensoren gekoppelt. Die App baut nur immer eine AdHoc Verdinung zu den Sensoren auf. Wenn ich sie "hart" beende sollte auch die Verbindung weg sein.

Zumindest habe ich auch mal Bluetooth am Handy deaktiviert, aber ändern tut sich nichts.

Ich gebe langsam aber sicher auf...
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 31 März 2018, 18:30:25
Wenn du die App beendest sollte die Verbindung getrennt sein, ja. Aber das hast Du ja nicht geschrieben. Am besten Mal BT ausschalten.

Was passiert wenn Du das

gatttool -i hci0 -b C4:7C:8D:66:16:30 --char-read -a 0x35

In der Konsole ein gibst?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Loki am 31 März 2018, 19:34:09
Das kommt dann raus:

Characteristic value/descriptor: aa bb cc dd ee ff 99 88 77 66 00 00 00 00 00 00
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 31 März 2018, 19:35:15
Und wenn du statt 35 38 nimmst?
Und probiere auch Mal hintereinander
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Loki am 31 März 2018, 19:58:08
Bei read -a 0x38 kommt:

Characteristic value/descriptor: 63 27 33 2e 31 2e 38



Mal nebenbei finde ich deine Geduld bemerkenswert...   ;)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 31 März 2018, 20:06:50
Und selbst wenn du das hintereinander ausführst bekommst immer Daten?
Gib Mal bitte ein list vom Device jetzt.
Führe set resetBatteryTimestamp aus und mach noch mal ein get sensorData
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Loki am 31 März 2018, 20:23:12
list:
Internals:
   BTMAC      C4:7C:8D:62:42:6F
   CFGFN     
   DEF        C4:7C:8D:62:42:6F
   INTERVAL   300
   NAME       Gummibaum_neu
   NOTIFYDEV  global,Gummibaum
   NR         9857
   NTFY_ORDER 50-Gummibaum
   STATE      error
   TYPE       XiaomiBTLESens
   VERSION    2.0.12
   loglevel   4
   READINGS:
     2018-03-31 20:16:04   lastGattError   Invalid argument (22)
     2018-03-31 20:16:04   state           error
   helper:
     CallBattery 0
     CallSensDataCounter 0
Attributes:
   model      flowerSens
   room       XiaomiBTLESens
   verbose    5


Log dazu:
2018.03.31 20:17:19 4: XiaomiBTLESens (Gummibaum_neu) - Run CreateParamGatttool with mod: read
2018.03.31 20:17:19 5: XiaomiBTLESens (Gummibaum_neu) - Read XiaomiBTLESens_ExecGatttool_Run Gummibaum_neu|C4:7C:8D:62:42:6F|read|0x38
2018.03.31 20:17:19 5: XiaomiBTLESens (Gummibaum_neu) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:62:42:6F --char-read -a 0x38 2>&1 /dev/null and loop 0
2018.03.31 20:17:22 4: XiaomiBTLESens (Gummibaum_neu) - Run CreateParamGatttool with mod: read
2018.03.31 20:17:22 5: XiaomiBTLESens (Gummibaum_neu) - Read XiaomiBTLESens_ExecGatttool_Run Gummibaum_neu|C4:7C:8D:62:42:6F|read|0x38


noch ein list:
Internals:
   BTMAC      C4:7C:8D:62:42:6F
   CFGFN     
   DEF        C4:7C:8D:62:42:6F
   INTERVAL   300
   NAME       Gummibaum_neu
   NOTIFYDEV  global,Gummibaum
   NR         9857
   NTFY_ORDER 50-Gummibaum
   STATE      error
   TYPE       XiaomiBTLESens
   VERSION    2.0.12
   loglevel   4
   READINGS:
     2018-03-31 20:18:29   lastGattError   Invalid argument (22)
     2018-03-31 20:18:29   state           error
   helper:
     CallBattery 0
     CallSensDataCounter 0
Attributes:
   model      flowerSens
   room       XiaomiBTLESens
   verbose    5
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 31 März 2018, 20:29:57
Ich kann beim besten Willen das Problem nicht erkennen. Verstehe nicht wieso es in der Konsole geht aber nicht im Modul.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ludwich am 01 April 2018, 16:29:19
Frohe Ostern!!
Eigentlich wollte ich ja nur schauen wie ich eine E-Mail versenden kann, wenn diese zu trocken werden.
Dabei habe ich gesehen, dass das Modul XiaomiFlowerSens (bisher genutzt) wird durch XiaomiBTLESens ersetzt wird - richtig?
Ich habe das Modul 2.0.12 im FHEM, im Github liegt 2.0.11 - ist da was zu beachten?
Kann/Soll ich mein FHEM schon komplett auf XiaomiBTLESens umstellen?

Vielleicht gibt es je noch nen Tipp zur Mail - sonst google ich mal los :-)
Ich hab das gestern das Modul  {DebianMail("email\@email.domain","Subject","Text","")} eingerichtet.

Schöne Grüße aus München

ludwich
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 01 April 2018, 16:36:16
Zitat von: ludwich am 01 April 2018, 16:29:19
Frohe Ostern!!
Eigentlich wollte ich ja nur schauen wie ich eine E-Mail versenden kann, wenn diese zu trocken werden.
Dabei habe ich gesehen, dass das Modul XiaomiFlowerSens (bisher genutzt) wird durch XiaomiBTLESens ersetzt wird - richtig?
Ich habe das Modul 2.0.12 im FHEM, im Github liegt 2.0.11 - ist da was zu beachten?
Kann/Soll ich mein FHEM schon komplett auf XiaomiBTLESens umstellen?

Vielleicht gibt es je noch nen Tipp zur Mail - sonst google ich mal los :-)
Ich hab das gestern das Modul  {DebianMail("email\@email.domain","Subject","Text","")} eingerichtet.

Schöne Grüße aus München

ludwich

Nicht aus GitHub nehmen bitte. In FHEM liegt das offizielle.
Du kannst einfach auf XiaomiBTLESens wechseln. Für Email wenn zu trocken einfach Attribut minMoisture setzen und ein Notify auf das Event setzen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ludwich am 01 April 2018, 18:48:26
Was hab ich da gemacht?

Ich habe einen MinMoisture von 18 gesetzt gesetzt, die Mail wird trotz des Readings von 20 verschickt.
Ist hier die Abfrage mit "low" falsch?
Das ganze bezieht sich ja auf das Device nicht auf den Log - richtig?
Das NOTIFYDEV mit global und Blume2 verwirrt mich etwas ?
Das ist mein erstes Notify - nicht wundern ;-)

Namen in Device:
NAME Blume2
NOTIFYDEV global,Blume2

im notify
"low"|Blume2:minMoisture.* {DebianMail("lu\@lu.de","FHEM","Elefantenohr","")}

In der Log Datei sieht es dann theoretisch so aus:
Zeitstempel Blume2 minMoisture low
Zeitstempel Blume2 minMoisture ok

ludwich

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 01 April 2018, 18:54:55

Blume2.minMoisture.low { DebianMail("lu\@lu.de","FHEM","Elefantenohr","") }
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ludwich am 01 April 2018, 23:01:00
Jetzt sieht es gut aus !
Meine Frau dankt ;-)

Gruß Ludwich
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: mark79 am 12 April 2018, 13:51:52
Der FlowerSens ist gerade im Angebot für etwa 10€
https://www.mydealz.de/deals/banggood-xiaomi-4-in-1-pflanzensensor-mit-app-bedienung-fur-980eur-1152825
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: theophilou85 am 16 April 2018, 01:17:30
Hallo

Ich nutze inzwischen 3 Flowersensoren mit nem Raspbi 3 zusammen und habe das Problem, dass die Dinger hin und wieder ihre Verbindung verlieren und danach erst wieder zurückkommen, wenn ich FHEM neustarte. Dadurch schließe ich ein Bluetoothproblem erstmal aus.
Für Testzwecke sind die Sensoren außerdem 15cm neben dem Pi platziert. Log sieht folgendermaßen aus:
2018-04-14_14:44:05 pla01 fertility: 0
2018-04-14_14:44:05 pla01 moisture: 0
2018-04-14_14:44:05 pla01 temperature: 25.3
2018-04-14_14:44:05 pla01 lux: 34
2018-04-14_14:44:05 pla01 active
2018-04-16_00:54:19 pla01 read sensor data
2018-04-16_00:54:23 pla01 batteryLevel: 100
2018-04-16_00:54:23 pla01 battery: ok
2018-04-16_00:54:23 pla01 firmware: 2.7.0
2018-04-16_00:54:23 pla01 active

2018-04-08_23:32:40 pla01 write sensor data
2018-04-08_23:32:41 pla01 read sensor data
2018-04-08_23:32:42 pla01 fertility: 0
2018-04-08_23:32:42 pla01 moisture: 0
2018-04-08_23:32:42 pla01 lux: 160
2018-04-08_23:32:42 pla01 temperature: 25.3
2018-04-08_23:32:42 pla01 active
2018-04-13_23:49:39 pla01 read sensor data
2018-04-13_23:49:58 pla01 read sensor data
2018-04-13_23:50:06 pla01 firmware: 2.7.0
2018-04-13_23:50:06 pla01 batteryLevel: 100
2018-04-13_23:50:06 pla01 battery: ok
2018-04-13_23:50:06 pla01 active


Da lässt sich meiner Meinung nach nichts rauslesen. Die Sensoren gehen dann von "active" aus "initlialised". Alle 3 gleichzeitig und kommen erst nach dem FHEM-Restart wieder.
Integriert wurden Sie folgendermaßen:
define pla00 XiaomiBTLESens C4:7C:8D:66:1C:4C
attr pla00 alias Plant Sensor left
attr pla00 event-min-interval state:3600,battery:3600,batteryLevel:3600,temperature:3600,moisture:3600,fertility:3600,lux:3600
attr pla00 event-on-change-reading state
attr pla00 event-on-update-reading .*
attr pla00 group [Bluetooth] Plant Sensors
attr pla00 interval 3600
attr pla00 model flowerSens
attr pla00 room Sensors


Wäre euch sehr verbunden, wenn ihr mir helfen könntet, oder Anweisungen geben, welche Informationen noch nötig wären.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 16 April 2018, 05:38:44
Ich brauche bitte ein Device Log, kein Reading Log. Beim Device Attribut verbose 5.
Ausserdem benötige ich ein list vom Device, die Definition ist nutzlos.
list DEVICENAME
List ist ein FHEM Befehl.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: raiderxxl am 16 April 2018, 11:39:41
Hallo,

Ich habe seit 3 Tagen 2 dieser Sensoren im Einsatz. Angebunden über ssh (Ziel ist RasperiyPiZeroW)
Reading und Status wird erfolgreich übertragen.

Doch habe ich nun hin und wieder folgende Meldungen im Log:

connect error: Transport endpoint is not connected (107)
connect error: Transport endpoint is not connected (107)
connect error: Function not implemented (38)
connect error: Function not implemented (38)
connect: Device or resource busy (16)
connect: Device or resource busy (16)
connect error: Function not implemented (38)
connect error: Transport endpoint is not connected (107)


Ohne angabe von Zeit und device...

Würde mich ja nicht stören da die Werte ja übertragen werden. Nur werden mir die Einträge ins Log geschrieben obwohl im device verbose 0 definiert ist.

Was ich noch testen kann ist ein Raspberry Pi 3 als Ziel vielleicht ist der ein  bisschen performanter... wobei auf dem Zero ausser einem Pytonscript nix läuft (CPU 1-3%)...

Jemand noch ne Idee?

Grüßle

Pascal


Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 16 April 2018, 11:48:10
Setz mal bitte das Atribut blockingCallLoglevel auf 1 oder 0
Eventuell hilft das.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: raiderxxl am 16 April 2018, 13:57:24
Hi,

ich kann den nur auf 2-5 setzen...

Pascal

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 16 April 2018, 14:05:17
Dann bitte auf 2
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: raiderxxl am 16 April 2018, 14:26:15
Wird gemacht....
Ich werde das Beobachten.

Danke!


Pascal
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Diggewuff am 20 April 2018, 16:35:55
Ich würde meine Pflanzrensensoren gerne mit dem montoring modul überwachen.
dafür brauche ich ein event das triggert wenn handlung notwendig ist,
maxlux - max. Helligkeits-Grenzwert für ein Ereignis maxlux high
Beispiele für min/max-Ereignisse:
2017-03-16 11:08:05 XiaomiFlowerSens Dracaena minMoisture low
2017-03-16 11:08:06 XiaomiFlowerSens Dracaena maxTemp high

wunderbar, das habe ich.
Aber ich bräuchte auch ein event das meldet wenn alles wieder in ordnung ist sprich sowas wie:

2017-03-16 11:08:05 XiaomiFlowerSens Dracaena minMoisture ok
2017-03-16 11:08:06 XiaomiFlowerSens Dracaena maxTemp ok


Gebe es einen weg soein event evenuel in diesem noch nach zu pflegen?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 20 April 2018, 16:45:22
Gibt es bereits. Ein ok sollte eigentlich immer kommen wenn min oder max nicht erfüllt sind. Problem, das Event kommt immer.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 20 April 2018, 16:51:09
Ganz vergessen. Das Event kommt aber nur wenn die entsprechenden Attribute auch gesetzt sind

2018-04-20 16:49:18 XiaomiBTLESens PflanzenSensor3 minMoisture ok
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: raiderxxl am 21 April 2018, 08:45:03
Hallo,
Ich hab das jetzt mal beobachtet... kommt immernoch...

connect error: Transport endpoint is not connected (107)
connect error: Transport endpoint is not connected (107)
connect error: Transport endpoint is not connected (107)
connect error: Transport endpoint is not connected (107)
connect error: Function not implemented (38)
connect error: Transport endpoint is not connected (107)
connect error: Transport endpoint is not connected (107)
connect error: Transport endpoint is not connected (107)
connect error: Transport endpoint is not connected (107)


Und was ganz komisch ist, setzt man den Intervall auf 600 melden sie sich gar nicht mehr...  :)


Hier nochmal mein raw device:

defmod Blume2 XiaomiBTLESens C4:7C:8D:65:EE:99
attr Blume2 blockingCallLoglevel 2
attr Blume2 event-min-interval .*:600
attr Blume2 interval 300
attr Blume2 model flowerSens
attr Blume2 room Kugele->OG->Flur
attr Blume2 sshHost 192.168.178.82
attr Blume2 verbose 0

setstate Blume2 active
setstate Blume2 2018-04-20 09:55:01 battery ok
setstate Blume2 2018-04-20 09:55:01 batteryLevel 93
setstate Blume2 2018-04-21 08:42:10 fertility 220
setstate Blume2 2018-04-20 09:55:01 firmware 2.7.0
setstate Blume2 2018-04-21 06:57:59 lastGattError Request attribute has encountered an unlikely error
setstate Blume2 2018-04-21 08:42:10 lux 1691
setstate Blume2 2018-04-21 08:42:10 moisture 57
setstate Blume2 2018-04-21 08:42:10 state active
setstate Blume2 2018-04-21 08:42:10 temperature 24.4

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 21 April 2018, 09:22:08
attr Blume2 event-min-interval .*:600


Das kann auch so Solo nicht gehen. event-min-interval funktioniert nur in Verbindung mit event-on-change-reading oder event-on-update-reading

Gegen die Meldungen
connect error: Transport endpoint is not connected (107)
kann ich dann leider nichts machen. die kommen direkt aus der Konsole raus. Da ist noch was faul. Entweder zu weit weg oder Probleme mit dem Bluetooth. Hast Du ein USB Stick oder on Board? Raspi 3 oder so.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ToM_ToM am 21 April 2018, 11:54:00
Hi Leon,

ich habe heute versucht, einen neuen Flower Sensor in Betrieb zu nehmen.
Die FlowerCare App findet ihn zwar, kann ihn aber komischerweise nicht verbinden. Auch wenn ich
hcitool lescan ausführe, finde ich den neuen Sensor. Diesen habe ich versucht als XiaomiFlowerSens einzubinden und anschließend auch als XiaomiBTLESens.
Bei beiden bekomme ich ein Error zurück.
lastGattError: The BlockingCall Process terminated unexpectedly. Timedout


2018.04.21 11:52:00 4: XiaomiBTLESens (Planze_08) - Run CreateParamGatttool with mod: read
2018.04.21 11:52:00 5: XiaomiBTLESens (Planze_08) - Read XiaomiBTLESens_ExecGatttool_Run Planze_08|C4:7C:8D:66:04:6A|read|0x38
2018.04.21 11:52:02 5: XiaomiBTLESens (Planze_08) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)

2018.04.21 11:52:02 5: XiaomiBTLESens (Planze_08) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:04:6A --char-read -a 0x38 2>&1 /dev/null and loop 2
2018.04.21 11:52:11 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 30812
2018.04.21 11:52:12 4: XiaomiBTLESens (Planze_08) - WriteReadings: Readings were written
2018.04.21 11:52:12 4: XiaomiBTLESens (Planze_08) - ExecGatttool_Aborted: The BlockingCall Process terminated unexpectedly. Timedout


Hast du noch eine Idee oder ist mein Sensor defekt?

VG, Thomas
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Nemo0815 am 21 April 2018, 12:27:27
Habe das gleiche Problem 2 neue Sensoren (hatte vorher noch keine) auf einem Raspian Stretch System mit 2 BT dongles (intern + USB).

Allerdings kann ich mit der App erfolgreich verbinden...
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 21 April 2018, 12:34:12
Zitat von: ToM_ToM am 21 April 2018, 11:54:00
Hi Leon,

ich habe heute versucht, einen neuen Flower Sensor in Betrieb zu nehmen.
Die FlowerCare App findet ihn zwar, kann ihn aber komischerweise nicht verbinden. Auch wenn ich
hcitool lescan ausführe, finde ich den neuen Sensor. Diesen habe ich versucht als XiaomiFlowerSens einzubinden und anschließend auch als XiaomiBTLESens.
Bei beiden bekomme ich ein Error zurück.
lastGattError: The BlockingCall Process terminated unexpectedly. Timedout


2018.04.21 11:52:00 4: XiaomiBTLESens (Planze_08) - Run CreateParamGatttool with mod: read
2018.04.21 11:52:00 5: XiaomiBTLESens (Planze_08) - Read XiaomiBTLESens_ExecGatttool_Run Planze_08|C4:7C:8D:66:04:6A|read|0x38
2018.04.21 11:52:02 5: XiaomiBTLESens (Planze_08) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)

2018.04.21 11:52:02 5: XiaomiBTLESens (Planze_08) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:04:6A --char-read -a 0x38 2>&1 /dev/null and loop 2
2018.04.21 11:52:11 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 30812
2018.04.21 11:52:12 4: XiaomiBTLESens (Planze_08) - WriteReadings: Readings were written
2018.04.21 11:52:12 4: XiaomiBTLESens (Planze_08) - ExecGatttool_Aborted: The BlockingCall Process terminated unexpectedly. Timedout


Hast du noch eine Idee oder ist mein Sensor defekt?

VG, Thomas

Hallo Thomas und Nemo0815

Wenn dieser Befehl in der Konsole zu Problemen führt dann scheint etwas mit dem Bluetooth nicht in Ordnung zu sein

gatttool -i hci0 -b MAC-ADRESSE --char-read -a 0x38



Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Nemo0815 am 21 April 2018, 12:36:23
Hi,

bei kommt da:

gatttool -i hci0 -b C4:7C:8D:66:0F:40 --char-read -a 0x38
Characteristic value/descriptor: 64 15 32 2e 37 2e 30


Edit: Hat sich erledigt, war der falsche (noch nicht mit dem Smartphone gepairte) Sensor  :)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 21 April 2018, 12:42:06
Zitat von: Nemo0815 am 21 April 2018, 12:36:23
Hi,

bei kommt da:

gatttool -i hci0 -b C4:7C:8D:66:0F:40 --char-read -a 0x38
Characteristic value/descriptor: 64 15 32 2e 37 2e 30


Edit: Hat sich erledigt, war der falsche (noch nicht mit dem Smartphone gepairte) Sensor  :)

Geht jetzt also? Bekommst Werte?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ToM_ToM am 21 April 2018, 13:18:20
Also ich habe es jetzt einmal mit dem XiaomiBTLESens Device geschafft, einen
get Pflanze_08 firmware auszuführen.
Der Status ändert sich dann auf "read sensor data" was mich etwas verwirrt, aber der Request war erfolgreich.

Anschließender Versuch mit get Pflanze_08 sensorData ändert den Status auf "write sensor data" was mich ebenso verwirrt, liefert aber dann wieder das Timeout Error.

VG, Thomas
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: raiderxxl am 21 April 2018, 22:36:06
Hi,

Ich meine das Interval Attribut und nicht ,,event-min-interval", das funktioniert...
Laut Wiki auch so wie ich's eingerichtet habe https://wiki.fhem.de/wiki/Event-min-interval alle 10 Minuten einen Eintrag...

Grüßle

Pascal
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 21 April 2018, 22:40:13
Dann setz Mal bitte verbose auf 5 und ändere das Intervall
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: majestro84 am 24 April 2018, 18:42:38
Hallo wollte kurz fragen das Thermometer mit dem Modul hier und das PRESENCE Modul bzw lepresence zusammen auf ein Pi laufen kann oder gibt es da Probleme?

Gesendet von meinem Redmi Note 4 mit Tapatalk

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 24 April 2018, 20:15:59
Ich habe keine Probleme und lasse es auf ein und dem selben System laufen. Wichtig meiner Meinung ist das hcidump für lepresenced verwendet wird. Muss eventuell von Hand nachinstalliert werden.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: majestro84 am 24 April 2018, 20:28:57
OK danke für die Antwort dann probiere ich es mal aus


Gesendet von meinem Redmi Note 4 mit Tapatalk

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: fhainz am 24 April 2018, 21:03:39
Hallo Leon!

Meine 7 Flower Sensoren laufen derzeit auf einer Ubuntu VM mit einem externem BT-Stick. Nachdem ich ab und zu Probleme mit der Reichweite des Sticks habe, hab ich mir einen Raspi 3+ geholt der auf dem Balkon kommen soll.
Der Pi ist heute angekommen, bei der Inbetriebnahme der Sensoren habe ich aber einige Probleme.
Ich hab die Installations-Prozedur jetzt 2x durch, bei der 2. Installation hab dann ich irgendwann angefangen den Beitrag zu schreiben um so alles genau mitzudokumentieren.

Nach der ersten Installation von raspbian hab ich mit hcitool lescan die Sensoren gleich gefunden. Dann FHEM und MQTT installiert und meine 7 Sensoren eingebunden (Copy+Paste der 7 Definitionen aus und in die fhem.cfg). Das erste abrufen hat geklappt, nach einem manuellen update kam schon der error (Invalid argument (22). Anschließend hab ich viel versucht und anscheinend das Systen kaputt konfiguriert. Gut nochmal von vorne, jetzt aber geziel. ;)

Nach der 2. Installation von raspbian funktioninert hcitool lescan ohne Probleme. 2-3x getestet. Anschließend wieder FHEM laut Debian Anleitung mit apt-get installiert und 5 Sensoren definiert. Wieder nach ein paar Sekunden der gleiche Fehler wie oben. In der Konsole bekomme ich jetzt den Fehler Disable scan failed: Input/output error Anschließend hab ich alle 5 Devices gelöscht, google angeschmissen und das gefunden. https://stackoverflow.com/questions/22062037/hcitool-lescan-shows-i-o-error
Also das in der Konsole eingegeben

hciconfig hci0 down
hciconfig hci0 up

und jetzt funktioniert es auch wieder aus der Konsole. 5-10 Minuten gewartet, immer wieder erneut versucht. Keine Probleme. Anschließend hab ich dann langsam Stück für Stück 5 der 7 Sensoren in der Web-UI definiert, immer wieder ausprobiert, gespeichert und NICHT neugestartet. Abrufen klappt aus FHEM und der Konsole.
Jetzt starte ich FHEM neu, 1-2 Sensoren gehen auf active, der rest error (Invalid argument (22)). In der Konsole bekomme ich jetzt nach ein paar Scans auch wieder den Fehler Disable scan failed: Input/output error
Die Prozedur nachdem ich hciconfig hci0 ... eingegeben habe, habe ich jetzt 2x wiederholt. Immer mit dem selben Ergebnis. Sobald FHEM und ein neustart ins spiel kommen, fängt hcitool zu zicken an. Beim 2. mal nachstellen hat das Empfangen des ersten Sensors länger gedauert als das empfangen des 2. Sensors. Der 2. Sensor war active, der 1. anschließend gleich mal auf error, ohne neustart.

Ich hab auch auf der Ubuntu-VM alle paar Tage Probleme die Sensoren zu empfangen. Den Fehler kann ich falls gewünscht nachreichen könnte aber "charWrite faild" sein, bin mir aber nicht sicher. Ein neustart von FHEM hilft da nicht mehr, ich muss die komplette Maschine neustarten. Das war unteranderem ein Grund auf den Pi zu wechseln ;)

Kannst du dir das ganze erklären? Falls du verbose 5 Logs benötigst, sag bescheid.

Danke & Grüße

Edit:
hcitool in der konsole funktioniert eigenartigerweise noch, in FHEM aber Invalid argument (22)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: theophilou85 am 25 April 2018, 00:11:05
Habe das verbose jetzt auf 5 gesetzt, anbei schon einmal ein list eines der drei Sensoren

Internals:
   BTMAC      C4:7C:8D:66:20:C7
   DEF        C4:7C:8D:66:20:C7
   INTERVAL   3600
   NAME       pla02
   NOTIFYDEV  global,pla02
   NR         356
   NTFY_ORDER 50-pla02
   STATE      initialized
   TYPE       XiaomiBTLESens
   VERSION    2.0.12
   loglevel   4
   READINGS:
     2018-04-19 00:59:05   battery         ok
     2018-04-19 00:59:05   batteryLevel    100
     2018-04-19 18:10:41   fertility       1
     2018-04-19 00:59:05   firmware        2.7.0
     2018-04-17 00:19:51   lastGattError   charWrite faild
     2018-04-19 18:10:41   lux             170
     2018-04-19 18:10:41   moisture        0
     2018-04-25 00:08:01   state           initialized
     2018-04-19 18:10:41   temperature     23.2
   helper:
     CallBattery 0
     CallSensDataCounter 0
Attributes:
   alias      Plant Sensor right
   event-min-interval state:3600,battery:3600,batteryLevel:3600,temperature:3600,moisture:3600,fertility:3600,lux:3600
   event-on-change-reading state
   event-on-update-reading .*
   group      [Bluetooth] Plant Sensors
   interval   3600
   model      flowerSens
   room       Sensors
   verbose    5


Im Moment ist er initialized und bietet mir an ein resetBatteryTimestamp zu senden. Mache ich das, wechselt er auf "active" und tut wieder.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: theophilou85 am 26 April 2018, 23:54:47
Es ist wieder passiert. Folgendes aus dem Log:

2018.04.25 00:08:36 4: XiaomiBTLESens (pla01) - Run CreateParamGatttool with mod: read
2018.04.25 00:08:36 5: XiaomiBTLESens (pla01) - Read XiaomiBTLESens_ExecGatttool_Run pla01|C4:7C:8D:66:1E:79|read|0x38
2018.04.25 00:08:36 4: XiaomiBTLESens (pla01) - stateRequestTimer: Call Request Timer
2018.04.25 00:08:37 5: XiaomiBTLESens (pla01) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:1E:79 --char-read -a 0x38 2>&1 /dev/null and loop 0
2018.04.25 00:08:39 5: XiaomiBTLESens (pla01) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,64 15 32 2e 37 2e 30

2018.04.25 00:08:39 4: XiaomiBTLESens (pla01) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,64 15 32 2e 37 2e 30

2018.04.25 00:08:39 5: XiaomiBTLESens (pla01) - ExecGatttool_Done: gatttool return string: pla01|C4:7C:8D:66:1E:79|ok|read|0x38|{"gtResult":"64 15 32 2e 37 2e 30 "}
2018.04.25 00:08:39 4: XiaomiBTLESens (pla01) - ProcessingNotification
2018.04.25 00:08:39 4: XiaomiBTLESens (pla01) - ProcessingNotification: handle 0x38
2018.04.25 00:08:39 4: XiaomiBTLESens (pla01) - FlowerSens Handle0x38
2018.04.25 00:08:39 4: XiaomiBTLESens (pla01) - WriteReadings: Readings were written
2018.04.25 00:08:39 4: XiaomiBTLESens (pla01) - Run CreateParamGatttool with mod: write
2018.04.25 00:08:39 5: XiaomiBTLESens (pla01) - Write XiaomiBTLESens_ExecGatttool_Run pla01|C4:7C:8D:66:1E:79|write|0x33|A01F
2018.04.25 00:08:39 5: XiaomiBTLESens (pla01) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:1E:79 --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 0
2018.04.25 00:08:39 5: XiaomiBTLESens (pla01) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.04.25 00:08:39 4: XiaomiBTLESens (pla01) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.04.25 00:08:39 5: XiaomiBTLESens (pla01) - ExecGatttool_Done: gatttool return string: pla01|C4:7C:8D:66:1E:79|ok|write|0x33|{"gtResult":"no data response"}
2018.04.25 00:08:39 4: XiaomiBTLESens (pla01) - Run CreateParamGatttool with mod: read
2018.04.25 00:08:39 5: XiaomiBTLESens (pla01) - Read XiaomiBTLESens_ExecGatttool_Run pla01|C4:7C:8D:66:1E:79|read|0x35
2018.04.25 00:08:40 5: XiaomiBTLESens (pla01) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:1E:79 --char-read -a 0x35 2>&1 /dev/null and loop 0
2018.04.25 00:08:40 5: XiaomiBTLESens (pla01) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,f3 00 00 5a 00 00 00 00 00 00 02 3c 00 fb 34 9b

2018.04.25 00:08:40 4: XiaomiBTLESens (pla01) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,f3 00 00 5a 00 00 00 00 00 00 02 3c 00 fb 34 9b

2018.04.25 00:08:40 5: XiaomiBTLESens (pla01) - ExecGatttool_Done: gatttool return string: pla01|C4:7C:8D:66:1E:79|ok|read|0x35|{"gtResult":"f3 00 00 5a 00 00 00 00 00 00 02 3c 00 fb 34 9b "}
2018.04.25 00:08:40 4: XiaomiBTLESens (pla01) - ProcessingNotification
2018.04.25 00:08:40 4: XiaomiBTLESens (pla01) - ProcessingNotification: handle 0x35
2018.04.25 00:08:40 4: XiaomiBTLESens (pla01) - FlowerSens Handle0x35
2018.04.25 00:08:40 4: XiaomiBTLESens (pla01) - WriteReadings: Readings were written
2018.04.25 00:08:45 3: Watchdog mod00_det_wd0 triggered
2018.04.25 00:08:45 3: scc00 IT_set: swt05 off
2018.04.25 00:08:47 4: XiaomiBTLESens (pla00) - Run CreateParamGatttool with mod: read
2018.04.25 00:08:47 5: XiaomiBTLESens (pla00) - Read XiaomiBTLESens_ExecGatttool_Run pla00|C4:7C:8D:66:1C:4C|read|0x38
2018.04.25 00:08:47 4: XiaomiBTLESens (pla00) - stateRequestTimer: Call Request Timer
2018.04.25 00:08:47 5: XiaomiBTLESens (pla00) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:1C:4C --char-read -a 0x38 2>&1 /dev/null and loop 0
2018.04.25 00:08:49 5: XiaomiBTLESens (pla00) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,61 15 32 2e 37 2e 30

2018.04.25 00:08:49 4: XiaomiBTLESens (pla00) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,61 15 32 2e 37 2e 30

2018.04.25 00:08:49 5: XiaomiBTLESens (pla00) - ExecGatttool_Done: gatttool return string: pla00|C4:7C:8D:66:1C:4C|ok|read|0x38|{"gtResult":"61 15 32 2e 37 2e 30 "}
2018.04.25 00:08:49 4: XiaomiBTLESens (pla00) - ProcessingNotification
2018.04.25 00:08:49 4: XiaomiBTLESens (pla00) - ProcessingNotification: handle 0x38
2018.04.25 00:08:49 4: XiaomiBTLESens (pla00) - FlowerSens Handle0x38
2018.04.25 00:08:49 4: XiaomiBTLESens (pla00) - WriteReadings: Readings were written
2018.04.25 00:08:49 4: XiaomiBTLESens (pla00) - Run CreateParamGatttool with mod: write
2018.04.25 00:08:49 5: XiaomiBTLESens (pla00) - Write XiaomiBTLESens_ExecGatttool_Run pla00|C4:7C:8D:66:1C:4C|write|0x33|A01F
2018.04.25 00:08:50 5: XiaomiBTLESens (pla00) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:1C:4C --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 0
2018.04.25 00:08:50 5: XiaomiBTLESens (pla00) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.04.25 00:08:50 4: XiaomiBTLESens (pla00) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.04.25 00:08:50 5: XiaomiBTLESens (pla00) - ExecGatttool_Done: gatttool return string: pla00|C4:7C:8D:66:1C:4C|ok|write|0x33|{"gtResult":"no data response"}
2018.04.25 00:08:50 4: XiaomiBTLESens (pla00) - Run CreateParamGatttool with mod: read
2018.04.25 00:08:50 5: XiaomiBTLESens (pla00) - Read XiaomiBTLESens_ExecGatttool_Run pla00|C4:7C:8D:66:1C:4C|read|0x35
2018.04.25 00:08:50 5: XiaomiBTLESens (pla00) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:1C:4C --char-read -a 0x35 2>&1 /dev/null and loop 0
2018.04.25 00:08:50 5: XiaomiBTLESens (pla00) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,fa 00 00 4c 00 00 00 00 00 00 02 3c 00 fb 34 9b

2018.04.25 00:08:50 4: XiaomiBTLESens (pla00) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,fa 00 00 4c 00 00 00 00 00 00 02 3c 00 fb 34 9b

2018.04.25 00:08:51 5: XiaomiBTLESens (pla00) - ExecGatttool_Done: gatttool return string: pla00|C4:7C:8D:66:1C:4C|ok|read|0x35|{"gtResult":"fa 00 00 4c 00 00 00 00 00 00 02 3c 00 fb 34 9b "}
2018.04.25 00:08:51 4: XiaomiBTLESens (pla00) - ProcessingNotification
2018.04.25 00:08:51 4: XiaomiBTLESens (pla00) - ProcessingNotification: handle 0x35
2018.04.25 00:08:51 4: XiaomiBTLESens (pla00) - FlowerSens Handle0x35
2018.04.25 00:08:51 4: XiaomiBTLESens (pla00) - WriteReadings: Readings were written
2018.04.25 00:11:00 4: XiaomiBTLESens (pla02) - Run CreateParamGatttool with mod: read
2018.04.25 00:11:00 5: XiaomiBTLESens (pla02) - Read XiaomiBTLESens_ExecGatttool_Run pla02|C4:7C:8D:66:20:C7|read|0x38
2018.04.25 00:11:00 4: XiaomiBTLESens (pla02) - stateRequestTimer: Call Request Timer
2018.04.25 00:11:00 5: XiaomiBTLESens (pla02) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:20:C7 --char-read -a 0x38 2>&1 /dev/null and loop 0
2018.04.25 00:11:02 5: XiaomiBTLESens (pla02) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,64 15 32 2e 37 2e 30

2018.04.25 00:11:02 4: XiaomiBTLESens (pla02) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,64 15 32 2e 37 2e 30

2018.04.25 00:11:02 5: XiaomiBTLESens (pla02) - ExecGatttool_Done: gatttool return string: pla02|C4:7C:8D:66:20:C7|ok|read|0x38|{"gtResult":"64 15 32 2e 37 2e 30 "}
2018.04.25 00:11:02 4: XiaomiBTLESens (pla02) - ProcessingNotification
2018.04.25 00:11:02 4: XiaomiBTLESens (pla02) - ProcessingNotification: handle 0x38
2018.04.25 00:11:02 4: XiaomiBTLESens (pla02) - FlowerSens Handle0x38
2018.04.25 00:11:02 4: XiaomiBTLESens (pla02) - WriteReadings: Readings were written
2018.04.25 00:11:02 4: XiaomiBTLESens (pla02) - Run CreateParamGatttool with mod: write
2018.04.25 00:11:02 5: XiaomiBTLESens (pla02) - Write XiaomiBTLESens_ExecGatttool_Run pla02|C4:7C:8D:66:20:C7|write|0x33|A01F
2018.04.25 00:11:03 5: XiaomiBTLESens (pla02) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:20:C7 --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 0
2018.04.25 00:11:03 5: XiaomiBTLESens (pla02) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.04.25 00:11:03 4: XiaomiBTLESens (pla02) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.04.25 00:11:03 5: XiaomiBTLESens (pla02) - ExecGatttool_Done: gatttool return string: pla02|C4:7C:8D:66:20:C7|ok|write|0x33|{"gtResult":"no data response"}
2018.04.25 00:11:03 4: XiaomiBTLESens (pla02) - Run CreateParamGatttool with mod: read
2018.04.25 00:11:03 5: XiaomiBTLESens (pla02) - Read XiaomiBTLESens_ExecGatttool_Run pla02|C4:7C:8D:66:20:C7|read|0x35
2018.04.25 00:11:03 5: XiaomiBTLESens (pla02) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:20:C7 --char-read -a 0x35 2>&1 /dev/null and loop 0
2018.04.25 00:11:03 5: XiaomiBTLESens (pla02) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,ee 00 00 52 00 00 00 00 02 00 02 3c 00 fb 34 9b

2018.04.25 00:11:03 4: XiaomiBTLESens (pla02) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,ee 00 00 52 00 00 00 00 02 00 02 3c 00 fb 34 9b

2018.04.25 00:11:03 5: XiaomiBTLESens (pla02) - ExecGatttool_Done: gatttool return string: pla02|C4:7C:8D:66:20:C7|ok|read|0x35|{"gtResult":"ee 00 00 52 00 00 00 00 02 00 02 3c 00 fb 34 9b "}
2018.04.25 00:11:03 4: XiaomiBTLESens (pla02) - ProcessingNotification
2018.04.25 00:11:03 4: XiaomiBTLESens (pla02) - ProcessingNotification: handle 0x35
2018.04.25 00:11:03 4: XiaomiBTLESens (pla02) - FlowerSens Handle0x35
2018.04.25 00:11:03 4: XiaomiBTLESens (pla02) - WriteReadings: Readings were written

2018.04.25 00:14:33 3: Sub XiaomiBTLESens_Undef (pla02) - delete device pla02
2018.04.25 00:14:33 3: Sub XiaomiBTLESens_Undef (pla01) - delete device pla01
2018.04.25 00:14:33 3: Sub XiaomiBTLESens_Undef (pla00) - delete device pla00

2018.04.25 00:14:42 3: XiaomiBTLESens (pla00) - defined with BTMAC C4:7C:8D:66:1C:4C
2018.04.25 00:14:42 3: XiaomiBTLESens (pla00) - set interval to 3600
2018.04.25 00:14:42 3: XiaomiBTLESens (pla01) - defined with BTMAC C4:7C:8D:66:1E:79
2018.04.25 00:14:42 3: XiaomiBTLESens (pla01) - set interval to 3600
2018.04.25 00:14:42 3: XiaomiBTLESens (pla02) - defined with BTMAC C4:7C:8D:66:20:C7
2018.04.25 00:14:42 3: XiaomiBTLESens (pla02) - set interval to 3600


Letztes Log des Devices:
2018-04-25_00:08:40 pla01 fertility: 0
2018-04-25_00:08:40 pla01 temperature: 24.3
2018-04-25_00:08:40 pla01 moisture: 0
2018-04-25_00:08:40 pla01 active
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 27 April 2018, 06:34:09
Zitat von: theophilou85 am 26 April 2018, 23:54:47
Es ist wieder passiert. Folgendes aus dem Log:

2018.04.25 00:08:36 4: XiaomiBTLESens (pla01) - Run CreateParamGatttool with mod: read
2018.04.25 00:08:36 5: XiaomiBTLESens (pla01) - Read XiaomiBTLESens_ExecGatttool_Run pla01|C4:7C:8D:66:1E:79|read|0x38
2018.04.25 00:08:36 4: XiaomiBTLESens (pla01) - stateRequestTimer: Call Request Timer
2018.04.25 00:08:37 5: XiaomiBTLESens (pla01) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:1E:79 --char-read -a 0x38 2>&1 /dev/null and loop 0
2018.04.25 00:08:39 5: XiaomiBTLESens (pla01) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,64 15 32 2e 37 2e 30

2018.04.25 00:08:39 4: XiaomiBTLESens (pla01) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,64 15 32 2e 37 2e 30

2018.04.25 00:08:39 5: XiaomiBTLESens (pla01) - ExecGatttool_Done: gatttool return string: pla01|C4:7C:8D:66:1E:79|ok|read|0x38|{"gtResult":"64 15 32 2e 37 2e 30 "}
2018.04.25 00:08:39 4: XiaomiBTLESens (pla01) - ProcessingNotification
2018.04.25 00:08:39 4: XiaomiBTLESens (pla01) - ProcessingNotification: handle 0x38
2018.04.25 00:08:39 4: XiaomiBTLESens (pla01) - FlowerSens Handle0x38
2018.04.25 00:08:39 4: XiaomiBTLESens (pla01) - WriteReadings: Readings were written
2018.04.25 00:08:39 4: XiaomiBTLESens (pla01) - Run CreateParamGatttool with mod: write
2018.04.25 00:08:39 5: XiaomiBTLESens (pla01) - Write XiaomiBTLESens_ExecGatttool_Run pla01|C4:7C:8D:66:1E:79|write|0x33|A01F
2018.04.25 00:08:39 5: XiaomiBTLESens (pla01) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:1E:79 --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 0
2018.04.25 00:08:39 5: XiaomiBTLESens (pla01) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.04.25 00:08:39 4: XiaomiBTLESens (pla01) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.04.25 00:08:39 5: XiaomiBTLESens (pla01) - ExecGatttool_Done: gatttool return string: pla01|C4:7C:8D:66:1E:79|ok|write|0x33|{"gtResult":"no data response"}
2018.04.25 00:08:39 4: XiaomiBTLESens (pla01) - Run CreateParamGatttool with mod: read
2018.04.25 00:08:39 5: XiaomiBTLESens (pla01) - Read XiaomiBTLESens_ExecGatttool_Run pla01|C4:7C:8D:66:1E:79|read|0x35
2018.04.25 00:08:40 5: XiaomiBTLESens (pla01) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:1E:79 --char-read -a 0x35 2>&1 /dev/null and loop 0
2018.04.25 00:08:40 5: XiaomiBTLESens (pla01) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,f3 00 00 5a 00 00 00 00 00 00 02 3c 00 fb 34 9b

2018.04.25 00:08:40 4: XiaomiBTLESens (pla01) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,f3 00 00 5a 00 00 00 00 00 00 02 3c 00 fb 34 9b

2018.04.25 00:08:40 5: XiaomiBTLESens (pla01) - ExecGatttool_Done: gatttool return string: pla01|C4:7C:8D:66:1E:79|ok|read|0x35|{"gtResult":"f3 00 00 5a 00 00 00 00 00 00 02 3c 00 fb 34 9b "}
2018.04.25 00:08:40 4: XiaomiBTLESens (pla01) - ProcessingNotification
2018.04.25 00:08:40 4: XiaomiBTLESens (pla01) - ProcessingNotification: handle 0x35
2018.04.25 00:08:40 4: XiaomiBTLESens (pla01) - FlowerSens Handle0x35
2018.04.25 00:08:40 4: XiaomiBTLESens (pla01) - WriteReadings: Readings were written
2018.04.25 00:08:45 3: Watchdog mod00_det_wd0 triggered
2018.04.25 00:08:45 3: scc00 IT_set: swt05 off
2018.04.25 00:08:47 4: XiaomiBTLESens (pla00) - Run CreateParamGatttool with mod: read
2018.04.25 00:08:47 5: XiaomiBTLESens (pla00) - Read XiaomiBTLESens_ExecGatttool_Run pla00|C4:7C:8D:66:1C:4C|read|0x38
2018.04.25 00:08:47 4: XiaomiBTLESens (pla00) - stateRequestTimer: Call Request Timer
2018.04.25 00:08:47 5: XiaomiBTLESens (pla00) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:1C:4C --char-read -a 0x38 2>&1 /dev/null and loop 0
2018.04.25 00:08:49 5: XiaomiBTLESens (pla00) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,61 15 32 2e 37 2e 30

2018.04.25 00:08:49 4: XiaomiBTLESens (pla00) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,61 15 32 2e 37 2e 30

2018.04.25 00:08:49 5: XiaomiBTLESens (pla00) - ExecGatttool_Done: gatttool return string: pla00|C4:7C:8D:66:1C:4C|ok|read|0x38|{"gtResult":"61 15 32 2e 37 2e 30 "}
2018.04.25 00:08:49 4: XiaomiBTLESens (pla00) - ProcessingNotification
2018.04.25 00:08:49 4: XiaomiBTLESens (pla00) - ProcessingNotification: handle 0x38
2018.04.25 00:08:49 4: XiaomiBTLESens (pla00) - FlowerSens Handle0x38
2018.04.25 00:08:49 4: XiaomiBTLESens (pla00) - WriteReadings: Readings were written
2018.04.25 00:08:49 4: XiaomiBTLESens (pla00) - Run CreateParamGatttool with mod: write
2018.04.25 00:08:49 5: XiaomiBTLESens (pla00) - Write XiaomiBTLESens_ExecGatttool_Run pla00|C4:7C:8D:66:1C:4C|write|0x33|A01F
2018.04.25 00:08:50 5: XiaomiBTLESens (pla00) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:1C:4C --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 0
2018.04.25 00:08:50 5: XiaomiBTLESens (pla00) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.04.25 00:08:50 4: XiaomiBTLESens (pla00) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.04.25 00:08:50 5: XiaomiBTLESens (pla00) - ExecGatttool_Done: gatttool return string: pla00|C4:7C:8D:66:1C:4C|ok|write|0x33|{"gtResult":"no data response"}
2018.04.25 00:08:50 4: XiaomiBTLESens (pla00) - Run CreateParamGatttool with mod: read
2018.04.25 00:08:50 5: XiaomiBTLESens (pla00) - Read XiaomiBTLESens_ExecGatttool_Run pla00|C4:7C:8D:66:1C:4C|read|0x35
2018.04.25 00:08:50 5: XiaomiBTLESens (pla00) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:1C:4C --char-read -a 0x35 2>&1 /dev/null and loop 0
2018.04.25 00:08:50 5: XiaomiBTLESens (pla00) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,fa 00 00 4c 00 00 00 00 00 00 02 3c 00 fb 34 9b

2018.04.25 00:08:50 4: XiaomiBTLESens (pla00) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,fa 00 00 4c 00 00 00 00 00 00 02 3c 00 fb 34 9b

2018.04.25 00:08:51 5: XiaomiBTLESens (pla00) - ExecGatttool_Done: gatttool return string: pla00|C4:7C:8D:66:1C:4C|ok|read|0x35|{"gtResult":"fa 00 00 4c 00 00 00 00 00 00 02 3c 00 fb 34 9b "}
2018.04.25 00:08:51 4: XiaomiBTLESens (pla00) - ProcessingNotification
2018.04.25 00:08:51 4: XiaomiBTLESens (pla00) - ProcessingNotification: handle 0x35
2018.04.25 00:08:51 4: XiaomiBTLESens (pla00) - FlowerSens Handle0x35
2018.04.25 00:08:51 4: XiaomiBTLESens (pla00) - WriteReadings: Readings were written
2018.04.25 00:11:00 4: XiaomiBTLESens (pla02) - Run CreateParamGatttool with mod: read
2018.04.25 00:11:00 5: XiaomiBTLESens (pla02) - Read XiaomiBTLESens_ExecGatttool_Run pla02|C4:7C:8D:66:20:C7|read|0x38
2018.04.25 00:11:00 4: XiaomiBTLESens (pla02) - stateRequestTimer: Call Request Timer
2018.04.25 00:11:00 5: XiaomiBTLESens (pla02) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:20:C7 --char-read -a 0x38 2>&1 /dev/null and loop 0
2018.04.25 00:11:02 5: XiaomiBTLESens (pla02) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,64 15 32 2e 37 2e 30

2018.04.25 00:11:02 4: XiaomiBTLESens (pla02) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,64 15 32 2e 37 2e 30

2018.04.25 00:11:02 5: XiaomiBTLESens (pla02) - ExecGatttool_Done: gatttool return string: pla02|C4:7C:8D:66:20:C7|ok|read|0x38|{"gtResult":"64 15 32 2e 37 2e 30 "}
2018.04.25 00:11:02 4: XiaomiBTLESens (pla02) - ProcessingNotification
2018.04.25 00:11:02 4: XiaomiBTLESens (pla02) - ProcessingNotification: handle 0x38
2018.04.25 00:11:02 4: XiaomiBTLESens (pla02) - FlowerSens Handle0x38
2018.04.25 00:11:02 4: XiaomiBTLESens (pla02) - WriteReadings: Readings were written
2018.04.25 00:11:02 4: XiaomiBTLESens (pla02) - Run CreateParamGatttool with mod: write
2018.04.25 00:11:02 5: XiaomiBTLESens (pla02) - Write XiaomiBTLESens_ExecGatttool_Run pla02|C4:7C:8D:66:20:C7|write|0x33|A01F
2018.04.25 00:11:03 5: XiaomiBTLESens (pla02) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:20:C7 --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 0
2018.04.25 00:11:03 5: XiaomiBTLESens (pla02) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.04.25 00:11:03 4: XiaomiBTLESens (pla02) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.04.25 00:11:03 5: XiaomiBTLESens (pla02) - ExecGatttool_Done: gatttool return string: pla02|C4:7C:8D:66:20:C7|ok|write|0x33|{"gtResult":"no data response"}
2018.04.25 00:11:03 4: XiaomiBTLESens (pla02) - Run CreateParamGatttool with mod: read
2018.04.25 00:11:03 5: XiaomiBTLESens (pla02) - Read XiaomiBTLESens_ExecGatttool_Run pla02|C4:7C:8D:66:20:C7|read|0x35
2018.04.25 00:11:03 5: XiaomiBTLESens (pla02) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:20:C7 --char-read -a 0x35 2>&1 /dev/null and loop 0
2018.04.25 00:11:03 5: XiaomiBTLESens (pla02) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,ee 00 00 52 00 00 00 00 02 00 02 3c 00 fb 34 9b

2018.04.25 00:11:03 4: XiaomiBTLESens (pla02) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,ee 00 00 52 00 00 00 00 02 00 02 3c 00 fb 34 9b

2018.04.25 00:11:03 5: XiaomiBTLESens (pla02) - ExecGatttool_Done: gatttool return string: pla02|C4:7C:8D:66:20:C7|ok|read|0x35|{"gtResult":"ee 00 00 52 00 00 00 00 02 00 02 3c 00 fb 34 9b "}
2018.04.25 00:11:03 4: XiaomiBTLESens (pla02) - ProcessingNotification
2018.04.25 00:11:03 4: XiaomiBTLESens (pla02) - ProcessingNotification: handle 0x35
2018.04.25 00:11:03 4: XiaomiBTLESens (pla02) - FlowerSens Handle0x35
2018.04.25 00:11:03 4: XiaomiBTLESens (pla02) - WriteReadings: Readings were written

2018.04.25 00:14:33 3: Sub XiaomiBTLESens_Undef (pla02) - delete device pla02
2018.04.25 00:14:33 3: Sub XiaomiBTLESens_Undef (pla01) - delete device pla01
2018.04.25 00:14:33 3: Sub XiaomiBTLESens_Undef (pla00) - delete device pla00

2018.04.25 00:14:42 3: XiaomiBTLESens (pla00) - defined with BTMAC C4:7C:8D:66:1C:4C
2018.04.25 00:14:42 3: XiaomiBTLESens (pla00) - set interval to 3600
2018.04.25 00:14:42 3: XiaomiBTLESens (pla01) - defined with BTMAC C4:7C:8D:66:1E:79
2018.04.25 00:14:42 3: XiaomiBTLESens (pla01) - set interval to 3600
2018.04.25 00:14:42 3: XiaomiBTLESens (pla02) - defined with BTMAC C4:7C:8D:66:20:C7
2018.04.25 00:14:42 3: XiaomiBTLESens (pla02) - set interval to 3600


Letztes Log des Devices:
2018-04-25_00:08:40 pla01 fertility: 0
2018-04-25_00:08:40 pla01 temperature: 24.3
2018-04-25_00:08:40 pla01 moisture: 0
2018-04-25_00:08:40 pla01 active


Guten Morgen,

Er scheint in der Tat falsche Werte zu bekommen. Ich kann mir aber nicht erklären wieso, denn das Schreiben funktioniert und er darf korrekt lesen.
Ich empfehle Dir ein Firmware-Update zu machen. Musste feststellen das mit jeder neueren Version das auslesen immer besser wurde, oder zu mindest die Fehlerbehandlung sauberer vom Modul abgefangen wurde.
Dies hilft natürlich nicht bei Reichweitenprobleme aber die hast du ja auch nicht.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 27 April 2018, 06:37:58
Zitat von: fhainz am 24 April 2018, 21:03:39
Hallo Leon!

Meine 7 Flower Sensoren laufen derzeit auf einer Ubuntu VM mit einem externem BT-Stick. Nachdem ich ab und zu Probleme mit der Reichweite des Sticks habe, hab ich mir einen Raspi 3+ geholt der auf dem Balkon kommen soll.
Der Pi ist heute angekommen, bei der Inbetriebnahme der Sensoren habe ich aber einige Probleme.
Ich hab die Installations-Prozedur jetzt 2x durch, bei der 2. Installation hab dann ich irgendwann angefangen den Beitrag zu schreiben um so alles genau mitzudokumentieren.

Nach der ersten Installation von raspbian hab ich mit hcitool lescan die Sensoren gleich gefunden. Dann FHEM und MQTT installiert und meine 7 Sensoren eingebunden (Copy+Paste der 7 Definitionen aus und in die fhem.cfg). Das erste abrufen hat geklappt, nach einem manuellen update kam schon der error (Invalid argument (22). Anschließend hab ich viel versucht und anscheinend das Systen kaputt konfiguriert. Gut nochmal von vorne, jetzt aber geziel. ;)

Nach der 2. Installation von raspbian funktioninert hcitool lescan ohne Probleme. 2-3x getestet. Anschließend wieder FHEM laut Debian Anleitung mit apt-get installiert und 5 Sensoren definiert. Wieder nach ein paar Sekunden der gleiche Fehler wie oben. In der Konsole bekomme ich jetzt den Fehler Disable scan failed: Input/output error Anschließend hab ich alle 5 Devices gelöscht, google angeschmissen und das gefunden. https://stackoverflow.com/questions/22062037/hcitool-lescan-shows-i-o-error
Also das in der Konsole eingegeben

hciconfig hci0 down
hciconfig hci0 up

und jetzt funktioniert es auch wieder aus der Konsole. 5-10 Minuten gewartet, immer wieder erneut versucht. Keine Probleme. Anschließend hab ich dann langsam Stück für Stück 5 der 7 Sensoren in der Web-UI definiert, immer wieder ausprobiert, gespeichert und NICHT neugestartet. Abrufen klappt aus FHEM und der Konsole.
Jetzt starte ich FHEM neu, 1-2 Sensoren gehen auf active, der rest error (Invalid argument (22)). In der Konsole bekomme ich jetzt nach ein paar Scans auch wieder den Fehler Disable scan failed: Input/output error
Die Prozedur nachdem ich hciconfig hci0 ... eingegeben habe, habe ich jetzt 2x wiederholt. Immer mit dem selben Ergebnis. Sobald FHEM und ein neustart ins spiel kommen, fängt hcitool zu zicken an. Beim 2. mal nachstellen hat das Empfangen des ersten Sensors länger gedauert als das empfangen des 2. Sensors. Der 2. Sensor war active, der 1. anschließend gleich mal auf error, ohne neustart.

Ich hab auch auf der Ubuntu-VM alle paar Tage Probleme die Sensoren zu empfangen. Den Fehler kann ich falls gewünscht nachreichen könnte aber "charWrite faild" sein, bin mir aber nicht sicher. Ein neustart von FHEM hilft da nicht mehr, ich muss die komplette Maschine neustarten. Das war unteranderem ein Grund auf den Pi zu wechseln ;)

Kannst du dir das ganze erklären? Falls du verbose 5 Logs benötigst, sag bescheid.

Danke & Grüße

Edit:
hcitool in der konsole funktioniert eigenartigerweise noch, in FHEM aber Invalid argument (22)

Hallo,

Bei Dir müsste ich ein bisschen drüber Nachdenken. Leider habe ich nicht wirklich eine Ahnung. Ich habe gehört das es oft Probleme mit BT und dem Raspi 3 geben soll. Du kannst zu Testzwecken versuchen einen BT Stick zu nehmen statt des internen.
Das hcitool funktioniert und das Modul nicht hat nichts miteinander zu tun, wenn du sauber testen willst musst du den gatttool Befehl ausführen.



Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: majestro84 am 27 April 2018, 22:47:17
So ich habe meine Thermometer nun alle verbunden soweit läuft es auch nur bekomme ich des öfteren diesen Fehler.
lastGattError   charWrite faild

Was kann ich sagen unternehmen?



Gesendet von meinem Redmi Note 4 mit Tapatalk

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 28 April 2018, 01:58:15
Da brauche ich wenn bitte ein verbose 5 Log.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 29 April 2018, 12:29:47
Zitat von: majestro84 am 29 April 2018, 11:27:38
Hier Mal ein Auszug aus dem log


2018-04-29_08:13:19 K_Abstellraum_Temperatur active 2018-04-29_08:18:10 K_Abstellraum_Temperatur write sensor data
2018-04-29_08:18:21 K_Abstellraum_Temperatur temperature: 21.7
2018-04-29_08:18:21 K_Abstellraum_Temperatur humidity: 48.1
2018-04-29_08:18:21 K_Abstellraum_Temperatur active 2018-04-29_08:23:32 K_Abstellraum_Temperatur write sensor data
2018-04-29_08:23:41 K_Abstellraum_Temperatur lastGattError: charWrite faild
2018-04-29_08:23:41 K_Abstellraum_Temperatur error 2018-04-29_08:23:41 K_Abstellraum_Temperatur active 2018-04-29_08:29:50 K_Abstellraum_Temperatur write sensor data
2018-04-29_08:29:56 K_Abstellraum_Temperatur lastGattError: charWrite faild
2018-04-29_08:29:56 K_Abstellraum_Temperatur error 2018-04-29_08:29:56 K_Abstellraum_Temperatur active 2018-04-29_08:35:44 K_Abstellraum_Temperatur write sensor data
2018-04-29_08:35:49 K_Abstellraum_Temperatur lastGattError: charWrite faild
2018-04-29_08:35:49 K_Abstellraum_Temperatur error 2018-04-29_08:35:49 K_Abstellraum_Temperatur active 2018-04-29_08:41:46 K_Abstellraum_Temperatur write sensor data
2018-04-29_08:42:33 K_Abstellraum_Temperatur lastGattError: Transport endpoint is not connected (107) 2018-04-29_08:42:33 K_Abstellraum_Temperatur error 2018-04-29_08:47:26 K_Abstellraum_Temperatur write sensor data
2018-04-29_08:48:11 K_Abstellraum_Temperatur lastGattError: Transport endpoint is not connected (107) 2018-04-29_08:48:11 K_Abstellraum_Temperatur error 2018-04-29_08:53:09 K_Abstellraum_Temperatur write sensor data
2018-04-29_08:53:24 K_Abstellraum_Temperatur lastGattError: charWrite faild
2018-04-29_08:53:24 K_Abstellraum_Temperatur error 2018-04-29_08:53:24 K_Abstellraum_Temperatur active 2018-04-29_08:58:19 K_Abstellraum_Temperatur write sensor data
2018-04-29_08:58:29 K_Abstellraum_Temperatur temperature: 21.6
2018-04-29_08:58:29 K_Abstellraum_Temperatur humidity: 46.3
2018-04-29_08:58:29 K_Abstellraum_Temperatur active


Vielleicht kannst du da was mit anfangen.
Danke schon mal im voraus.
Schönen Sonntag noch

Gesendet von meinem Redmi Note 4 mit Tapatalk
Das ist ein Device Log ich brauche bitte fhem Log
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: majestro84 am 29 April 2018, 13:03:12
Sorry mein Fehler hier das FHEM log.

2018.04.29 08:47:26 4: XiaomiBTLESens (K_Abstellraum_Temperatur) - Run CreateParamGatttool with mod: write
2018.04.29 08:47:26 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - Write XiaomiBTLESens_ExecGatttool_Run K_Abstellraum_Temperatur|4C:65:A8:D3:EF:EE|write|0x10|0100
2018.04.29 08:47:26 4: XiaomiBTLESens (K_Abstellraum_Temperatur) - stateRequestTimer: Call Request Timer
2018.04.29 08:47:26 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D3:EF:EE --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.04.29 08:47:36 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Run: gatttool loop result
2018.04.29 08:47:36 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D3:EF:EE --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 1
2018.04.29 08:47:46 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Run: gatttool loop result
2018.04.29 08:47:46 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D3:EF:EE --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 2
2018.04.29 08:47:56 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Run: gatttool loop result
2018.04.29 08:47:56 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D3:EF:EE --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 3
2018.04.29 08:48:06 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Run: gatttool loop result
2018.04.29 08:48:06 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D3:EF:EE --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 4
2018.04.29 08:48:10 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Run: gatttool loop result connect error,Transport endpoint is not connected (107)

2018.04.29 08:48:10 4: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Run: gatttool result connect error,Transport endpoint is not connected (107)

2018.04.29 08:48:11 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Done: gatttool return string: K_Abstellraum_Temperatur|4C:65:A8:D3:EF:EE|error|write|0x10|{"gtResult":"Transport endpoint is not connected (107)"}
2018.04.29 08:48:11 4: XiaomiBTLESens (K_Abstellraum_Temperatur) - ProcessingErrors
2018.04.29 08:48:11 4: XiaomiBTLESens (K_Abstellraum_Temperatur) - WriteReadings: Readings were written
2018.04.29 08:53:09 4: XiaomiBTLESens (K_Abstellraum_Temperatur) - Run CreateParamGatttool with mod: write
2018.04.29 08:53:09 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - Write XiaomiBTLESens_ExecGatttool_Run K_Abstellraum_Temperatur|4C:65:A8:D3:EF:EE|write|0x10|0100
2018.04.29 08:53:09 4: XiaomiBTLESens (K_Abstellraum_Temperatur) - stateRequestTimer: Call Request Timer
2018.04.29 08:53:09 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D3:EF:EE --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.04.29 08:53:19 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Run: gatttool loop result
2018.04.29 08:53:19 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D3:EF:EE --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 1
2018.04.29 08:53:22 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Run: gatttool loop result connect error,Transport endpoint is not connected (107)
2018.04.29 08:53:22 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D3:EF:EE --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 2
2018.04.29 08:53:24 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Run: gatttool loop result connect error,Software caused connection abort (103)
2018.04.29 08:53:24 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D3:EF:EE --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 3
2018.04.29 08:53:24 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Run: gatttool loop result connect,No route to host (113)
2018.04.29 08:53:24 4: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Run: gatttool result connect,No route to host (113)
2018.04.29 08:53:24 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Done: gatttool return string: K_Abstellraum_Temperatur|4C:65:A8:D3:EF:EE|ok|write|0x10|{"gtResult":"No route to host (113)"}
2018.04.29 08:53:24 4: XiaomiBTLESens (K_Abstellraum_Temperatur) - ProcessingNotification
2018.04.29 08:53:24 4: XiaomiBTLESens (K_Abstellraum_Temperatur) - ProcessingNotification: handle 0x10
2018.04.29 08:53:24 4: XiaomiBTLESens (K_Abstellraum_Temperatur) - Thermo/Hygro Sens Handle0x10
2018.04.29 08:53:24 4: XiaomiBTLESens (K_Abstellraum_Temperatur) - WriteReadings: Readings were written
2018.04.29 08:53:24 4: XiaomiBTLESens (K_Abstellraum_Temperatur) - WriteReadings: Readings were written
2018.04.29 08:58:19 4: XiaomiBTLESens (K_Abstellraum_Temperatur) - Run CreateParamGatttool with mod: write
2018.04.29 08:58:19 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - Write XiaomiBTLESens_ExecGatttool_Run K_Abstellraum_Temperatur|4C:65:A8:D3:EF:EE|write|0x10|0100
2018.04.29 08:58:19 4: XiaomiBTLESens (K_Abstellraum_Temperatur) - stateRequestTimer: Call Request Timer
2018.04.29 08:58:19 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D3:EF:EE --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.04.29 08:58:21 3: ENIGMA2 WZ_Receiver: ERROR: Unable to read tv bouquet '1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.dbe09.tv" ORDER BY bouquet' from device
2018.04.29 08:58:29 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 31 2e 36 20 48 3d 34 36 2e 33 00
Notification handle = 0x000e value,54 3d 32 31 2e 36 20 48 3d 34 36 2e 32 00
Notification handle = 0x000e value,54 3d 32 31 2e 36 20 48 3d 34 36 2e 35 00
Notification handle = 0x000e value,54 3d 32 31 2e 36 20 48 3d 34 36 2e 34 00

2018.04.29 08:58:29 4: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 31 2e 36 20 48 3d 34 36 2e 33 00
Notification handle = 0x000e value,54 3d 32 31 2e 36 20 48 3d 34 36 2e 32 00
Notification handle = 0x000e value,54 3d 32 31 2e 36 20 48 3d 34 36 2e 35 00
Notification handle = 0x000e value,54 3d 32 31 2e 36 20 48 3d 34 36 2e 34 00

2018.04.29 08:58:29 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Done: gatttool return string: K_Abstellraum_Temperatur|4C:65:A8:D3:EF:EE|ok|write|0x10|{"gtResult":"54 3d 32 31 2e 36 20 48 3d 34 36 2e 33 00 "}
2018.04.29 08:58:29 4: XiaomiBTLESens (K_Abstellraum_Temperatur) - ProcessingNotification
2018.04.29 08:58:29 4: XiaomiBTLESens (K_Abstellraum_Temperatur) - ProcessingNotification: handle 0x10
2018.04.29 08:58:29 4: XiaomiBTLESens (K_Abstellraum_Temperatur) - Thermo/Hygro Sens Handle0x10
2018.04.29 08:58:29 4: XiaomiBTLESens (K_Abstellraum_Temperatur) - WriteReadings: Readings were written
2018.04.29 09:03:46 4: XiaomiBTLESens (K_Abstellraum_Temperatur) - Run CreateParamGatttool with mod: write
2018.04.29 09:03:46 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - Write XiaomiBTLESens_ExecGatttool_Run K_Abstellraum_Temperatur|4C:65:A8:D3:EF:EE|write|0x10|0100
2018.04.29 09:03:46 4: XiaomiBTLESens (K_Abstellraum_Temperatur) - stateRequestTimer: Call Request Timer
2018.04.29 09:03:46 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D3:EF:EE --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.04.29 09:03:48 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Run: gatttool loop result connect error,Transport endpoint is not connected (107)

2018.04.29 09:03:48 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D3:EF:EE --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 1
2018.04.29 09:03:49 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Run: gatttool loop result connect error,Software caused connection abort (103)

2018.04.29 09:03:49 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D3:EF:EE --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 2
2018.04.29 09:03:49 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Run: gatttool loop result connect,No route to host (113)

2018.04.29 09:03:49 4: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Run: gatttool result connect,No route to host (113)

2018.04.29 09:03:49 5: XiaomiBTLESens (K_Abstellraum_Temperatur) - ExecGatttool_Done: gatttool return string: K_Abstellraum_Temperatur|4C:65:A8:D3:EF:EE|ok|write|0x10|{"gtResult":"No route to host (113)"}
2018.04.29 09:03:49 4: XiaomiBTLESens (K_Abstellraum_Temperatur) - ProcessingNotification
2018.04.29 09:03:49 4: XiaomiBTLESens (K_Abstellraum_Temperatur) - ProcessingNotification: handle 0x10
2018.04.29 09:03:49 4: XiaomiBTLESens (K_Abstellraum_Temperatur) - Thermo/Hygro Sens Handle0x10
2018.04.29 09:03:49 4: XiaomiBTLESens (K_Abstellraum_Temperatur) - WriteReadings: Readings were written
2018.04.29 09:03:49 4: XiaomiBTLESens (K_Abstellraum_Temperatur) - WriteReadings: Readings were written
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Steffen am 29 April 2018, 18:40:29
Hallo!

Habe seit einem Upgrade Stretch auf einmal nur Probleme mit den Modulen die mit Bluetooth zusammen hängen und jetzt hier auch mit diesen.

Vielleicht habt ihr ja eine Idee was es sein könnte:


2018.04.29 18:30:37 3: XiaomiBTLESens (TestPflanze) - defined with BTMAC C4:7C:8D:66:17:03
2018.04.29 18:32:07 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 6585
2018.04.29 18:32:12 3: XiaomiBTLESens (TestPflanze) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.04.29 18:32:13 3: XiaomiBTLESens (TestPflanze) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.04.29 18:32:14 3: XiaomiBTLESens (TestPflanze) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.04.29 18:32:15 3: XiaomiBTLESens (TestPflanze) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.04.29 18:32:17 3: XiaomiBTLESens (TestPflanze) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.04.29 18:32:18 3: XiaomiBTLESens (TestPflanze) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.04.29 18:32:19 3: XiaomiBTLESens (TestPflanze) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.04.29 18:32:20 3: XiaomiBTLESens (TestPflanze) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.04.29 18:32:21 3: XiaomiBTLESens (TestPflanze) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.04.29 18:32:22 3: XiaomiBTLESens (TestPflanze) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.04.29 18:32:23 3: XiaomiBTLESens (TestPflanze) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.04.29 18:32:24 3: XiaomiBTLESens (TestPflanze) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.04.29 18:32:25 3: XiaomiBTLESens (TestPflanze) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.04.29 18:32:26 3: XiaomiBTLESens (TestPflanze) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.04.29 18:32:28 3: XiaomiBTLESens (TestPflanze) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.04.29 18:32:29 3: XiaomiBTLESens (TestPflanze) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.04.29 18:32:30 3: XiaomiBTLESens (TestPflanze) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.04.29 18:32:31 3: XiaomiBTLESens (TestPflanze) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.04.29 18:32:32 3: XiaomiBTLESens (TestPflanze) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.04.29 18:32:33 3: XiaomiBTLESens (TestPflanze) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.04.29 18:32:34 3: XiaomiBTLESens (TestPflanze) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.04.29 18:32:35 3: XiaomiBTLESens (TestPflanze) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.04.29 18:32:36 3: XiaomiBTLESens (TestPflanze) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.04.29 18:32:37 3: XiaomiBTLESens (TestPflanze) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.04.29 18:32:38 3: XiaomiBTLESens (TestPflanze) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.04.29 18:32:39 3: XiaomiBTLESens (TestPflanze) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.04.29 18:32:41 3: XiaomiBTLESens (TestPflanze) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.04.29 18:33:42 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 6667
2018.04.29 18:37:59 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 6913


Mfg Steffen
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 29 April 2018, 18:45:18
Da scheint schon ein gatttool Prozess zu laufen.
list vom Device und mach mal ein
ps ax | grep gatttool
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Steffen am 29 April 2018, 19:02:18
Hallo!

Ok du scheinst recht zu haben, aber es bleibt so auch wenn ich das ganze System neu starte aber hier mal die weiteren Infos:


root@happyfamilyserver:~# ps ax | grep gatttool
7895 ?        S      0:00 sh -c gatttool -i hci0 -b C4:7C:8D:66:17:03 --char-read -a 0x38 2>&1 /dev/null
7896 ?        S      0:00 gatttool -i hci0 -b C4:7C:8D:66:17:03 --char-read -a 0x38 /dev/null
7909 pts/0    S+     0:00 grep gatttool
root@happyfamilyserver:~#



Internals:
   BTMAC      C4:7C:8D:66:17:03
   CHANGED   
   DEF        C4:7C:8D:66:17:03
   INTERVAL   300
   NAME       TestPflanze
   NOTIFYDEV  global,TestPflanze
   NR         234
   NTFY_ORDER 50-TestPflanze
   STATE      32
   TYPE       XiaomiBTLESens
   VERSION    2.0.12
   loglevel   4
   READINGS:
     2018-04-28 10:30:14   battery         ok
     2018-04-28 10:30:14   batteryLevel    99
     2018-04-28 11:14:39   fertility       0
     2018-04-28 10:30:14   firmware        3.1.8
     2018-04-29 18:57:11   lastGattError   The BlockingCall Process terminated unexpectedly. Timedout
     2018-04-28 11:14:39   lux             27476
     2018-04-28 11:14:39   moisture        1
     2018-04-29 18:59:32   state           read sensor data
     2018-04-28 11:14:39   temperature     32
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 0
     RUNNING_PID:
       abortFn    XiaomiBTLESens_ExecGatttool_Aborted
       arg        TestPflanze|C4:7C:8D:66:17:03|read|0x38
       bc_pid     48
       finishFn   XiaomiBTLESens_ExecGatttool_Done
       fn         XiaomiBTLESens_ExecGatttool_Run
       pid        8011
       telnet     telnetForBlockingFn_1525018483.13791_127.0.0.1_37632
       timeout    90
       abortArg:
Attributes:
   event-on-update-reading fertility,moisture,temperature
   model      flowerSens
   room       Balkon,XiaomiBTLESens
   stateFormat temperature


es hatte aber vor dem upgrade aber gut Funktioniert deswege habe ich kein Plan wo ich da noch ansetzten kann?!?

Mfg Steffen
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 29 April 2018, 19:12:40
Setze mal alles auf disable und warte 2min, danach noch mal mit ps schauen
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Steffen am 29 April 2018, 19:47:04
Hallo!

Mit disable 1 :

root@happyfamilyserver:~# ps ax | grep gatttool
10262 pts/0    S+     0:00 grep gatttool
root@happyfamilyserver:~#ps -ax
9950 ?        S<     0:00 [hci0]
9951 ?        S<     0:00 [hci0]
9955 ?        Ss     0:00 /usr/lib/bluetooth/bluetoothd


ohne disable :


root@happyfamilyserver:~# ps ax | grep gatttool
10386 ?        S      0:00 sh -c gatttool -i hci0 -b C4:7C:8D:66:17:03 --char-read -a 0x38 2>&1 /dev/null
10387 ?        S      0:00 gatttool -i hci0 -b C4:7C:8D:66:17:03 --char-read -a 0x38 /dev/null
10399 pts/0    S+     0:00 grep gatttool
root@happyfamilyserver:~#


kannst du was erkennen???

Mfg Steffen
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 29 April 2018, 20:39:26
Jetzt bitte noch mal ps
Will sehen ob der Prozess stehen bleibt oder ein neuer entsteht.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Steffen am 29 April 2018, 20:50:19
meinst du so?

root@happyfamilyserver:~# ps
  PID TTY          TIME CMD
7384 pts/0    00:00:00 bash
7463 pts/0    00:00:00 ps
root@happyfamilyserver:~#


wenn ja dann ist diese Ausgabe ob mit ohne "disable"!

Mfg Steffen
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 29 April 2018, 21:12:02
Gatttool scheint also auch sauber beendet zu werden. Wie oft hast du diese Einträge, kommen überhaupt saubere Werte?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Steffen am 30 April 2018, 20:44:23
Zitat von: CoolTux am 29 April 2018, 21:12:02
Gatttool scheint also auch sauber beendet zu werden. Wie oft hast du diese Einträge, kommen überhaupt saubere Werte?

Vor dem Upgrade auf Stretch lief es wirklich gut und hatte immer saubere werte, nach dem Upgrade kam hier und da was an aber seit dem 28.04 kommt nichts mehr an.

Bei PLAYBULB war gleich nach dem Upgrade Schluss und es kam gar nichts mehr an.

Ich vermute es hat was mit dem Gattool zu tun aber kenne mich zu wenig in dieser Richtung aus, deswegen hoffte ich hier auf Hilfe?!

Mfg Steffen
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 30 April 2018, 22:21:16
Playbulb funktioniert in der Tat nicht mehr mit dem aktuellen gatttool. BTLESens sollte aber funktionieren.
Kannst Du das Mal bitte in der Konsole eingeben
gatttool -i hci0 -b C4:7C:8D:66:17:03 --char-read -a 0x38
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Steffen am 01 Mai 2018, 07:35:41
Hallo!

Jetzt habe ich glaube ich den Fehler gefunden, den es scheint ein Reichweiten Problem zu sein denn sobald ich ich den Flower-Sensor nach innen hole bekommt er die Daten.

Was aber komisch ist den zum einen sind das nicht mal 5m bis zum Balkon direkt durch riesige Terrassen Fenster und ohne Wände und zum anderen war das nicht so vor dem Upgrade.

Kann das was mit dem Upgrade zu tun haben das damit die Sendeleistung vom Usb Dongle beeinflusst wird? Könnte man irgendwie die Sendeleistung erhöhen?

Könnte jemand eine USB-Bluetooth Stick empfehlen der eine gute Reichweite hat?

Mfg Steffen
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: majestro84 am 02 Mai 2018, 20:28:22
Hallo

Habe mal einen Sensor Dichter an den Dongle gepackt. Er bekommt relativ häufig Werte allerdings kommen zwischen durch auch immer diese Fehler.

2018.05.02 20:15:30 4: XiaomiBTLESens (F_Temperatur) - Run CreateParamGatttool with mod: write 2018.05.02 20:15:30 5: XiaomiBTLESens (F_Temperatur) - Write XiaomiBTLESens_ExecGatttool_Run F_Temperatur|4C:65:A8:D3:F4:47|write|0x10|0100 2018.05.02 20:15:30 4: XiaomiBTLESens (F_Temperatur) - stateRequestTimer: Call Request Timer 2018.05.02 20:15:31 5: XiaomiBTLESens (F_Temperatur) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D3:F4:47 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0 2018.05.02 20:15:37 5: XiaomiBTLESens (F_Temperatur) - ExecGatttool_Run: gatttool loop result connect error,Transport endpoint is not connected (107) 2018.05.02 20:15:37 5: XiaomiBTLESens (F_Temperatur) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D3:F4:47 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 1 2018.05.02 20:15:38 5: XiaomiBTLESens (F_Temperatur) - ExecGatttool_Run: gatttool loop result connect error,Software caused connection abort (103) 2018.05.02 20:15:38 5: XiaomiBTLESens (F_Temperatur) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D3:F4:47 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 2 2018.05.02 20:15:38 5: XiaomiBTLESens (F_Temperatur) - ExecGatttool_Run: gatttool loop result connect,No route to host (113) 2018.05.02 20:15:38 4: XiaomiBTLESens (F_Temperatur) - ExecGatttool_Run: gatttool result connect,No route to host (113) 2018.05.02 20:15:39 5: XiaomiBTLESens (F_Temperatur) - ExecGatttool_Done: gatttool return string: F_Temperatur|4C:65:A8:D3:F4:47|ok|write|0x10|{"gtResult":"No route to host (113)"} 2018.05.02 20:15:39 4: XiaomiBTLESens (F_Temperatur) - ProcessingNotification 2018.05.02 20:15:39 4: XiaomiBTLESens (F_Temperatur) - ProcessingNotification: handle 0x10 2018.05.02 20:15:39 4: XiaomiBTLESens (F_Temperatur) - Thermo/Hygro Sens Handle0x10 2018.05.02 20:15:39 4: XiaomiBTLESens (F_Temperatur) - WriteReadings: Readings were written 2018.05.02 20:15:39 4: XiaomiBTLESens (F_Temperatur) - WriteReadings: Readings were written

Was kann ich da machen um diese Fehler weg zubekommen?

Danke schonmal für die Hilfe
Gruß Alex

Gesendet von meinem Redmi Note 4 mit Tapatalk

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: mark79 am 02 Mai 2018, 22:12:37
Zitat von: Steffen am 01 Mai 2018, 07:35:41
Könnte jemand eine USB-Bluetooth Stick empfehlen der eine gute Reichweite hat?

Das würde mich auch interessieren.. Habe seit neusten auch Probleme mit der Reichweite und habe schon überlegt, eine Antenne an den BT Stick dran zu basteln. :D

Zuerst hatte ich nur ein Flower Sensor, der lief über Monate zuverlässig, obwohl manchmal auch ein Char write failed in den Readings auftauchte, aber die Daten kamen trotzdem regelmäßig rein.

Dann kam ein zweiter Sensor hinzu, der etwa 1 Meter näher am Fhem Server steht.
Der alte Sensor funktionierte nicht mehr, seit dem der neue Sensor eingerichtet wurde.
Die Daten kamen nur noch für den neuen Sensor rein.

Obwohl der alte Sensor, sowie Fhem bzw. der Bluetooth Stick von der Position her nicht verändert wurde.

Habe den alten Sensor dann aus der Blume entfernt und neben den neuen gelegt und dann ging er wieder...
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 02 Mai 2018, 22:22:13
Zitat von: majestro84 am 02 Mai 2018, 20:28:22
Hallo

Habe mal einen Sensor Dichter an den Dongle gepackt. Er bekommt relativ häufig Werte allerdings kommen zwischen durch auch immer diese Fehler.

2018.05.02 20:15:30 4: XiaomiBTLESens (F_Temperatur) - Run CreateParamGatttool with mod: write 2018.05.02 20:15:30 5: XiaomiBTLESens (F_Temperatur) - Write XiaomiBTLESens_ExecGatttool_Run F_Temperatur|4C:65:A8:D3:F4:47|write|0x10|0100 2018.05.02 20:15:30 4: XiaomiBTLESens (F_Temperatur) - stateRequestTimer: Call Request Timer 2018.05.02 20:15:31 5: XiaomiBTLESens (F_Temperatur) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D3:F4:47 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0 2018.05.02 20:15:37 5: XiaomiBTLESens (F_Temperatur) - ExecGatttool_Run: gatttool loop result connect error,Transport endpoint is not connected (107) 2018.05.02 20:15:37 5: XiaomiBTLESens (F_Temperatur) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D3:F4:47 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 1 2018.05.02 20:15:38 5: XiaomiBTLESens (F_Temperatur) - ExecGatttool_Run: gatttool loop result connect error,Software caused connection abort (103) 2018.05.02 20:15:38 5: XiaomiBTLESens (F_Temperatur) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D3:F4:47 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 2 2018.05.02 20:15:38 5: XiaomiBTLESens (F_Temperatur) - ExecGatttool_Run: gatttool loop result connect,No route to host (113) 2018.05.02 20:15:38 4: XiaomiBTLESens (F_Temperatur) - ExecGatttool_Run: gatttool result connect,No route to host (113) 2018.05.02 20:15:39 5: XiaomiBTLESens (F_Temperatur) - ExecGatttool_Done: gatttool return string: F_Temperatur|4C:65:A8:D3:F4:47|ok|write|0x10|{"gtResult":"No route to host (113)"} 2018.05.02 20:15:39 4: XiaomiBTLESens (F_Temperatur) - ProcessingNotification 2018.05.02 20:15:39 4: XiaomiBTLESens (F_Temperatur) - ProcessingNotification: handle 0x10 2018.05.02 20:15:39 4: XiaomiBTLESens (F_Temperatur) - Thermo/Hygro Sens Handle0x10 2018.05.02 20:15:39 4: XiaomiBTLESens (F_Temperatur) - WriteReadings: Readings were written 2018.05.02 20:15:39 4: XiaomiBTLESens (F_Temperatur) - WriteReadings: Readings were written

Was kann ich da machen um diese Fehler weg zubekommen?

Danke schonmal für die Hilfe
Gruß Alex

Gesendet von meinem Redmi Note 4 mit Tapatalk

Das hin und wieder Mal Fehler reinkommen ist leider normal.
Ganz lesen kann ich dein was auch immer leider nicht. Ist irgendwie alles an einander gereiht.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: majestro84 am 02 Mai 2018, 22:36:45
Probiere es einmal zu sortieren die Zeilenumbrüche am Handy sind anscheinend nicht so toll.


2018.05.02 20:15:30 4: XiaomiBTLESens (F_Temperatur) - Run CreateParamGatttool with mod: write

2018.05.02 20:15:30 5: XiaomiBTLESens (F_Temperatur) - Write XiaomiBTLESens_ExecGatttool_Run F_Temperatur|4C:65:A8:D3:F4:47|write|0x10|0100

2018.05.02 20:15:30 4: XiaomiBTLESens (F_Temperatur) - stateRequestTimer: Call Request Timer

2018.05.02 20:15:31 5: XiaomiBTLESens (F_Temperatur) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D3:F4:47 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0

2018.05.02 20:15:37 5: XiaomiBTLESens (F_Temperatur) - ExecGatttool_Run: gatttool loop result connect error,Transport endpoint is not connected (107)

2018.05.02 20:15:37 5: XiaomiBTLESens (F_Temperatur) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D3:F4:47 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 1

2018.05.02 20:15:38 5: XiaomiBTLESens (F_Temperatur) - ExecGatttool_Run: gatttool loop result connect error,Software caused connection abort (103)

2018.05.02 20:15:38 5: XiaomiBTLESens (F_Temperatur) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D3:F4:47 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 2

2018.05.02 20:15:38 5: XiaomiBTLESens (F_Temperatur) - ExecGatttool_Run: gatttool loop result connect,No route to host (113)

2018.05.02 20:15:38 4: XiaomiBTLESens (F_Temperatur) - ExecGatttool_Run: gatttool result connect,No route to host (113)

2018.05.02 20:15:39 5: XiaomiBTLESens (F_Temperatur) - ExecGatttool_Done: gatttool return string: F_Temperatur|4C:65:A8:D3:F4:47|ok|write|0x10|{"gtResult":"No route to host (113)"}

2018.05.02 20:15:39 4: XiaomiBTLESens (F_Temperatur) - ProcessingNotification

2018.05.02 20:15:39 4: XiaomiBTLESens (F_Temperatur) - ProcessingNotification: handle 0x10

2018.05.02 20:15:39 4: XiaomiBTLESens (F_Temperatur) - Thermo/Hygro Sens Handle0x10

2018.05.02 20:15:39 4: XiaomiBTLESens (F_Temperatur) - WriteReadings: Readings were written

2018.05.02 20:15:39 4: XiaomiBTLESens (F_Temperatur) - WriteReadings: Readings were written


Vielleicht ist es so besser so lesen danke für deine Mühe
Gruß Alex

Gesendet von meinem Redmi Note 4 mit Tapatalk
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 03 Mai 2018, 08:40:37
Es sieht nach einem normalen Verbindungsproblem aus. Entweder wird der BT Stack blockiert oder das Endgerät ist ausser Reichweite.
BT hat auch Probleme im Zusammenhang mit 2,4GHz WLAN. Da kann die BT Reichweite schnell mal absacken. Wer kann sollte sein WLAN auf 5GHz umschalten. Habe ich auch gemacht.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: majestro84 am 03 Mai 2018, 08:54:13
OK kann dann natürlich auch am zigbee liegen das kann ich ja leider nicht auf 5ghz umstellen. Das Thermometer aus dem letzten Log ist nur durch eine Wand zum dongel getrennt. Danke für deine Antwort Wort all zu schlimm ist es ja auch nicht bekommt ja paar mal am Tag Werte
Gruß Alex

Gesendet von meinem Redmi Note 4 mit Tapatalk

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: christiang am 05 Mai 2018, 10:12:52
Hallo CoolTux,

erstmal vielen Dank für das tolle Modul! Funktioniert bisher einwandfrei mit mittlerweile 10 Sensoren.

Ich habe jedoch das Problem, dass nach einem rereadCfg die Devices im Zustand "initialized" sind und auch bleiben. Nach einem restart von Fhem werden die Messwerte jedoch einwandfrei gelesen.
Ist das ein Problem an meinem Setup oder tritt das bei anderen auch auf?

Viele Grüße,
Christian

Hier ein list von einem Device im Zustand initialized:

Internals:
   BTMAC      C4:7C:8D:65:D8:64
   CFGFN      ./FHEM/plants.cfg
   DEF        C4:7C:8D:65:D8:64
   INTERVAL   300
   NAME       plants_xiaomi_schnittlauch
   NOTIFYDEV  global,plants_xiaomi_schnittlauch
   NR         692
   NTFY_ORDER 50-plants_xiaomi_schnittlauch
   STATE      initialized
   TYPE       XiaomiBTLESens
   VERSION    2.0.12
   loglevel   4
   READINGS:
     2018-05-05 10:06:27   battery         ok
     2018-05-05 10:06:27   batteryLevel    83
     2018-05-05 10:06:27   fertility       1434
     2018-05-05 10:06:27   firmware        2.7.0
     2018-05-04 19:06:03   lastGattError   charWrite faild
     2018-05-05 10:06:27   lux             8447
     2018-05-05 10:06:27   moisture        69
     2018-05-05 10:09:01   state           initialized
     2018-05-05 10:06:27   temperature     16.3
   helper:
     CallBattery 0
     CallSensDataCounter 0
Attributes:
   alias      Schnittlauch
   event-min-interval moisture:1800
   event-on-change-reading .*
   group      Pflanzen
   interval   300
   model      flowerSens
   room       7.3_Plants
   stateFormat Feuchtigkeit: moisture Licht: lux lm Temperatur: temperature°C Nährstoffe: fertility Batterie: batteryLevel%
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 05 Mai 2018, 12:38:37
Das ist etwas was im Modul nicht beachtet wurde weil ich Configeditierer nicht mag  :P
Ich werde es die Tage richten  ;)

Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: christiang am 05 Mai 2018, 14:54:03
Super das ist sehr Nett  :) Vielen Dank.

Grüße
Christian

P.S. Configgenerierer mit templates  :P
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 05 Mai 2018, 15:01:59
Zitat von: christiang am 05 Mai 2018, 14:54:03

P.S. Configgenerierer mit templates  :P

Kenn ich. Die fressen kleene Kinder oder Nachbars Katze.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 07 Mai 2018, 09:05:25
Zitat von: christiang am 05 Mai 2018, 10:12:52
Hallo CoolTux,

erstmal vielen Dank für das tolle Modul! Funktioniert bisher einwandfrei mit mittlerweile 10 Sensoren.

Ich habe jedoch das Problem, dass nach einem rereadCfg die Devices im Zustand "initialized" sind und auch bleiben. Nach einem restart von Fhem werden die Messwerte jedoch einwandfrei gelesen.
Ist das ein Problem an meinem Setup oder tritt das bei anderen auch auf?

Viele Grüße,
Christian

Hier ein list von einem Device im Zustand initialized:

Internals:
   BTMAC      C4:7C:8D:65:D8:64
   CFGFN      ./FHEM/plants.cfg
   DEF        C4:7C:8D:65:D8:64
   INTERVAL   300
   NAME       plants_xiaomi_schnittlauch
   NOTIFYDEV  global,plants_xiaomi_schnittlauch
   NR         692
   NTFY_ORDER 50-plants_xiaomi_schnittlauch
   STATE      initialized
   TYPE       XiaomiBTLESens
   VERSION    2.0.12
   loglevel   4
   READINGS:
     2018-05-05 10:06:27   battery         ok
     2018-05-05 10:06:27   batteryLevel    83
     2018-05-05 10:06:27   fertility       1434
     2018-05-05 10:06:27   firmware        2.7.0
     2018-05-04 19:06:03   lastGattError   charWrite faild
     2018-05-05 10:06:27   lux             8447
     2018-05-05 10:06:27   moisture        69
     2018-05-05 10:09:01   state           initialized
     2018-05-05 10:06:27   temperature     16.3
   helper:
     CallBattery 0
     CallSensDataCounter 0
Attributes:
   alias      Schnittlauch
   event-min-interval moisture:1800
   event-on-change-reading .*
   group      Pflanzen
   interval   300
   model      flowerSens
   room       7.3_Plants
   stateFormat Feuchtigkeit: moisture Licht: lux lm Temperatur: temperature°C Nährstoffe: fertility Batterie: batteryLevel%


Hallo Christian,

Kannst Du bitte einmal die aktuelle Git Version testen?
https://github.com/LeonGaultier/fhem-XiaomiBTLESens/archive/master.zip

Danke Dir

Leon
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: christiang am 08 Mai 2018, 00:09:19
Hi Leon,

sorry ich bin erst jetzt zum ausprobieren gekommen, war beruflich unterwegs.

Leider bleiben die Devices noch im initialized state hängen.

Viele Grüße,
Christian

Internals:
   BTMAC      C4:7C:8D:65:D8:64
   CFGFN      ./FHEM/plants.cfg
   DEF        C4:7C:8D:65:D8:64
   INTERVAL   300
   NAME       plants_xiaomi_schnittlauch
   NOTIFYDEV  global,plants_xiaomi_schnittlauch
   NR         700
   NTFY_ORDER 50-plants_xiaomi_schnittlauch
   STATE      initialized
   TYPE       XiaomiBTLESens
   VERSION    2.0.13
   loglevel   4
   READINGS:
     2018-05-07 10:06:11   battery         ok
     2018-05-07 10:06:11   batteryLevel    83
     2018-05-07 23:57:42   fertility       1628
     2018-05-07 10:06:11   firmware        2.7.0
     2018-05-08 00:03:24   lastGattError   charWrite faild
     2018-05-07 23:57:42   lux             150
     2018-05-07 23:57:42   moisture        68
     2018-05-08 00:06:28   state           initialized
     2018-05-07 23:57:42   temperature     16.8
   helper:
     CallBattery 0
     CallSensDataCounter 0
Attributes:
   alias      Schnittlauch
   event-min-interval moisture:1800
   event-on-change-reading .*
   group      Pflanzen
   interval   300
   model      flowerSens
   room       7.3_Plants
   stateFormat Feuchtigkeit: moisture Licht: lux lm Temperatur: temperature°C Nährstoffe: fertility Batterie: batteryLevel%
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 08 Mai 2018, 17:26:35
bitte noch einmal testen. selber link zum download
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: christiang am 08 Mai 2018, 18:40:41
Hi Leon,

Super jetzt funktioniert es !

Vielen Dank und beste Grüße,
Christian
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ih-sqeezer am 21 Mai 2018, 10:39:11
Hallo zusammen,

ich nutze seit einigen Monaten zwei Pflanzensensoren von Xiaomi. Bisher liefen die beiden Sensoren mit einem RPI3 ohne weitere Probleme.
Seitdem ich jedoch auf einen neuen RPI3+ gewechselt habe, scheint das BLE bzw allgemein das BT nicht stabil zu laufen. Ich bekomme immer ein "The BlockingCall Process terminated unexpectedly. Timedout" im Status von beiden Pflanzensensoren. Dazu habe ich schon hier das ganze Thema durchgelesen und diverse Dinge herausgefunden. An der Reichweite kann es hier nicht liegen, da sich ein Sensor so ca. 2m vom RPI3+ befindet. Der andere ist auf dem Balkon, aber dennoch voll in Reichweite. Wenn ich in der Konsole vom RPI ein "sudo hcitool lescan" durchführe, erscheint ab und zu mal ein "Disable scan failed: input/output error". Das würde auch zum Fehler in FHEM passen. Sofern ich jedoch einen Sensor direkt via Konsole anspreche "sudo gatttool -i hci0 -b MAC --char-read -a 0x38", erhalte ich nur ein "connect error: Invalid argument (22)" für den weiter weg Sensor. Diesen Fehler bekomme ich auch ziemlich oft im state vom Sensor in FHEM. Für den sehr nahen Sensor erhalte ich dafür in der Konsole ein "connect error: connection refused (111)". Wenn ich im Fehlerfall das BT device mit "sudo hciconfig hci0 down" und "sudo hciconfig hci0 up" neustarte, kann zu jedem Sensor wieder Verbindung aufgebaut werden. Ich bekomme dann auch gleich in der Konsole wieder Daten (Characteristic value/descriptor: 63 27 33 2e 31 2e 38). Auch in FHEM bekomme ich dann mit dem "get Pflanzen sensorData" wieder aktuelle Werte vom Sensor.

Woran könnte das liegen? Ich habe auch schon diverse andere Foren nach dieser BT Schwäche für den RPI3+ gesucht und nichts passendes gefunden. Weiterhin habe ich schon die gesamte BT Soft-/Firmware vom RPI auf Updates geprüft - läuft jedoch schon auf der neusten Version seit dem Upgrade von Jessie (RPI3 => RPI3+).

Hat jemand von euch einen Rat oder vlt das gleiche Problem und konnte es schon lösen? Ich wäre für jede Hilfe dankbar!

Grüße,
Ingo
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Tobias am 22 Mai 2018, 17:33:45
Hi,
Ich möchte euch ganz kurz meine Erfahrungen mitteilen.
Der raspi zero w passt perfekt in das Box -Sens Gehäuse, die bohrungen passen exakt zur Befestigung der Platine.
Die Reichweite ist verblüffend, ich bekomme wirklich einen 10m Radius sauber abgedeckt.
Der raspi fragt 6 pflanzensensoren ab und verteilt die Messwerte per mqtt.
So läuft er völlig autark :)

Gesendet von meinem Leap mit Tapatalk

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Steffen am 24 Mai 2018, 06:21:10
Zitat von: Tobias am 22 Mai 2018, 17:33:45
Hi,
Ich möchte euch ganz kurz meine Erfahrungen mitteilen.
Der raspi zero w passt perfekt in das Box -Sens Gehäuse, die bohrungen passen exakt zur Befestigung der Platine.
Die Reichweite ist verblüffend, ich bekomme wirklich einen 10m Radius sauber abgedeckt.
Der raspi fragt 6 pflanzensensoren ab und verteilt die Messwerte per mqtt.
So läuft er völlig autark :)

Gesendet von meinem Leap mit Tapatalk

Hallo!

Das würde mich sehr interessieren, da ich zur Zeit sehr große Empfangsprobleme mit meinen Pflanzensensoren habe,
könntest du mir vielleicht erklären wie du wie Werte per mqtt verteilst?

Ein mqtt server läuft schon bei mir durch Sonoff, aber hätten kein Plan wie man das per mqtt verteilen könnte?!

Mfg Steffen
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Tobias am 24 Mai 2018, 08:47:20
Auf dem raspi läuft fhem. Dort sind die Sensoren als BTLESens Modul definiert und die Werte per MQTT_Bridge ins mqtt geschoben.
In meiner Haupt fhem Installation sind die Sensoren per mqtt_Device definiert

Gesendet von meinem Leap mit Tapatalk

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 24 Mai 2018, 09:01:26
Zitat von: Tobias am 24 Mai 2018, 08:47:20
Auf dem raspi läuft fhem. Dort sind die Sensoren als BTLESens Modul definiert und die Werte per MQTT_Bridge ins mqtt geschoben.
In meiner Haupt fhem Installation sind die Sensoren per mqtt_Device definiert

Gesendet von meinem Leap mit Tapatalk

Wäre das mit dem SSH Support nicht einfacher gewesen? So musstest Du ja noch ein FHEM installieren was auch gepflegt werden will.
Ansonsten hätte man auch FHEM2FHEM machen können und im Master FHEM einfach nur einen gleichnamigen Dummy anlegen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 24 Mai 2018, 12:52:06
Zitat von: CoolTux am 24 Mai 2018, 09:01:26
Wäre das mit dem SSH Support nicht einfacher gewesen? So musstest Du ja noch ein FHEM installieren was auch gepflegt werden will.
Ansonsten hätte man auch FHEM2FHEM machen können und im Master FHEM einfach nur einen gleichnamigen Dummy anlegen.

Wollte mich nicht "auf-/ bzw. dazwischendrängen" aber habe das per ssh und ebenfalls PI ZeroW gelöst... ;)

Gruß, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Tobias am 24 Mai 2018, 13:13:27
Genau DAS wollte ich nicht haben. Ich wollte explizit eine Entkopplung haben. Sensor und Server (fhen) sollen unabhängig laufen.
Das fhem auf dem raspi muss auch nicht gepflegt werden. Einmal angelegt und es läuft durch.
Ausserdem wollte ich erreichen das ein Sensor si h selbst kümmert die Daten Korrekt zu erhalten und die fertig aufbereiteten Werte für alle Abnehmer zur Verfügung zu stellen.
Neben fhem hab ich auch ein esp der meine Bewässerung steuert, mit pumpenkontrolle, wassertank und automatischer umschaltung nach Frischwasser wenn regentonne leer.
Dieser soll später die bodenfeuchtewerte auch auswerten und die Ventile selbstständig steuern. Mein Haupt fhem monitored nur noch oder aktiviert/deaktiviert die Bewässerungsstränge

Gesendet von meinem Leap mit Tapatalk
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Steffen am 24 Mai 2018, 13:41:30
Hallo!

Verstehe ich das Richtig, ihr fragt die Werte von einem Pi zero per SSH ab und wertet sie dann in Fhem aus?

Mfg Steffen
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 24 Mai 2018, 13:54:08
JEIN.

Tobias macht das nicht. Die anderen machen es so.
Das Modul wurde extra so entwickelt das es möglich ist per ssh den gatttool Befehl auf einem entfernten Pi aus zu führen und die Daten zu erhalten.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: jorge am 29 Mai 2018, 14:01:46
Erstmal Danke für das tolle Modul. Bei dem Wetter in Potsdam sehr hilfreich bei der Bewässerungssteuerung...
Ich setze auch auf 'verteilte Intelligenz' bei meiner Home-Automation, schon aufgrund der BT-Reichweite. Also habe ich ein RPiZeroW (Remote) mit einer FHEM-Instanz versehen und XiaomiBTLESens eingebunden:

define XiaomiBTLESens XiaomiBTLESens XX:XX:XX:XX:XX:XX
attr XiaomiBTLESens model flowerSens
attr XiaomiBTLESens room Sensors



Da ich für andere Sensoren (ESPEasy, sonoff) auch MQTT installiert ist, habe ich die Anbindung folgendermaßen realisiert:

(Weitere) Prerequisites:
- MQTT server irgendwo im Heimnetz installiert
- MQTT Client auf dem Remote
- s.a.https://wiki.fhem.de/wiki/MQTT_Einf%C3%BChrung

In FHEM auf dem zentralen Rechner:


define XiaomiBTLESens.MQTT MQTT_DEVICE
attr XiaomiBTLESens.MQTT IODev Mosquitto
attr XiaomiBTLESens.MQTT event-on-change-reading .*
attr XiaomiBTLESens.MQTT room MQTT
attr XiaomiBTLESens.MQTT stateFormat transmission-state
attr XiaomiBTLESens.MQTT subscribeReading_battery /XiaomiBTLESens/battery
attr XiaomiBTLESens.MQTT subscribeReading_fertility /XiaomiBTLESens/fertility
attr XiaomiBTLESens.MQTT subscribeReading_lux /XiaomiBTLESens/lux
attr XiaomiBTLESens.MQTT subscribeReading_moisture /XiaomiBTLESens/moisture
attr XiaomiBTLESens.MQTT subscribeReading_temperature /XiaomiBTLESens/temperature


Auf dem Remote in FHEM ein notify definieren:



define XiaomiBTLESens.notify notify XiaomiBTLESens:(lux|temperature|battery|moisture|fertility).* {$EVTPART0=~ s/\://g;;;; WriteMQTT("192.168.XXX.XXX","",$NAME,$EVTPART0,$EVTPART1);;;;}
attr XiaomiBTLESens.notify room Sensors


...und in 99_myutils eine neue Funktion definieren



sub
WriteMQTT($$$$$)
{
my ($ip, $port, $topic, $name, $event) = @_;
my $cmd='mosquitto_pub -h '.$ip.' -t /'.$topic.'/'.$name.'  -m "'.$event.'"';
system $cmd;
}


Läuft bis jetzt stabil.

LG

Jorge
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Tobias am 29 Mai 2018, 17:07:36
Genauso, fast hab ich es auch. Allerdings kann man über das mqtt_device auch befehle per mqtt schicken welches zb. Der espeasy auswerten kann

Gesendet von meinem Leap mit Tapatalk

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 29 Mai 2018, 20:29:30
Zitat von: jorge am 29 Mai 2018, 14:01:46
Erstmal Danke für das tolle Modul. Bei dem Wetter in Potsdam sehr hilfreich bei der Bewässerungssteuerung...
Ich setze auch auf 'verteilte Intelligenz' bei meiner Home-Automation, schon aufgrund der BT-Reichweite. Also habe ich ein RPiZeroW (Remote) mit einer FHEM-Instanz versehen und XiaomiBTLESens eingebunden:

define XiaomiBTLESens XiaomiBTLESens XX:XX:XX:XX:XX:XX
attr XiaomiBTLESens model flowerSens
attr XiaomiBTLESens room Sensors



Da ich für andere Sensoren (ESPEasy, sonoff) auch MQTT installiert ist, habe ich die Anbindung folgendermaßen realisiert:

(Weitere) Prerequisites:
- MQTT server irgendwo im Heimnetz installiert
- MQTT Client auf dem Remote
- s.a.https://wiki.fhem.de/wiki/MQTT_Einf%C3%BChrung

In FHEM auf dem zentralen Rechner:


define XiaomiBTLESens.MQTT MQTT_DEVICE
attr XiaomiBTLESens.MQTT IODev Mosquitto
attr XiaomiBTLESens.MQTT event-on-change-reading .*
attr XiaomiBTLESens.MQTT room MQTT
attr XiaomiBTLESens.MQTT stateFormat transmission-state
attr XiaomiBTLESens.MQTT subscribeReading_battery /XiaomiBTLESens/battery
attr XiaomiBTLESens.MQTT subscribeReading_fertility /XiaomiBTLESens/fertility
attr XiaomiBTLESens.MQTT subscribeReading_lux /XiaomiBTLESens/lux
attr XiaomiBTLESens.MQTT subscribeReading_moisture /XiaomiBTLESens/moisture
attr XiaomiBTLESens.MQTT subscribeReading_temperature /XiaomiBTLESens/temperature


Auf dem Remote in FHEM ein notify definieren:



define XiaomiBTLESens.notify notify XiaomiBTLESens:(lux|temperature|battery|moisture|fertility).* {$EVTPART0=~ s/\://g;;;; WriteMQTT("192.168.XXX.XXX","",$NAME,$EVTPART0,$EVTPART1);;;;}
attr XiaomiBTLESens.notify room Sensors


...und in 99_myutils eine neue Funktion definieren



sub
WriteMQTT($$$$$)
{
my ($ip, $port, $topic, $name, $event) = @_;
my $cmd='mosquitto_pub -h '.$ip.' -t /'.$topic.'/'.$name.'  -m "'.$event.'"';
system $cmd;
}


Läuft bis jetzt stabil.

LG

Jorge

Komme auch aus der Nähe von Potsdam. Sau Hitze aktuell.  ;D
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Steffen am 31 Mai 2018, 13:31:03
Zitat von: MadMax-FHEM am 24 Mai 2018, 12:52:06
Wollte mich nicht "auf-/ bzw. dazwischendrängen" aber habe das per ssh und ebenfalls PI ZeroW gelöst... ;)

Gruß, Joachim

Hallo!

Habe mir aus diesem grund auch ein Zero geholt und habe den Pi nun im Netzwerk, auf dem PiZero ist auch Bluez in der Version 5.4.

Wenn ich jetzt von meinem Haupt-Fhem Server das attr sshHost einfüge mit der Ip von Zero dann bekomme ich diese Fehlermeldung:

no gatttool binary found. Please check if bluez-package is properly installed


kann mir jemand dazu vielleicht einen rat geben?!?

Mfg Steffen
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 31 Mai 2018, 13:37:32
Design bedingt schummelt das Modul da ein bisschen. Bitte installiere auf dem aufrufenden pi ebenfalls das bluez-package
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Steffen am 31 Mai 2018, 13:53:15
Zitat von: CoolTux am 31 Mai 2018, 13:37:32
Design bedingt schummelt das Modul da ein bisschen. Bitte installiere auf dem aufrufenden pi ebenfalls das bluez-package
Danke für die schnelle Antwort aber das war schon installiert, den von diesem hatte ich vorher schon das Modul genutzt. Aber die Reichweite
war zu schlecht, deswegen wollte ich mit dem Pi zero verlängern.

Muss ich sonst noch was auf dem Pi zero machen außer bluez installieren??

Mfg Steffen
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 31 Mai 2018, 13:54:17
Du musst natürlich ssh für passwortlosen Zugang einrichten. Sprich mit Keyfile
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Steffen am 31 Mai 2018, 18:55:02
Zitat von: CoolTux am 31 Mai 2018, 13:54:17
Du musst natürlich ssh für passwortlosen Zugang einrichten. Sprich mit Keyfile

Ok das habe ich gerade erledigt, aber kommt immer noch diese Fehlermeldung?!?

Was könnte es noch sein?!?

Mfg Steffen
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 31 Mai 2018, 18:59:07
Naja nun Mal langsam. Was genau hast du denn wie gemacht dafür.

Der User fhem hat jetzt also unter /opt/fhem/ ein Ordner .ssh und darin den privaten Schlüssel? Der User den du auf der anderen Seite aufrufst pi@server z.b. hat auf der anderen Seite einen Ordner .ssh in seinem Homeverzeichnis mit dem öffentlichen Schlüssel?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Steffen am 31 Mai 2018, 19:39:49
Oh Sorry...

Das habe ich dann wohl falsch verstanden, ich habe nur einen ssh zugang gemacht ohne Passwort aufforderung auf
den PiZero.

Sehe ich das richtig, das ich die erstellt "id_rsa.pub" jetzt nach /opt/fhem/.ssh kopiere?

Mfg Steffen
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 31 Mai 2018, 19:52:16
Mit welchem User machst du denn eine ssh Verbindung auf der anderen Seite?
fhem@server?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Steffen am 31 Mai 2018, 19:55:06
ich hatte es so eingerichtet:

root@happyfamilyserver:~# ssh pi@192.168.178.137
Linux raspberrypi 4.14.34+ #1110 Mon Apr 16 14:51:42 BST 2018 armv6l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu May 31 17:34:44 2018 from 91.64.217.22
pi@raspberrypi:~ $



Mfg Steffen
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 31 Mai 2018, 20:03:37
OK du willst also auf der anderen Seite den User pi verwenden. Den Aufruf für ssh macht der User fhem

Du hast also lokal fhem und remote pi.

Dann bekommt lokal der User fhem den privat Key und remote der User pi den Public Key.

Wenn du als ein anderer User das Schlüsselpaar erstellt musst du lokal den privat Key nach /opt/fhem/.ssh kopieren und die rechte richtig setzen. Besitzer fhem Gruppe dialout.
Remote bekommt der User pi in seinem Homeverzeichnis unter.ssh den Public Key.

Ich will schon seit Ewigkeiten dafür ne Anleitung schreiben. Komme nur nicht dazu  :-[
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Steffen am 31 Mai 2018, 20:25:40
Ok ich dachte es wäre einfacher, aber würde das gerne das irgendwie lösen, was ich aber selber komisch finde das ich anscheinend gar kein user fhem habe...

root@happyfamilyserver:~# su - fhem
root@happyfamilyserver:~#


die remote ssh habe ich auch als "root" aufgerufen oder sehe ich das Falsch?!


root@happyfamilyserver:~# ls -la /root/.ssh
total 16
drwx------ 1 root root   84 May 31 18:46 .
drwx------ 1 root root  654 May 31 20:18 ..
-rw------- 1 root root 1675 May 31 18:39 id_rsa
-rw-r--r-- 1 root root  404 May 31 18:39 id_rsa.pub
-rw------- 1 root root  222 May 31 18:40 known_hosts
-rw------- 1 root root  222 May 31 18:38 known_hosts.old
root@happyfamilyserver:~#



root@happyfamilyserver:~# ssh pi@192.168.178.137
Linux raspberrypi 4.14.34+ #1110 Mon Apr 16 14:51:42 BST 2018 armv6l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu May 31 18:14:03 2018 from 192.168.178.102
pi@raspberrypi:~ $ ls -la
total 28
drwxr-xr-x 3 pi   pi   4096 May 31 16:46 .
drwxr-xr-x 3 root root 4096 Apr 18 00:16 ..
-rw------- 1 pi   pi    526 May 31 17:57 .bash_history
-rw-r--r-- 1 pi   pi    220 Apr 18 00:16 .bash_logout
-rw-r--r-- 1 pi   pi   3523 Apr 18 00:16 .bashrc
-rw-r--r-- 1 pi   pi    675 Apr 18 00:16 .profile
drwx------ 2 pi   pi   4096 May 31 18:13 .ssh
pi@raspberrypi:~ $ cd .ssh
pi@raspberrypi:~/.ssh $ ls -la
total 28
drwx------ 2 pi pi 4096 May 31 18:13 .
drwxr-xr-x 3 pi pi 4096 May 31 16:46 ..
-rw------- 1 pi pi  404 May 31 16:46 authorized_keys
-rwxrwxrwx 1 pi pi 1675 May 31 17:59 id_rsa
-rwxrwxrwx 1 pi pi  404 May 31 17:59 id_rsa.pub
-rw-r--r-- 1 pi pi  222 May 31 17:59 known_hosts
-rw-r--r-- 1 pi pi  222 May 31 17:59 known_hosts.old
pi@raspberrypi:~/.ssh $


aber bis jetzt immer noch der gleiche Fehler...

Mfg Steffen
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 31 Mai 2018, 20:31:49
Als root geht schon mal.
Nun kopierst du den .ssh von root nach /opt/fhem/ und gibst mit chown -R ./opt/fhem/.ssh dem User fhem und der Gruppe dialout die Rechte des Verzeichnisses und allem darunter.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Steffen am 31 Mai 2018, 20:52:29
Zitat von: CoolTux am 31 Mai 2018, 20:31:49
Als root geht schon mal.
Nun kopierst du den .ssh von root nach /opt/fhem/ und gibst mit chown -R ./opt/fhem/.ssh dem User fhem und der Gruppe dialout die Rechte des Verzeichnisses und allem darunter.

Das hatte ich schon gemacht, aber bleibt immer noch bei der Fehlermeldung:

root@happyfamilyserver:~/.ssh# ls -la /opt/fhem/.ssh
total 16
drwxrwxrwx 1 fhem dialout   84 May 31 19:59 .
drwxr-xr-x 1 fhem dialout  470 May 31 12:53 ..
-rwxrwxrwx 1 fhem dialout 1675 May 31 19:59 id_rsa
-rwxrwxrwx 1 fhem dialout  404 May 31 19:59 id_rsa.pub
-rwxrwxrwx 1 fhem dialout  222 May 31 19:59 known_hosts
-rwxrwxrwx 1 fhem dialout  222 May 31 19:59 known_hosts.old
root@happyfamilyserver:~/.ssh#


kann man den befehl den das Modul nutzt vielleicht auf der Shell ausführen um vielleicht zu sehen wo es nicht klappt?!?

Mfg Steffe
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 31 Mai 2018, 20:58:35
Bitte einmal als root ausführen

su -s /bin/bash -c "ssh pi@192.168.178.137 'ls /etc/'" fhem
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Steffen am 31 Mai 2018, 21:35:57
Zitat von: CoolTux am 31 Mai 2018, 20:58:35
Bitte einmal als root ausführen

su -s /bin/bash -c "ssh pi@192.168.178.137 'ls /etc/'" fhem

erstmal zwischen durch viel dank für deine Geduld...


root@happyfamilyserver:~# su -s /bin/bash -c "ssh pi@192.168.178.137 'ls /etc/'" fhem
X11
adduser.conf
alternatives
apt
avahi
bash.bashrc
bash_completion
bash_completion.d
bindresvport.blacklist
binfmt.d
bluetooth
ca-certificates
ca-certificates.conf
calendar
cifs-utils
console-setup
cron.d
cron.daily
cron.hourly
cron.monthly
cron.weekly
crontab
dbus-1
debconf.conf
debian_version
default
deluser.conf
dhcp
dhcpcd.conf
dhcpcd.duid
dhcpcd.secret
dphys-swapfile
dpkg
environment
fake-hwclock.data
fb.modes
fstab
gai.conf
gdb
groff
group
gshadow
gss
host.conf
hostname
hosts
hosts.allow
hosts.deny
idmapd.conf
ifplugd
init
init.d
initramfs-tools
inputrc
insserv.conf.d
iproute2
issue
issue.net
kernel
ld.so.cache
ld.so.conf
ld.so.conf.d
ld.so.preload
ldap
libaudit.conf
libnl-3
locale.alias
locale.gen
localtime
logcheck
login.defs
logrotate.conf
logrotate.d
machine-id
magic
magic.mime
mailcap
mailcap.order
manpath.config
mime.types
mke2fs.conf
modprobe.d
modules
modules-load.d
motd
mtab
nanorc
netconfig
network
networks
newt
nsswitch.conf
opt
os-release
pam.conf
pam.d
passwd
paxctld.conf
perl
plymouth
polkit-1
ppp
profile
profile.d
protocols
python
python2.7
python3
python3.5
rc.local
rc0.d
rc1.d
rc2.d
rc3.d
rc4.d
rc5.d
rc6.d
rcS.d
request-key.conf
request-key.d
resolv.conf
resolv.conf.bak
resolvconf
resolvconf.conf
rmt
rpc
rpi-issue
rsyslog.conf
rsyslog.d
samba
securetty
security
selinux
services
sgml
shadow
shells
skel
ssh
ssl
staff-group-for-usr-local
subgid
subgid-
subuid
subuid-
sudoers
sudoers.d
sysctl.conf
sysctl.d
systemd
terminfo
timezone
tmpfiles.d
triggerhappy
ucf.conf
udev
ufw
update-motd.d
usb_modeswitch.conf
usb_modeswitch.d
vim
wgetrc
wpa_supplicant
xdg
xml
root@happyfamilyserver:~#
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Steffen am 31 Mai 2018, 21:43:10
das habe ich jetzt auch mal versucht:

root@happyfamilyserver:~# ssh pi@192.168.178.137 gatttool -i hci0 -b C4:7C:8D:66:17:03 --char-read -a 0x38
Characteristic value/descriptor: 64 27 33 2e 31 2e 38
root@happyfamilyserver:~#
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 31 Mai 2018, 21:45:01
Sieht doch gut aus.

Lokal ist gatttool installiert? Remote ist gatttool installiert?

su -s /bin/bash -c "ssh pi@192.168.178.137 'gatttool -i hci0 -b C4:7C:8D:66:17:03 --char-read -a 0x38'" fhem
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Steffen am 31 Mai 2018, 21:47:13
Zitat von: Steffen am 31 Mai 2018, 21:43:10
das habe ich jetzt auch mal versucht:

root@happyfamilyserver:~# ssh pi@192.168.178.137 gatttool -i hci0 -b C4:7C:8D:66:17:03 --char-read -a 0x38
Characteristic value/descriptor: 64 27 33 2e 31 2e 38
root@happyfamilyserver:~#


Ok jetzt habe ich es wohl, habe dann nochmal bei sshHost "pi@192.168.178.137" eingegeben statt nur "192.168.178.137" und schon kommen die Werte rein.

Vielen Vielen Dank für deine Geduld und Hilfe...

Mfg Steffen

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 31 Mai 2018, 21:51:00
Zitat von: Steffen am 31 Mai 2018, 21:47:13
Ok jetzt habe ich es wohl, habe dann nochmal bei sshHost "pi@192.168.178.137" eingegeben statt nur "192.168.178.137" und schon kommen die Werte rein.

Vielen Vielen Dank für deine Geduld und Hilfe...

Mfg Steffen

Na dann kann es auch nicht gehen. Es sei denn du hast eine config Datei in .ssh liegen  ;D

Gerne doch. Viel Spaß damit.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 01 Juni 2018, 22:39:12
ACHTUNG!!! Es gibt Readings Änderungen für den Batteriestand. Bitte beachten!!

https://forum.fhem.de/index.php/topic,87575.msg807158.html#msg807158
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Tobias am 02 Juni 2018, 17:32:06
Ey Leute, warum macht ihr das sooo kompliziert.
Auf dem pi zero w mit aktuellem Image funktioniert das gatttool perfekt. Soll der raspi zero sich doch selbst darum kümmern und die fertigen sensorwerte dem Haupt fhem bereitstellen.
Dieses SSH gewurschtel ist echt nicht mehr nötig.

Bereitstellung der Werte Funktionen mit fhem2fhem oder mein Favorit per mqtt

Gesendet von meinem Leap mit Tapatalk

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 02 Juni 2018, 18:42:56
Zitat von: Tobias am 02 Juni 2018, 17:32:06
Ey Leute, warum macht ihr das sooo kompliziert.
Auf dem pi zero w mit aktuellem Image funktioniert das gatttool perfekt. Soll der raspi zero sich doch selbst darum kümmern und die fertigen sensorwerte dem Haupt fhem bereitstellen.
Dieses SSH gewurschtel ist echt nicht mehr nötig.

Bereitstellung der Werte Funktionen mit fhem2fhem oder mein Favorit per mqtt

Gesendet von meinem Leap mit Tapatalk

FHEM2FHEM heißt fhem auf dem ZeroW (brauch ich nicht) und MQTT ist (für mich) komplizierter als einmal Schlüssel erzeugen, simpler Aufruf von openssl und dann per passendem Copy-Befehl die Schlüssel auf das Zielsystem fettich...
(was ich eh mache, da ich gerne schnell auf meine headless Systeme kommen will)

Aber: jeder wie er will bei einem System wie fhem! ;)

Gruß, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 03 Juni 2018, 15:19:54
Hi Leon,

so habe heute (begonnen) meine FlowerSense wieder in Betrieb zu nehmen...

Und gleich umgeschwenkt auf das neue Modul...
...läuft.
Inkl. ssh...

Allerdings (habe ja die "Vereinheitlichung" der Batteriewerte nachverfolgt) sollte es bei den FlowerSense nicht eher BatteryPercentage heißen (müssen)!?
Da ja hier Prozente und nicht Spannungswerte angegeben werden...
...zumindest bei mir...
(oder ist bei mir da was falsch, z.B. "alte" FW [ja ich weiß aber bislang sah ich keinen Grund upzudaten oder wären da gute!?])

Hier ein list:


Internals:
   BTMAC      C4:7C:8D:61:51:BE
   CFGFN     
   DEF        C4:7C:8D:61:51:BE
   INTERVAL   300
   NAME       Feuchtigkeit_Balkon_11
   NOTIFYDEV  global,Feuchtigkeit_Balkon_11
   NR         147226
   NTFY_ORDER 50-Feuchtigkeit_Balkon_11
   STATE      active
   TYPE       XiaomiBTLESens
   VERSION    2.0.12
   loglevel   4
   READINGS:
     2018-06-03 15:15:08   battery         ok
     2018-06-03 15:15:08   batteryLevel    100
     2018-06-03 15:15:14   fertility       0
     2018-06-03 15:15:08   firmware        2.6.2
     2018-06-03 15:14:34   lastGattError   No route to host (113)
     2018-06-03 15:15:14   lux             0
     2018-06-03 15:15:14   moisture        0
     2018-06-03 15:15:14   state           active
     2018-06-03 15:15:14   temperature     0
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1528031708.35676
     updateTimestampCallBattery 2018-06-03 15:15:08
Attributes:
   model      flowerSens
   room       XiaomiBTLESens
   sshHost    jemand@192.168.1.94


Gruß, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 03 Juni 2018, 15:30:09
Du musst ein Update machen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 03 Juni 2018, 15:50:45
Ups, sorry!

Hab's eben genau deswegen noch nicht gemacht, da auch ZWave geändert wurde...
...und ich wollte erst mal den Code meiner Batterieberechnung nachziehen...

Eieieieiei!

Danke, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Invers am 09 Juni 2018, 20:34:56
Hi, mir ist aufgefallen, dass alle Thermo/Hygrometer in STATE und state
   
T: 29.2 H: 37.0

eingetragen haben. Das betrifft Homematic und Andere.
Bei den Xiaomis, die ich seit gestern habe, steht hingegen;

active

Ich weiss nicht, wie es bei Geräten anderer Hersteller ist, wollte aber fragen, ob es sinnvoll wäre, das zu vereinheitlichen.
Meine Thermometerliste sieht nun eigenartig aus.

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 09 Juni 2018, 20:43:31
Kann ich die Tage einbauen. Bisschen Geduld aber bitte  :)


Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Invers am 10 Juni 2018, 00:52:38
Eilt ja nicht. Ist mir halt nur aufgefallen. Danke.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 12 Juni 2018, 08:29:20
Zitat von: Invers am 09 Juni 2018, 20:34:56
Hi, mir ist aufgefallen, dass alle Thermo/Hygrometer in STATE und state
   
T: 29.2 H: 37.0

eingetragen haben. Das betrifft Homematic und Andere.
Bei den Xiaomis, die ich seit gestern habe, steht hingegen;

active

Ich weiss nicht, wie es bei Geräten anderer Hersteller ist, wollte aber fragen, ob es sinnvoll wäre, das zu vereinheitlichen.
Meine Thermometerliste sieht nun eigenartig aus.

Habe ich angepasst und auch gleich das Batterie Reading nachgezogen. Kannst Du das bitte einmal testen. Du findest in meinem Git die neue Version.




Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Invers am 12 Juni 2018, 09:56:50
Ui! Ist aber böse. Scheint nicht so gut gelaufen zu sein.

2018.06.12 09:52:18 1: reload: Error:Modul 74_XiaomiBTLESens deactivated:
syntax error at ./FHEM/74_XiaomiBTLESens.pm line 804, near ") if"

2018.06.12 09:52:18 0: syntax error at ./FHEM/74_XiaomiBTLESens.pm line 804, near ") if"

2018.06.12 09:52:18 1: PERL WARNING: Subroutine XiaomiBTLESens_Initialize redefined at ./FHEM/74_XiaomiBTLESens.pm line 112.
2018.06.12 09:52:18 1: PERL WARNING: Subroutine XiaomiBTLESens_Define redefined at ./FHEM/74_XiaomiBTLESens.pm line 148.
2018.06.12 09:52:18 1: PERL WARNING: Subroutine XiaomiBTLESens_Undef redefined at ./FHEM/74_XiaomiBTLESens.pm line 179.
2018.06.12 09:52:18 1: PERL WARNING: Subroutine XiaomiBTLESens_Attr redefined at ./FHEM/74_XiaomiBTLESens.pm line 195.
2018.06.12 09:52:18 1: PERL WARNING: Subroutine XiaomiBTLESens_Notify redefined at ./FHEM/74_XiaomiBTLESens.pm line 262.
2018.06.12 09:52:18 1: PERL WARNING: Subroutine XiaomiBTLESens_stateRequest redefined at ./FHEM/74_XiaomiBTLESens.pm line 294.
2018.06.12 09:52:18 1: PERL WARNING: Subroutine XiaomiBTLESens_stateRequestTimer redefined at ./FHEM/74_XiaomiBTLESens.pm line 331.
2018.06.12 09:52:18 1: PERL WARNING: Subroutine XiaomiBTLESens_Set redefined at ./FHEM/74_XiaomiBTLESens.pm line 346.
2018.06.12 09:52:18 1: PERL WARNING: Subroutine XiaomiBTLESens_Get redefined at ./FHEM/74_XiaomiBTLESens.pm line 381.
2018.06.12 09:52:18 1: PERL WARNING: Subroutine XiaomiBTLESens_CreateParamGatttool redefined at ./FHEM/74_XiaomiBTLESens.pm line 417.
2018.06.12 09:52:18 1: PERL WARNING: Subroutine XiaomiBTLESens_ExecGatttool_Run redefined at ./FHEM/74_XiaomiBTLESens.pm line 442.
2018.06.12 09:52:18 1: PERL WARNING: Subroutine XiaomiBTLESens_ExecGatttool_Done redefined at ./FHEM/74_XiaomiBTLESens.pm line 541.
2018.06.12 09:52:18 1: PERL WARNING: Subroutine XiaomiBTLESens_ExecGatttool_Aborted redefined at ./FHEM/74_XiaomiBTLESens.pm line 573.
2018.06.12 09:52:18 1: PERL WARNING: Subroutine XiaomiBTLESens_ProcessingNotification redefined at ./FHEM/74_XiaomiBTLESens.pm line 588.
2018.06.12 09:52:18 1: PERL WARNING: Subroutine XiaomiBTLESens_FlowerSensHandle0x38 redefined at ./FHEM/74_XiaomiBTLESens.pm line 647.
2018.06.12 09:52:18 1: PERL WARNING: Subroutine XiaomiBTLESens_FlowerSensHandle0x35 redefined at ./FHEM/74_XiaomiBTLESens.pm line 672.
2018.06.12 09:52:18 1: PERL WARNING: Subroutine XiaomiBTLESens_ThermoHygroSensHandle0x18 redefined at ./FHEM/74_XiaomiBTLESens.pm line 702.
2018.06.12 09:52:18 1: PERL WARNING: Subroutine XiaomiBTLESens_ThermoHygroSensHandle0x10 redefined at ./FHEM/74_XiaomiBTLESens.pm line 725.
2018.06.12 09:52:18 1: PERL WARNING: Subroutine XiaomiBTLESens_ThermoHygroSensHandle0x24 redefined at ./FHEM/74_XiaomiBTLESens.pm line 755.
2018.06.12 09:52:18 1: PERL WARNING: Subroutine XiaomiBTLESens_ThermoHygroSensHandle0x3 redefined at ./FHEM/74_XiaomiBTLESens.pm line 773.
2018.06.12 09:52:18 1: reload: Error:Modul 74_XiaomiBTLESens deactivated:
syntax error at ./FHEM/74_XiaomiBTLESens.pm line 804, near ") if"

2018.06.12 09:52:18 0: syntax error at ./FHEM/74_XiaomiBTLESens.pm line 804, near ") if"

2018.06.12 09:52:18 1: reload: Error:Modul 74_XiaomiBTLESens deactivated:
syntax error at ./FHEM/74_XiaomiBTLESens.pm line 804, near ") if"

2018.06.12 09:52:18 0: syntax error at ./FHEM/74_XiaomiBTLESens.pm line 804, near ") if"

2018.06.12 09:52:18 3: [STV] You are using a deprecated MAC detection mechanism using ifconfig.
2018.06.12 09:52:18 3: [STV] Please install Pearl Modules libnet-address-ip-local-perl and libio-interface-perl
2018.06.12 09:52:19 1: configDB: Cannot load module XiaomiBTLESens
Cannot load module XiaomiBTLESens
Cannot load module XiaomiBTLESens



NACHTRAG: Vewrsion 2.0.14
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 12 Juni 2018, 09:59:19
Sieht schlimmer aus wie es ist. War nur ein Klammerproblem. Bitte noch einmal. Danke
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Invers am 12 Juni 2018, 10:20:51
Vielen Dank, Funktioniert scheinbar sehr gut.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 13 Juni 2018, 13:08:44
Zitat von: Invers am 09 Juni 2018, 20:34:56
Hi, mir ist aufgefallen, dass alle Thermo/Hygrometer in STATE und state
   
T: 29.2 H: 37.0

eingetragen haben. Das betrifft Homematic und Andere.
Bei den Xiaomis, die ich seit gestern habe, steht hingegen;

active

Ich weiss nicht, wie es bei Geräten anderer Hersteller ist, wollte aber fragen, ob es sinnvoll wäre, das zu vereinheitlichen.
Meine Thermometerliste sieht nun eigenartig aus.

Die Umstellung des state habe ich nun ins svn geladen. Morgen per Update
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 20 Juni 2018, 16:51:12
Hallo,

ich habe jetzt auch zwei dieser Flower Care Sensoren da. Die App kann man ja knicken, erst muss man sich anmelden und dann noch eine Pflanze zuweisen, das geht bei mir irgendwie nicht. Also ich sehe zumindest keine Werte.

Jetzt wollte ich das direkt an FHEM anbinden aber mein Bluetooth Dongle ist leider am Raspberry und der ist nur via FHEM2FHEM angebunden. An meinem FHEM Server ist kein Bluetooth Adapter. Gibt es da Möglichkeiten?

/Daniel
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 20 Juni 2018, 17:31:55
Ja. Via ssh
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 20 Juni 2018, 18:25:51
Ahh, sehr schön, das steht aber auch versteckt in der command ref ...

Wie oft sendet der eigentlich? Wenn man die App benutzt sendet der ja im Sekunden Takt so wie das aussieht. Und speichert der Sensor Daten? Weil die App da ein Sync macht...?

/Daniel
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ToM_ToM am 21 Juni 2018, 07:55:52
ZitatWie oft sendet der eigentlich?

Gar nicht! Du machst einen Request und fragst die Daten ab. Das kannst du im Interval einstellen. Wenn du keine Daten abfragst, wird auch nichts gesendet.

Siehe Commandref Attribut interval und disabledForIntervals. Letzteres habe ich gesetzt um Nachts keine Abfragen durchzuführen.

VG, Thomas
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 21 Juni 2018, 08:14:41
Zitat von: ext23 am 20 Juni 2018, 18:25:51
Ahh, sehr schön, das steht aber auch versteckt in der command ref ...

Wie oft sendet der eigentlich? Wenn man die App benutzt sendet der ja im Sekunden Takt so wie das aussieht. Und speichert der Sensor Daten? Weil die App da ein Sync macht...?

/Daniel

Der Sensor speichert Daten, leider habe ich aber keine Info darüber wie man die abrufen kann.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 21 Juni 2018, 10:19:52
OK und der Sensor arbeitet dann als "Observer", sprich der sende nichts solange kein "Broadcaster" etwas von ihm will, richtig? Schick also keine Advertiser Messages.

Dann schau ich mir das mal an.

Hat einer schon langzeit Erfahrungen mit den Dingern in Sachen Korrosion? Gerade die Messfühler für die Leitfähigkeit. Und dann wundert mich, dass die Platine nicht eingeharzt ist, sondern nur simpler Lack auf der Oberseite und nicht mal an den Seiten ist. Da diffundiert doch früher oder später Wasser durch.....

/Daniel

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 21 Juni 2018, 11:14:34
Zitat von: ext23 am 21 Juni 2018, 10:19:52
OK und der Sensor arbeitet dann als "Observer", sprich der sende nichts solange kein "Broadcaster" etwas von ihm will, richtig? Schick also keine Advertiser Messages.

Dann schau ich mir das mal an.

Hat einer schon langzeit Erfahrungen mit den Dingern in Sachen Korrosion? Gerade die Messfühler für die Leitfähigkeit. Und dann wundert mich, dass die Platine nicht eingeharzt ist, sondern nur simpler Lack auf der Oberseite und nicht mal an den Seiten ist. Da diffundiert doch früher oder später Wasser durch.....

/Daniel

Dir ist schon klar das das Teil offiziell keine 5 Dollar kostet? Bei Bedarf kaufst dir halt alle Jahre ein neues.  ;D
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 21 Juni 2018, 11:17:09
Zitat von: CoolTux am 21 Juni 2018, 11:14:34
Dir ist schon klar das das Teil offiziell keine 5 Dollar kostet? Bei Bedarf kaufst dir halt alle Jahre ein neues.  ;D

Naja meiner kam 10 aus China, aber ich will eben nicht alle paar Jahre was neues. Und wenn Schwermetalle an die Erst abgegeben werden will ich das auch nicht ;-) Dann nützt mir die gute Pflege er Blume auch nicht ;-) Aber auch wenn es nur 4 Euro sind, macht bei 30 Stück nen batzen Geld...

/Daniel
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 21 Juni 2018, 11:22:23
Zitat von: ext23 am 21 Juni 2018, 11:17:09
Naja meiner kam 10 aus China, aber ich will eben nicht alle paar Jahre was neues. Und wenn Schwermetalle an die Erst abgegeben werden will ich das auch nicht ;-) Dann nützt mir die gute Pflege er Blume auch nicht ;-) Aber auch wenn es nur 4 Euro sind, macht bei 30 Stück nen batzen Geld...

/Daniel

Dann lieber doch was richtiges. Gardena oder dieser andere deutsche? Bude. Kostet der Sensor zwischen 30 und 50 Euro. Aber da haste dann auch was richtiges für Dein Geld mit allem drum und dran.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 21 Juni 2018, 11:26:22
Ja naja kommt drauf an, teuer ist auch nicht immer gut. Also mit den Gies-O-Mat bin ich ganz zufrieden. Auch wenn mir ein Nachbau noch nicht wirklich gelungen ist. Die Dinger verhalten sich dann doch anders als das original. Das ist schon gut abgestimmt.

Ist der Flower Care nun eigentlich Wasserdichtig? Die Dichtung lässt es ja vermuten, das Datenblatt auch. woanders steht aber das die Garantie erlischt wenn man es zu gut meint mit der Gießkanne. Also laufen die Dinger auch unter freiem Himmel?

/Daniel
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ToM_ToM am 21 Juni 2018, 12:02:11
ZitatIst der Flower Care nun eigentlich Wasserdichtig? Die Dichtung lässt es ja vermuten, das Datenblatt auch. woanders steht aber das die Garantie erlischt wenn man es zu gut meint mit der Gießkanne. Also laufen die Dinger auch unter freiem Himmel?

Es steht dabei dass die ausschließlich für den Innenraum geeignet sind und nicht für den Außenbereich. Also nein!

Zum Themak Langzeiterfahrung: Ich habe die Geräte jetzt seit über einem Jahr im Einsatz und die laufen wunderbar. Auch fault da bisher nichts weg. Es gibt bei den Mess-Gabeln (so nenne ich sie jetzt mal) aber verschiedene Qualitätsstufen wenn du sie als einelnes elektronisches Bauteil kaufst. Dort gibt es ganz billige bei der sich nach einigen Monaten die leitfähige Beschichtung auflöst.

Die Xiaomi halte ich aber für äußerst stabil. Wie gesagt: Sie sind ausschließlich für Zimmerpflanzen. Und hält man in der Regel keine Gieskanne drauf. ;)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Sanchez am 21 Juni 2018, 12:15:43
Habe einen seit letztem Jahr draussen im Topf im Einsatz. War im Winter "leicht" eingeschneit (hab ihn echt gesucht  ;D) und beim giessen gehe ich da gnadenlos drüber. Bisher keine negative Reaktion. Dieses Jahr vier weitere für draussen geholt und es werden mehr werden...

Das einzig nervende ist, das ab und zu am Tag keine Werte kommen. Liegt aber nicht am Modul oder den Senoren, sondern an BT.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 21 Juni 2018, 12:19:34
OK perfekt ;-)

Ganz nebenbei, falls jemand mal ein defekten hat, ich zerlege ihn gerne um mir mal die Elektronik anzuschauen.

Wegen dem gammeln, wenn dann gammeln nur die beiden Punkte unten. Das andere ist ja nicht leitfähig weil Kapazitiv. Da kann nur Wasser eindringen und zu falschen Messergenissen der Bodenfeuchte führen. Aber das ist ein anderes Thema womit schon Foren gefüllt wurde. Ich werden meine sicherheitshalber mit Urethan 71 einsprühen.

Hat noch jemand ein Tip wegen ssh... ich bekomme immer fehler wegen "no gatttool binary found. Please check if bluez-package is properly installed". Ist es aber, im FHEM log steht aber "Host key verification failed." FHEM läuft ja als user fhem, also nimmt der auch die config aus dem /home/fhem/.ssh/config sofern man es anlegt ja?

/Daniel
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 21 Juni 2018, 14:30:38
Das zweite Jahr jetzt außen.
Allerdings "geschützter" Balkon und autom. Gießeinrichtung (Blumat mit Tonkegeln: physikalische "Steuerung"), also nix Gießkanne...
...aber ab und an schon mal etwas Regen...

Ich habe aber bei diversen Händlern auch was von "Wasserfest" gelesen... ;)

Im Winter hole ich sie aber rein, weil da auch nix gegossen wird...

Das Home des Users fhem liegt (normalerweise) NICHT in /home/fhem sondern ist /opt/fhem

So in etwa hab ich das gemacht:

http://heinz-otto.blogspot.com/2017/01/per-ssh-remote-befehle-direkt-ausfuhren.html?_sm_au_=iVVDnP60tJ1NHtRj

EDIT: ansonsten sollte sich bzgl. ssh und fhem einiges finden lassen...

Gruß, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 21 Juni 2018, 14:33:15
Ach stimmt, jetzt wo du es sagts sehe ich es auch im vipw.

OK dann schau ich mal ob es jetzt geht.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Invers am 25 Juni 2018, 11:27:18
Hi, ich hatte heute nach Neustart von fhem folgende Einträge imn Log:
2018.06.25 11:22:52 1: PERL WARNING: Illegal hexadecimal digit ' ' ignored at ./FHEM/74_XiaomiBTLESens.pm line 717.
2018.06.25 11:22:52 3: eval: {XiaomiBTLESens_ExecGatttool_Done('TMP_SZ|4C:65:A8:D2:53:8C|ok|read|0x18|{"gtResult":"64 "}')}
2018.06.25 11:22:52 1: PERL WARNING: Illegal hexadecimal digit ' ' ignored at ./FHEM/74_XiaomiBTLESens.pm line 718.
2018.06.25 11:22:52 3: eval: {XiaomiBTLESens_ExecGatttool_Done('TMP_SZ|4C:65:A8:D2:53:8C|ok|read|0x18|{"gtResult":"64 "}')}


Scheint dennoch zu funktionieren.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 25 Juni 2018, 11:38:29
Zitat von: Invers am 25 Juni 2018, 11:27:18
Hi, ich hatte heute nach Neustart von fhem folgende Einträge imn Log:
2018.06.25 11:22:52 1: PERL WARNING: Illegal hexadecimal digit ' ' ignored at ./FHEM/74_XiaomiBTLESens.pm line 717.
2018.06.25 11:22:52 3: eval: {XiaomiBTLESens_ExecGatttool_Done('TMP_SZ|4C:65:A8:D2:53:8C|ok|read|0x18|{"gtResult":"64 "}')}
2018.06.25 11:22:52 1: PERL WARNING: Illegal hexadecimal digit ' ' ignored at ./FHEM/74_XiaomiBTLESens.pm line 718.
2018.06.25 11:22:52 3: eval: {XiaomiBTLESens_ExecGatttool_Done('TMP_SZ|4C:65:A8:D2:53:8C|ok|read|0x18|{"gtResult":"64 "}')}


Scheint dennoch zu funktionieren.

Ist nur ne Warnung, alles gut.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 25 Juni 2018, 15:43:02
Hi,

also mit ssh das blockiert ja alles, da braucht der 15 Sekunden bis ein Ergebnis kommt, wenn es denn kommt. Ich glaube das ist keine so gute Lösung. Da werd ich mir mal die ESP32 Geschichte anschauen.

/Daniel
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 25 Juni 2018, 15:50:12
Zitat von: ext23 am 25 Juni 2018, 15:43:02
Hi,

also mit ssh das blockiert ja alles, da braucht der 15 Sekunden bis ein Ergebnis kommt, wenn es denn kommt. Ich glaube das ist keine so gute Lösung. Da werd ich mir mal die ESP32 Geschichte anschauen.

/Daniel

Diese Aussage ist so wie sie da steht Schwachsinn!!!
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 25 Juni 2018, 16:03:13
Naja bei mir ist das so. Kann ich leider nicht ändern, pro Verbindungsaufbau braucht der 14 Sekunden mit SSH, mal mehr mal weniger. Und wenn ich jetzt 10 Abfrage wird es nicht besser. Und FHEM sehe ich dann immer nur "The BlockingCall Process terminated unexpectedly. Timedout"

/Daniel
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 25 Juni 2018, 16:04:57
Es wird aber rein gar nichts blockiert!
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 25 Juni 2018, 16:05:14
Bei mir schon. Ob das jetzt lokal anders ist weißt ich nicht, mein Server hat leider kein BT dran, also was heißt leider... belibt auch so.

Zumindest bleibt die SSH session recht lange offen, das wird vermutlich das gattools sein das ewig nicht reagiert.

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 25 Juni 2018, 16:06:46
Dein FHEM arbeitet in der Zeit der Abfrage also nicht mehr? Du kannst z.B. die WebGui nicht mehr aufrufen?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 25 Juni 2018, 16:07:52
Zitat von: CoolTux am 25 Juni 2018, 16:06:46
Dein FHEM arbeitet in der Zeit der Abfrage also nicht mehr? Du kannst z.B. die WebGui nicht mehr aufrufen?

Ich habe nicht gesagt das FHEM blockiert...
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 25 Juni 2018, 16:09:47
Zitat von: ext23 am 25 Juni 2018, 15:43:02
Hi,

also mit ssh das blockiert ja alles, da braucht der 15 ...

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 25 Juni 2018, 16:10:52
Ja wer lesen kann, ich habe von SSH gesprochen, wie gesagt von FHEM war keine Rede oO

Kann man da eventuell Timeouts erhöhen? Ich hab in der Firewall jetzt schon 15 parallele SSH sessions freigeschaltet, das sollte eigentlich passen sofern er alte sauber schließt. Davon gehe ich aber mal aus.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 25 Juni 2018, 16:14:14
Was stört dich daran das die SSH Session etwas länger offen bleibt? Es werden eh nicht alle 10 Sensoren zeitgleich abgefragt.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 25 Juni 2018, 16:23:01
Das wird nur schlecht wenn er eine neue Session öffnet und die alte nicht beendet hat. Dann wird das geblockt in der FW wenn es zu viel wird.

Was hängt denn dann hier so lange, ist das nur das gattool?

Kann es sein, dass sich das mit meinem G-Tags nicht verträgt die auch über diesen RPi abgefragt werden?

/Daniel
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 25 Juni 2018, 16:47:12
Mhh liegt wirklich an den G-Tags. Das ist wohl zu viel des Guten. Ich schau mir mal die Sache mit dem ESP32 an, dann ist das etwas getrennt.

/Daniel
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: mark79 am 25 Juni 2018, 22:15:17
Zitat von: ext23 am 25 Juni 2018, 16:47:12
Mhh liegt wirklich an den G-Tags. Das ist wohl zu viel des Guten. Ich schau mir mal die Sache mit dem ESP32 an, dann ist das etwas getrennt.

/Daniel
Ich habe auch die G-Tags und für lepresence und den Xiaomi Flower Sensoren bisher zwei BT Sticks verwendet.
Seit dem ich die G-Tags habe, wird das kernel.log vollgespammt... "Bluetooth: hci0 advertising data length corrected"
Aber das kann man ja blockieren...

Bzgl. Abruf via ESP32 (openmqttgateway), das funktioniert bei mir gut, was nur fehlt ist das Battery Reading.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 25 Juni 2018, 22:32:49
Zitat von: mark79 am 25 Juni 2018, 22:15:17
Bzgl. Abruf via ESP32 (openmqttgateway), das funktioniert bei mir gut, was nur fehlt ist das Battery Reading.

Hast du mal ein Binary für mich, oder gibt es die irgendwo? (Sofern die WLAN Daten nicht hardcoded sind.) Battery Reading, naja, unwichtig, merkt man ja wenn die tot sind.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: mark79 am 25 Juni 2018, 22:57:52
Zitat von: ext23 am 25 Juni 2018, 22:32:49
Hast du mal ein Binary für mich, oder gibt es die irgendwo? (Sofern die WLAN Daten nicht hardcoded sind.) Battery Reading, naja, unwichtig, merkt man ja wenn die tot sind.
Hast eine PN :)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 25 Juni 2018, 23:02:26
Danke,

(Ich hab den ESP32 noch nicht in meiner Arduino IDE drin, daher reicht mir das erst mal zu probieren!)

Danke.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 26 Juni 2018, 09:40:19
Zitat von: ext23 am 25 Juni 2018, 23:02:26
Danke,

(Ich hab den ESP32 noch nicht in meiner Arduino IDE drin, daher reicht mir das erst mal zu probieren!)

Danke.

Was mir noch eingefallen ist. Installiere Dir mal hcidump und starte lepresenced neu. Danach sollte lepresenced nicht mehr den Abruf der Sensoren stören. Kann man dann parallel betreiben.


Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 26 Juni 2018, 10:15:44
Habe ich gemacht, ich werde es beobachten.

/Daniel
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: hjjk am 28 Juni 2018, 09:03:34
Bei mir gibt es immer noch Probleme mit der ssh Abfrage. ssh ist richtig aufgesetzt da ich von der Kommandozeile den Aufruf ausführen kann.


ssh 192.168.XX.XX 'gatttool -b C4:7C:8D:66:XX:XX --char-write-req -a 0x33 --value=A01F 2>&1 >/dev/null && gatttool -b C4:7C:8D:66:XX:XX --char-read --handle=0x35'


Ausgeführt als user fhem
Ich habe den loglevel auf 5 erhört und sehe in log folgende Information


2018.06.27 10:15:12.066 4: XiaomiBTLESens (Rosen) - Run CreateParamGatttool with mod: read
2018.06.27 10:15:12.066 1: PERL WARNING: Use of uninitialized value $handle in concatenation (.) or string at ./FHEM/74_XiaomiBTLESens.pm line 427.
...
2018.06.27 10:15:12.085 1: PERL WARNING: Use of uninitialized value $handle in concatenation (.) or string at ./FHEM/74_XiaomiBTLESens.pm line 431.
2018.06.27 10:15:12.086 5: XiaomiBTLESens (Rosen) - Read XiaomiBTLESens_ExecGatttool_Run Rosen|C4:7C:8D:66:2B:51|read|

...
2018.06.27 11:31:54.046 5: XiaomiBTLESens (Rosen) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:XX:XX --char-read -a  2>&1 /dev/null and loop 0
2018.06.27 11:31:54.046 5: XiaomiBTLESens (Oleander) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:XX:XX --char-read -a  2>&1 /dev/null and loop 0
2018.06.27 11:31:54.060 5: XiaomiBTLESens (Rosen) - ExecGatttool_Run: gatttool loop result Cannot parse integer value '/dev/null' for -a
Usage:
  gatttool [OPTION...]

Help Options:
  -h, --help                                Show help options
  --help-all                                Show all help options
  --help-gatt                               Show all GATT commands
  --help-params                             Show all Primary Services/Characteristics arguments
  --help-char-read-write                    Show all Characteristics Value/Descriptor Read/Write arguments

Der handle Parameter fehlt !!! Warum ?
Ich nutze fhem 5.8 mit dem aktuellsten Update auf einem PI 3 und möchte remote die Daten von einem andern PI nahe eines Xiaomi Flower Monitors auslesen.

Hier ist die Definition für den Sensor

define Rosen XiaomiBTLESens C4:7C:8D:66:XX:XX
attr Rosen model flowerSense
attr Rosen interval 1800
attr Rosen room Pflanzen
attr sshHost 192.168.X.XX
attr Rosen stateFormat Temp: temperature °C, Dünger: fertility µS/cm, Feuchtigkeit: moisture %, Licht: lux Lux, Batterie: batteryLevel %
define FileLog_Rosen FileLog ./log/Rosen-%Y-%m.log Rosen:batteryLevel:.*|Rosen:fertility:.*|Rosen:lux:.*|Rosen:moisture:.*|Rosen:temperature:.*


Ich bin für jeden Hinweis dankbar

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 28 Juni 2018, 10:08:59

call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:XX:XX --char-read -a  2>&1 /dev/null and loop 0


Ich sehe da kein ssh. Mach mal bitte ein list vom Device
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: hjjk am 28 Juni 2018, 18:43:10
OK, "list Rosen" bringt


nternals:
   BTMAC      C4:7C:8D:66:2B:51
   CFGFN      include/xiaomi-plant-monitor.cfg
   CHANGED   
   DEF        C4:7C:8D:66:2B:51
   INTERVAL   1800
   NAME       Rosen
   NOTIFYDEV  global,Rosen
   NR         107
   NTFY_ORDER 50-Rosen
   STATE      Temp: 16.0 °C, Dünger: 147 µS/cm, Feuchtigkeit: 26 %, Licht: 839 Lux, Batterie: 99 %
   TYPE       XiaomiBTLESens
   VERSION    2.0.14
   loglevel   4
   READINGS:
     2018-06-28 17:08:42   batteryLevel    99
     2018-06-28 17:08:41   fertility       147
     2018-06-28 17:08:42   firmware        3.1.8
     2018-06-28 17:08:41   lux             839
     2018-06-28 17:08:41   moisture        26
     2018-06-28 18:24:43   state           read sensor data
     2018-06-28 17:08:40   temperature     16.0
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 0
Attributes:
   interval   1800
   model      flowerSense
   room       Pflanzen
   stateFormat Temp: temperature °C, Dünger: fertility µS/cm, Feuchtigkeit: moisture %, Licht: lux Lux, Batterie: batteryLevel %


Die Readings werden momentan durch ein externes Skript geschrieben (ähnlich perl /opt/fhem/fhem.pl 7072 "setreading Rosen temperature 21.6).
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 28 Juni 2018, 19:05:05
Ich sehe da jetzt kein ssh Attribut. Was genau machst das externe Script? Funktionen es beim gatttool Aufruf dazwischen?
Setze das Devices bitte auf verbose 5 und setze das ssh Attribut mit REMOTEUSER@REMOTESERVER
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: hjjk am 28 Juni 2018, 19:54:15
Danke für den Hinweise. War ein Typo bei attr Device ssh. Nun wird ein ssh Aufruf gestartet. Aber es fehlt nach wie vor der Parameter für "--char-read -a   "


2018.06.28 19:43:01.671 5: XiaomiBTLESens (Rosen) - ExecGatttool_Run: call gatttool with command: ssh pi@192.168.3.61 'gatttool -i hci0 -b C4:7C:8D:66:2B:51 --char-read -a  2>&1 /dev/null' and loop 0
2018.06.28 19:43:01.754 4: Connection accepted from WEB_192.168.3.41_48804
2018.06.28 19:43:01.906 4: WEB_192.168.3.41_48804 GET /fhem?XHR=1&inform=type=status;filter=Rosen;since=1530207621.236;fmt=JSON&fw_id=119&timestamp=1530207781746; BUFLEN:0
2018.06.28 19:43:02.097 5: XiaomiBTLESens (Rosen) - ExecGatttool_Run: gatttool loop result Cannot parse integer value '/dev/null' for -a
Usage:
  gatttool [OPTION...]

Help Options:
  -h, --help                                Show help options
  --help-all                                Show all help options
  --help-gatt                               Show all GATT commands
  --help-params                             Show all Primary Services/Characteristics arguments
  --help-char-read-write                    Show all Characteristics Value/Descriptor Read/Write arguments

Application Options:
  -i, --adapter=hciX                        Specify local adapter interface
  -b, --device=MAC                          Specify remote Bluetooth address
  -t, --addr-type=[public | random]         Set LE address type. Default,public
  -m, --mtu=MTU                             Specify the MTU size
  -p, --psm=PSM                             Specify the PSM for GATT/ATT over BR/EDR
  -l, --sec-level=[low | medium | high]     Set security level. Default,low
  -I, --interactive                         Use interactive mode


Hier ist der Output von "list Rosen"


Internals:
   BTMAC      C4:7C:8D:66:2B:51
   CFGFN      include/xiaomi-plant-monitor.cfg
   CHANGED
   DEF        C4:7C:8D:66:2B:51
   INTERVAL   1800
   NAME       Rosen
   NOTIFYDEV  global,Rosen
   NR         107
   NTFY_ORDER 50-Rosen
   STATE      Temp: 15.6 °C, Dünger: 151 µS/cm, Feuchtigkeit: 26 %, Licht: 584 Lux, Batterie: 99 %
   TYPE       XiaomiBTLESens
   VERSION    2.0.14
   loglevel   4
   READINGS:
     2018-06-28 19:22:54   batteryLevel    99
     2018-06-28 19:22:54   fertility       151
     2018-06-28 19:22:55   firmware        3.1.8
     2018-06-28 19:22:53   lux             584
     2018-06-28 19:22:54   moisture        26
     2018-06-28 19:42:58   state           read sensor data
     2018-06-28 19:22:53   temperature     15.6
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 0
Attributes:
   interval   1800
   model      flowerSense
   room       Pflanzen
   sshHost    pi@192.168.3.61
   stateFormat Temp: temperature °C, Dünger: fertility µS/cm, Feuchtigkeit: moisture %, Licht: lux Lux, Batterie: batteryLevel %


Mein Skript zum Schreiben der Readings wir manuell gestartet, nur um mal ein paar Daten zum Darstellen zu haben. Sollte eigentlich kein Problem für fhem sein.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 28 Juni 2018, 20:43:26
Keine Ahnung was du da machst aber das ganze Teil ist kaputt.
Lösche bitte das Devices über das Webinterface und lege es dann über das Webinterface neu an. Danach das Attribut für ssh setzen. Auf dem remote Rechner gibt es den user pi?

Bitte führe alle Befehle über das Webinterface aus. Ich gebe keinen Support für vermurkste include cfg editierungen!
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: hjjk am 28 Juni 2018, 21:15:03
Es handelt sich um ein frisch aufgesetztes fhem. Es gibt nur die 3 Devices.
Da von einer vermurksten Cfg zu reden halte ich für zeimlich überheblich.
Danke für den FREUNDLICHEN Support !!!
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: hjjk am 28 Juni 2018, 21:21:56
BTW, was ist an dieser Config vermurkst ?


define Rosen XiaomiBTLESens C4:7C:8D:66:XX:XX
attr loglevel 5
attr Rosen model flowerSense
attr Rosen interval 1800
attr Rosen room Pflanzen
attr Rosen sshHost pi@192.168.3.61
attr Rosen stateFormat Temp: temperature °C, Dünger: fertility µS/cm, Feuchtigkeit: moisture %, Licht: lux Lux, Batterie: batteryLevel %
define FileLog_Rosen FileLog ./log/Rosen-%Y-%m.log Rosen:batteryLevel:.*|Rosen:fertility:.*|Rosen:lux:.*|Rosen:moisture:.*|Rosen:temperature:.*
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 28 Juni 2018, 21:57:05

gatttool -i hci0 -b C4:7C:8D:66:2B:51 --char-read -a


Dein Log!
Hinter a fehlt das Value. Sowas dürfte eigentlich gar nicht vorkommen. Da stimmt also was nicht.


Entweder wir probieren es zusammen wie ich es sage oder Du findest alleine raus das ich Recht hatte.
Lösche bitte das Devices über die FHEMWEB und definiere es über FHEMWEB neu. Vorher bitte alle anderen fremden Scripte einstellen die auch auf gatttool oder Bluetooth wegen dem Sensor zugreifen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: hjjk am 29 Juni 2018, 10:15:27
Ich habe es allein herausgefunden !
Woher nimmst du eigentlich deine Arroganz das DU Recht hast? Wenn ich Du wäre würde ich jetzt mal was zu deinem Code sagen, lass ich aber. Es führen bekanntlich viele Wege zum Ziel, nicht nur DEINER. Das solltest du mal bedenken.
Nochmals danke für deine FREUNDLICHE Hilfe.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: u.becker am 07 Juli 2018, 08:42:53
Hallo,

ich setze noch das alte Modul ein, habe aber seit einiger Zeit ein seltsames Phänomen.
mittels minMoisture.low steuere ich eine Pumpe, die dann meine Tomaten mit Wassser versorgt, funktioniert soweit, aber warum auch immer wird die Pumpe auch gestartet, wenn der minMoisture Wert größer dem Schwellwert ist.

list Tomate2
Internals:
   BTMAC      C4:7C:8D:63:5A:87
   DEF        C4:7C:8D:63:5A:87
   INTERVAL   3600
   NAME       Tomate2
   NR         26
   STATE      Temp: 16.9 °C, Dünger: 87 µS/cm, Feuchtigkeit: 43 %, Licht: 3668 Lux, Batterie: 99 %
   TYPE       XiaomiFlowerSens
   VERSION    1.0.3
   READINGS:
     2018-07-07 07:37:04   battery         ok
     2018-07-07 07:37:04   batteryLevel    99
     2018-07-07 07:37:04   fertility       87
     2018-07-07 07:37:04   firmware        3.1.8
     2018-05-12 11:00:20   lastGattError   Unknown Error, look at verbose 5 output
     2018-07-07 07:37:04   lux             3668
     2018-07-07 07:37:04   moisture        43
     2018-07-07 07:37:04   state           active
     2017-08-29 20:44:59   stateSoilMoisture ok
     2018-07-07 07:37:04   temperature     16.9
   helper:
Attributes:
   disabledForIntervals 21:00-24:00 00:00-07:00
   event-aggregator moisture:10800:none:max
   interval   3600
   minMoisture 40
   room       1.0_Tomatenhaus
   stateFormat Temp: temperature °C, Dünger: fertility µS/cm, Feuchtigkeit: moisture %, Licht: lux Lux, Batterie: batteryLevel %
   



list PumpEin
   
   Internals:
   DEF        Tomate2:minMoisture.low set Pumpe on-for-timer 60
   NAME       PumpeEin
   NOTIFYDEV  Tomate2
   NR         38
   NTFY_ORDER 50-PumpeEin
   REGEXP     Tomate2:minMoisture.low
   STATE      2018-07-07 07:37:04
   TYPE       notify
   READINGS:
     2018-07-03 17:31:35   state           active
Attributes:
   room       1.0_Tomatenhaus

Was kann da die Ursache sein?
Danke
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 07 Juli 2018, 11:22:12
Gibt es Einträge im Log. So kann man schwer was dazu sagen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: u.becker am 07 Juli 2018, 11:59:29
In der Logdatei steht nur, das eine Mail verschickt wurde. Soll ich da mal einen Loglevel hochdrehen, wenn ja, welchen?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 07 Juli 2018, 12:24:23
Wenn dann natürlich beim Pflanzensensor Device. Bitte einmal auf 5 stellen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: u.becker am 07 Juli 2018, 21:31:04
2018.07.07 19:10:59 4: Sub XiaomiFlowerSens_Run (Tomate2) - start blocking call
2018.07.07 19:11:00 4: Sub XiaomiFlowerSens_BlockingRun (Tomate2) - Running nonBlocking
2018.07.07 19:11:00 5: Sub XiaomiFlowerSens_stateRequestTimer (Tomate2) - Request Timer wird aufgerufen
2018.07.07 19:11:00 5: Sub XiaomiFlowerSens_callGatttool (Tomate2) - WFR: 1
2018.07.07 19:11:02 4: Sub XiaomiFlowerSens_callGatttool (Tomate2) - write data to local host
2018.07.07 19:11:02 4: Sub XiaomiFlowerSens_callGatttool (Tomate2) - call gatttool charWrite loop 1
2018.07.07 19:11:02 4: Sub XiaomiFlowerSens_callGatttool (Tomate2) - charWrite wresp: Characteristic value was written successfully

2018.07.07 19:11:02 4: Sub XiaomiFlowerSens_callGatttool (Tomate2) - run gatttool
2018.07.07 19:11:02 4: Sub XiaomiFlowerSens_callGatttool (Tomate2) - call data from local host
2018.07.07 19:11:02 4: Sub XiaomiFlowerSens_callGatttool (Tomate2) - call gatttool charRead loop 1
2018.07.07 19:11:02 4: Sub XiaomiFlowerSens_callGatttool (Tomate2) - processing gatttool response. sensData[0]: Characteristic value/descriptor
2018.07.07 19:11:02 4: Sub XiaomiFlowerSens_callGatttool (Tomate2) - processing gatttool response. sensData: 06 01 00 e3 1b 00 00 23 7b 00 02 3c 00 fb 34 9b

2018.07.07 19:11:02 4: Sub XiaomiFlowerSens_callGatttool (Tomate2) - call firm/batt data from host local host
2018.07.07 19:11:02 4: Sub XiaomiFlowerSens (Tomate2) - call gatttool readBatFw loop 1
2018.07.07 19:11:02 4: Sub XiaomiFlowerSens_callGatttool (Tomate2) - processing gatttool response. batFwData: 63 27 33 2e 31 2e 38

2018.07.07 19:11:02 4: Sub XiaomiFlowerSens_BlockingRun (Tomate2) - Processing response data: 06 01 00 e3 1b 00 00 23 7b 00 02 3c 00 fb 34 9b

2018.07.07 19:11:02 4: Sub XiaomiFlowerSens_BlockingRun (Tomate2) - no dataerror, create encode json: {"lux":7139,"blevel":99,"fertility":123,"firmware":"3.1.8","temp":262,"moisture":35}
2018.07.07 19:11:02 1: sendEmail RCP: xxx@xxx.de
2018.07.07 19:11:02 1: sendEmail Subject: Tomate2 ist trocken Wert: 41
2018.07.07 19:11:02 1: sendEmail Text: Tomate2 Feuchtewert: 41
2018.07.07 19:11:02 1: sendEmail Anhang:
2018.07.07 19:11:09 1: sendEmail returned: Jul 07 19:11:09 tomatenpi sendEmail[31605]: Email was sent successfully!
2018.07.07 19:11:09 4: Sub XiaomiFlowerSens_BlockingDone (Tomate2) - Abschluss!

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 07 Juli 2018, 23:30:27
Passt doch.
moisture":35

Attribut minMoisture 40
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: u.becker am 08 Juli 2018, 17:14:01
nicht immer
hier meine Definition für die Nachricht

list Tomate2nachricht
Internals:
   DEF        Tomate2:minMoisture.low {DebianMail('xxx@xxx.de',$NAME.' ist trocken Wert: '.ReadingsVal("Tomate2","moisture",0),$NAME.' Feuchtewert: '.ReadingsVal("Tomate2","moisture",0));;}

   NAME       Tomate2nachricht
   NOTIFYDEV  Tomate2
   NR         29
   NTFY_ORDER 50-Tomate2nachricht
   REGEXP     Tomate2:minMoisture.low
   STATE      2018-07-08 15:57:01
   TYPE       notify
   READINGS:
     2018-07-04 09:18:52   state           active

in dem Beispiel oben zeigt moisture "35", in der Mail aber "41", Definition siehe den kopierten Code. Es passt ja manchmal?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 08 Juli 2018, 18:13:44
Könnte die 41 noch der alte Wert sein?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: u.becker am 08 Juli 2018, 22:52:19
nein, oder vielleicht doch? Der Wert von 14:54 in der Mail ist der von 12:47 gemessen, genauso bei 8:39 und 10:41h

Bsp von heute:

2018.07.08 07:37:34 4: Sub XiaomiFlowerSens_BlockingRun (Tomate2) - no dataerror, create encode json: {"blevel":99,"lux":1666,"moisture":32,"temp":137,"firmware":"3.1.8","fertility":92}
2018.07.08 07:37:35 1: sendEmail Text: Tomate2 Feuchtewert: 42

2018.07.08 08:39:27 4: Sub XiaomiFlowerSens_BlockingRun (Tomate2) - no dataerror, create encode json: {"lux":3392,"blevel":99,"fertility":175,"firmware":"3.1.8","temp":160,"moisture":44}
Keine Mail


2018.07.08 09:39:54 4: Sub XiaomiFlowerSens_BlockingRun (Tomate2) - no dataerror, create encode json: {"lux":10372,"blevel":99,"fertility":134,"firmware":"3.1.8","temp":213,"moisture":40}
Keine Mail

2018.07.08 10:41:39 4: Sub XiaomiFlowerSens_BlockingRun (Tomate2) - no dataerror, create encode json: {"temp":287,"moisture":36,"firmware":"3.1.8","fertility":90,"blevel":99,"lux":10652}
2018.07.08 10:41:39 1: sendEmail Text: Tomate2 Feuchtewert: 44

2018.07.08 11:43:35 4: Sub XiaomiFlowerSens_BlockingRun (Tomate2) - no dataerror, create encode json: {"fertility":123,"firmware":"3.1.8","moisture":41,"temp":311,"lux":49475,"blevel":99}
Keine Mail

2018.07.08 12:47:12 4: Sub XiaomiFlowerSens_BlockingRun (Tomate2) - no dataerror, create encode json: {"lux":13089,"blevel":99,"firmware":"3.1.8","fertility":181,"temp":240,"moisture":50}
Keine Mail

2018.07.08 13:49:57 4: Sub XiaomiFlowerSens_BlockingRun (Tomate2) - no dataerror, create encode json: {"lux":31009,"blevel":99,"firmware":"3.1.8","fertility":127,"moisture":41,"temp":324}
Keine Mail

2018.07.08 14:54:07 4: Sub XiaomiFlowerSens_BlockingRun (Tomate2) - no dataerror, create encode json: {"lux":40362,"blevel":99,"firmware":"3.1.8","fertility":96,"temp":335,"moisture":35}
2018.07.08 14:54:07 1: sendEmail Text: Tomate2 Feuchtewert: 50

2018.07.08 15:57:01 4: Sub XiaomiFlowerSens_BlockingRun (Tomate2) - no dataerror, create encode json: {"lux":47094,"blevel":99,"firmware":"3.1.8","fertility":111,"moisture":38,"temp":369}
2018.07.08 15:57:01 1: sendEmail Text: Tomate2 Feuchtewert: 38
Passt

2018.07.08 16:57:51 4: Sub XiaomiFlowerSens_BlockingRun (Tomate2) - no dataerror, create encode json: {"fertility":121,"firmware":"3.1.8","temp":360,"moisture":39,"lux":47094,"blevel":99}
2018.07.08 16:57:51 1: sendEmail Text: Tomate2 Feuchtewert: 38

2018.07.08 17:58:19 4: Sub XiaomiFlowerSens_BlockingRun (Tomate2) - no dataerror, create encode json: {"firmware":"3.1.8","fertility":154,"temp":282,"moisture":39,"lux":8734,"blevel":99}
2018.07.08 17:58:19 1: sendEmail Text: Tomate2 Feuchtewert: 39
Passt


2018.07.08 18:59:28 4: Sub XiaomiFlowerSens_BlockingRun (Tomate2) - no dataerror, create encode json: {"blevel":99,"lux":5529,"moisture":42,"temp":256,"firmware":"3.1.8","fertility":169}
Keine Mail

2018.07.08 19:59:41 4: Sub XiaomiFlowerSens_BlockingRun (Tomate2) - no dataerror, create encode json: {"fertility":135,"firmware":"3.1.8","moisture":37,"temp":237,"lux":4020,"blevel":99}
2018.07.08 19:59:41 1: sendEmail Text: Tomate2 Feuchtewert: 37
Passt
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 08 Juli 2018, 22:58:59
Muss ich bei mir mal testen
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: u.becker am 09 Juli 2018, 08:39:13
Falls es relevant ist, ich nutze noch das "alte" 74_XiaomiFlowerSens Modul

Danke
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 09 Juli 2018, 09:11:12
Zitat von: u.becker am 09 Juli 2018, 08:39:13
Falls es relevant ist, ich nutze noch das "alte" 74_XiaomiFlowerSens Modul

Danke

Testen kann ich wenn nur mit dem aktuellen.
Könntest Du denn ohne Probleme updaten. Ich weiß nicht ob es damit besser ist. Aber ein versuch wäre es wert. Wäre auch für mich einfacher.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Tobias am 10 Juli 2018, 14:27:30
@ext, bei mir habe ich einen pi zero W draußen installiert. Der hat nur fhem drauf und fragt alle BT Sensoren an und schickt die Werte mittels mqtt bridge zum Haupt fhem.
Funktioniert seit 3 Monaten problemlos

Gesendet von meinem Leap mit Tapatalk
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 10 Juli 2018, 18:03:04
danke auch Idee.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: u.becker am 12 Juli 2018, 22:08:19
So, ich habe auf das neue Modul umgestellt, aber die Ausgabe sieht etwas anders aus als beim alten Modul, den Block mit den gelesenen Werten im Klartext finde ich nicht mehr, Muss da noch was neu eingestellt werden? Hier ein Logauszug, wo in der Mail der Wert von 50 für moisture ausgegeben wird, der Trigger ist aber minmoisture=40


2018.07.11 13:03:24 4: XiaomiBTLESens (Tomate2) - Run CreateParamGatttool with mod: write
2018.07.11 13:03:25 5: XiaomiBTLESens (Tomate2) - Write XiaomiBTLESens_ExecGatttool_Run Tomate2|C4:7C:8D:63:5A:87|write|0x33|A01F
2018.07.11 13:03:25 4: XiaomiBTLESens (Tomate2) - stateRequestTimer: Call Request Timer
2018.07.11 13:03:25 5: XiaomiBTLESens (Tomate2) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:63:5A:87 --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 0
2018.07.11 13:03:29 5: XiaomiBTLESens (Tomate2) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully

2018.07.11 13:03:29 4: XiaomiBTLESens (Tomate2) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.07.11 13:03:29 5: XiaomiBTLESens (Tomate2) - ExecGatttool_Done: gatttool return string: Tomate2|C4:7C:8D:63:5A:87|ok|write|0x33|{"gtResult":"no data response"}
2018.07.11 13:03:29 4: XiaomiBTLESens (Tomate2) - Run CreateParamGatttool with mod: read
2018.07.11 13:03:29 5: XiaomiBTLESens (Tomate2) - Read XiaomiBTLESens_ExecGatttool_Run Tomate2|C4:7C:8D:63:5A:87|read|0x35
2018.07.11 13:03:29 5: XiaomiBTLESens (Tomate2) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:63:5A:87 --char-read -a 0x35 2>&1 /dev/null and loop 0
2018.07.11 13:03:29 5: XiaomiBTLESens (Tomate2) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,bc 00 00 86 27 00 00 26 81 00 02 3c 00 fb 34 9b

2018.07.11 13:03:29 4: XiaomiBTLESens (Tomate2) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,bc 00 00 86 27 00 00 26 81 00 02 3c 00 fb 34 9b

2018.07.11 13:03:29 5: XiaomiBTLESens (Tomate2) - ExecGatttool_Done: gatttool return string: Tomate2|C4:7C:8D:63:5A:87|ok|read|0x35|{"gtResult":"bc 00 00 86 27 00 00 26 81 00 02 3c 00 fb 34 9b "}
2018.07.11 13:03:29 4: XiaomiBTLESens (Tomate2) - ProcessingNotification
2018.07.11 13:03:29 4: XiaomiBTLESens (Tomate2) - ProcessingNotification: handle 0x35
2018.07.11 13:03:29 4: XiaomiBTLESens (Tomate2) - FlowerSens Handle0x35
2018.07.11 13:03:29 1: sendEmail RCP: lane@pbf.de
2018.07.11 13:03:29 1: sendEmail Subject: Tomate2 ist trocken Wert: 50
2018.07.11 13:03:29 1: sendEmail Text: Tomate2 Feuchtewert: 50
2018.07.11 13:03:29 1: sendEmail Anhang:
2018.07.11 13:03:36 1: sendEmail returned: Jul 11 13:03:36 tomatenpi sendEmail[20411]: Email was sent successfully!
2018.07.11 13:03:36 4: XiaomiBTLESens (Tomate2) - WriteReadings: Readings were written
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 13 Juli 2018, 09:08:22
Ich muss Dein Notify mal versuchen bei mir nach zu stellen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 14 Juli 2018, 14:58:55
Ich habe das jetzt mal einen Tag getestet, ich kann das bei mir nicht nachstellen. Tut mir leid.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: u.becker am 15 Juli 2018, 12:30:39
Beim "alten" Modul gab's in der Ausgabe einen Eintrag mit "create encode json", worin die erkannten Werte lesbar waren

2018.07.07 19:11:02 4: Sub XiaomiFlowerSens_callGatttool (Tomate2) - processing gatttool response. batFwData: 63 27 33 2e 31 2e 38
2018.07.07 19:11:02 4: Sub XiaomiFlowerSens_BlockingRun (Tomate2) - Processing response data: 06 01 00 e3 1b 00 00 23 7b 00 02 3c 00 fb 34 9b
2018.07.07 19:11:02 4: Sub XiaomiFlowerSens_BlockingRun (Tomate2) - no dataerror, create encode json: {"lux":7139,"blevel":99,"fertility":123,"firmware":"3.1.8","temp":262,"moisture":35}



Beim aktuellen Modul sehe ich das nicht


2018.07.11 13:03:29 5: XiaomiBTLESens (Tomate2) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:63:5A:87 --char-read -a 0x35 2>&1 /dev/null and loop 0
2018.07.11 13:03:29 5: XiaomiBTLESens (Tomate2) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,bc 00 00 86 27 00 00 26 81 00 02 3c 00 fb 34 9b

2018.07.11 13:03:29 4: XiaomiBTLESens (Tomate2) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,bc 00 00 86 27 00 00 26 81 00 02 3c 00 fb 34 9b

2018.07.11 13:03:29 5: XiaomiBTLESens (Tomate2) - ExecGatttool_Done: gatttool return string: Tomate2|C4:7C:8D:63:5A:87|ok|read|0x35|{"gtResult":"bc 00 00 86 27 00 00 26 81 00 02 3c 00 fb 34 9b "}
2018.07.11 13:03:29 4: XiaomiBTLESens (Tomate2) - ProcessingNotification
2018.07.11 13:03:29 4: XiaomiBTLESens (Tomate2) - ProcessingNotification: handle 0x35
2018.07.11 13:03:29 4: XiaomiBTLESens (Tomate2) - FlowerSens Handle0x35


Muss ich da noch irgendwas einstellen oder fehlt diese Ausgabe einfach?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 15 Juli 2018, 12:32:08
Diese Ausgabe gibt es nicht mehr, weil kein JSON mehr erstellt wird.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 17 Juli 2018, 08:20:04
Zitat von: u.becker am 15 Juli 2018, 12:30:39
Beim "alten" Modul gab's in der Ausgabe einen Eintrag mit "create encode json", worin die erkannten Werte lesbar waren

2018.07.07 19:11:02 4: Sub XiaomiFlowerSens_callGatttool (Tomate2) - processing gatttool response. batFwData: 63 27 33 2e 31 2e 38
2018.07.07 19:11:02 4: Sub XiaomiFlowerSens_BlockingRun (Tomate2) - Processing response data: 06 01 00 e3 1b 00 00 23 7b 00 02 3c 00 fb 34 9b
2018.07.07 19:11:02 4: Sub XiaomiFlowerSens_BlockingRun (Tomate2) - no dataerror, create encode json: {"lux":7139,"blevel":99,"fertility":123,"firmware":"3.1.8","temp":262,"moisture":35}



Beim aktuellen Modul sehe ich das nicht


2018.07.11 13:03:29 5: XiaomiBTLESens (Tomate2) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:63:5A:87 --char-read -a 0x35 2>&1 /dev/null and loop 0
2018.07.11 13:03:29 5: XiaomiBTLESens (Tomate2) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,bc 00 00 86 27 00 00 26 81 00 02 3c 00 fb 34 9b

2018.07.11 13:03:29 4: XiaomiBTLESens (Tomate2) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,bc 00 00 86 27 00 00 26 81 00 02 3c 00 fb 34 9b

2018.07.11 13:03:29 5: XiaomiBTLESens (Tomate2) - ExecGatttool_Done: gatttool return string: Tomate2|C4:7C:8D:63:5A:87|ok|read|0x35|{"gtResult":"bc 00 00 86 27 00 00 26 81 00 02 3c 00 fb 34 9b "}
2018.07.11 13:03:29 4: XiaomiBTLESens (Tomate2) - ProcessingNotification
2018.07.11 13:03:29 4: XiaomiBTLESens (Tomate2) - ProcessingNotification: handle 0x35
2018.07.11 13:03:29 4: XiaomiBTLESens (Tomate2) - FlowerSens Handle0x35


Muss ich da noch irgendwas einstellen oder fehlt diese Ausgabe einfach?




Ich habe in der neuen Version 2.2.0 eine Erweiterte Ausgabe eingebaut
Zitat
2018.07.17 08:17:22 4: XiaomiBTLESens (PflanzenSensor1) - Run CreateParamGatttool with mod: write
2018.07.17 08:17:29 4: XiaomiBTLESens (PflanzenSensor1) - ExecGatttool_Run: gatttool result Characteristic value was written successfully

2018.07.17 08:17:29 4: XiaomiBTLESens (PflanzenSensor1) - Run CreateParamGatttool with mod: read
2018.07.17 08:17:29 4: XiaomiBTLESens (PflanzenSensor1) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,dd 00 00 aa 01 00 00 29 c6 02 02 3c 00 fb 34 9b

2018.07.17 08:17:29 4: XiaomiBTLESens (PflanzenSensor1) - ProcessingNotification
2018.07.17 08:17:29 4: XiaomiBTLESens (PflanzenSensor1) - ProcessingNotification: handle 0x35
2018.07.17 08:17:29 4: XiaomiBTLESens (PflanzenSensor1) - FlowerSens Handle0x35
2018.07.17 08:17:29 4: XiaomiBTLESens (PflanzenSensor1) - FlowerSens Handle0x35 - lux: 426, moisture: 41, fertility: 710
2018.07.17 08:17:30 4: XiaomiBTLESens (PflanzenSensor1) - WriteReadings: Readings were written

Die neue Version gibt es morgen oder gleich über Github
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: FEHMPiDi am 17 Juli 2018, 13:19:33
Hallo,

kann jemand etwas zur Reichweite der Bluetooth thermo- Hygrometer in Verbindung mit einem RasPi 3 sagen.
Wieviel der Bluetooth devices kann man den eigentlich gleichzeitig mit dem RasPi koppeln. Gibt es da ein maximum?

Danke
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 17 Juli 2018, 13:25:26
Zitat von: FEHMPiDi am 17 Juli 2018, 13:19:33
Hallo,

kann jemand etwas zur Reichweite der Bluetooth thermo- Hygrometer in Verbindung mit einem RasPi 3 sagen.
Wieviel der Bluetooth devices kann man den eigentlich gleichzeitig mit dem RasPi koppeln. Gibt es da ein maximum?

Danke

Ein Maximum gibt es nicht. Aber ich denke mal so ab 10 -14 wird es eng mit dem Zeitversetzen Abfragen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 17 Juli 2018, 13:48:23
Zitat von: FEHMPiDi am 17 Juli 2018, 13:19:33
Wieviel der Bluetooth devices kann man den eigentlich gleichzeitig mit dem RasPi koppeln. Gibt es da ein maximum?

Die werden doch garnicht gekoppelt oder? Ist das nicht nur ein Broadcast was die senden?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 17 Juli 2018, 14:16:01
Nee gekoppelt wird da gar nichts. Wird einfach nur abgefragt.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: FEHMPiDi am 18 Juli 2018, 08:36:57
Achso, vielen Dank. Dann werde ich mir mal so ein Ding besorgen und testen. Ich hoffe nur das die BT Reichweite ausreicht.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Invers am 18 Juli 2018, 08:54:31
Ich habe 2 Hygro- Thermometer im Einsatz. Eine 73 qm grosse Wohnung kann man damit bezüglich Reichweite nicht abdecken, zumindest, wenn eine Wand dazwischen liegt. Für die Nachbarzimmer reicht es aber schon. Somit fällt bei mir eigentlich nur die Küche raus. Ich war verblüfft, dass die Abweichung beider Thermometer nur 0,2 Grad betragen. Da lagen sie natürlich direkt nebeneinander. Bei der Feuchte gab es gar keine Abweichung. Ich werde mir wohl noch 2 Stück zulegen. Die Batterien stehen nach etwa einem Monat Betriebszeit auf 98 Prozent. Ich denke aber, das ist meine Schuld, weil ich zu häufig abfrage. 
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 18 Juli 2018, 09:18:11
Alternativ kann man sich ja immer noch einen kleinen Pi holen und per ssh abrufen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 18 Juli 2018, 14:15:34
Zitat von: Invers am 18 Juli 2018, 08:54:31
Ich habe 2 Hygro- Thermometer im Einsatz. Eine 73 qm grosse Wohnung kann man damit bezüglich Reichweite nicht abdecken, zumindest, wenn eine Wand dazwischen liegt. Für die Nachbarzimmer reicht es aber schon. Somit fällt bei mir eigentlich nur die Küche raus. Ich war verblüfft, dass die Abweichung beider Thermometer nur 0,2 Grad betragen. Da lagen sie natürlich direkt nebeneinander. Bei der Feuchte gab es gar keine Abweichung. Ich werde mir wohl noch 2 Stück zulegen. Die Batterien stehen nach etwa einem Monat Betriebszeit auf 98 Prozent. Ich denke aber, das ist meine Schuld, weil ich zu häufig abfrage.

Kann ich bestätigen, wenn dei Türen offen sind geht das einigermaßen gut. Aber dolle ist es nicht, aber gut ist eben BLE.

An sicht sind die Teile gut, ich bin nur gespannt wann das Wasser durchdiffundiert bei der eigenartigen Beschichtung. Die Nährstoffangabe ist auch Blödsinn, hätte man sich sparen können.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Invers am 18 Juli 2018, 17:19:03
Nach meiner Auffassung haben wir ja gerade über die Thermometer von Xiaomi geredet, nicht über das Pflanzenteil. Aber ich denke, die Reichweite sollte theoretisch etwa gleich sein.
Beide Gerätearten laufen bei mir äusserst zuverlässig.


@CoolTux
Da wäre es aber einfacher, ein Anderes Thermometer zu kaufen. :-)
Danke nochmals für das tolle und sehr gut funktionierende Modul.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: mark79 am 28 Juli 2018, 17:05:59
Hallo CoolTux,

wenn du mal Zeit hast, könntest du vielleicht die Xiaomi Oclean SE Zahnbürste mit in dein Modul einbinden? :)
https://www.chinahandys.net/oclean-one-schallzahnbuerste-im-test/
Diese ist noch im Angebot, für 34,19€ https://www.mydealz.de/deals/xiaomi-oclean-se-sonic-elektrische-zahnburste-1193722

Ich habe etwas mit gatttool rumgespielt und mit "char-read-hnd 0x0011" lässt sich der Akku stand auslesen:

Akku 96%
[70:28:45:5E:FC:73][LE]> char-read-hnd 0x0011
Characteristic value/descriptor: 60


Akku 94%
[70:28:45:5E:FC:73][LE]> char-read-hnd 0x0011
Characteristic value/descriptor: 5e


root@rocki:~# gatttool -i hci0 -b 70:28:45:5E:FC:73 -I
[70:28:45:5E:FC:73][LE]> connect
Attempting to connect to 70:28:45:5E:FC:73
Connection successful
[70:28:45:5E:FC:73][LE]> primary
attr handle: 0x0001, end grp handle: 0x0007 uuid: 00001800-0000-1000-8000-00805f9b34fb
attr handle: 0x0008, end grp handle: 0x0008 uuid: 00001801-0000-1000-8000-00805f9b34fb
attr handle: 0x0009, end grp handle: 0x000b uuid: 00001802-0000-1000-8000-00805f9b34fb
attr handle: 0x000c, end grp handle: 0x000e uuid: 00001803-0000-1000-8000-00805f9b34fb
attr handle: 0x000f, end grp handle: 0x0012 uuid: 0000180f-0000-1000-8000-00805f9b34fb
attr handle: 0x0013, end grp handle: 0x0016 uuid: 0783b03e-8535-b5a0-7140-a304d2495cd7
attr handle: 0x0017, end grp handle: 0x0026 uuid: 8082caa8-41a6-4021-91c6-56f9b954cc18
attr handle: 0x0027, end grp handle: 0x0036 uuid: 0000fef5-0000-1000-8000-00805f9b34fb
attr handle: 0x0037, end grp handle: 0x0043 uuid: 0000180a-0000-1000-8000-00805f9b34fb
[70:28:45:5E:FC:73][LE]>
[70:28:45:5E:FC:73][LE]> char-desc
handle: 0x0001, uuid: 00002800-0000-1000-8000-00805f9b34fb
handle: 0x0002, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0003, uuid: 00002a00-0000-1000-8000-00805f9b34fb
handle: 0x0004, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0005, uuid: 00002a01-0000-1000-8000-00805f9b34fb
handle: 0x0006, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0007, uuid: 00002a04-0000-1000-8000-00805f9b34fb
handle: 0x0008, uuid: 00002800-0000-1000-8000-00805f9b34fb
handle: 0x0009, uuid: 00002800-0000-1000-8000-00805f9b34fb
handle: 0x000a, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x000b, uuid: 00002a06-0000-1000-8000-00805f9b34fb
handle: 0x000c, uuid: 00002800-0000-1000-8000-00805f9b34fb
handle: 0x000d, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x000e, uuid: 00002a06-0000-1000-8000-00805f9b34fb
handle: 0x000f, uuid: 00002800-0000-1000-8000-00805f9b34fb
handle: 0x0010, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0011, uuid: 00002a19-0000-1000-8000-00805f9b34fb
handle: 0x0012, uuid: 00002902-0000-1000-8000-00805f9b34fb
handle: 0x0013, uuid: 00002800-0000-1000-8000-00805f9b34fb
handle: 0x0014, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0015, uuid: 0783b03e-8535-b5a0-7140-a304d2495cd8
handle: 0x0016, uuid: 00002902-0000-1000-8000-00805f9b34fb
handle: 0x0017, uuid: 00002800-0000-1000-8000-00805f9b34fb
handle: 0x0018, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0019, uuid: 9d84b9a3-000c-49d8-9183-855b673fbb85
handle: 0x001a, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x001b, uuid: 5f78df94-798c-46f5-990a-855b673fbb86
handle: 0x001c, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x001d, uuid: 5f78df94-798c-46f5-990a-855b673fbb87
handle: 0x001e, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x001f, uuid: 5f78df94-798c-46f5-990a-855b673fbb88
handle: 0x0020, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0021, uuid: 5f78df94-798c-46f5-990a-855b673fbb89
handle: 0x0022, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0023, uuid: 5f78df94-798c-46f5-990a-855b673fbb90
handle: 0x0024, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0025, uuid: 5f78df94-798c-46f5-990a-b3eb6a065c78
handle: 0x0026, uuid: 00002902-0000-1000-8000-00805f9b34fb
handle: 0x0027, uuid: 00002800-0000-1000-8000-00805f9b34fb
handle: 0x0028, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0029, uuid: 8082caa8-41a6-4021-91c6-56f9b954cc34
handle: 0x002a, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x002b, uuid: 724249f0-5ec3-4b5f-8804-42345af08651
handle: 0x002c, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x002d, uuid: 6c53db25-47a1-45fe-a022-7c92fb334fd4
handle: 0x002e, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x002f, uuid: 9d84b9a3-000c-49d8-9183-855b673fda31
handle: 0x0030, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0031, uuid: 457871e8-d516-4ca1-9116-57d0b17b9cb2
handle: 0x0032, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0033, uuid: 5f78df94-798c-46f5-990a-b3eb6a065c88
handle: 0x0034, uuid: 00002902-0000-1000-8000-00805f9b34fb
handle: 0x0035, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0036, uuid: 61c8849c-f639-4765-946e-5c3419bebb2a
handle: 0x0037, uuid: 00002800-0000-1000-8000-00805f9b34fb
handle: 0x0038, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0039, uuid: 00002a29-0000-1000-8000-00805f9b34fb
handle: 0x003a, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x003b, uuid: 00002a24-0000-1000-8000-00805f9b34fb
handle: 0x003c, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x003d, uuid: 00002a25-0000-1000-8000-00805f9b34fb
handle: 0x003e, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x003f, uuid: 00002a27-0000-1000-8000-00805f9b34fb
handle: 0x0040, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0041, uuid: 00002a26-0000-1000-8000-00805f9b34fb
handle: 0x0042, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0043, uuid: 00002a28-0000-1000-8000-00805f9b34fb



Viele Grüße
Mark
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 28 Juli 2018, 19:57:20
Zitat von: mark79 am 28 Juli 2018, 17:05:59
Hallo CoolTux,

wenn du mal Zeit hast, könntest du vielleicht die Xiaomi Oclean SE Zahnbürste mit in dein Modul einbinden? :)
https://www.chinahandys.net/oclean-one-schallzahnbuerste-im-test/
Diese ist noch im Angebot, für 34,19€ https://www.mydealz.de/deals/xiaomi-oclean-se-sonic-elektrische-zahnburste-1193722

Ich habe etwas mit gatttool rumgespielt und mit "char-read-hnd 0x0011" lässt sich der Akku stand auslesen:

Akku 96%
[70:28:45:5E:FC:73][LE]> char-read-hnd 0x0011
Characteristic value/descriptor: 60


Akku 94%
[70:28:45:5E:FC:73][LE]> char-read-hnd 0x0011
Characteristic value/descriptor: 5e


root@rocki:~# gatttool -i hci0 -b 70:28:45:5E:FC:73 -I
[70:28:45:5E:FC:73][LE]> connect
Attempting to connect to 70:28:45:5E:FC:73
Connection successful
[70:28:45:5E:FC:73][LE]> primary
attr handle: 0x0001, end grp handle: 0x0007 uuid: 00001800-0000-1000-8000-00805f9b34fb
attr handle: 0x0008, end grp handle: 0x0008 uuid: 00001801-0000-1000-8000-00805f9b34fb
attr handle: 0x0009, end grp handle: 0x000b uuid: 00001802-0000-1000-8000-00805f9b34fb
attr handle: 0x000c, end grp handle: 0x000e uuid: 00001803-0000-1000-8000-00805f9b34fb
attr handle: 0x000f, end grp handle: 0x0012 uuid: 0000180f-0000-1000-8000-00805f9b34fb
attr handle: 0x0013, end grp handle: 0x0016 uuid: 0783b03e-8535-b5a0-7140-a304d2495cd7
attr handle: 0x0017, end grp handle: 0x0026 uuid: 8082caa8-41a6-4021-91c6-56f9b954cc18
attr handle: 0x0027, end grp handle: 0x0036 uuid: 0000fef5-0000-1000-8000-00805f9b34fb
attr handle: 0x0037, end grp handle: 0x0043 uuid: 0000180a-0000-1000-8000-00805f9b34fb
[70:28:45:5E:FC:73][LE]>
[70:28:45:5E:FC:73][LE]> char-desc
handle: 0x0001, uuid: 00002800-0000-1000-8000-00805f9b34fb
handle: 0x0002, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0003, uuid: 00002a00-0000-1000-8000-00805f9b34fb
handle: 0x0004, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0005, uuid: 00002a01-0000-1000-8000-00805f9b34fb
handle: 0x0006, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0007, uuid: 00002a04-0000-1000-8000-00805f9b34fb
handle: 0x0008, uuid: 00002800-0000-1000-8000-00805f9b34fb
handle: 0x0009, uuid: 00002800-0000-1000-8000-00805f9b34fb
handle: 0x000a, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x000b, uuid: 00002a06-0000-1000-8000-00805f9b34fb
handle: 0x000c, uuid: 00002800-0000-1000-8000-00805f9b34fb
handle: 0x000d, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x000e, uuid: 00002a06-0000-1000-8000-00805f9b34fb
handle: 0x000f, uuid: 00002800-0000-1000-8000-00805f9b34fb
handle: 0x0010, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0011, uuid: 00002a19-0000-1000-8000-00805f9b34fb
handle: 0x0012, uuid: 00002902-0000-1000-8000-00805f9b34fb
handle: 0x0013, uuid: 00002800-0000-1000-8000-00805f9b34fb
handle: 0x0014, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0015, uuid: 0783b03e-8535-b5a0-7140-a304d2495cd8
handle: 0x0016, uuid: 00002902-0000-1000-8000-00805f9b34fb
handle: 0x0017, uuid: 00002800-0000-1000-8000-00805f9b34fb
handle: 0x0018, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0019, uuid: 9d84b9a3-000c-49d8-9183-855b673fbb85
handle: 0x001a, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x001b, uuid: 5f78df94-798c-46f5-990a-855b673fbb86
handle: 0x001c, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x001d, uuid: 5f78df94-798c-46f5-990a-855b673fbb87
handle: 0x001e, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x001f, uuid: 5f78df94-798c-46f5-990a-855b673fbb88
handle: 0x0020, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0021, uuid: 5f78df94-798c-46f5-990a-855b673fbb89
handle: 0x0022, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0023, uuid: 5f78df94-798c-46f5-990a-855b673fbb90
handle: 0x0024, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0025, uuid: 5f78df94-798c-46f5-990a-b3eb6a065c78
handle: 0x0026, uuid: 00002902-0000-1000-8000-00805f9b34fb
handle: 0x0027, uuid: 00002800-0000-1000-8000-00805f9b34fb
handle: 0x0028, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0029, uuid: 8082caa8-41a6-4021-91c6-56f9b954cc34
handle: 0x002a, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x002b, uuid: 724249f0-5ec3-4b5f-8804-42345af08651
handle: 0x002c, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x002d, uuid: 6c53db25-47a1-45fe-a022-7c92fb334fd4
handle: 0x002e, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x002f, uuid: 9d84b9a3-000c-49d8-9183-855b673fda31
handle: 0x0030, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0031, uuid: 457871e8-d516-4ca1-9116-57d0b17b9cb2
handle: 0x0032, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0033, uuid: 5f78df94-798c-46f5-990a-b3eb6a065c88
handle: 0x0034, uuid: 00002902-0000-1000-8000-00805f9b34fb
handle: 0x0035, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0036, uuid: 61c8849c-f639-4765-946e-5c3419bebb2a
handle: 0x0037, uuid: 00002800-0000-1000-8000-00805f9b34fb
handle: 0x0038, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0039, uuid: 00002a29-0000-1000-8000-00805f9b34fb
handle: 0x003a, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x003b, uuid: 00002a24-0000-1000-8000-00805f9b34fb
handle: 0x003c, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x003d, uuid: 00002a25-0000-1000-8000-00805f9b34fb
handle: 0x003e, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x003f, uuid: 00002a27-0000-1000-8000-00805f9b34fb
handle: 0x0040, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0041, uuid: 00002a26-0000-1000-8000-00805f9b34fb
handle: 0x0042, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0043, uuid: 00002a28-0000-1000-8000-00805f9b34fb



Viele Grüße
Mark

Hallo Mark,

Ich schaue es mir die Wochen einmal an.


Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: mark79 am 28 Juli 2018, 23:59:26
Zitat von: CoolTux am 28 Juli 2018, 19:57:20
Hallo Mark,

Ich schaue es mir die Wochen einmal an.

Hi Cooltux, das wäre super. Wenn du noch was brauchst, sag bescheid und es hat Zeit, der Akku soll angeblich 2 Monate durchhalten. :D

Gibt es eigentlich einen besseren Weg, um so was herauszufinden?
So etwas wie ein Sniffer, also das man die Kommunikation der APP mit dem Device mitschneiden kann...


Viele Grüße
Mark
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 29 Juli 2018, 07:24:07
Zitat von: mark79 am 28 Juli 2018, 23:59:26
Hi Cooltux, das wäre super. Wenn du noch was brauchst, sag bescheid und es hat Zeit, der Akku soll angeblich 2 Monate durchhalten. :D

Gibt es eigentlich einen besseren Weg, um so was herauszufinden?
So etwas wie ein Sniffer, also das man die Kommunikation der APP mit dem Device mitschneiden kann...


Viele Grüße
Mark

Es gibt da so die ein oder andere App. Musst bitte mal schauen. Oder eventuell findest Du sogar schon Infos im Netz.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ToM_ToM am 02 August 2018, 07:23:48
Hi Leon,

mir ist aufgefallen dass disabledForIntervals bei mir nicht sauber arbeitet. Es wird zwar das Device korrekt disabled, aber nicht wieder enabled. Das Verhalten habe ich beim aktuellen als auch beim alten XiaomiFolowerSens Modul.


defmod Pflanze_07 XiaomiBTLESens C4:XX:XX:XX:XX:XX
attr Pflanze_07 DbLogExclude .*
attr Pflanze_07 alias Gasteria
attr Pflanze_07 disabledForIntervals 21:00-24:00 00:00-06:00
attr Pflanze_07 interval 3600
attr Pflanze_07 maxFertility 1000
attr Pflanze_07 maxLux 30000
attr Pflanze_07 maxMoisture 50
attr Pflanze_07 maxTemp 35
attr Pflanze_07 minFertility 300
attr Pflanze_07 minLux 3500
attr Pflanze_07 minMoisture 7
attr Pflanze_07 minTemp 5
attr Pflanze_07 model flowerSens
attr Pflanze_07 room FlowerSens
attr Pflanze_07 userReadings moistureFeeling:moisture.* {\
if (ReadingsVal($name, "moisture", -1) < AttrVal($name, "minMoisture", 0)) {\
return "too dry";;\
}\
elsif (ReadingsVal($name, "moisture", -1) > AttrVal($name, "maxMoisture", 100)) {\
return "too wet";;\
}\
else {\
return "good";;\
}\
}

setstate Pflanze_07 disabled
setstate Pflanze_07 2018-06-14 20:36:07 battery ok
setstate Pflanze_07 2018-06-14 20:36:07 batteryLevel 100
setstate Pflanze_07 2018-07-31 20:33:29 batteryPercent 100
setstate Pflanze_07 2018-07-31 20:33:29 batteryState ok
setstate Pflanze_07 2018-07-31 20:33:31 fertility 1332
setstate Pflanze_07 2018-07-31 20:33:29 firmware 3.1.8
setstate Pflanze_07 2018-07-28 19:14:27 lastGattError charWrite faild
setstate Pflanze_07 2018-07-31 20:33:31 lux 164
setstate Pflanze_07 2018-07-31 20:33:31 moisture 24
setstate Pflanze_07 2018-07-31 20:33:31 moistureFeeling good
setstate Pflanze_07 2018-08-01 21:31:20 state disabled
setstate Pflanze_07 2018-07-31 20:33:31 temperature 28.2


Ich hatte es auch mit disabledForIntervals 21:00-23:59 00:00-06:00 probiert. Gleiches Verhalten.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 02 August 2018, 07:30:12
Hallo Tom,

Deine aktuelle Konfiguration ist korrekt. Wie äußert sich denn das nicht funktionieren? Wird außerhalb des Zeitintervalls nicht abgefragt?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ToM_ToM am 02 August 2018, 08:17:04
ZitatDeine aktuelle Konfiguration ist korrekt. Wie äußert sich denn das nicht funktionieren? Wird außerhalb des Zeitintervalls nicht abgefragt?[/quote
Ja genau. Du siehst ja, er hat um 21:31:20 den Status geändert und das Device disabled, jedoch wird es am nächsten Tag um 06:00 bzw. nach 06:00 nicht wieder enabled. Da der Abfrage-Intervall auf eine Stunde steht, würde ich erwarten dass spätestens gegen 07:00 die Abfrage ausgeführt werden müsste. Aber selbst um 08:00 hat sich nichts getan. Wenn ich dann manuell abfrage, geht's.

VG, Thomas
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 02 August 2018, 08:23:43
Da braucht ich dann aber bitte ein list vom Device, die raw definitions helfen mir da nicht.
Ich kann Dir nur sagen das es bei mir funktioniert. Das disabled verschwindet sobald der erste Aufruf nach dem Intervall kommt. Also frühstens 06:01 aber spätestens bei Dir wohl 8 Uhr
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ToM_ToM am 02 August 2018, 17:10:38
ZitatDa braucht ich dann aber bitte ein list vom Device, die raw definitions helfen mir da nicht.

Anbei das list. Die Mac habe ich verfälscht.


Internals:
   BTMAC      C4:XX:XX:XX:XX:70
   DEF        C4:XX:XX:XX:XX:70
   INTERVAL   3600
   NAME       Pflanze_07
   NOTIFYDEV  global,Pflanze_07
   NR         1007
   NTFY_ORDER 50-Pflanze_07
   STATE      disabled
   TYPE       XiaomiBTLESens
   VERSION    2.2.0
   loglevel   4
   READINGS:
     2018-06-14 20:36:07   battery         ok
     2018-06-14 20:36:07   batteryLevel    100
     2018-07-31 20:33:29   batteryPercent  100
     2018-07-31 20:33:29   batteryState    ok
     2018-07-31 20:33:31   fertility       1332
     2018-07-31 20:33:29   firmware        3.1.8
     2018-07-28 19:14:27   lastGattError   charWrite faild
     2018-07-31 20:33:31   lux             164
     2018-07-31 20:33:31   moisture        24
     2018-07-31 20:33:31   moistureFeeling good
     2018-08-01 21:31:20   state           disabled
     2018-07-31 20:33:31   temperature     28.2
   helper:
     CallBattery 0
     CallSensDataCounter 0
Attributes:
   DbLogExclude .*
   alias      Gasteria
   disabledForIntervals 21:00-24:00 00:00-06:00
   interval   3600
   maxFertility 1000
   maxLux     30000
   maxMoisture 50
   maxTemp    35
   minFertility 300
   minLux     3500
   minMoisture 7
   minTemp    5
   model      flowerSens
   room       FlowerSens
   userReadings moistureFeeling:moisture.* {
if (ReadingsVal($name, "moisture", -1) < AttrVal($name, "minMoisture", 0)) {
return "too dry";
}
elsif (ReadingsVal($name, "moisture", -1) > AttrVal($name, "maxMoisture", 100)) {
return "too wet";
}
else {
return "good";
}
}


VG, Thomas
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 02 August 2018, 20:07:55
OK. Dann bitte morgen früh noch mal wenn er eigentlich einmal angerufen haben sollte es aber nicht hat.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ToM_ToM am 03 August 2018, 06:58:01
Guten Morgen.

Ich habe gestern Abend das disabledForIntervals von meinem XiaomiBTLESens umgestellt auf 21:00-24:00 00:00-04:00.
Und heute morgen lief alles korrekt.

Ich habe derzeit 5 aktive XiaomiFlowerSens und 1 aktiven XiaomiBTLESens die alle das gleiche disableForIntervals haben.
Kann es sein dass die sich in die Quere kommen weil die alle morgens um 06:00 loslaufen wollen?

Hier nochmal ein list (allerdings läuft es ja heute morgen korrekt)


Internals:
   BTMAC      C4:XX:XX:XX:XX:70
   DEF        C4:XX:XX:XX:XX:70
   INTERVAL   3600
   NAME       Pflanze_07
   NOTIFYDEV  global,Pflanze_07
   NR         1007
   NTFY_ORDER 50-Pflanze_07
   STATE      active
   TYPE       XiaomiBTLESens
   VERSION    2.2.0
   loglevel   4
   READINGS:
     2018-06-14 20:36:07   battery         ok
     2018-06-14 20:36:07   batteryLevel    100
     2018-08-02 18:53:42   batteryPercent  100
     2018-08-02 18:53:42   batteryState    ok
     2018-08-03 06:01:28   fertility       1496
     2018-08-02 18:53:42   firmware        3.1.8
     2018-07-28 19:14:27   lastGattError   charWrite faild
     2018-08-03 06:01:28   lux             21
     2018-08-03 06:01:28   moisture        22
     2018-08-03 06:01:28   moistureFeeling good
     2018-08-03 06:01:28   state           active
     2018-08-03 06:01:28   temperature     27.8
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1533228822.27665
     updateTimestampCallBattery 2018-08-02 18:53:42
Attributes:
   DbLogExclude .*
   alias      Gasteria
   disabledForIntervals 21:00-24:00 00:00-04:00
   interval   3600
   maxFertility 1000
   maxLux     30000
   maxMoisture 50
   maxTemp    35
   minFertility 300
   minLux     3500
   minMoisture 7
   minTemp    5
   model      flowerSens
   room       FlowerSens
   userReadings moistureFeeling:moisture.* {
if (ReadingsVal($name, "moisture", -1) < AttrVal($name, "minMoisture", 0)) {
return "too dry";
}
elsif (ReadingsVal($name, "moisture", -1) > AttrVal($name, "maxMoisture", 100)) {
return "too wet";
}
else {
return "good";
}
}
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 03 August 2018, 07:23:05
Keine Sorge. Die wollen nicht alle um Punkt 6 Uhr loslaufen.
Der Timer für jeden einzelnen Sensor läuft trotz disabled weiter. Es wird lediglich nicht abgefragt. Daher kann es sein das der letzte Timer ohne Abfrage 6 Uhr ist und dann dem zu Folge der nächste bei einer Stunde Intervall erst wieder 7 Uhr. Wichtig ist zu wissen daß bei jedem neuen Timer immer eine Zufallszahl mit dazu kommt von max 15 min.

Es muss bei Dir also was anderes sein.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ToM_ToM am 08 August 2018, 17:39:27
Hi Leon,

ich hatte die jetzt alle wieder auf die gleiche Zeit gestellt und mal ein paar Tage beobachtet. Nun lief alles wie es sollte. Werde das nochmal länger beobachten. Aber nach manchen Neustarts von meinem Pi bekomme ich den Fehler No route to host (113).

hciconfig hci0 reset bringt dann Can't get device info: No such device

Dann muss ich meist den Bluethooth-Adapter abziehen und wieder anstecken und dann geht's. Hast du hier vielleicht einen Tipp für mich wie ich bei so einem Fehler den Adapter anders (automatisiert) neu einlesen kann?

VG, Thomas
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 08 August 2018, 18:13:55
Statt reset mal up und down nehmen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ToM_ToM am 10 August 2018, 07:27:56
ZitatStatt reset mal up und down nehmen.

Funktioniert leider auch nicht da er das Device irgendwie nicht kennt. Es müsste eine Möglichkeit geben, dieses neu einzulesen ohne es immer manuell abzuziehen und neu anzustecken.


fhem@bananapi:~$ sudo hciconfig hci0 up
Can't get device info: No such device
fhem@bananapi:~$

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 10 August 2018, 07:44:47
Seltsam. Da weiß ich aber nicht wirklich mehr. Es gibt einige Einträge dazu im Forum. Vielleicht findest Du eine passende Lösung.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: mark79 am 10 August 2018, 11:05:08
Vielleicht hilft dir so was, ein USB Reset:

https://raspberrypi.stackexchange.com/questions/9264/how-do-i-reset-a-usb-device-using-a-script
https://gist.github.com/x2q/5124616
https://gist.github.com/zlot/1d867b7d941abde3f02636a54a1f8495

Ich würde einen anderen Kernel ausprobieren, der ist vermutlich die Ursache.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ToM_ToM am 10 August 2018, 19:07:43
ZitatVielleicht hilft dir so was, ein USB Reset

Habe ich auch probiert mit:
modprobe -r btusb && sleep 1 && modprobe btusb

Aber funktioniert leider auch nicht. Er verliert den Stick auch irgendwie nur immer dann, wenn ich den Pi vom Strom getrennt hatte. Habe eben nochmal geteste. reboot und shutdown ist kein Thema. Erst nach einem shutdown + Stromtrennung ist der Stick nach Wiedereinschalten nicht mehr ansprechbar und muss manuelle entfernt und neu eingesteckt werden.
Evtl. muss ich mir eine USV organisieren.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: mark79 am 11 August 2018, 01:20:11
Bei mir funktioniert das mit dem USB Reset leider auch nicht. Bei mir handelt es sich um ein Playstation 3 Eye Kamera mit 4x Mikrofon (USB), was ich für Snips (Alexa ohne Cloud) verwende möchte.

Wenn ich den Rock64 oder Orange PI Zero reboote und das USB Device dabei verbunden ist, funktioniert das Device danach nicht mehr.
Wenn ich aber das USB Device abstecke und neu verbinde geht es.

Mach ich ein shutdown und trenne den Strom und verbinde es neu, funktioniert das USB Device nach dem Systemstart komischerweise.

Ich vermute das liegt am Kernel... Laut Berichten wurde das beim RPi durch ein Kernel update wohl behoben (noch nicht selbst getestet) und wir, mit dem Exoten Boards wurde das wohl vergessen zu beheben...
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ToM_ToM am 11 August 2018, 09:53:42
Hi Leon,

heute hatte ich wieder den Fall dass alle Sensoren weiterhin auf "disabled" stehen. Und das, obwohl es mittlerweile schon 09:51 ist.


Internals:
   BTMAC      C4:XX:XX:XX:XX:70
   DEF        C4:XX:XX:XX:XX:70
   INTERVAL   3600
   NAME       Pflanze_07
   NOTIFYDEV  global,Pflanze_07
   NR         1005
   NTFY_ORDER 50-Pflanze_07
   STATE      disabled
   TYPE       XiaomiBTLESens
   VERSION    2.2.0
   loglevel   4
   READINGS:
     2018-06-14 20:36:07   battery         ok
     2018-06-14 20:36:07   batteryLevel    100
     2018-08-10 18:54:20   batteryPercent  100
     2018-08-10 18:54:20   batteryState    ok
     2018-08-10 20:54:55   fertility       1182
     2018-08-10 18:54:20   firmware        3.1.8
     2018-08-10 18:32:35   lastGattError   No route to host (113)
     2018-08-10 20:54:55   lux             115
     2018-08-10 20:54:55   moisture        21
     2018-08-10 20:54:55   moistureFeeling good
     2018-08-11 00:58:08   state           disabled
     2018-08-10 20:54:55   temperature     27.1
   helper:
     CallBattery 0
     CallSensDataCounter 0
Attributes:
   DbLogExclude .*
   alias      Gasteria
   disabledForIntervals 21:00-24:00 00:00-06:00
   interval   3600
   maxFertility 1000
   maxLux     30000
   maxMoisture 50
   maxTemp    35
   minFertility 300
   minLux     3500
   minMoisture 7
   minTemp    5
   model      flowerSens
   room       FlowerSens
   userReadings moistureFeeling:moisture.* {
if (ReadingsVal($name, "moisture", -1) < AttrVal($name, "minMoisture", 0)) {
return "too dry";
}
elsif (ReadingsVal($name, "moisture", -1) > AttrVal($name, "maxMoisture", 100)) {
return "too wet";
}
else {
return "good";
}
}



Zur Vollständigkeit auch hier nochmal ein List von einem Device mit dem alten Modul (da ich davon auch noch einige im Einsatz habe)


Internals:
   BTMAC      C4:YY:YY:YY:YY:4B
   DEF        C4:YY:YY:YY:YY:4B
   INTERVAL   3600
   NAME       Pflanze_01
   NOTIFYDEV  global
   NR         411
   NTFY_ORDER 50-Pflanze_01
   STATE      disabled
   TYPE       XiaomiFlowerSens
   VERSION    1.4.1
   loglevel   4
   READINGS:
     2018-08-10 18:54:12   battery         ok
     2018-08-10 18:54:12   batteryLevel    98
     2018-08-10 19:58:40   fertility       253
     2018-08-10 18:54:12   firmware        3.1.4
     2018-08-10 18:32:30   lastGattError   No route to host (113)
     2018-08-10 19:58:40   lux             1289
     2018-08-10 19:58:40   moisture        23
     2018-08-10 19:58:40   moistureFeeling good
     2018-08-11 00:57:57   state           disabled
     2018-08-10 19:58:40   temperature     29.2
   helper:
     CallBatteryFirmware 0
     CallSensDataCounter 0
Attributes:
   DbLogInclude batteryLevel:86400,fertility,lux,moisture,temperature
   alias      Kalanchoe
   disabledForIntervals 21:00-24:00 00:00-06:00
   hciDevice  hci0
   interval   3600
   maxFertility 2000
   maxLux     60000
   maxMoisture 60
   maxTemp    32
   minFertility 350
   minLux     3000
   minMoisture 7
   minTemp    10
   room       FlowerSens
   userReadings moistureFeeling:moisture.* {
if (ReadingsVal($name, "moisture", -1) < AttrVal($name, "minMoisture", 0)) {
return "too dry";
}
elsif (ReadingsVal($name, "moisture", -1) > AttrVal($name, "maxMoisture", 100)) {
return "too wet";
}
else {
return "good";
}
}
   verbose    0




VG, Thomas
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 11 August 2018, 10:15:55
Interessant. Der letzte Durchlauf war 0:58 Uhr. Danach lief kein Timer mehr. Eine Erklärung habe ich dafür nicht. Du kannst versuchen verbose 5 bei einem Device an zu stellen, eventuell sieht man dann mehr.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ToM_ToM am 11 August 2018, 10:26:07
Gegen 0:58 hatte ich FHEM neu gestartet da ich gestern noch bisschen was gebastelt hatte. Kann es sein dass ich das System in der Zeit wo die Geräte disabled sind, nicht neu starten darf da dann die Timer die das Gerät wieder enablen sollen, verloren gehen?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 11 August 2018, 10:58:18
Eigentlich sollte das nicht das Problem sein. Die Timer sollten dennoch laufen. Ich schaue es mir aber mal an.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: mark79 am 13 August 2018, 23:47:56
Zitat von: CoolTux am 29 Juli 2018, 07:24:07
Es gibt da so die ein oder andere App. Musst bitte mal schauen. Oder eventuell findest Du sogar schon Infos im Netz.
Ich bin heute zufällig auf so etwas gestoßen:
https://www.heise.de/security/meldung/Btlejack-Neues-Gratis-Tool-zum-Belauschen-von-Bluetooth-Verbindungen-4134142.html
https://github.com/virtualabs/btlejack

Man benötigt allerdings ein Micro:Bit, der kostet jedoch nur ~16€.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 14 August 2018, 06:54:00
Zitat von: mark79 am 13 August 2018, 23:47:56
Ich bin heute zufällig auf so etwas gestoßen:
https://www.heise.de/security/meldung/Btlejack-Neues-Gratis-Tool-zum-Belauschen-von-Bluetooth-Verbindungen-4134142.html
https://github.com/virtualabs/btlejack

Man benötigt allerdings ein Micro:Bit, der kostet jedoch nur ~16€.

Wenn man im Netz schaut findet man diverse Anleitungen. Unteranderem gibt es bei Android unter Entwicklertools, also das was man freischalten muss, die Möglichkeit ein BT Log schreiben zu lassen welches man dann mit Wireshark auslesen kann.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 14 August 2018, 06:56:33
Zitat von: ToM_ToM am 11 August 2018, 10:26:07
Gegen 0:58 hatte ich FHEM neu gestartet da ich gestern noch bisschen was gebastelt hatte. Kann es sein dass ich das System in der Zeit wo die Geräte disabled sind, nicht neu starten darf da dann die Timer die das Gerät wieder enablen sollen, verloren gehen?

Hab Dich nicht vergessen. Ich teste noch.  ;D
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ToM_ToM am 17 August 2018, 07:22:17
Hi Leon,

ich hatte mich die Tage gewundert warum meine Pflanzen kein Wasser mehr verbrauchen und die Bodenfeuchtigkeit über Tage konstant bleibt obwohl die Sensoren alle den Status "active" haben.
Irgendwie werden die Daten nicht mehr automatisch abegerufen.


Internals:
   BTMAC      C4:XX:XX:XX:XX:70
   DEF        C4:XX:XX:XX:XX:70
   INTERVAL   3600
   NAME       Pflanze_07
   NOTIFYDEV  global,Pflanze_07
   NR         1005
   NTFY_ORDER 50-Pflanze_07
   STATE      active
   TYPE       XiaomiBTLESens
   VERSION    2.2.0
   loglevel   4
   READINGS:
     2018-06-14 20:36:07   battery         ok
     2018-06-14 20:36:07   batteryLevel    100
     2018-08-11 11:39:47   batteryPercent  100
     2018-08-11 11:39:47   batteryState    ok
     2018-08-11 11:39:48   fertility       1149
     2018-08-11 11:39:47   firmware        3.1.8
     2018-08-10 18:32:35   lastGattError   No route to host (113)
     2018-08-11 11:39:48   lux             624
     2018-08-11 11:39:48   moisture        21
     2018-08-11 11:39:48   moistureFeeling good
     2018-08-11 11:39:48   state           active
     2018-08-11 11:39:48   temperature     26.7
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1533980387.58388
     updateTimestampCallBattery 2018-08-11 11:39:47
Attributes:
   DbLogExclude .*
   alias      Gasteria
   disabledForIntervals 21:00-24:00 00:00-06:00
   interval   3600
   maxFertility 1000
   maxLux     30000
   maxMoisture 50
   maxTemp    35
   minFertility 300
   minLux     3500
   minMoisture 7
   minTemp    5
   model      flowerSens
   room       FlowerSens
   userReadings moistureFeeling:moisture.* {
if (ReadingsVal($name, "moisture", -1) < AttrVal($name, "minMoisture", 0)) {
return "too dry";
}
elsif (ReadingsVal($name, "moisture", -1) < AttrVal($name, "minMoisture", 100) + 3) {
return "getting dry";
}
elsif (ReadingsVal($name, "moisture", -1) > AttrVal($name, "maxMoisture", 100)) {
return "too wet";
}
else {
return "good";
}
}


Nachdem ich manuell
get Pflanze_07 sensorData
ausführe, holt er die Daten ohne Probleme und das list sieht danach so aus:


Internals:
   BTMAC      C4:XX:XX:XX:XX:70
   DEF        C4:XX:XX:XX:XX:70
   INTERVAL   3600
   NAME       Pflanze_07
   NOTIFYDEV  global,Pflanze_07
   NR         1005
   NTFY_ORDER 50-Pflanze_07
   STATE      active
   TYPE       XiaomiBTLESens
   VERSION    2.2.0
   loglevel   4
   READINGS:
     2018-06-14 20:36:07   battery         ok
     2018-06-14 20:36:07   batteryLevel    100
     2018-08-17 07:19:58   batteryPercent  100
     2018-08-17 07:19:58   batteryState    ok
     2018-08-17 07:20:46   fertility       950
     2018-08-17 07:19:58   firmware        3.1.8
     2018-08-10 18:32:35   lastGattError   No route to host (113)
     2018-08-17 07:20:46   lux             217
     2018-08-17 07:20:46   moisture        20
     2018-08-17 07:20:46   moistureFeeling good
     2018-08-17 07:20:46   state           active
     2018-08-17 07:20:46   temperature     25.9
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1534483198.95201
     updateTimestampCallBattery 2018-08-17 07:19:58
Attributes:
   DbLogExclude .*
   alias      Gasteria
   disabledForIntervals 21:00-24:00 00:00-06:00
   interval   3600
   maxFertility 1000
   maxLux     30000
   maxMoisture 50
   maxTemp    35
   minFertility 300
   minLux     3500
   minMoisture 7
   minTemp    5
   model      flowerSens
   room       FlowerSens
   userReadings moistureFeeling:moisture.* {
if (ReadingsVal($name, "moisture", -1) < AttrVal($name, "minMoisture", 0)) {
return "too dry";
}
elsif (ReadingsVal($name, "moisture", -1) < AttrVal($name, "minMoisture", 100) + 3) {
return "getting dry";
}
elsif (ReadingsVal($name, "moisture", -1) > AttrVal($name, "maxMoisture", 100)) {
return "too wet";
}
else {
return "good";
}
}


Hast du eine Idee was da schief läuft?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 17 August 2018, 07:39:33
Wollte Dir heute schreiben. Ich habe die Woche über auf einem Testsystem getestet und natürlich auch auf meinem Life. Gerade was das Neusarten innerhalb der disableForInterval Zeit an geht. Ich habe da keine Probleme festgestellt. Und gerade Deine aktuelle Beschreibung ist seltsam. Da scheinst Du ja kein Neustart gemacht zu haben sondern es hörte einfach auf die Daten ab zu rufen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 17 August 2018, 07:45:31
Was mir aber auf fällt das der letzte Timestamp aller Readings kurz vor dem setzen und abrufen des Batteriestatus endet. Muss nichts heißen aber ich schaue da mal.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: choetzu am 03 September 2018, 22:49:47
Hallo
Ich habe 4 Stk Flower Care in meinem Garten im Aussenbereich. Ich steuEre damit meine Gardena Water Control Bewässerung. Auch wenn es nicht für Aussen gedacht ist, hat es eigentlich während der Trockenperiode relativ zuverlässig funktioniert.

Seit neustem spinnen die Sensoren und haben Mühe zu connecten, obschonich die Distanz nicht verändert habe. Zudem kommen vermehrt solche Meldungen:

2018.09.01 14:58:59 3: XiaomiBTLESens (Heidelbeeren_FlowerCare) - defined with BTMAC C4:7C:8D:65:FF:E4
2018.09.01 14:58:59 1: XiaomiBTLESens (Heidelbeeren_FlowerCare) - readings battery and batteryLevel a deprecated and will be remove in future
2018.09.01 14:58:59 3: XiaomiBTLESens (Rhabarber_FlowerCare) - defined with BTMAC C4:7C:8D:66:01:EA


2018.09.01 19:29:45 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 1833
2018.09.01 19:31:55 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 1994
2018.09.01 19:35:39 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 2119
2018.09.01 19:37:43 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 2262
2018.09.01 19:41:07 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 2459
2018.09.01 19:44:02 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 2621
2018.09.01 19:46:12 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 2704
2018.09.01 19:49:08 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 2877
2018.09.01 19:51:30 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 2958
2018.09.01 19:54:34 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 3058
2018.09.01 19:57:24 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 3224


Ich habe nun alles deaktiviert. Woran könnte das liegen? Danke für input..

Lg c
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 03 September 2018, 22:59:27
Die oberen Meldungen sind normal.

Das untere bedeutet daß der Abrufenprozess nach 2 min beendet werden musste, es also zu keiner Verbindung kam. Zum testen empfehle ich die Geräte neben dem Pi mit dem BT Single zu legen und noch mal ab zu rufen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: onkel_joerg am 03 September 2018, 23:30:13
Ich weiss, es ist etwas OT, aber hat schon jemand die Erfahrung gemacht, dass der Sensor einige Zeit (14) Tage prima läuft, und dann die Batterie innerhalb eines Tages komplett runter geht? bei mir ist das gerade wieder der Fall.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ToM_ToM am 04 September 2018, 09:15:29
Hallo onkel_joerg,

ja, die Erfahrung konnte ich auch machen. An dem einen Tag noch 97 Prozent Akku und am nächsten Tag war Feierabend. Jedoch hatte ich das erst bei einem Sensor. Meine Vermutung war damals dass dieser beim Gießen zu viel bzw. ungünstig Wasser abbekommen hat, es intern einen Kurzschluss gab und dadurch die Batterie leer gesaugt wurde. Die Hardware hat das zum Glück überstanden (falls es überhaupt daran lag)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: choetzu am 05 September 2018, 21:17:54
Zitat von: CoolTux am 03 September 2018, 22:59:27
Die oberen Meldungen sind normal.

Das untere bedeutet daß der Abrufenprozess nach 2 min beendet werden musste, es also zu keiner Verbindung kam. Zum testen empfehle ich die Geräte neben dem Pi mit dem BT Single zu legen und noch mal ab zu rufen.

danke. das habe ich auch gemacht. da gibt es keine Probleme. Die Sensoren sind ca. 10 Meter vom Raspi entfernt. Getrennt durch eine Aussenwand von ca. 30cm und Isolation..  Komisch nur, dass es bislang (Sommer, trocken) ohne Probleme ging.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 05 September 2018, 21:53:34
Alles was mit Funk zu tun hat ist Wetter und Witterungsabhängig. Da reicht schon bisschen feuchte Wand oder Luft.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: choetzu am 05 September 2018, 22:05:39
Danke. Hmm. Da meine Bewässerung durch die Sensoren gesteuert werden, brauche ich eine Gewisse Zuverlässigkeit. Flower Care ist offensichtlich nicht di Lösung.. muss mich umsehen.. lg tom
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 05 September 2018, 22:07:26
Zitat von: CoolTux am 05 September 2018, 21:53:34
Alles was mit Funk zu tun hat ist Wetter und Witterungsabhängig. Da reicht schon bisschen feuchte Wand oder Luft.

Na na na, das ist jetzt aber eine sehr pauschale Aussage ;-) Und "bisschen feuchte" im Kabel ist auch schlecht ^^
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: nanocosmos am 08 September 2018, 21:13:57
Guten Abend,

bei mir zeigen sowohl die Flower Care, als auch die Temp Hygro Sensoren die Fehlermeldung :
Function not implemented (38)
   
Gleicher Fehler erscheint auch, wenn ich die Sensoren aus der Konsole abrufe.

Habt ihr vielleicht einen Rat für mich?

Besten Dank und viele Grüße!
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 08 September 2018, 21:17:01
Zitat von: nanocosmos am 08 September 2018, 21:13:57
Guten Abend,

bei mir zeigen sowohl die Flower Care, als auch die Temp Hygro Sensoren die Fehlermeldung :
Function not implemented (38)
   
Gleicher Fehler erscheint auch, wenn ich die Sensoren aus der Konsole abrufe.

Habt ihr vielleicht einen Rat für mich?

Besten Dank und viele Grüße!

Kannst Du nicht mal Batteriestatus abrufen? Was ist wenn du näher an den Pi gehst?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: nanocosmos am 08 September 2018, 21:34:26
Erstmal Danke, dass Du mir zu solch späten Stunde hilfst!
Sämtliche Readings sind leider schon einen Monat alt. Bekomme also auch keine aktuellen Werte des Batteriestatus.

Kleine Korrektur: Ein Flower Care gibt folgendes von sich : The BlockingCall Process terminated unexpectedly. Timedout
   
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: nanocosmos am 08 September 2018, 21:36:41
Werde einen Sensor gleich mal neben den Raspi (3 mit Bluetooth) legen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 08 September 2018, 21:53:53
Das deutet alles auf nicht erreichbar hin.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 08 September 2018, 21:58:22
Den und andere/ähnliche Fehler hab ich ab und an auch...
(kann grad leider nicht genauer sagen, bin unterwegs)
Aber nicht dauerhaft...
Manchmal mehr/öfter und dann auch wieder gar nicht...

Habe 9 Stück per Raspi-Zero und ssh angebunden...

Also bis auf die Meldungen im Log läuft es...

Habe es auch auf Verbindungsprobleme geschoben...

Gruß, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: nanocosmos am 08 September 2018, 22:18:24
Direkt neben dem PI gehen die Flower Care Sensoren. Die anderen habe ich noch nicht ausprobiert.
Aber komisch, dass es monatelang trotz der anscheinend zu großen Entfernung funktioniert hat.
Habe übrigens noch eine neue Meldung: Transport endpoint is not connected (107)
Auch wieder ein Reichweitenproblem?

Die Sache mit der ssh Anbindung habe ich schon oft gelesen, wie genau funktioniert das denn?

Besten Dank euch!
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 08 September 2018, 22:26:09
Zitat von: nanocosmos am 08 September 2018, 22:18:24
Direkt neben dem PI gehen die Flower Care Sensoren. Die anderen habe ich noch nicht ausprobiert.
Aber komisch, dass es monatelang trotz der anscheinend zu großen Entfernung funktioniert hat.
Habe übrigens noch eine neue Meldung: Transport endpoint is not connected (107)
Auch wieder ein Reichweitenproblem?

Die Sache mit der ssh Anbindung habe ich schon oft gelesen, wie genau funktioniert das denn?

Besten Dank euch!

Vielleicht neue Batterie.
Einen Linux Rechner in der Nähe der Sensoren aufbauen und dann ssh so einrichten das es ohne Passwort und mit Keyfile geht.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 08 September 2018, 22:35:27
Stimmt an die Meldung kann ich mich auch erinnern: Transport endpoint is not connected (107)

Aber wie geschrieben mal häufiger und mal auch (fast) gar nicht...

Evtl. je nach Feuchtigkeit der Pflanzen bzw. wie sie grad "über die Sensoren gewachsen" sind... ;)

ssh: http://heinz-otto.blogspot.com/2017/01/per-ssh-remote-befehle-direkt-ausfuhren.html

Oder (bei Problemen): https://forum.fhem.de/index.php/topic,82942.msg751131.html#msg751131

Gruß, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: onkel_joerg am 09 September 2018, 00:07:59
Zitat von: CoolTux am 05 September 2018, 21:53:34
Alles was mit Funk zu tun hat ist Wetter und Witterungsabhängig. Da reicht schon bisschen feuchte Wand oder Luft.
Ja, aber wenn das Teil INNEN angebracht ist und 2 Wochen mit so ziemlich keinem Verbrauch läuft und dann innerhalb eines Tages (ohne Veränderung des Ortes und der Bedingungen) von 96% auf 0% geht, dann erzeugt das doch schon einige Fragezeichen über meinem Kopf
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 09 September 2018, 00:24:52
Zitat von: onkel_joerg am 09 September 2018, 00:07:59
Ja, aber wenn das Teil INNEN angebracht ist und 2 Wochen mit so ziemlich keinem Verbrauch läuft und dann innerhalb eines Tages (ohne Veränderung des Ortes und der Bedingungen) von 96% auf 0% geht, dann erzeugt das doch schon einige Fragezeichen über meinem Kopf

Meine Aussage bezog sich nicht auf Deinen Post!
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: onkel_joerg am 09 September 2018, 08:21:24
Zitat von: CoolTux am 09 September 2018, 00:24:52
Meine Aussage bezog sich nicht auf Deinen Post!
Ah, ok. ;)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Clue am 10 September 2018, 21:38:47
Hallo zusammen,

ich habe das Problem, dass ich nach einer unbestimmten Zeit einen Error bekomme. Verbose 5 gibt folgendes Log:


...
2018.09.10 21:01:16 4: XiaomiBTLESens (FlowerCareWohnzimmerKastanie) - Run CreateParamGatttool with mod: read
2018.09.10 21:01:16 5: XiaomiBTLESens (FlowerCareWohnzimmerKastanie) - Read XiaomiBTLESens_ExecGatttool_Run FlowerCareWohnzimmerKastanie|C4:7C:8D:66:CA:A0|read|0x38
2018.09.10 21:01:16 4: XiaomiBTLESens (FlowerCareWohnzimmerKastanie) - stateRequestTimer: Call Request Timer
2018.09.10 21:01:16 3: XiaomiBTLESens (FlowerCareWohnzimmerKastanie) - ExecGatttool_Run: another gatttool process is running. waiting...
...
...
2018.09.10 21:02:46 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 6876
2018.09.10 21:02:46 4: XiaomiBTLESens (FlowerCareWohnzimmerKastanie) - WriteReadings: Readings were written
2018.09.10 21:02:46 4: XiaomiBTLESens (FlowerCareWohnzimmerKastanie) - ExecGatttool_Aborted: The BlockingCall Process terminated unexpectedly. Timedout
...


die Distanz spielt keine Rolle.
Ob ich das Device disable oder nicht spielt für "ps ax | grep gatttool" keine Rolle. Beides liefert folgende Ausgabe:


root@Heimhirn:/# ps ax | grep gatttool                                                                                                                                                                                                                           
  920 pts/0    S      0:00 sh -c gatttool -i hci0 -b C4:7C:8D:66:CA:A0 --char-read -a 0x35 2>&1 /dev/null                                                                                                                                                       
  921 pts/0    S      0:00 gatttool -i hci0 -b C4:7C:8D:66:CA:A0 --char-read -a 0x35 /dev/null                                                                                                                                                                   
7589 pts/0    S+     0:00 grep --color=auto gatttool


Einem früheren Beitrag von CoolTux habe ich entnommen, dass das heisst, dass eventuell mein Gatttool nicht sauber beendet wird(?).
Mein Fhem läuft in einem Docker Container ohne sonstige Probleme. Wenn ich den Docker Container neu starte funktioniert auch wieder alles und ich habe folgende Ausgabe:


root@Heimhirn:/# ps ax | grep gatttool                                                                                                                                                                                                                           
   45 pts/0    S+     0:00 grep --color=auto gatttool   


Mit der App geht alles tadellos, natürlich wird diese auch sauber von mir beendet.

Ein wenig Unterstützung wäre total super, ihr rettet Pflanzenleben damit ;). Auf jeden Fall aber super Arbeit.

Grüße
Christoph


Edit:
Während ich im Error bin kann ich aber anscheinend mittels Konsole auf das Gerät zugreifen:


root@Heimhirn:/# gatttool -i hci0 -b C4:7C:8D:66:CA:A0 --char-read -a 0x35                                                                                                                                                                                       
Characteristic value/descriptor: aa bb cc dd ee ff 99 88 77 66 00 00 00 00 00 00                                                                                                                                                                                 
root@Heimhirn:/# gatttool -i hci0 -b C4:7C:8D:66:CA:A0 --char-read -a 0x38                                                                                                                                                                                       
Characteristic value/descriptor: 64 28 33 2e 31 2e 39 
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 10 September 2018, 21:53:59
Zitat von: Clue am 10 September 2018, 21:38:47
Hallo zusammen,

ich habe das Problem, dass ich nach einer unbestimmten Zeit einen Error bekomme. Verbose 5 gibt folgendes Log:


...
2018.09.10 21:01:16 4: XiaomiBTLESens (FlowerCareWohnzimmerKastanie) - Run CreateParamGatttool with mod: read
2018.09.10 21:01:16 5: XiaomiBTLESens (FlowerCareWohnzimmerKastanie) - Read XiaomiBTLESens_ExecGatttool_Run FlowerCareWohnzimmerKastanie|C4:7C:8D:66:CA:A0|read|0x38
2018.09.10 21:01:16 4: XiaomiBTLESens (FlowerCareWohnzimmerKastanie) - stateRequestTimer: Call Request Timer
2018.09.10 21:01:16 3: XiaomiBTLESens (FlowerCareWohnzimmerKastanie) - ExecGatttool_Run: another gatttool process is running. waiting...
...
...
2018.09.10 21:02:46 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 6876
2018.09.10 21:02:46 4: XiaomiBTLESens (FlowerCareWohnzimmerKastanie) - WriteReadings: Readings were written
2018.09.10 21:02:46 4: XiaomiBTLESens (FlowerCareWohnzimmerKastanie) - ExecGatttool_Aborted: The BlockingCall Process terminated unexpectedly. Timedout
...


die Distanz spielt keine Rolle.
Ob ich das Device disable oder nicht spielt für "ps ax | grep gatttool" keine Rolle. Beides liefert folgende Ausgabe:


root@Heimhirn:/# ps ax | grep gatttool                                                                                                                                                                                                                           
  920 pts/0    S      0:00 sh -c gatttool -i hci0 -b C4:7C:8D:66:CA:A0 --char-read -a 0x35 2>&1 /dev/null                                                                                                                                                       
  921 pts/0    S      0:00 gatttool -i hci0 -b C4:7C:8D:66:CA:A0 --char-read -a 0x35 /dev/null                                                                                                                                                                   
7589 pts/0    S+     0:00 grep --color=auto gatttool


Einem früheren Beitrag von CoolTux habe ich entnommen, dass das heisst, dass eventuell mein Gatttool nicht sauber beendet wird(?).
Mein Fhem läuft in einem Docker Container ohne sonstige Probleme. Wenn ich den Docker Container neu starte funktioniert auch wieder alles und ich habe folgende Ausgabe:


root@Heimhirn:/# ps ax | grep gatttool                                                                                                                                                                                                                           
   45 pts/0    S+     0:00 grep --color=auto gatttool   


Mit der App geht alles tadellos, natürlich wird diese auch sauber von mir beendet.

Ein wenig Unterstützung wäre total super, ihr rettet Pflanzenleben damit ;). Auf jeden Fall aber super Arbeit.

Grüße
Christoph


Edit:
Während ich im Error bin kann ich aber anscheinend mittels Konsole auf das Gerät zugreifen:


root@Heimhirn:/# gatttool -i hci0 -b C4:7C:8D:66:CA:A0 --char-read -a 0x35                                                                                                                                                                                       
Characteristic value/descriptor: aa bb cc dd ee ff 99 88 77 66 00 00 00 00 00 00                                                                                                                                                                                 
root@Heimhirn:/# gatttool -i hci0 -b C4:7C:8D:66:CA:A0 --char-read -a 0x38                                                                                                                                                                                       
Characteristic value/descriptor: 64 28 33 2e 31 2e 39 


Hallo Christoph

Kannst Du bitte einmal noch ein list vom Device mit anhängen. Einfach im FHEM Web in der Befehlszeile list DEVICENAME eingeben.
In ganz alten Versionen gab es mal Probleme mit nicht beendeten gatttools, aber das sollte eigentlich erledigt sein.



Grüße
Leon
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Clue am 11 September 2018, 07:25:12
Hi Leon,

vielen Dank für die schnelle Antwort. Hier der list. Gerät befindet sich gerade nicht immer Fehlerzustand. Das kann einige Tage dauern bis es soweit ist, ist aber unausweichlich :(.


Internals:
   BTMAC      C4:7C:8D:66:CA:A0
   DEF        C4:7C:8D:66:CA:A0
   INTERVAL   1800
   NAME       FlowerCareWohnzimmerKastanie
   NOTIFYDEV  global,FlowerCareWohnzimmerKastanie
   NR         122
   NTFY_ORDER 50-FlowerCareWohnzimmerKastanie
   STATE      active
   TYPE       XiaomiBTLESens
   VERSION    2.2.0
   loglevel   4
   READINGS:
     2018-09-10 22:55:34   batteryPercent  100
     2018-09-10 22:55:34   batteryState    ok
     2018-09-11 07:09:46   fertility       0
     2018-09-10 22:55:34   firmware        3.1.9
     2018-09-10 21:09:06   lastGattError   The BlockingCall Process terminated unexpectedly. Timedout
     2018-09-11 07:09:46   lux             102
     2018-09-11 07:09:46   moisture        0
     2018-09-11 07:09:46   state           active
     2018-09-11 07:09:46   temperature     22.9
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1536612934.89746
     updateTimestampCallBattery 2018-09-10 22:55:34
Attributes:
   interval   1800
   model      flowerSens
   room       XiaomiBTLESens
   verbose    1



Grüße
Christoph
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 11 September 2018, 08:54:08
Dein FHEM ist aber ansonsten auf dem neusten Stand? Also nicht nur das 74_XiaomiBTLESens.pm Modul sondern der Rest auch?
Wenn ja hilft uns nur ein verbose 5 über die Tage.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Clue am 11 September 2018, 09:36:56
Ja, ist aktuell. Dann melde ich mich wenn der Fehler wieder auftritt mit dem verbose 5 Logeintrag des initialen Fehlerzustands.

Vielen Dank und Gruß
Christoph
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: oelidoc am 11 September 2018, 20:12:01
Hallo,
wenn ich bei meinen Sensoren das Attribut disabledForIntervals setze, springt der state sofort auf disabled - auch wenn der angegebene Zeitraum nicht erreicht ist. Lasse ich das device auf disabled, dann finden nach Beendigung des Zeitraums keine Abfragen statt - das device bleibt auf disabled. Mache ich eine manuelle Abfrage über die Web Oberfläche, springt das device auf active - aber bei Erreichen des Zeitraums wird weiter abgefragt. Mit andern Worten: das Attribut disabledForIntervals scheint irgendwie nicht zu funktionieren.
Hier ein List eines Sensors:
Internals:
   BTMAC      C4:7C:8D:66:2A:77
   CHANGED   
   DEF        C4:7C:8D:66:2A:77
   INTERVAL   1800
   NAME       FlowerSens_Kamelie
   NOTIFYDEV  global,FlowerSens_Kamelie
   NR         467
   NTFY_ORDER 50-FlowerSens_Kamelie
   STATE      Feuchtigkeit: 10 %
   TYPE       XiaomiBTLESens
   VERSION    2.2.0
   loglevel   4
   OLDREADINGS:
   READINGS:
     2018-09-10 21:47:57   batteryPercent  99
     2018-09-10 21:47:57   batteryState    ok
     2018-09-11 19:56:45   fertility       68
     2018-09-10 21:47:57   firmware        3.1.9
     2018-09-07 13:55:36   lastGattError   charWrite faild
     2018-09-11 19:56:45   lux             194
     2018-09-11 19:56:45   moisture        10
     2018-09-11 20:08:40   state           disabled
     2018-09-11 19:56:45   temperature     20.5
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1536608877.60954
     updateTimestampCallBattery 2018-09-10 21:47:57
Attributes:
   alias      Kamelie
   batteryFirmwareAge 48h
   disabledForIntervals 22:00-24:00 00:00-06:00
   event-min-interval temperature:3600,moisture:3600,fertility:3600,lux:3600
   event-on-change-reading batteryState,fertility,lastGattError,lux,moisture,temperature
   interval   1800
   maxFertility 2000
   maxMoisture 60
   minFertility 350
   minMoisture 5
   minTemp    0
   model      flowerSens
   room       Garten
   sshHost    -p 45147 oelidoc@192.168.178.57
   stateFormat Feuchtigkeit: moisture %

Irgendeine Idee, was ich falsch mache?
Gruß
oelidoc
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 11 September 2018, 20:19:37
Hallo,

Vielen Dank. Das ist definitiv ein Fehler. Ich schaue es mir die Woche an.


Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: oelidoc am 11 September 2018, 20:20:56
Danke CoolTux - tolle Unterstützung wie immer.
Gruß
oelidoc
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 12 September 2018, 08:41:21
Zitat von: oelidoc am 11 September 2018, 20:20:56
Danke CoolTux - tolle Unterstützung wie immer.
Gruß
oelidoc

Ist gefixt und morgen per Update verfügbar
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: oelidoc am 12 September 2018, 09:43:27
Cool. Danke.  8)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Clue am 13 September 2018, 23:09:13
Guten Abend,

leider ist der Fehler wieder aufgetaucht und das Gerät bzw. der Server hängt wieder im Fehlerzustand. Erster Timeout ist im Eintrag von 2018.09.13 20:12:02 zu sehen. Davor lief er bis zu Abfrage bei 2018.09.13 20:10:21 ohne Vorkommnisse.


2018.09.13 20:10:21 4: XiaomiBTLESens (FlowerCareWohnzimmerKastanie) - Run CreateParamGatttool with mod: write
2018.09.13 20:10:21 5: XiaomiBTLESens (FlowerCareWohnzimmerKastanie) - Write XiaomiBTLESens_ExecGatttool_Run FlowerCareWohnzimmerKastanie|C4:7C:8D:66:CA:A0|write|0x33|A01F
2018.09.13 20:10:21 4: XiaomiBTLESens (FlowerCareWohnzimmerKastanie) - stateRequestTimer: Call Request Timer
2018.09.13 20:10:21 5: XiaomiBTLESens (FlowerCareWohnzimmerKastanie) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:CA:A0 --char-write-req -a 0x33 -n A01F 2>&1 /dev/null and loop 0
2018.09.13 20:10:32 5: XiaomiBTLESens (FlowerCareWohnzimmerKastanie) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
2018.09.13 20:10:32 4: XiaomiBTLESens (FlowerCareWohnzimmerKastanie) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
2018.09.13 20:10:32 5: XiaomiBTLESens (FlowerCareWohnzimmerKastanie) - ExecGatttool_Done: gatttool return string: FlowerCareWohnzimmerKastanie|C4:7C:8D:66:CA:A0|ok|write|0x33|{"gtResult":"no data response"}
2018.09.13 20:10:32 4: XiaomiBTLESens (FlowerCareWohnzimmerKastanie) - Run CreateParamGatttool with mod: read
2018.09.13 20:10:32 5: XiaomiBTLESens (FlowerCareWohnzimmerKastanie) - Read XiaomiBTLESens_ExecGatttool_Run FlowerCareWohnzimmerKastanie|C4:7C:8D:66:CA:A0|read|0x35
2018.09.13 20:10:32 5: XiaomiBTLESens (FlowerCareWohnzimmerKastanie) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:CA:A0 --char-read -a 0x35 2>&1 /dev/null and loop 0
2018.09.13 20:12:02 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 799
2018.09.13 20:12:02 4: XiaomiBTLESens (FlowerCareWohnzimmerKastanie) - WriteReadings: Readings were written
2018.09.13 20:12:02 4: XiaomiBTLESens (FlowerCareWohnzimmerKastanie) - ExecGatttool_Aborted: The BlockingCall Process terminated unexpectedly. Timedout
2018.09.13 20:44:22 4: XiaomiBTLESens (FlowerCareWohnzimmerKastanie) - Run CreateParamGatttool with mod: write
2018.09.13 20:44:22 5: XiaomiBTLESens (FlowerCareWohnzimmerKastanie) - Write XiaomiBTLESens_ExecGatttool_Run FlowerCareWohnzimmerKastanie|C4:7C:8D:66:CA:A0|write|0x33|A01F
2018.09.13 20:44:22 4: XiaomiBTLESens (FlowerCareWohnzimmerKastanie) - stateRequestTimer: Call Request Timer
2018.09.13 20:44:22 3: XiaomiBTLESens (FlowerCareWohnzimmerKastanie) - ExecGatttool_Run: another gatttool process is running. waiting...
... usw....
018.09.13 20:45:51 3: XiaomiBTLESens (FlowerCareWohnzimmerKastanie) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.09.13 20:45:52 1: Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 808
2018.09.13 20:45:52 4: XiaomiBTLESens (FlowerCareWohnzimmerKastanie) - WriteReadings: Readings were written
2018.09.13 20:45:52 4: XiaomiBTLESens (FlowerCareWohnzimmerKastanie) - ExecGatttool_Aborted: The BlockingCall Process terminated unexpectedly. Timedout


Vielleicht gibt das ja einen Hinweis. Ich wäre für einen Tipp bzw. jegliche Hilfe sehr dankbar.

Viele Grüße
Christoph
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 14 September 2018, 21:07:20
Leider kann ich Dir da nichts neues sagen.
Aus irgendeinem Grund bleibt der gatttool Aufruf bei Dir als Prozess bestehen was eigentlich nicht sein dürfte.

Gib mal bitte in der FHEMWEB Kommandozeile version ein und poste hier die Ausgabe.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Clue am 15 September 2018, 12:54:54
Wir finden schon eine Lösung :). Hier die Versionsnummern:


Latest Revision: 17334

File                  Rev   Last Change

fhem.pl               17329 2018-09-12 07:03:11Z rudolfkoenig
96_allowed.pm         17179 2018-08-20 15:49:33Z rudolfkoenig
90_at.pm              17252 2018-09-02 09:35:58Z rudolfkoenig
98_autocreate.pm      15620 2017-12-16 18:10:36Z rudolfkoenig
57_Calendar.pm        16742 2018-05-15 19:20:16Z neubert
98_DOIF.pm            17291 2018-09-06 18:37:03Z Damian
98_dummy.pm           16965 2018-07-09 07:59:58Z rudolfkoenig
91_eventTypes.pm      14888 2017-08-13 12:07:12Z rudolfkoenig
72_FB_CALLLIST.pm     16433 2018-03-18 08:20:35Z markusbloch
72_FB_CALLMONITOR.pm  16709 2018-05-08 20:14:58Z markusbloch
01_FHEMWEB.pm         17307 2018-09-09 13:42:47Z rudolfkoenig
92_FileLog.pm         17181 2018-08-20 17:23:26Z rudolfkoenig
98_help.pm            15223 2017-10-10 10:14:24Z betateilchen
98_HTTPMOD.pm         16951 2018-07-06 18:02:15Z StefanStrobel
02_HTTPSRV.pm         16874 2018-06-15 17:18:55Z neubert
98_JsonList2.pm       17230 2018-08-30 13:03:48Z rudolfkoenig
91_notify.pm          17225 2018-08-29 12:34:29Z rudolfkoenig
59_PROPLANTA.pm       17079 2018-08-02 17:47:03Z tupol
33_readingsGroup.pm   16299 2018-03-01 08:06:55Z justme1968
00_SONOS.pm           16658 2018-04-25 06:00:12Z Reinerlein
21_SONOSPLAYER.pm     16478 2018-03-24 22:47:43Z Reinerlein
99_SUNRISE_EL.pm      16632 2018-04-17 19:00:21Z rudolfkoenig
50_TelegramBot.pm     16382 2018-03-11 13:20:55Z viegener
98_telnet.pm          17116 2018-08-10 11:52:49Z rudolfkoenig
59_Twilight.pm        16005 2018-01-27 06:05:51Z igami
99_Utils.pm           15713 2017-12-28 11:01:02Z rudolfkoenig
98_version.pm         15140 2017-09-26 09:20:09Z markusbloch
74_XiaomiBTLESens.pm  17328 2018-09-12 06:40:06Z CoolTux
10_ZWave.pm           17186 2018-08-20 20:10:55Z rudolfkoenig
00_ZWDongle.pm        17186 2018-08-20 20:10:55Z rudolfkoenig

Blocking.pm           16985 2018-07-15 14:08:15Z rudolfkoenig
Color.pm              11159 2016-03-30 16:08:06Z justme1968
Common.pm             10759 2016-02-07 20:00:12Z rleins
ControlPoint.pm       16658 2018-04-25 06:00:12Z Reinerlein
DevIo.pm              16623 2018-04-15 18:44:05Z rudolfkoenig
FritzBoxUtils.pm      16691 2018-05-05 17:11:26Z rudolfkoenig
HttpUtils.pm          17034 2018-07-27 05:47:13Z rudolfkoenig
Info.pm                  28 2008-11-09 01:08:44Z dsully
myUtilsTemplate.pm     7570 2015-01-14 18:31:44Z rudolfkoenig
myUtilsTemplate.pm     7570 2015-01-14 18:31:44Z rudolfkoenig
myUtilsTemplate.pm     7570 2015-01-14 18:31:44Z rudolfkoenig
myUtilsTemplate.pm     7570 2015-01-14 18:31:44Z rudolfkoenig
myUtilsTemplate.pm     7570 2015-01-14 18:31:44Z rudolfkoenig
RTypes.pm             10476 2016-01-12 21:03:33Z borisneubert
SetExtensions.pm      17100 2018-08-07 07:40:20Z rudolfkoenig
SubProcess.pm         14334 2017-05-20 23:11:06Z neubert
TcpServerUtils.pm     17124 2018-08-11 06:54:58Z rudolfkoenig
ZWLib.pm              17186 2018-08-20 20:10:55Z rudolfkoenig

doif.js                    15546 2017-12-03 09:57:42Z Ellert
f18.js                     17318 2018-09-10 16:25:56Z rudolfkoenig
fhemweb.js                 17308 2018-09-09 13:43:37Z rudolfkoenig
fhemweb_readingsGroup.js   15189 2017-10-03 17:53:27Z justme1968


Ich habe übrigens geupdated nachdem du den Bug von oelidoc gefixt hast, aber bevor der Fehler aufgetreten ist.

Hier eine Liste meiner laufenden Prozesse kurz nachdem einem get sensorData

root@Heimhirn:/# ps -u fhem                                                                                                                                                                                         
  PID TTY          TIME CMD                                                                                                                                                                                         
  733 pts/0    00:04:10 perl                                                                                                                                                                                       
  741 pts/0    00:21:52 perl                                                                                                                                                                                       
  804 pts/0    00:00:00 sh                                                                                                                                                                                         
  805 pts/0    00:00:00 gatttool                                                                                                                                                                                   
21070 pts/0    00:00:00 perl


Der Prozess mit der PID 21070 ist derjenige der den Timeout bekommt. Der Prozess 805 bleibt immer bestehen. Welchen Prozess müsste ich denn killen damit es weiterläuft?

Grüße
Christoph
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 15 September 2018, 13:15:01
Du müsstest den 805 killen.

Ansonsten sehen die Versionen gut aus. Welche Linuxdistribution hast Du?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Clue am 15 September 2018, 13:21:39
Ich habe Ubuntu 16.04 in einem Docker Container auf einem Qnap NAS laufen.

Nachdem ich den 805er gekillt habe geht es wieder.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 15 September 2018, 13:25:46
Klingt erstmal ok. Hast Du noch andere Fehlermeldungen in Verbindung mit BlockingCall oder Blocking.pm?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Clue am 15 September 2018, 13:34:38
Nur "ExecGatttool_Aborted: The BlockingCall Process terminated unexpectedly. Timedout" innerhalb dieses Monats.

So wie ich es verstanden habe sollte


delete($hash->{helper}{RUNNING_PID});


in jedem Fall den Prozess killen oder? Soll ich mal lokal hier in "XiaomiBTLESens_ExecGatttool_Aborted" nen Log ausgeben lassen? Wie sollte der aussehen um sinnvolle Infos zu bekommen?

Edit: Oder woanders falls hilfreich natürlich :).
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 15 September 2018, 13:47:29
Zitat von: Clue am 15 September 2018, 13:34:38
Nur "ExecGatttool_Aborted: The BlockingCall Process terminated unexpectedly. Timedout" innerhalb dieses Monats.

So wie ich es verstanden habe sollte


delete($hash->{helper}{RUNNING_PID});


in jedem Fall den Prozess killen oder? Soll ich mal lokal hier in "XiaomiBTLESens_ExecGatttool_Aborted" nen Log ausgeben lassen? Wie sollte der aussehen um sinnvolle Infos zu bekommen?

Edit: Oder woanders falls hilfreich natürlich :).

Das killt die geforkte FHEM Instanz die dann eigentlich gatttool mit killen sollte.
Kannst Du gerne machen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Clue am 15 September 2018, 13:55:49
Dann tobe ich mich mal aus, am besten lernt man durchs Debuggen :). Melde mich sobald ich ein paar mehr Infos habe.

Grüße
Christoph

Edit: habe gerade mal paar Logs eingebaut um zu schauen wann PIDs erstellt und wann gekillt werden.
Mir ist dabei aufgefallen dass in Blocking.pm die Funktion BlockingKill ganz am Ende die Funktion BlockingStart ohne Eingabeargumente aufruft.


BlockingKill($)
{
  my $h = shift;

  return if($h->{terminated});

#  if($^O !~ m/Win/) {
    if($h->{pid} && $h->{pid} !~ m/:/ && kill(9, $h->{pid})) {
      my $ll = (defined($h->{loglevel}) ? $h->{loglevel} : 1); # Forum #77057
      Log $ll, "Timeout for $h->{fn} reached, terminated process $h->{pid}";
      $h->{terminated} = 1;
      if($h->{abortFn}) {
        no strict "refs";
        my $ret = &{$h->{abortFn}}($h->{abortArg},
                        "Timeout: process terminated");
        use strict "refs";

      } elsif($h->{finishFn}) {
        no strict "refs";
        my $ret = &{$h->{finishFn}}();
        use strict "refs";

      }
      delete($BC_hash{$h->{bc_pid}});
      InternalTimer(gettimeofday()+1, "BlockingStart", \%BC_hash, 0)
        if(looks_like_number($h->{pid}) && kill(0, $h->{pid})); # Forum #58867
    }
#  }
  BlockingStart();
}


Mir ergibt sich aber nicht so ganz der Sinn davon und würde nach meinem Verständnis zu meinem Fehler passen, da der ERSTE Timeout Prozess zwar korrekt beendet wird (wie im Log auch zu sehen, den ich zuvor gepostet habe), im gleichen Zug aber ein neuer Prozess erstellt der alle nachfolgenden Versuche behindert (passt dann zur Meldung "ExecGatttool_Run: another gatttool process is running. waiting...")? Die Perl Syntax ist mir aber nicht so geläufig und daher lasse ich mich gerne belehren. Habe die Zeile aber testweise auskommentiert und schaue was passiert :].

Edit2: Es hat sich bewarhheitet, dass der "BlockingStart();" im BlockingKill das Problem ist. Heute hatte ich insgesamt drei Timeouts nach denen sich der Server jedes mal wieder gefangen hat. Vorher hat jeder Timeout zu einem offenen Process geführt und jeden weiteren read dadurch blockiert.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: skyline am 17 September 2018, 10:56:26
Hallo,

ich bekomme mit den letzten Versionen auch den error-Fehler, bei Geräten (Temperatursensor) die vorher liefen.

Gruß
Marco
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 17 September 2018, 11:59:21
Ich bin da dran und habe entsprechende Erkenntnisse weiter geleitet.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Clue am 17 September 2018, 18:43:32
Hi,

habe noch immer korrektes Verhalten nach gelegentlichen Timeouts. Auskommentieren der BlockingStart schien tatsächlich die Lösung. Dann verfolge ich das Thema mal nicht weiter und lasse es bei dir CoolTux wenn es okay ist.

Grüße
Christoph
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 17 September 2018, 20:16:27
Zitat von: Clue am 17 September 2018, 18:43:32
Hi,

habe noch immer korrektes Verhalten nach gelegentlichen Timeouts. Auskommentieren der BlockingStart schien tatsächlich die Lösung. Dann verfolge ich das Thema mal nicht weiter und lasse es bei dir CoolTux wenn es okay ist.

Grüße
Christoph

Also BlockingStart ist da korrekt, es geht darum das mittels BlockingStart eine queue abgearbeitet wird.
Du kannst ja global mittels maxBlockingCall oder so festlegen wie viele BlockingCall Aufrufe gleichzeitig erlaubt sind. Daher muss immer wieder geschaut werden ob noch ein Aufruf in der queue liegt.
Wie eng ist denn Timer gesetzt und von wie vielen Geräten sprechen wir?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: skyline am 17 September 2018, 20:41:28
2018.09.17 20:39:12 1 : PERL WARNING: Illegal hexadecimal digit ' ' ignored at ./FHEM/74_XiaomiBTLESens.pm line 712.
2018.09.17 20:39:12 3 : eval: {XiaomiBTLESens_ExecGatttool_Done('EG_FL_TF|4C:65:A8:D4:B6:0F|ok|read|0x18|{"gtResult":"64 "}')}
2018.09.17 20:39:12 1 : PERL WARNING: Illegal hexadecimal digit ' ' ignored at ./FHEM/74_XiaomiBTLESens.pm line 713.
2018.09.17 20:39:12 3 : eval: {XiaomiBTLESens_ExecGatttool_Done('EG_FL_TF|4C:65:A8:D4:B6:0F|ok|read|0x18|{"gtResult":"64 "}')}


Ist das denn so normal?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 17 September 2018, 20:43:18
Zitat von: skyline am 17 September 2018, 20:41:28
2018.09.17 20:39:12 1 : PERL WARNING: Illegal hexadecimal digit ' ' ignored at ./FHEM/74_XiaomiBTLESens.pm line 712.
2018.09.17 20:39:12 3 : eval: {XiaomiBTLESens_ExecGatttool_Done('EG_FL_TF|4C:65:A8:D4:B6:0F|ok|read|0x18|{"gtResult":"64 "}')}
2018.09.17 20:39:12 1 : PERL WARNING: Illegal hexadecimal digit ' ' ignored at ./FHEM/74_XiaomiBTLESens.pm line 713.
2018.09.17 20:39:12 3 : eval: {XiaomiBTLESens_ExecGatttool_Done('EG_FL_TF|4C:65:A8:D4:B6:0F|ok|read|0x18|{"gtResult":"64 "}')}


Ist das denn so normal?

Eher nicht so? Hast Du das oft?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: skyline am 17 September 2018, 20:47:05
2018.09.17 20:45:52 1 : PERL WARNING: Illegal hexadecimal digit ' ' ignored at ./FHEM/74_XiaomiBTLESens.pm line 712.
2018.09.17 20:45:52 3 : eval: {XiaomiBTLESens_ExecGatttool_Done('EG_BZ_TF|4C:65:A8:D4:08:B1|ok|read|0x18|{"gtResult":"64 "}')}
2018.09.17 20:45:52 1 : PERL WARNING: Illegal hexadecimal digit ' ' ignored at ./FHEM/74_XiaomiBTLESens.pm line 713.
2018.09.17 20:45:52 3 : eval: {XiaomiBTLESens_ExecGatttool_Done('EG_BZ_TF|4C:65:A8:D4:08:B1|ok|read|0x18|{"gtResult":"64 "}')}


Kommt wohl nach jedem Start (shutdown restart)


EDIT:
2018.09.17 20:47:13 1 : Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 9599
2018.09.17 21:00:02 1 : Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 9757
2018.09.17 21:12:45 1 : Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 9862
2018.09.17 21:24:21 1 : Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 10007


Igendwo ist da wohl noch der Wurm drin, hatte ich aber vor ein paar Tagen nicht.
Erst nach einem Update.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 18 September 2018, 08:24:47
Zitat von: skyline am 17 September 2018, 20:47:05
2018.09.17 20:45:52 1 : PERL WARNING: Illegal hexadecimal digit ' ' ignored at ./FHEM/74_XiaomiBTLESens.pm line 712.
2018.09.17 20:45:52 3 : eval: {XiaomiBTLESens_ExecGatttool_Done('EG_BZ_TF|4C:65:A8:D4:08:B1|ok|read|0x18|{"gtResult":"64 "}')}
2018.09.17 20:45:52 1 : PERL WARNING: Illegal hexadecimal digit ' ' ignored at ./FHEM/74_XiaomiBTLESens.pm line 713.
2018.09.17 20:45:52 3 : eval: {XiaomiBTLESens_ExecGatttool_Done('EG_BZ_TF|4C:65:A8:D4:08:B1|ok|read|0x18|{"gtResult":"64 "}')}


Kommt wohl nach jedem Start (shutdown restart)


EDIT:
2018.09.17 20:47:13 1 : Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 9599
2018.09.17 21:00:02 1 : Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 9757
2018.09.17 21:12:45 1 : Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 9862
2018.09.17 21:24:21 1 : Timeout for XiaomiBTLESens_ExecGatttool_Run reached, terminated process 10007


Igendwo ist da wohl noch der Wurm drin, hatte ich aber vor ein paar Tagen nicht.
Erst nach einem Update.

Ich habe mir gerade das Update noch mal angeschaut. Da gab es keine relevanten Änderungen. Was ist mit den Standort der Sensoren. Gab es da Änderungen die Tage. Umgestellt, neue elektronische Geräte gekauft, Wlan Repeater besorgt neue Wand im Schlafzimmer eingezogen?


Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Clue am 18 September 2018, 19:34:44
Zitat von: CoolTux am 17 September 2018, 20:16:27
Also BlockingStart ist da korrekt, es geht darum das mittels BlockingStart eine queue abgearbeitet wird.
Du kannst ja global mittels maxBlockingCall oder so festlegen wie viele BlockingCall Aufrufe gleichzeitig erlaubt sind. Daher muss immer wieder geschaut werden ob noch ein Aufruf in der queue liegt.
Wie eng ist denn Timer gesetzt und von wie vielen Geräten sprechen wir?

Dann habe ich bestimmt nur Glück die letzten 2 Tage, dass es nicht aufgetaucht ist. Interval habe ich immer auf 1800 (30 min). Ich habe aktuell nur ein einziges Gerät in Betrieb, wenn es ohne Probleme läuft werden weitere angeschafft. Ich beobachte es mal weiter, wenn sonst niemand anderes das Problem hat muss es irgendwie an meinem Setup liegen, dann werde ich es entweder sein lassen oder einen Workaround überlegen der den Prozess killt.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 18 September 2018, 19:40:20
Zitat von: Clue am 18 September 2018, 19:34:44
Dann habe ich bestimmt nur Glück die letzten 2 Tage, dass es nicht aufgetaucht ist. Interval habe ich immer auf 1800 (30 min). Ich habe aktuell nur ein einziges Gerät in Betrieb, wenn es ohne Probleme läuft werden weitere angeschafft. Ich beobachte es mal weiter, wenn sonst niemand anderes das Problem hat muss es irgendwie an meinem Setup liegen, dann werde ich es entweder sein lassen oder einen Workaround überlegen der den Prozess killt.


Wo liegt den der Sensor? Ist er weit weg vom FHEM Rechner? Lege ihn zum testen doch mal für einen Tag daneben.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: skyline am 18 September 2018, 21:32:11
Hab festgestellt, dass ich gar kein gatttool installiert hatte.

Mal sehen wie es nun läuft.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 19 September 2018, 05:24:21
Interessant. Dann musst Du aber das Attribute sshHost verwendet haben. Ansonsten hättest Du eine Fehlermeldung bekommen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: skyline am 20 September 2018, 13:47:31
Nee, das Attribute habe ich nicht gesetzt.

Mein Bluetooth wollte erst nicht, habe es dann mit dieser Anleitung https://stackoverflow.com/questions/41707164/connect-ble-devices-with-raspberry-pi-3-b (https://stackoverflow.com/questions/41707164/connect-ble-devices-with-raspberry-pi-3-b)zum Laufen gebracht.
Benutze raspbian jessie lite.

Habe mir noch eine externe Antenne an den Raspberry 3 gebaut  https://ossilampe.de/?p=1637 (https://ossilampe.de/?p=1637).
Hab jetzt auch noch mal ein paar Antennen aus China geordert um zu probieren.

Hab jetzt erstmal die zwei weitesten Geräte raus genommen und teste aktuell mit 4 Geräten, sieht bis jetzt nicht schlecht aus.

Werde auch noch mal die Antenne im Thermometer ersetzen und schauen was das noch bringt.

Edit:
Fotos vom Antennenumbau
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Clue am 26 September 2018, 20:20:49
Zitat von: CoolTux am 18 September 2018, 19:40:20
Wo liegt den der Sensor? Ist er weit weg vom FHEM Rechner? Lege ihn zum testen doch mal für einen Tag daneben.

Der Sensor ist 5m entfernt auf der gleichen Etage. Ich muss nach wie vor sagen, wenn ich den BlockingStart(); auskommentiere läuft es sehr stabil. Dann fängt er sich bei einem gelegentlichen Error (einer alle 2 Tage) direkt wieder. wenn es einkommentiert ist, dauert es keine 2 Tage bis alles hängt. Darüber hinaus habe ich keine anderen Probleme bemerkt wenn BlockingStart im BlockingKill fehlt. Habe ja aber auch nur dieses eine Gerät. Ich werde es im Auge behalten.

Edit: Das Problem ist nun leider doch wieder zwei mal aufgetaucht :(. Wenn ich die Zeit habe schaue ich mal vielleicht doch etwas genauer rein. Vielleicht hat ja in der Zwischenzeit jemand anderes ein ähnliches Problem und findet eine Lösung.

Grüße
Christoph

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Gunther am 30 September 2018, 12:49:33
Kann ich die chinesische Version des Sensors einsetzen oder habe ich damit Nachteile?

https://www.ebay.de/i/113236323795?chn=ps&var=413531359817 (https://www.ebay.de/i/113236323795?chn=ps&var=413531359817)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 30 September 2018, 12:51:53
Kannst Du. Habe ich auch. Musst nur für Updates mit nem VPN nach China arbeiten.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Gunther am 30 September 2018, 12:59:59
Danke für die schnelle Antwort.
Ist das nachteilig, bzw. umständlicher?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 30 September 2018, 13:17:10
Kommt auf Deine Fähigkeiten an. Ich hätte da nicht so die Probleme. VPN Client auf Handy installieren, China Server auswählen und verbinden. Danach App starten und Update anwerfen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Gunther am 30 September 2018, 13:25:30
Ahh, verstehe. Ich muss mich quasi in China "befinden" um updaten zu können, richtig?
Falls Du mit dem Iphone unterwegs bist: Mit welcher App arbeitest Du?

Bei den Geräten für 12 Euro +: Hier kann ich normal in Europa updaten? Das ist der einzige Unterschied?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 30 September 2018, 13:27:45
Habe kein iPhone.
Ja das wäre der einzige Unterschied.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Gunther am 30 September 2018, 13:45:11
Danke!
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 30 September 2018, 15:08:57
(Noch mal) die Frage, weil es grad um Updates geht:

bringen die Updates (neuere Versionen) deutliche Vorteile!?

Ich laufe mit meinen immer noch auf 2.6.2 (6 Stck.) bzw. 2.7.0 (3 Stck.) und bin eigentlich zufrieden.

Habe mir kürzlich noch 2 bestellt, mal sehen was die für FW-Version(en) haben...
...und mal sehen, ob ich einen Unterschied feststelle...

An dieser Stelle (noch mal): vielen Dank für die Einbindung in fhem / das Modul!

Gruß, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: skyline am 01 Oktober 2018, 10:32:32
Hallo CoolTux,

könnte man nicht noch ein Timer-Attribut und Schleifen-Attribut hinzufügen um das Error-Problem vielleicht etwas mehr in den Griff zu bekommen?
Somit könnten man an der einzelnen Sensoren unterschiedlich tunen.

Hier gibt es auch für den Hygrotermograph ein Modul für homebridge:
https://github.com/hannseman/homebridge-mi-hygrothermograph (https://github.com/hannseman/homebridge-mi-hygrothermograph)


Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 01 Oktober 2018, 10:55:54
Zitat von: skyline am 01 Oktober 2018, 10:32:32
Hallo CoolTux,

könnte man nicht noch ein Timer-Attribut und Schleifen-Attribut hinzufügen um das Error-Problem vielleicht etwas mehr in den Griff zu bekommen?
Somit könnten man an der einzelnen Sensoren unterschiedlich tunen.

Hier gibt es auch für den Hygrotermograph ein Modul für homebridge:
https://github.com/hannseman/homebridge-mi-hygrothermograph (https://github.com/hannseman/homebridge-mi-hygrothermograph)

Kann man sicherlich machen. Persönlich werde ich aber die nächsten Monate eher nicht dazu kommen.
Nehme aber sehr gerne getestete Patches an.

Ich dachte eigentlich wir unterstützen dieses Hygrotermograph bereits. Jedenfalls haben wir so ein Device in unserer Liste. Ist das ein anderes?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: stoxx am 01 Oktober 2018, 18:56:42
ZitatIch dachte eigentlich wir unterstützen dieses Hygrotermograph bereits. Jedenfalls haben wir so ein Device in unserer Liste. Ist das ein anderes?
Es ist genau das und das Modul unterstützt es perfekt. Ich habe bereits drei davon angebunden - ohne Probleme.
vg stoxx
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: skyline am 02 Oktober 2018, 13:14:31
Es wird ja auch vom Modul gut unterstützt.

Nur tauchen hin und zu Errors auf.

Das wird auch sicher mit der Reichweite zusammen hängen, aber oft geht und dann mal wieder nicht.

Da ich die Sensoren für den PID20 nehme, würde ich mir schon etwas mehr Stabilität wünschen.

Das Modul ist schon echt super!!!
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 02 Oktober 2018, 13:51:49
Zitat von: skyline am 02 Oktober 2018, 13:14:31
Es wird ja auch vom Modul gut unterstützt.

Nur tauchen hin und zu Errors auf.

Das wird auch sicher mit der Reichweite zusammen hängen, aber oft geht und dann mal wieder nicht.

Da ich die Sensoren für den PID20 nehme, würde ich mir schon etwas mehr Stabilität wünschen.

Das Modul ist schon echt super!!!

Es wird doch im state des Devices error geschrieben wenn es Probleme gab. Du kannst gerne ein Notify darauf ansetzen und einfach das holen der Daten noch einmal anstoßen. Solltest aber einen Zähler einbauen das nach 3-4 mal nichts mehr weiter gemacht wird.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: smurphy am 03 Oktober 2018, 17:06:56
Hallo Liebe Gemeinde,

ich hoffe, meine Frage so zu stellen, wie es sich gehört. Ich habe natürlich vorher auch die Suchfunktion benutzt, jedoch konnte ich keine Lösungsansätze für mich adaptieren.

Was ich gemacht habe:
Ich habe ein Temperatur/Luftfeichtigskeits-Sensor von Xiaomi über das Modul XiaomiBTLESens eingebunden.

define xiaomi1 XiaomiBTLESens xx:xx:xx:d8:ae:ef

Ich erhalte folgende Readings:
Readings
batteryPercent
76
batteryState
ok
firmware
00.00.66
humidity
=7.6
state
T: 14.9 H: =7.4
temperature
14.9

Leider komme ich mit = bei der Luftfeuchtigkeit nicht klar. die Graphen funktionieren damit einfach nicht und die dewpoint Berechnung auch nicht.

Im Logfile erscheint folgende Fehlermeldung:
2018.10.03 16:22:06 1: Error dewpoint: humidity invalid: 0
2018.10.03 16:25:46 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at (eval 113) line 1.
2018.10.03 16:25:46 3: eval: { "Xiaomi Humidity Min $data{min2}, Max $data{max2}, Last $data{currval2}, Taupunkt $data{currval3}" }

Komischerweise scheinen beim Neustart des Raspberry die ersten Werte ohne das blöde = übermittelt zu werden.
Siehe Logfile:

2018-10-03_16:26:03 xiaomi1 batteryPercent: 76
2018-10-03_16:26:03 xiaomi1 T: 0 H: 0
2018-10-03_16:26:03 xiaomi1 write sensor data
2018-10-03_16:26:13 xiaomi1 T: 15.1 H: 47.7 D: 4.1
2018-10-03_16:28:16 xiaomi1 write sensor data
2018-10-03_16:28:29 xiaomi1 T: 15.0 H: 11.9 D: -14.3
2018-10-03_16:31:14 xiaomi1 write sensor data
2018-10-03_16:31:24 xiaomi1 T: 14.9 H: =9.4
2018-10-03_16:37:00 xiaomi1 write sensor data
2018-10-03_16:37:10 xiaomi1 T: 15.0 H: =8.0
2018-10-03_16:41:55 xiaomi1 write sensor data


Kann mir jemand helfen?
Vielen Dank und Gruß
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 03 Oktober 2018, 17:17:54
Zitat von: smurphy am 03 Oktober 2018, 17:06:56
Hallo Liebe Gemeinde,

ich hoffe, meine Frage so zu stellen, wie es sich gehört. Ich habe natürlich vorher auch die Suchfunktion benutzt, jedoch konnte ich keine Lösungsansätze für mich adaptieren.

Was ich gemacht habe:
Ich habe ein Temperatur/Luftfeichtigskeits-Sensor von Xiaomi über das Modul XiaomiBTLESens eingebunden.

define xiaomi1 XiaomiBTLESens xx:xx:xx:d8:ae:ef

Ich erhalte folgende Readings:
Readings
batteryPercent
76
batteryState
ok
firmware
00.00.66
humidity
=7.6
state
T: 14.9 H: =7.4
temperature
14.9

Leider komme ich mit = bei der Luftfeuchtigkeit nicht klar. die Graphen funktionieren damit einfach nicht und die dewpoint Berechnung auch nicht.

Im Logfile erscheint folgende Fehlermeldung:
2018.10.03 16:22:06 1: Error dewpoint: humidity invalid: 0
2018.10.03 16:25:46 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at (eval 113) line 1.
2018.10.03 16:25:46 3: eval: { "Xiaomi Humidity Min $data{min2}, Max $data{max2}, Last $data{currval2}, Taupunkt $data{currval3}" }

Komischerweise scheinen beim Neustart des Raspberry die ersten Werte ohne das blöde = übermittelt zu werden.
Siehe Logfile:

2018-10-03_16:26:03 xiaomi1 batteryPercent: 76
2018-10-03_16:26:03 xiaomi1 T: 0 H: 0
2018-10-03_16:26:03 xiaomi1 write sensor data
2018-10-03_16:26:13 xiaomi1 T: 15.1 H: 47.7 D: 4.1
2018-10-03_16:28:16 xiaomi1 write sensor data
2018-10-03_16:28:29 xiaomi1 T: 15.0 H: 11.9 D: -14.3
2018-10-03_16:31:14 xiaomi1 write sensor data
2018-10-03_16:31:24 xiaomi1 T: 14.9 H: =9.4
2018-10-03_16:37:00 xiaomi1 write sensor data
2018-10-03_16:37:10 xiaomi1 T: 15.0 H: =8.0
2018-10-03_16:41:55 xiaomi1 write sensor data


Kann mir jemand helfen?
Vielen Dank und Gruß

Interessant, haben andere mit diesem Gerät selbiges Reading? Kann mir gerade nicht erklären wo das = herkommen soll.

@smurphy was Dein Problem an geht. Entweder userReading mit ReadingsNum und dann das userReading loggen oder im SVG mit split arbeiten.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: smurphy am 03 Oktober 2018, 17:35:24
Danke Cooltux,

Die Variante mit Split hört sich für mich erstmal unkomplizierter an.
Ich schau mal ob ich dazu irgendwo Beispiele finde.

Mir sagt das mit dem Split leider nichts.

Für ein Beispiel, wie man das einsetzt wäre ich echt dankbar.

Gruß
Martin

....ah ja ... es ist so trocken bei mir in der Trockenbox
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: smurphy am 03 Oktober 2018, 21:02:45
Für alle, die auch auf dieses Problem gestossen sind.
Hier die Lösung, die ich von Cooltux erhalten habe.

Funktioniert prima

attr xiaomi1 userReadings Luftfeuchte:humidity:.* { ReadingsNum($name,"humidity",0) }
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 03 Oktober 2018, 21:04:38
Du könntest bitte bei Gelegenheit das Teil mal auf verbose 5 stellen, also direkt am FHEM Device und mir den Auszug aus dem Log hier in Codetags einstellen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: smurphy am 03 Oktober 2018, 21:23:28
Zitat von: CoolTux am 03 Oktober 2018, 21:04:38
Du könntest bitte bei Gelegenheit das Teil mal auf verbose 5 stellen, also direkt am FHEM Device und mir den Auszug aus dem Log hier in Codetags einstellen.

Nichts lieber als das...

Habe Dir einen Kaffee spendiert für die Hilfe  :D

2018.10.03 21:21:26 4: XiaomiBTLESens (xiaomi1) - Run CreateParamGatttool with mod: write
2018.10.03 21:21:26 5: XiaomiBTLESens (xiaomi1) - Write XiaomiBTLESens_ExecGatttool_Run xiaomi1|4c:65:a8:d8:ae:ef|write|0x10|0100
2018.10.03 21:21:26 5: XiaomiBTLESens (xiaomi1) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4c:65:a8:d8:ae:ef --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.10.03 21:21:36 5: XiaomiBTLESens (xiaomi1) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 31 34 2e 37 20 48 3d 36 2e 31 00
Notification handle = 0x000e value,54 3d 31 34 2e 37 20 48 3d 36 2e 30 00
Notification handle = 0x000e value,54 3d 31 34 2e 37 20 48 3d 36 2e 31 00

2018.10.03 21:21:36 4: XiaomiBTLESens (xiaomi1) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 31 34 2e 37 20 48 3d 36 2e 31 00
Notification handle = 0x000e value,54 3d 31 34 2e 37 20 48 3d 36 2e 30 00
Notification handle = 0x000e value,54 3d 31 34 2e 37 20 48 3d 36 2e 31 00

2018.10.03 21:21:36 5: XiaomiBTLESens (xiaomi1) - ExecGatttool_Done: gatttool return string: xiaomi1|4c:65:a8:d8:ae:ef|ok|write|0x10|{"gtResult":"54 3d 31 34 2e 37 20 48 3d 36 2e 31 00 "}
2018.10.03 21:21:36 4: XiaomiBTLESens (xiaomi1) - ProcessingNotification
2018.10.03 21:21:36 4: XiaomiBTLESens (xiaomi1) - ProcessingNotification: handle 0x10
2018.10.03 21:21:36 4: XiaomiBTLESens (xiaomi1) - Thermo/Hygro Sens Handle0x10
2018.10.03 21:21:36 4: XiaomiBTLESens (xiaomi1) - WriteReadings: Readings were written
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 03 Oktober 2018, 22:08:54
Sieht gut aus. Kannst Du bitte noch ein list vom Device geben.

FHEMWEB Kommandozeile
list xiaomi1
eingeben
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: smurphy am 03 Oktober 2018, 22:16:33
Zitat von: CoolTux am 03 Oktober 2018, 22:08:54
Sieht gut aus. Kannst Du bitte noch ein list vom Device geben.

FHEMWEB Kommandozeile
list xiaomi1
eingeben

Internals:
   BTMAC      4c:65:a8:d8:ae:ef
   DEF        4c:65:a8:d8:ae:ef
   INTERVAL   120
   NAME       xiaomi1
   NOTIFYDEV  global,xiaomi1
   NR         232
   NTFY_ORDER 50-xiaomi1
   STATE      T: 14.7 H: =6.1
   TYPE       XiaomiBTLESens
   VERSION    2.2.2
   loglevel   4
   READINGS:
     2018-10-03 22:13:59   Luftfeuchtigkeit 6.1
     2018-10-03 20:22:50   batteryPercent  76
     2018-10-03 20:22:50   batteryState    ok
     2018-10-03 22:13:59   dewpoint        -22.4
     2018-10-03 16:22:06   firmware        00.00.66
     2018-10-03 22:13:59   humidity        =6.1
     2018-10-03 22:13:59   state           T: 14.7 H: =6.1
     2018-10-03 22:13:59   temperature     14.7
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1538590970.06001
     updateTimestampCallBattery 2018-10-03 20:22:50
Attributes:
   event-on-change-reading batteryPercent,temperature,Luftfeuchtigkeit
   event-on-update-reading batteryPercent,temperature,Luftfeuchtigkeit
   interval   120
   model      thermoHygroSens
   room       XiaomiBTLESens
   userReadings Luftfeuchtigkeit { my $luft = ReadingsVal("xiaomi1","humidity",0);$luft=~s/=//;$luft;}
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: randor48 am 07 Oktober 2018, 21:04:39
Guten Abend zusammen,
hat schon jemand hier probiert das Xiaomi Thermometer in homebridge einzubinden? Ich bekomme nur die Temperatur in Homekit angezeigt. Die Luftfeuchte fehlt.
Leider auch, wenn ich homebridgeMapping benutze. In dem Log von homebridge taucht interessanterweise die Luftfeuchte auf, aber wird leider nicht übertragen.

Das "native" homebridge plugin ist dagegen für mich keine Alternative, da das die Steuerung von FHEM teilweise stört (Bluetooth).

MfG
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 07 Oktober 2018, 21:11:42
Zitat von: smurphy am 03 Oktober 2018, 22:16:33
Internals:
   BTMAC      4c:65:a8:d8:ae:ef
   DEF        4c:65:a8:d8:ae:ef
   INTERVAL   120
   NAME       xiaomi1
   NOTIFYDEV  global,xiaomi1
   NR         232
   NTFY_ORDER 50-xiaomi1
   STATE      T: 14.7 H: =6.1
   TYPE       XiaomiBTLESens
   VERSION    2.2.2
   loglevel   4
   READINGS:
     2018-10-03 22:13:59   Luftfeuchtigkeit 6.1
     2018-10-03 20:22:50   batteryPercent  76
     2018-10-03 20:22:50   batteryState    ok
     2018-10-03 22:13:59   dewpoint        -22.4
     2018-10-03 16:22:06   firmware        00.00.66
     2018-10-03 22:13:59   humidity        =6.1
     2018-10-03 22:13:59   state           T: 14.7 H: =6.1
     2018-10-03 22:13:59   temperature     14.7
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1538590970.06001
     updateTimestampCallBattery 2018-10-03 20:22:50
Attributes:
   event-on-change-reading batteryPercent,temperature,Luftfeuchtigkeit
   event-on-update-reading batteryPercent,temperature,Luftfeuchtigkeit
   interval   120
   model      thermoHygroSens
   room       XiaomiBTLESens
   userReadings Luftfeuchtigkeit { my $luft = ReadingsVal("xiaomi1","humidity",0);$luft=~s/=//;$luft;}


Vielen Dank nochmal für den Kaffee. Ich habe mich die Tage mit Deinem "Problem" beschäftigt und muss gestehen das ich keine Ahnung habe wo das = herkommen soll. Ich sehe da beim besten Willen kein Problem beim auslesen.
Kannst Du mal schauen ob Du bei höheren Werten auch die Probleme hast?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: smurphy am 13 Oktober 2018, 12:59:07
Sorry das ich jetzt erst wieder in das Forum schaue. Ich werde das am Wochenende mal,testen und sage dann Bescheid.

Es ist ja auch aktuell kein Problem mehr, dank des userreadings.
Aber klar, wir haben nur das Symptom beseitigt.

Gruß
Smurphy
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: smurphy am 14 Oktober 2018, 20:35:19
So ganz schlau bin ich noch nicht.

Ich habe im FHEM eine Fehlermeldung im Log gehabt und es wurden keine neuen Werte gelesen.
   
,,The BlockingCall Process terminated unexpectedly. Timedout"

Ich habe jetzt den Sensor aus der Trockenbox genommen und den Raspi neungestartet.

Die Werte werden aktuell ohne das Gleichheitszeichen gesendet.

   
T: 20.0 H: 55.2 D: 10.7

Morgen nach der Arbeit schaue ich, ob die Werte noch ok sind und lege dann den Sender zurück in die Trockenbox.

Mal sehen was passiert.

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 15 Oktober 2018, 15:39:25
Aber ist ja schon mal interessant. Im einstelligen Bereich ist ja das Format anders, da muss ich dann erstmal schauen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 15 Oktober 2018, 15:40:00
Ich habe eh vor das gesamte Modul ein wenig um zu bauen. Hauptsächlich damit ich mit package arbeiten kann und vielleicht etwas OOP
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: smurphy am 15 Oktober 2018, 20:20:42
Guten Abend Cooltux,

Jetzt ist es bestätigt. Einstellige Werte werden mit dem Gleichheitszeichen ausgegeben.

Zumindest ist jetzt die Ursache gefunden!

Gruß
Smurphy
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ToM_ToM am 17 Oktober 2018, 06:46:32
ZitatWas mir aber auf fällt das der letzte Timestamp aller Readings kurz vor dem setzen und abrufen des Batteriestatus endet. Muss nichts heißen aber ich schaue da mal.

Guten Morgen Leon,

da ich aktuell wieder den Fall habe dass die Sensoren nicht automatisch reenablen nachdem ich innderhal des disabled intervalls neu gestartet habe, die Frage: Hast du hier schon was zu herausfinden können? :)

Zusätzlich ist mir heute noch etwas aufgefallen. Einer meiner Pflanzensensoren hängt im Status "set attribute model first". Das Attribut ist jedoch gesetzt und das manuelle Abrufen funktioniert auch.


Internals:
   BTMAC      C4:7C:8D:66:04:70
   DEF        C4:7C:8D:66:04:70
   INTERVAL   3600
   NAME       Pflanze_07
   NOTIFYDEV  global,Pflanze_07
   NR         1002
   NTFY_ORDER 50-Pflanze_07
   STATE      set attribute model first
   TYPE       XiaomiBTLESens
   VERSION    2.2.2
   loglevel   4
   READINGS:
     2018-06-14 20:36:07   battery         ok
     2018-06-14 20:36:07   batteryLevel    100
     2018-10-16 11:23:43   batteryPercent  100
     2018-10-16 11:23:43   batteryState    ok
     2018-10-16 20:46:15   fertility       479
     2018-10-16 11:23:43   firmware        3.1.8
     2018-10-14 13:49:41   lastGattError   charWrite faild
     2018-10-16 20:46:15   lux             121
     2018-10-16 20:46:15   moisture        27
     2018-10-16 20:46:15   moistureFeeling good
     2018-10-16 21:00:48   state           set attribute model first
     2018-10-16 20:46:15   temperature     21.8
   helper:
     CallBattery 0
     CallSensDataCounter 0
Attributes:
   DbLogExclude .*
   alias      Gasteria
   disabledForIntervals 21:00-24:00 00:00-06:00
   interval   3600
   maxFertility 1000
   maxLux     30000
   maxMoisture 50
   maxTemp    35
   minFertility 300
   minLux     3500
   minMoisture 7
   minTemp    5
   model      flowerSens
   room       FlowerSens
   userReadings moistureFeeling:moisture.* {
if (ReadingsVal($name, "moisture", -1) < AttrVal($name, "minMoisture", 0)) {
return "too dry";
}
elsif (ReadingsVal($name, "moisture", -1) < AttrVal($name, "minMoisture", 100) + 3) {
return "getting dry";
}
elsif (ReadingsVal($name, "moisture", -1) > AttrVal($name, "maxMoisture", 100)) {
return "too wet";
}
else {
return "good";
}
}


VG, Thomas
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 17 Oktober 2018, 08:19:37
Hallo Thomas,

Herausfinden konnte ich leider noch nichts. Hatte aber auch schon einmal das Problem. Es hat etwas damit zu tun wenn man innerhalb der disabled Zeit FHEM neustartet.

Zu Deinem einen Sensor. Bitte einmal das Attribut model löschen. Dann auf DEF klicken und einfach wieder auf modify. Danach das model Attribut vergeben.


Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: JWRu am 18 Oktober 2018, 10:57:08
Ich habe Probleme mit XiaomiBTLESens und FHEM2FHEM.
Ich habe ein Xiaomi-Device auf einem RasPi Zero W eingerichtet, den ich für BLE-Tags (PRESENCE) nutze. Hier läuft meine dritte FHEM-Installation (FHEM3).
Lokal funktioniert alles prima.
Jetzt habe ich versucht, das Device per FHEM2FHEM auf ein gleichnamiges dummy-Device im meinem Haupt-FHEM (FHEM1) zu übertragen, wie ich das schon mehrfach mit Geräten in meiner zweiten FHEM-Installation (FHEM2) erfolgreich gemacht habe.
Dabei tritt folgendes Problem auf: Die Readings des dummies auf FHEM1 werden zwar einmalig definiert, dann aber mit Ausnahme von "state" nicht mehr aktualisiert. Ursache ist wohl, dass das Update der Readings im Original-Device (FHEM3) keine events auslöst. Im Event monitor taucht jedenfalls außer "state" nichts auf. Erst wenn ich einzelne Readings explizit im Attribut "event-on-update-reading" aufliste, werden events ausgelöst und die Readings im dummy-Device aktualisiert. Sobald ich aber "state" in die Liste aufnehme, löst nur noch "state" ein event aus.
Hier das list des Original-Device (FHEM3):
Internals:
   BTMAC      C4:7C:8D:64:47:67
   CFGFN     
   DEF        C4:7C:8D:64:47:67
   INTERVAL   300
   NAME       Ficus
   NOTIFYDEV  global,Ficus
   NR         56
   NTFY_ORDER 50-Ficus
   STATE      active
   TYPE       XiaomiBTLESens
   VERSION    2.2.2
   loglevel   4
   READINGS:
     2018-10-17 22:59:11   batteryPercent  99
     2018-10-17 22:59:11   batteryState    ok
     2018-10-18 10:44:30   fertility       777
     2018-10-17 22:59:11   firmware        3.1.9
     2018-10-18 10:20:48   lastGattError   charWrite faild
     2018-10-18 10:44:30   lux             2581
     2018-10-18 10:44:30   moisture        47
     2018-10-18 10:44:30   state           active
     2018-10-18 10:44:30   temperature     21.4
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1539809951.40486
     updateTimestampCallBattery 2018-10-17 22:59:11
Attributes:
   event-on-update-reading moisture,temperature,lux,fertility
   model      flowerSens
   room       XiaomiBTLESens


und des dummies (FHEM1):
Internals:
   CFGFN     
   NAME       Ficus
   NR         3961
   STATE      write sensor data
   TYPE       dummy
   Helper:
     DBLOG:
       fertility:
         myDbLog:
           TIME       1539852270.6456
           VALUE      777
       lux:
         myDbLog:
           TIME       1539852270.69482
           VALUE      2581
       moisture:
         myDbLog:
           TIME       1539852270.62049
           VALUE      47
       state:
         myDbLog:
           TIME       1539808234.50414
           VALUE      write sensor data
       temperature:
         myDbLog:
           TIME       1539852270.67003
           VALUE      21.4
   READINGS:
     2018-10-18 10:44:30   fertility       777
     2018-10-18 10:44:30   lux             2581
     2018-10-18 10:44:30   moisture        47
     2018-10-17 22:30:34   state           write sensor data
     2018-10-18 10:44:30   temperature     21.4
Attributes:
   room       Flur
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 18 Oktober 2018, 11:04:03
Deine Beobachtung ergibt keinen Sinn. Wenn ich Dich richtig verstanden habe, dann kommen Events vom Moduldevice erst seit Du event-on-update-reading aktiviert hast.
Sollte es ein Problem vom Modul her sein, so würde ein event-on-xxx Eintrag dieses nicht lösen.
Lass es mich heute Abend einmal testen, Ich glaube ich habe bei mir event-on-change-reading aktiviert. Werde das mal raus nehmen.

Aber ich habe Dich richtig verstanden? Ohne event-on-xxx kommen keine Events?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: JWRu am 18 Oktober 2018, 11:05:07
Es kommen dann nur events für "state".
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: JWRu am 18 Oktober 2018, 11:27:28
Ich muss es genauer beschreiben:
Ohne event-on-update-reading tauchen außer für "state" keine Events im FHEM1 auf.
Event monitor FHEM3:
2018-10-18 11:16:16 XiaomiBTLESens Ficus write sensor data
2018-10-18 11:16:19 XiaomiBTLESens Ficus read sensor data
2018-10-18 11:16:19 XiaomiBTLESens Ficus lux: 2553
2018-10-18 11:16:19 XiaomiBTLESens Ficus moisture: 47
2018-10-18 11:16:19 XiaomiBTLESens Ficus fertility: 753
2018-10-18 11:16:19 XiaomiBTLESens Ficus temperature: 22.5
2018-10-18 11:16:19 XiaomiBTLESens Ficus active


Event monitor FHEM1:
2018-10-18 11:16:16 dummy Ficus write sensor data


Mit "event-on-update-reading moisture,temperature,lux,fertility" sieht es so aus:
Event monitor FHEM3:
2018-10-18 11:24:44 XiaomiBTLESens Ficus lux: 2734
2018-10-18 11:24:44 XiaomiBTLESens Ficus temperature: 22.9
2018-10-18 11:24:44 XiaomiBTLESens Ficus moisture: 47
2018-10-18 11:24:44 XiaomiBTLESens Ficus fertility: 753


Event monitor FHEM1:
2018-10-18 11:24:44 dummy Ficus lux: 2734
2018-10-18 11:24:44 dummy Ficus temperature: 22.9
2018-10-18 11:24:44 dummy Ficus moisture: 47
2018-10-18 11:24:44 dummy Ficus fertility: 753



Hier ein list meines FHEM2FHEM:
Internals:
   CFGFN     
   DEF        192.168.178.86:7027 LOG:Ficus.*

   FD         29
   Host       192.168.178.86:7027
   NAME       FHEM3
   NR         3507
   PARTIAL   
   STATE      connected
   TYPE       FHEM2FHEM
   informType LOG
   regexp     Ficus.*
   Helper:
     DBLOG:
       state:
         myDbLog:
           TIME       1539854181.41746
           VALUE      CONNECTED
Attributes:
   room       System

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 18 Oktober 2018, 11:34:33
Ändere mal bitte das FHEM2FEHM Define nach

DEF        192.168.178.86:7027 LOG:Ficus:(lux|moisture|fertility|temperature):.*


Es ist eher ein Hilferuf, da ich keinen Ansatz habe wieso das so ist.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 18 Oktober 2018, 12:03:42
Zitat von: ToM_ToM am 17 Oktober 2018, 06:46:32
Guten Morgen Leon,

da ich aktuell wieder den Fall habe dass die Sensoren nicht automatisch reenablen nachdem ich innderhal des disabled intervalls neu gestartet habe, die Frage: Hast du hier schon was zu herausfinden können? :)

Zusätzlich ist mir heute noch etwas aufgefallen. Einer meiner Pflanzensensoren hängt im Status "set attribute model first". Das Attribut ist jedoch gesetzt und das manuelle Abrufen funktioniert auch.


Internals:
   BTMAC      C4:7C:8D:66:04:70
   DEF        C4:7C:8D:66:04:70
   INTERVAL   3600
   NAME       Pflanze_07
   NOTIFYDEV  global,Pflanze_07
   NR         1002
   NTFY_ORDER 50-Pflanze_07
   STATE      set attribute model first
   TYPE       XiaomiBTLESens
   VERSION    2.2.2
   loglevel   4
   READINGS:
     2018-06-14 20:36:07   battery         ok
     2018-06-14 20:36:07   batteryLevel    100
     2018-10-16 11:23:43   batteryPercent  100
     2018-10-16 11:23:43   batteryState    ok
     2018-10-16 20:46:15   fertility       479
     2018-10-16 11:23:43   firmware        3.1.8
     2018-10-14 13:49:41   lastGattError   charWrite faild
     2018-10-16 20:46:15   lux             121
     2018-10-16 20:46:15   moisture        27
     2018-10-16 20:46:15   moistureFeeling good
     2018-10-16 21:00:48   state           set attribute model first
     2018-10-16 20:46:15   temperature     21.8
   helper:
     CallBattery 0
     CallSensDataCounter 0
Attributes:
   DbLogExclude .*
   alias      Gasteria
   disabledForIntervals 21:00-24:00 00:00-06:00
   interval   3600
   maxFertility 1000
   maxLux     30000
   maxMoisture 50
   maxTemp    35
   minFertility 300
   minLux     3500
   minMoisture 7
   minTemp    5
   model      flowerSens
   room       FlowerSens
   userReadings moistureFeeling:moisture.* {
if (ReadingsVal($name, "moisture", -1) < AttrVal($name, "minMoisture", 0)) {
return "too dry";
}
elsif (ReadingsVal($name, "moisture", -1) < AttrVal($name, "minMoisture", 100) + 3) {
return "getting dry";
}
elsif (ReadingsVal($name, "moisture", -1) > AttrVal($name, "maxMoisture", 100)) {
return "too wet";
}
else {
return "good";
}
}


VG, Thomas

Fehler gefunden und gefixt. Werde ich die Tage ausrollen. Bitte etwas Geduld ich baue gerade das Modul wegen Package um.

Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: JWRu am 18 Oktober 2018, 12:59:51
ZitatÄndere mal bitte das FHEM2FEHM Define nach
Code: [Auswählen]
DEF        192.168.178.86:7027 LOG:Ficus:(lux|moisture|fertility|temperature):.*

Es ist eher ein Hilferuf, da ich keinen Ansatz habe wieso das so ist.

Irgendjemand hat den Hilferuf erhört: Die Änderung bei FHEM2FHEM hat denselben Effekt wie event-on-update-reading (habe ich natürlich gelöscht).
Allerdings kriege ich die "state"-Events nicht rüber zu FHEM1, auch wenn ich "state" in der DEF ergänze.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 18 Oktober 2018, 13:29:05
Ja das ist ein bisschen kniffliger
Versuche mal bitte

DEF        192.168.178.86:7027 LOG:Ficus:(\s[a-z]+|(lux|moisture|fertility|temperature):\s[0-9]+)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: JWRu am 18 Oktober 2018, 14:33:48
ZitatVersuche mal bitte
DEF        192.168.178.86:7027 LOG:Ficus:(\s[a-z]+|(lux|moisture|fertility|temperature):\s[0-9]+)

Mit dieser Definition passiert folgendes:

Event monitor FHEM3:
2018-10-18 14:31:50 XiaomiBTLESens Ficus write sensor data
2018-10-18 14:31:53 XiaomiBTLESens Ficus read sensor data
2018-10-18 14:31:54 XiaomiBTLESens Ficus temperature: 24.9
2018-10-18 14:31:54 XiaomiBTLESens Ficus fertility: 659
2018-10-18 14:31:54 XiaomiBTLESens Ficus moisture: 45
2018-10-18 14:31:54 XiaomiBTLESens Ficus lux: 2259
2018-10-18 14:31:54 XiaomiBTLESens Ficus active


Event monitor FHEM1:
2018-10-18 14:31:54 dummy Ficus fertility: 659
2018-10-18 14:31:54 dummy Ficus moisture: 45
2018-10-18 14:31:54 dummy Ficus lux: 2259
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: JWRu am 18 Oktober 2018, 14:41:44
Habe noch ein bißchen rumgespielt. Mit

DEF 192.168.178.86:7027 LOG:Ficus:.*

kommt:
2018-10-18 14:38:48 dummy Ficus write sensor data
2018-10-18 14:38:53 dummy Ficus temperature: 25
2018-10-18 14:38:53 dummy Ficus moisture: 45
2018-10-18 14:38:53 dummy Ficus fertility: 657
2018-10-18 14:38:53 dummy Ficus lux: 2344
2018-10-18 14:38:53 dummy Ficus active


Das war's dann wohl. Verstanden habe ich es trotzdem nicht.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 18 Oktober 2018, 14:47:02

DEF 192.168.178.86:7027 LOG:Ficus.(((lux|moisture|fertility|temperature):\s[0-9].+)|([a-z]+\s?)+)


So würde es auch gehen.
Hattest Du

DEF 192.168.178.86:7027 LOG:Ficus:.*

nicht ganz am Anfang?


Nachtrag
Gerade gesehen Du hattest das letzte : nicht.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 18 Oktober 2018, 14:48:29
Zitat von: smurphy am 15 Oktober 2018, 20:20:42
Guten Abend Cooltux,

Jetzt ist es bestätigt. Einstellige Werte werden mit dem Gleichheitszeichen ausgegeben.

Zumindest ist jetzt die Ursache gefunden!

Gruß
Smurphy

Dann brauche ich bitte ein verbose 5 mit zweistelligen Werten und ein verbose 5 mit einem einstelligen Wert.
Danke Dir
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: JWRu am 18 Oktober 2018, 14:52:55
ZitatHattest Du
Code: [Auswählen]
DEF 192.168.178.86:7027 LOG:Ficus:.*
nicht ganz am Anfang?

Nein, der Doppelpunkt nach "Ficus" fehlte.

Seltsam - mein anderes FHEM2FHEM sieht so aus:
DEF 192.168.178.82:7027 LOG:^Heizung.*|Pin13.*|Luftdruckmesser.*|Flow_01
Trotzdem funktioniert alles.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: JWRu am 18 Oktober 2018, 15:05:34
Zu früh gefreut: Es hat nach der Änderung von DEF nur einmal funktioniert - jetzt kommt wieder nur noch "state".
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 18 Oktober 2018, 15:10:08
Was ist damit


DEF 192.168.178.86:7027 LOG:Ficus.(((lux|moisture|fertility|temperature):\s[0-9].+)|([a-z]+\s?)+)


War mein letztes Beispiel. Aber eigentlich sollte es nicht nur einmal gehen sondern wenn dann immer.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: JWRu am 18 Oktober 2018, 15:32:10
ZitatWas ist damit

DEF 192.168.178.86:7027 LOG:Ficus.(((lux|moisture|fertility|temperature):\s[0-9].+)|([a-z]+\s?)+)

dann kommt wieder nur:
2018-10-18 15:27:23 dummy Ficus write sensor data
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 18 Oktober 2018, 15:33:35
Das interessiert mich. Ich werde mir das die Tage mal zu Hause anschauen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 18 Oktober 2018, 15:40:17
konnte doch nicht warten

Internals:
   CFGFN     
   DEF        10.6.6.21:7072 LOG:PflanzenSensor1.*
   FD         7
   Host       10.6.6.21:7072
   NAME       FHEM02toFHEM01
   NR         15
   PARTIAL   
   STATE      connected
   TYPE       FHEM2FHEM
   informType LOG
   regexp     PflanzenSensor1.*
Attributes:
   room       EDV




Internals:
   CFGFN     
   NAME       PflanzenSensor1
   NR         2110
   STATE      maxTemp ok
   TYPE       dummy
   READINGS:
     2018-10-18 15:38:06   fertility       1111
     2018-10-18 15:38:06   lux             331
     2018-10-18 15:38:06   moisture        51
     2018-10-18 15:38:06   state           maxTemp ok
     2018-10-18 15:38:06   temperature     18.9
Attributes:
   room       Test


Geht 1a. Habe auch kein event-on-* irgendwas beim original Device. Einzig die Sache mit state ist seltsam, aber da stand kurz vor dem "maxTemp ok" ein active. Scheint das er den DoTrigger als state interpretiert.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 18 Oktober 2018, 15:42:56
Wenn ich das ganze änder in das was ich dir vorhin vorgeschlagen habe


Internals:
   CFGFN     
   DEF        10.6.6.21:7072 LOG:PflanzenSensor1.(((lux|moisture|fertility|temperature):\s[0-9].+)|([a-z]+\s?)+)
   FD         7
   Host       10.6.6.21:7072
   NAME       FHEM02toFHEM01
   NR         15
   PARTIAL   
   STATE      connected
   TYPE       FHEM2FHEM
   informType LOG
   regexp     PflanzenSensor1.(((lux|moisture|fertility|temperature):\s[0-9].+)|([a-z]+\s?)+)
Attributes:
   room       EDV


kommt auch alles so wie erwartet


Internals:
   CFGFN     
   NAME       PflanzenSensor1
   NR         2110
   STATE      active
   TYPE       dummy
   READINGS:
     2018-10-18 15:41:12   fertility       1113
     2018-10-18 15:41:12   lux             348
     2018-10-18 15:41:12   moisture        51
     2018-10-18 15:41:12   state           active
     2018-10-18 15:41:12   temperature     18.8
Attributes:
   room       Test
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: JWRu am 18 Oktober 2018, 15:45:17
Bei mir hat er auch direkt nach der Definition des Dummy alle Readings wunderschön angelegt und aktualisiert.
Nur anschließend wurde nur noch "state" aktualisiert.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 18 Oktober 2018, 15:51:20
Deswegen habe ich es dreimal hintereinander getestet.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: JWRu am 18 Oktober 2018, 17:18:27
Ich habe FHEM2FHEM jetzt mal auf:
DEF LOG:Ficus:(lux|moisture|fertility|temperature|.*):.*
gesetzt - da kommt außer "state" alles an (auch batteryPercent etc.)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 18 Oktober 2018, 17:35:36
Was du da hast ist doppelt gemoppelt. Weißt Du wie regex geht? Testen kannst du unter 103regex.com oder so
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: JWRu am 18 Oktober 2018, 20:09:31
Es ist mir schon klar, dass das schräg ist. Wenn FHEM2FHEM den regex korrekt interpretieren würde, müsste ja wohl ".*" reichen, um alle Events zu bekommen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 19 Oktober 2018, 04:47:20
Ich habe soeben eine neue Version eingecheckt. Sollte nun auch nach einem restart von FHEM innerhalb der disabledForInterval Zeit gehen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: JWRu am 19 Oktober 2018, 09:05:38
Jetzt geht alles auch mit
DEF 192.168.178.86:7027 LOG:Ficus.*
Weiß der Henker, was das war.
Vielen Dank nochmal!
Eine Frage habe ich noch, bevor ich mich verabschiede:
In welchen Einheiten wird "batteryFirmwareAge" gesetzt? Sekunden?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 19 Oktober 2018, 09:27:48
Als Value für das Attribut batteryFirmwareAge steht 8h,16h,24h,32h,40h,48h zur Auswahl. Das h bedeutet Stunden und bezieht sich auf das maximale Alter des Readings bevor es aktualisiert werden soll.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: JWRu am 19 Oktober 2018, 10:10:57
Danke!
Ich hatte nicht versucht, das Attribut zu setzen, sondern nur in der Commandref gelesen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 19 Oktober 2018, 10:25:21
Zitat von: JWRu am 19 Oktober 2018, 10:10:57
Danke!
Ich hatte nicht versucht, das Attribut zu setzen, sondern nur in der Commandref gelesen.
Ich werde die Commandref eindeutiger schreiben. Habe beim lesen festgestellt das es nicht wirklich deutlich genug rüber kommt.


Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 20 Oktober 2018, 21:44:58
Zitat von: smurphy am 15 Oktober 2018, 20:20:42
Guten Abend Cooltux,

Jetzt ist es bestätigt. Einstellige Werte werden mit dem Gleichheitszeichen ausgegeben.

Zumindest ist jetzt die Ursache gefunden!

Gruß
Smurphy

Ich kann es reparieren. Kannst Du mir ein verbose 5 Ausgabe geben wenn der Wert 2 stellig ist?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 20 Oktober 2018, 21:54:35
Ok hat sich erledigt. Fehler gefunden.
Der Bug muss sich in einer Version nach 2.0.1 eingeschlichen haben, ich hatte es nämlich schon mal richtig gehabt  ;D

Morgen früh per Update
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: smurphy am 21 Oktober 2018, 17:45:36
Hast du schon ein Update released?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 21 Oktober 2018, 17:55:59
Ja. Steht seit heute morgen bereit.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: smurphy am 21 Oktober 2018, 20:56:03
Habe gerade aktualisiert und dann neu gestartet. Die Werte stimmen.
Um das Log sauber zu haben, habe ich es gelöscht und ein neues angelegt. Nach dem Neustart habe ich zuerst einen falschen Wert im log, danach passt es.

2018-10-21_20:45:18 xiaomi1 read sensor data
2018-10-21_20:45:18 xiaomi1 Luftfeuchtigkeit: 6.5
2018-10-21_20:45:24 xiaomi1 batteryState: ok
2018-10-21_20:45:24 xiaomi1 batteryPercent: 69
2018-10-21_20:45:24 xiaomi1 T: 17.4 H: =6.5
2018-10-21_20:45:24 xiaomi1 Luftfeuchtigkeit: 6.5
2018-10-21_20:45:24 xiaomi1 write sensor data
2018-10-21_20:45:24 xiaomi1 Luftfeuchtigkeit: 6.5
2018-10-21_20:45:37 xiaomi1 humidity: 4.9
2018-10-21_20:45:37 xiaomi1 temperature: 14.9
2018-10-21_20:45:37 xiaomi1 T: 14.9 H: 4.9 D: -24.8
2018-10-21_20:45:37 xiaomi1 Luftfeuchtigkeit: 4.9
2018-10-21_20:45:37 xiaomi1 dewpoint: -24.8
2018-10-21_20:45:37 xiaomi1 Luftfeuchtigkeit: 4.9
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: smurphy am 21 Oktober 2018, 21:31:04
Und noch etwas. Ich weiß nicht genau warum, aber ich kann den Wert H im plot nicht darstellen.

2018-10-21_21:26:25 xiaomi1 T: 14.9 H: 4.8 D: -25.0

Colum 4 liefert den Wert von T, Colum 8 den Wert von D, Colum 6 liefert keinen Wert im Graphen.

Woran kann das liegen? Handelt es sich eventuell umeinen String und keine Zahl?

Es gibt auch Fehlermeldungen im log.

Server started with 179 defined entities (fhem.pl:17528/2018-10-14 perl:5.024001 os:linux user:fhem pid:1949)
2018.10.21 21:18:49 1: PERL WARNING: Illegal hexadecimal digit ' ' ignored at ./FHEM/74_XiaomiBTLESens.pm line 865.
2018.10.21 21:18:49 3: eval: {XiaomiBTLESens::ExecGatttool_Done('xiaomi1|4c:65:a8:d8:ae:ef|ok|read|0x18|{"gtResult":"45 "}')}
2018.10.21 21:18:49 1: PERL WARNING: Illegal hexadecimal digit ' ' ignored at ./FHEM/74_XiaomiBTLESens.pm line 866.
2018.10.21 21:18:49 3: eval: {XiaomiBTLESens::ExecGatttool_Done('xiaomi1|4c:65:a8:d8:ae:ef|ok|read|0x18|{"gtResult":"45 "}')}
2018.10.21 21:18:51 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at (eval 193) line 1.
2018.10.21 21:18:51 3: eval: { "Xiaomi Humidity Min $data{min2}, Max $data{max2}, Last $data{currval2}, Taupunkt $data{currval3}" }
2018.10.21 21:19:02 1: PERL WARNING: Argument "5.0\0" isn't numeric in numeric le (<=) at ./FHEM/98_dewpoint.pm line 278.
2018.10.21 21:20:55 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at (eval 236) line 1.
2018.10.21 21:20:56 3: eval: { "Xiaomi Humidity Min $data{min2}, Max $data{max2}, Last $data{currval2}, Taupunkt $data{currval3}" }
2018.10.21 21:26:25 1: PERL WARNING: Argument "4.8\0" isn't numeric in numeric le (<=) at ./FHEM/98_dewpoint.pm line 278.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 22 Oktober 2018, 08:21:41
Das ganze kommt vom Sensor in der Tat als Text, aber das stört Perl eigentlich nicht, da Perl erkennen kann das es sich im eine Zahl handelt und den Variablen Type intern an passt.
Warum nimmst Du ausgerechnet state als Reading für den Plot. Du hast doch die Werte einzeln in Readings.
Die Meldung

2018.10.21 21:18:49 3: eval: {XiaomiBTLESens::ExecGatttool_Done('xiaomi1|4c:65:a8:d8:ae:ef|ok|read|0x18|{"gtResult":"45 "}')}
2018.10.21 21:18:49 1: PERL WARNING: Illegal hexadecimal digit ' ' ignored at ./FHEM/74_XiaomiBTLESens.pm line 866.
2018.10.21 21:18:49 3: eval: {XiaomiBTLESens::ExecGatttool_Done('xiaomi1|4c:65:a8:d8:ae:ef|ok|read|0x18|{"gtResult":"45 "}')}

Kommt vom Batteriestatus. Das schaue ich mir gerne noch mal an.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: smurphy am 22 Oktober 2018, 14:50:19
Ich logge eigentlich nur das State um das logfile klein zu halten.

Ich habe es jetzt mal mit den einzelnen Readings versucht:

Example lines for input:
2018-10-22_14:42:40 xiaomi1 Luftfeuchtigkeit: 4.9
2018-10-22_14:42:40 xiaomi1 T: 14.9 H: 4.9 D: -24.8
2018-10-22_14:42:40 xiaomi1 dewpoint: -24.8
2018-10-22_14:42:40 xiaomi1 humidity: 4.9
2018-10-22_14:42:40 xiaomi1 temperature: 14.9
2018-10-22_14:42:28 xiaomi1 write sensor data


#File_LOG_xiaomi1 4:xiaomi1.temperature\x3a:10:
#File_LOG_xiaomi1 4:xiaomi1.humidity\x3a:50:

plot "<IN>" using 1:2 axes x1y2 title 'Measured temperature' ls l0 lw 1 with lines,\
     "<IN>" using 1:2 axes x1y1 title 'Humidity_(%)' ls l2 lw 2 with lines


Temperatur wird angezeigt....die Luftfeuchtigkeit nicht.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 22 Oktober 2018, 15:09:18
Kenne mich damit ehrlich gesagt nicht so gut aus.
Steht denn die Luftfeuchte überhaupt im Filelog drin?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: smurphy am 22 Oktober 2018, 15:53:15
Ja klar..die example lines stammen aus dem File-Log.

Ich habe ja auch zig SVG Plots und das Problem nur mit diesem Wert von diesem Device.
Ich kann das ja auch an anderer Stelle mal erfragen. Ich war davon ausgegangen, dass die Ursache in diesem speziellen Werten liegt.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 22 Oktober 2018, 16:11:02
Ich habe einen Fix fertig für

2018.10.21 21:18:49 3: eval: {XiaomiBTLESens::ExecGatttool_Done('xiaomi1|4c:65:a8:d8:ae:ef|ok|read|0x18|{"gtResult":"45 "}')}
2018.10.21 21:18:49 1: PERL WARNING: Illegal hexadecimal digit ' ' ignored at ./FHEM/74_XiaomiBTLESens.pm line 866.
2018.10.21 21:18:49 3: eval: {XiaomiBTLESens::ExecGatttool_Done('xiaomi1|4c:65:a8:d8:ae:ef|ok|read|0x18|{"gtResult":"45 "}')}


Kommt die Tage per Update
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 22 Oktober 2018, 16:11:35
Wegen dem Plot habe ich ehrlich gesagt gar keine Idee
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: smurphy am 22 Oktober 2018, 20:45:22
Ich warte erstmal dein Update ab, ob dann das log wieder frei von Fehlermeldungen ist.

Vielen Dank für deine tolle Arbeit Cooltux!

Gruß
Smurphy
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 23 Oktober 2018, 11:19:14
Ich habe den Fix soeben hochgeladen. Bekommst morgen per FHEM Update
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: smurphy am 23 Oktober 2018, 16:03:32
 ;D ;D ;D
Ich werde berichten.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: smurphy am 24 Oktober 2018, 08:40:09
Guten Morgen Cooltux.

Der Bug mit der Batterieanzeige ist behoben.
Das Problem, dass die humidity Werte nicht im Plot visiualisiert werden können, besteht weiterhin.

Die Taupunktberechnung meckert auch an, dass es sich um einen uninitialisierten Wert oder String handelt. ( Argument "4.7\0" isn't numeric in numeric)

2018.10.24 08:35:29 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at (eval 194) line 1.
2018.10.24 08:35:29 3: eval: { "Xiaomi Humidity Min $data{min2}, Max $data{max2}, Last $data{currval2}, Taupunkt $data{currval3}" }
2018.10.24 08:35:31 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at (eval 196) line 1.
2018.10.24 08:35:31 3: eval: { "Xiaomi Humidity Min $data{min2}, Max $data{max2}, Last $data{currval2}, Taupunkt $data{currval3}" }
2018.10.24 08:35:35 1: PERL WARNING: Argument "4.7\0" isn't numeric in numeric le (<=) at ./FHEM/98_dewpoint.pm line 278.
2018.10.24 08:35:51 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at (eval 229) line 1.
2018.10.24 08:35:51 3: eval: { "Xiaomi Humidity Min $data{min2}, Max $data{max2}, Last $data{currval2}, Taupunkt $data{currval3}" }



Vielleicht bin ich aber auch nur ein Einzelschicksal.
Wie sieht das bei den anderen aus?
Gruß
Smurphy
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 24 Oktober 2018, 08:43:45
Erstelle mal bitte ein userreadings welches einfach nur luftfeuchte und Temperatur addiert. Verwende zum auslesen bitte Readingsval und schaue dann im Log nach Fehlern
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: smurphy am 24 Oktober 2018, 08:57:36
Habe heute leider den ganzen Tag zwei externe im Büro hocken und nach Feierabend gehen wir noch in die Stadt. Wird also leider spät oder erst morgen früh.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 24 Oktober 2018, 09:12:53
Zitat von: smurphy am 24 Oktober 2018, 08:57:36
Habe heute leider den ganzen Tag zwei externe im Büro hocken und nach Feierabend gehen wir noch in die Stadt. Wird also leider spät oder erst morgen früh.

Kein Problem
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: triagony am 24 Oktober 2018, 12:32:12
Hallo!
Erstmal vielen Dank für dieses Modul, das auch bis vor kurzem wunderbar bei meinen zwei Sensoren funktioniert hat. Leider bekomme ich seit ein paar Tagen (ich weiß leider nicht genau seit wann) immer folgenden Fehler:

2018.10.24 12:10:58 5 : XiaomiBTLESens (Benjamini_Fenster) - ExecGatttool_Done: gatttool return string: Benjamini_Fenster|C4:7C:8D:66:D2:80|error|read|0x38|{"gtResult":"Connection refused (111)"}
2018.10.24 12:10:58 4 : XiaomiBTLESens (Benjamini_Fenster) - ProcessingErrors
2018.10.24 12:10:58 4 : XiaomiBTLESens (Benjamini_Fenster) - WriteReadings: Readings were written


In der Konsole mit gatttool sieht es genauso aus:

user@fhem-VM:~$ gatttool -i hci0 -b  C4:7C:8D:66:D2:80 --char-read -a 0x38
connect: Connection refused (111)


Ich habe bereits
sudo hciconfig hci0 down; sudo hciconfig hci0 up
ausprobiert; leider ohne Erfolg.

Beim Scannen mit lescan werden die Sensoren angezeigt. Ebenso funktionieren Sie in der Android-App; Firmware der Sensoren ist 3.1.9 (heute ein Update aufgespielt - Version 3.1.8 hat aber auch nicht (mehr) funktioniert).

Umgebung:
user@fhem-VM:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.5 (stretch)
Release: 9.5
Codename: stretch
user@fhem-VM:~$ bluetoothctl --version
5.43


list Benjamini_Fenster:



Internals:
   BTMAC      C4:7C:8D:66:D2:80
   DEF        C4:7C:8D:66:D2:80
   INTERVAL   300
   NAME       Benjamini_Fenster
   NOTIFYDEV  global,Benjamini_Fenster
   NR         264
   NTFY_ORDER 50-Benjamini_Fenster
   STATE      Temperatur: 20.3 &deg;C<br/>Helligkeit: 24 lx<br/>Bodenfeuchte: 19 %<br/>Dünger: 44 us/cm
   TYPE       XiaomiBTLESens
   VERSION    2.4.3
   loglevel   4
   Helper:
     DBLOG:
       lastGattError:
         DBLogging:
           TIME       1540376913.49599
           VALUE      Connection refused (111)
       state:
         DBLogging:
           TIME       1540376913.49599
           VALUE      error
   READINGS:
     2018-10-20 07:20:25   batteryPercent  100
     2018-10-20 07:20:25   batteryState    ok
     2018-10-20 19:57:15   fertility       44
     2018-10-20 07:20:25   firmware        3.1.8
     2018-10-24 12:28:33   lastGattError   Connection refused (111)
     2018-10-20 19:57:15   lux             24
     2018-10-20 19:57:15   moisture        19
     2018-10-24 12:28:33   state           error
     2018-10-20 19:57:15   temperature     20.3
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 0
Attributes:
   maxFertility 2000
   maxLux     35000
   maxMoisture 60
   maxTemp    32
   minFertility 350
   minLux     2500
   minMoisture 15
   minTemp    8
   model      flowerSens
   room       MiSmartHome,Pflanzen,Wohnzimmer
   stateFormat {"Temperatur: " . ReadingsVal($name, "temperature", 0) . " &deg;C" . "<br/>" . "Helligkeit: " . ReadingsVal($name, "lux", 0) . " lx" . "<br/>" . "Bodenfeuchte: " . ReadingsVal($name, "moisture", 0) . " %" . "<br/>" . "Dünger: " . ReadingsVal($name, "fertility", 0) . " us/cm"}
   verbose    5



Hat jemand eine Idee, woran es liegen könnte? Für jeden sachdienlichen Hinweis bin ich dankbar :)

Beste Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 24 Oktober 2018, 12:37:48
Wird die Schnittstelle von einer anderen Anwendung verwendet? lepresenced zum Beispiel. Ist die APP immer noch mit dem Sensor gekoppelt? Hast Du den Server mal neugestartet?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: triagony am 24 Oktober 2018, 12:50:20
Zitat von: CoolTux am 24 Oktober 2018, 12:37:48
Wird die Schnittstelle von einer anderen Anwendung verwendet? lepresenced zum Beispiel. Ist die APP immer noch mit dem Sensor gekoppelt? Hast Du den Server mal neugestartet?
Hi! Danke schonmal für deine Antwort. Lepresenced läuft tatsächlich. Aber bis vor ein paar Tagen hat es damit auch funktioniert. Ich hab lepresenced gerade Mal gestoppt, was aber keinen Unterschied macht.

Die App von Handy ist nicht mehr verbunden - bin auf der Arbeit, sodass ich diesen Fehler ausschließen kann.

Ich starte den Server jetzt Mal neu und sehe, was dann passiert.

VG

Gesendet von meinem SM-G950F mit Tapatalk

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: triagony am 24 Oktober 2018, 13:04:08
Okay, der Neustart scheint es gebracht zu haben. Danke :)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: smurphy am 24 Oktober 2018, 15:02:59
Was ich jetzt probiert habe:

Mit dem userreading

testwert {ReadingsVal ("xiaomi1","temperature",0) + ReadingsVal ("xiaomi1","humidity",0)}

erhalte ich folgende Fehlermeldung im Log:

2018.10.24 14:57:18 1: PERL WARNING: Argument "4.6\0" isn't numeric in addition (+) at (eval 16625) line 1.
2018.10.24 14:57:18 3: eval: {ReadingsVal ("xiaomi1","temperature",0) + ReadingsVal ("xiaomi1","humidity",0)}


trotzdem ist der Wert für $testwert korrekt addiert

mit dem userreading

testwert {ReadingsVal ("xiaomi1","temperature",0) + ReadingsVal ("xiaomi1","temperature",0)}

erscheint keine Fehlermeldung im Log

Ich habe natürlich jeweils einen neuen Wert getriggert
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 24 Oktober 2018, 15:12:33
die 4.6 sind bestimmt die Luftfeuchte, oder?

Wieso steht da "4.6\0" Irgendwoher muß die /0 kommen.

Kannst Du bitte einmal das hier

print $readings{humidity} . "\n";


In Zeile 898 einfügen und dann einen reload 74_XiaomiBTLESens machen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: smurphy am 24 Oktober 2018, 15:22:43
ähhmmm..in welche Datei soll ich das einfügen? Und wo liegt diese Datei?

Eine 74_XiaomiBTLESens.pm kann ich jedenfalls nicht über das Frontend finden.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 24 Oktober 2018, 15:33:25
die Datei liegt unter FHEM/

meist unter /opt/fhem/FHEM/
sie heißt 74_XiaomiBTLESens.pm

Aber bitte nur machen wenn Du Dich dazu technisch in der Lage siehst. Ansonsten muss ich mir was einfallen lassen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Invers am 24 Oktober 2018, 15:47:09
Hab ich mal gemacxht, da ich den selben fehler habe.
Luftfeuchted steht immer bei 0.0.
Fehler bleibt leider mit der Änderung im Modul bestehen.
Altes Modul luft aber.

2018.10.24 15:44:27 1: PERL WARNING: Argument "=44." isn't numeric in sprintf at ./FHEM/33_readingsGroup.pm line 543.
2018.10.24 15:44:27 1: PERL WARNING: Argument "=44." isn't numeric in numeric gt (>) at (eval 1261) line 32.
201
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 24 Oktober 2018, 15:48:55
Zitat von: Invers am 24 Oktober 2018, 15:47:09
Hab ich mal gemacxht, da ich den selben fehler habe.
Luftfeuchted steht immer bei 0.0.
Fehler bleibt leider mit der Änderung im Modul bestehen.
Altes Modul luft aber.

2018.10.24 15:44:27 1: PERL WARNING: Argument "=44." isn't numeric in sprintf at ./FHEM/33_readingsGroup.pm line 543.
2018.10.24 15:44:27 1: PERL WARNING: Argument "=44." isn't numeric in numeric gt (>) at (eval 1261) line 32.
201


Ich befürchte Du hast nur die hälfte mit bekommen.
Mach mal bitte ein Update von FHEM dann ist Dein Problem mit dem = behoben. Und dann kannst Du mal bitte berichten was bei Dir passiert wenn Du das Userreadings an legst.


Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: smurphy am 24 Oktober 2018, 15:53:04
Zitat von: CoolTux am 24 Oktober 2018, 15:33:25
die Datei liegt unter FHEM/

meist unter /opt/fhem/FHEM/
sie heißt 74_XiaomiBTLESens.pm

Aber bitte nur machen wenn Du Dich dazu technisch in der Lage siehst. Ansonsten muss ich mir was einfallen lassen.

Das ist wirklich kein Problem.
Ich komme vom Büro aus leider nicht auf die bash. Und per Handy + VPN + Terminal ist mir das zu frickelig.

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 24 Oktober 2018, 15:55:30
Zitat von: smurphy am 24 Oktober 2018, 15:53:04
Das ist wirklich kein Problem.
Ich komme vom Büro aus leider nicht auf die bash. Und per Handy + VPN + Terminal ist mir das zu frickelig.

Dann einfach ganz entspannt wenn es passt.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Invers am 24 Oktober 2018, 15:57:07
ZitatIch befürchte Du hast nur die hälfte mit bekommen.
Kann schon sein. Sorry für das Missverständnis.
Ein Update hatte ich allerdings heute früh gemacht. Der Fehler kommt trotzdem/gerade dadurch.

Version:
74_XiaomiBTLESens.pm 17604 2018-10-23 09:18:34Z CoolTux
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 24 Oktober 2018, 15:58:48
Dann brauche ich bitte ein list vom Device und ein verbose 5 Mitschnitt
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Invers am 24 Oktober 2018, 16:21:04
2018.10.24 16:13:47 1: Logfile gelöscht
2018.10.24 16:17:59 4: XiaomiBTLESens (TMP_Bu) - Run CreateParamGatttool with mod: write
2018.10.24 16:17:59 5: XiaomiBTLESens (TMP_Bu) - Write XiaomiBTLESens_ExecGatttool_Run TMP_Bu|4C:65:A8:D2:9B:E3|write|0x10|0100
2018.10.24 16:17:59 5: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D2:9B:E3 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.10.24 16:18:09 5: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 31 39 2e 36 20 48 3d 34 34 2e 32 00
Notification handle = 0x000e value,54 3d 31 39 2e 36 20 48 3d 34 34 2e 30 00
Notification handle = 0x000e value,54 3d 31 39 2e 35 20 48 3d 34 34 2e 32 00
Notification handle = 0x000e value,54 3d 31 39 2e 36 20 48 3d 34 34 2e 34 00
Notification handle = 0x000e value,54 3d 31 39 2e 37 20 48 3d 34 34 2e 32 00
Notification handle = 0x000e value,54 3d 31 39 2e 36 20 48 3d 34 34 2e 32 00
Notification handle = 0x000e value,54 3d 31 39 2e 36 20 48 3d 34 34 2e 31 00
Notification handle = 0x000e value,54 3d 31 39 2e 36 20 48 3d 34 34 2e 32 00
Notification handle = 0x000e value,54 3d 31 39 2e 37 20 48 3d 34 34 2e 34 00
Notification handle = 0x000e value,54 3d 31 39 2e 37 20 48 3d 34 34 2e 33 00

2018.10.24 16:18:09 4: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 31 39 2e 36 20 48 3d 34 34 2e 32 00
Notification handle = 0x000e value,54 3d 31 39 2e 36 20 48 3d 34 34 2e 30 00
Notification handle = 0x000e value,54 3d 31 39 2e 35 20 48 3d 34 34 2e 32 00
Notification handle = 0x000e value,54 3d 31 39 2e 36 20 48 3d 34 34 2e 34 00
Notification handle = 0x000e value,54 3d 31 39 2e 37 20 48 3d 34 34 2e 32 00
Notification handle = 0x000e value,54 3d 31 39 2e 36 20 48 3d 34 34 2e 32 00
Notification handle = 0x000e value,54 3d 31 39 2e 36 20 48 3d 34 34 2e 31 00
Notification handle = 0x000e value,54 3d 31 39 2e 36 20 48 3d 34 34 2e 32 00
Notification handle = 0x000e value,54 3d 31 39 2e 37 20 48 3d 34 34 2e 34 00
Notification handle = 0x000e value,54 3d 31 39 2e 37 20 48 3d 34 34 2e 33 00

2018.10.24 16:18:09 5: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Done: gatttool return string: TMP_Bu|4C:65:A8:D2:9B:E3|ok|write|0x10|{"gtResult":"54 3d 31 39 2e 36 20 48 3d 34 34 2e 32 00 "}
2018.10.24 16:18:09 4: XiaomiBTLESens (TMP_Bu) - ProcessingNotification
2018.10.24 16:18:09 4: XiaomiBTLESens (TMP_Bu) - ProcessingNotification: handle 0x10
2018.10.24 16:18:09 4: XiaomiBTLESens (TMP_Bu) - Thermo/Hygro Sens Handle0x10
2018.10.24 16:18:09 4: XiaomiBTLESens (TMP_Bu) - WriteReadings: Readings were written


Internals:
   BTMAC      4C:65:A8:D2:9B:E3
   CFGFN     
   DEF        4C:65:A8:D2:9B:E3
   INTERVAL   300
   NAME       TMP_Bu
   NOTIFYDEV  global,TMP_Bu
   NR         451
   NTFY_ORDER 50-TMP_Bu
   STATE      T: 19.6 H: =44.
   TYPE       XiaomiBTLESens
   VERSION    2.4.3
   loglevel   4
   READINGS:
     2018-10-24 08:39:05   battery         ok
     2018-10-24 08:39:05   batteryLevel    79
     2018-10-24 16:12:26   batteryPercent  79
     2018-10-24 16:12:26   batteryState    ok
     2018-06-12 10:14:03   firmware        00.00.66
     2018-10-24 16:18:09   humidity        =44.
     2018-10-24 13:56:42   lastGattError   charWrite faild
     2018-10-24 16:18:09   state           T: 19.6 H: =44.
     2018-10-24 16:18:09   temperature     19.6
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1540390346.67417
     updateTimestampCallBattery 2018-10-24 16:12:26
Attributes:
   alias      Büro
   hciDevice  hci0
   model      thermoHygroSens
   room       XiaomiBTLESens
   verbose    5



Die Änderung hatte ich aus dem Modul wiededr entfernt mit "update 74_XiaomiBTLESens.pm" und Neustart von fhem.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: smurphy am 24 Oktober 2018, 22:35:32
Zitat von: CoolTux am 24 Oktober 2018, 15:12:33
die 4.6 sind bestimmt die Luftfeuchte, oder?

Wieso steht da "4.6\0" Irgendwoher muß die /0 kommen.

Kannst Du bitte einmal das hier

print $readings{humidity} . "\n";


In Zeile 898 einfügen und dann einen reload 74_XiaomiBTLESens machen.

Guten Abend Cooltux,

ich habe das gerade so gemacht, wie von Dir vorgeschlagen.
Irgendwie wird das nicht besser.

Jetzt sieht man (manchmal) hinter der humidity so einen viereckigen Kasten.

2018.10.24 22:37:20 1: PERL WARNING: Argument "4.7\0" isn't numeric in addition (+) at (eval 581) line 1.
2018.10.24 22:37:20 3: eval: {ReadingsVal ("xiaomi1","temperature",0) + ReadingsVal ("xiaomi1","humidity",0)}
2018.10.24 22:37:20 1: PERL WARNING: Argument "4.7\0" isn't numeric in addition (+) at (eval 582) line 1.
2018.10.24 22:37:20 3: eval: {ReadingsVal ("xiaomi1","temperature",0) + ReadingsVal ("xiaomi1","humidity",0)}
2018.10.24 22:37:20 1: PERL WARNING: Argument "4.7\0" isn't numeric in addition (+) at (eval 583) line 1.
2018.10.24 22:37:20 3: eval: {ReadingsVal ("xiaomi1","temperature",0) + ReadingsVal ("xiaomi1","humidity",0)}




Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 25 Oktober 2018, 04:41:32
Besser kann es dadurch nicht werden. Ich wollte nur eine Ausgabe haben. Hast Du den auch ein Rekord gemacht oder FHEM neu gestartet?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: smurphy am 25 Oktober 2018, 06:07:38
Mit einen Record gemacht meinst du sicher einen neuen Wert abgerufen mit get sensordat?
Ja habe ich. Und ich habe auch das Modul neu geladen. Weil,ich die Ausgabe nicht gefunden habe, habe ich FHEM und schlussendlich sogar den raspi neu gestartet. Wo hätte denn die Ausgabe erscheinen sollen? Im FHEM.log? Es kam nichts. Deshalb habe ich den Screenshot der editierten Datei hochgeladen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 25 Oktober 2018, 06:54:37
Ja hätte eigentlich im FHEM Log erscheinen sollen. Ich schaue nachher noch mal
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: smurphy am 25 Oktober 2018, 07:52:48
4:41 / 6:54 ? Was machst du da mitten in der Nacht? ::) ::)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 25 Oktober 2018, 08:59:23
Na für Euch da sein  ;D
Also irgendwas hat sich in den letzten Wochen/Monaten geändert bei den Dingern. Gab es da ein Firmwareupdate oder so?

Ich lade mal ins Git eine neue Version.
@Invers @smurphy bitte testet ihr beide diese einmal unter den selben Umständen wie ihr aktuell testet.
https://github.com/LeonGaultier/fhem-XiaomiBTLESens/archive/master.zip

Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Invers am 25 Oktober 2018, 21:28:57
Hast du sehr gut gemacht. Läuft, behalte ich. :-))

Danke, super, wie immer!
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Dersch am 01 November 2018, 16:38:51
Ich habe 2 Sensoren mit dem Modul nun seit ein paar Monaten erfolgreich am laufen.

Nun sind es aber Topfpflanzen die Außen stehen und nun rein kommen. An beiden Orten habe ich einen Pi mit Bluetooth. Beides sind FHEM2FHEM "nodes" welche Ihre Sensoren an meine Hauptinstanz von FHEM übergeben.

Nun gibt es ja das ssh attr. Kann ich in der Hauptinstanz meines FHEM (ohne Bluetooth) die beiden Sensoren via SSH einbinden? Also je nach Ort und damit anderem Pi einfach die IP ändern?

Grüße
Dirk
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 01 November 2018, 16:49:23
Hallo Dirk,

Wenn ich Dich richtig verstanden habe dann sollte das ohne Probleme machbar sein. Bitte lese Dir durch welche Voraussetzungen für ssh gegeben sein müssen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Tobias am 01 November 2018, 20:54:05
Hi Dirk,
um völlig unabhängig zu sein kann ich nur empfehlen, die Daten nicht per FHEM2FHEM an die Hauptinstanz zu übergeben sondern alle Daten ins MQTT zu senden und von der Hauptinstanz per MQTT wieder einzubinden.
Damit ist man völlig von IP Adressen oder Clients losgelöst. Läuft bei mir seit einem Jahr super und stabil
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: skyline am 03 November 2018, 00:05:39
Hab nun einen USB-Stick laufen, welcher die Error-Sache noch mal verbessert hat.
Aber es kommt trotzdem noch weiter vor.

Zitat
Zitat:CoolTux
Es wird doch im state des Devices error geschrieben wenn es Probleme gab. Du kannst gerne ein Notify darauf ansetzen und einfach das holen der Daten noch einmal anstoßen. Solltest aber einen Zähler einbauen das nach 3-4 mal nichts mehr weiter gemacht wird.

Wäre das dann so korrekt?

define TF_RETRY notify EG_TF_.*:error {
my $loops = "3";
my $sleeptime = "10";
for(my $i = 1;$i <= $loops;$i++) { fhem "sleep $sleeptime; get $NAME sensorData;" }
}
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 03 November 2018, 03:54:18
Nein so wird das nichts.
Du musst den Zähler als Reading hinterlegen und abfragen. Wenn das Notify wieder an Sprint und der Zähler sagen wir mal 5 ist dann soll er aufhören ab zu rufen und es erst wieder bei der normalen Zeit machen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: skyline am 03 November 2018, 07:20:09
Wie bekomme ich das Reading denn dann wieder zurückgesetzt auf 0?
Vielleicht mit einer zusatzlichen if-Fuinktion, welche das Reading bei 5 wieder zurücksetzt?

Warum würde es denn so wie beschrieben nicht gehen?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 03 November 2018, 08:12:14

for(my $i = 1;$i <= $loops;$i++) { fhem "sleep $sleeptime; get $NAME sensorData;" }


Durchlaufe dieSchleife bei i=1 anfangend genau $loop mal und zähle $i immer um eins hoch nach jedem durchlauf.
Sende bei jedem durchlauf den Befehl fhem "sleep $sleeptime; get $NAME sensorData;"
er würde also ohne zu kontrollieren ob in einem Durchlauf der Befehl mal geklappt hat hart die x Befehle hintereinander weg senden


if ( ReadingsVal($NAME,'count',1) == 5 ) {
  CommandSet(undef, $self . ' inactive');
  fhem('sleep 15; set ' . $self . ' active');
}
elsif ( ReadingsVal($NAME,'count',1) < 5 ) {
  CommandGet(undef, $NAME . ' sensorData');
  readingsSingleUpdate( $defs{$shuttersDev} , 'count', ReadingsVal($NAME,'count',1) + 1, 0 );
}


Bei Fragen einfach Fragen
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: skyline am 03 November 2018, 12:30:55
Danke!!!
Stimmt natürlich.

Würde es denn auch so gehen?
define TF_RETRY notify EG_TF_.*:error {\
my $loops = "3";\
my $sleeptime = "10";\
for(my $i = 1;$i <= $loops;$i++) { \
if ('$EVENT' eq 'error'){\
    fhem "sleep $sleeptime; get $NAME sensorData" }\
}


oder so

define TF_RETRY notify EG_TF_.*:error {\
my $loops = "3";\
my $sleeptime = "10";\
for(my $i = 1;$i <= $loops;$i++) { \
if ( ReadingsVal('$NAME', 'state', 'undef') eq 'error'{\
    fhem "sleep $sleeptime; get $NAME sensorData" }\
}


Lerne ja noch ;-)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 03 November 2018, 12:46:04
Auf die schnelle würde ich sagen ist das selbe in Grün. Auch hier durchläuft er wieder die volle Anzahl an loops da $EVENT error wäre.
Davon ab ist hier $EVENT nie Error, da $EVENT aus "READING: READINGVALUE" besteht.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: skyline am 06 November 2018, 13:52:04
ZitatDavon ab ist hier $EVENT nie Error, da $EVENT aus "READING: READINGVALUE" besteht.

Ist das bei state nicht ein Sonderfall?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 06 November 2018, 13:57:05
bei state ja
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: skyline am 08 November 2018, 09:23:23
if ( ReadingsVal($NAME,'count',1) == 5 ) {
  CommandSet(undef, $self . ' inactive');
  fhem('sleep 15; set ' . $self . ' active');
}
elsif ( ReadingsVal($NAME,'count',1) < 5 ) {
  CommandGet(undef, $NAME . ' sensorData');
  readingsSingleUpdate( $defs{$shuttersDev} , 'count', ReadingsVal($NAME,'count',1) + 1, 0 );
}


Aber hier würde doch nie etwas den Zähler (Count) wieder auf 0 setzen.
Würde dann doch nur beim ersten mal klappen....oder?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 08 November 2018, 09:47:32
Zitat von: skyline am 08 November 2018, 09:23:23
if ( ReadingsVal($NAME,'count',1) == 5 ) {
  CommandSet(undef, $self . ' inactive');
  fhem('sleep 15; set ' . $self . ' active');
}
elsif ( ReadingsVal($NAME,'count',1) < 5 ) {
  CommandGet(undef, $NAME . ' sensorData');
  readingsSingleUpdate( $defs{$shuttersDev} , 'count', ReadingsVal($NAME,'count',1) + 1, 0 );
}


Aber hier würde doch nie etwas den Zähler (Count) wieder auf 0 setzen.
Würde dann doch nur beim ersten mal klappen....oder?

War ja auch nur exemplarisch zum drüber nachdenken gedacht, es ist keine fertige funktionierende Lösung.
Du musst natürlich den count dann wieder auf null setzen

if ( ReadingsVal($NAME,'count',1) == 5 ) {
  CommandSet(undef, $self . ' inactive');
  fhem('sleep 900; set ' . $self . ' active');
readingsSingleUpdate( $defs{$NAME} ,'count',0,0);
}
elsif ( ReadingsVal($NAME,'count',1) < 5 ) {
  CommandGet(undef, $NAME . ' sensorData');
  readingsSingleUpdate( $defs{$NAME} , 'count', ReadingsVal($NAME,'count',1) + 1, 0 );
}


Ist auch keine fertige Lösung und vor allem ungetestet
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: skyline am 08 November 2018, 12:36:59
Hmmm, aber wenn ich das notify auf inaktiv setze, würde es mir die anderen Devices nicht mehr überwachen.

Vielleicht sollte das doch mit ins Modul, da Bluetooth nicht so stabil läuft.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 08 November 2018, 12:57:11
Ich kann es mir bei Gelegenheit einmal in Ruhe anschauen. Aber das wird noch etwas dauern.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: skyline am 08 November 2018, 14:00:12
Das wäre super!!!
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: skyline am 14 November 2018, 21:37:24
Habe es (mit Hilfe) erstmal so hinbekommen.

Im Device
attr Device event-on-change-reading .*

attr Device userReadings  statevalue {
                                                      my $state = ReadingsVal($name, "state", "");
                                                      return "nok" if $state eq "error";
                                                      return "ok" if substr($state, 0, 1) eq "T";
                                                      return undef;
                                                      }

Im Notify
Device:statevalue:.nok {
                                   foreach $i (1..3) {
                                   fhem ("sleep 5;; get " . $NAME . " sensorData;; sleep 30");
                                   last if (ReadingsVal($NAME, "statevalue", "") eq "ok")}
                                   }


Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Typ1er am 19 November 2018, 10:10:30
Ich habe neuerdings relativ viele Probleme die Sensoren abzufragen.

- lastGattError: The BlockingCall Process terminated unexpectedly. Timedout
- lastGattError: Transport endpoint is not connected (107)
- ExecGatttool_Run: another gatttool process is running. waiting...
- unreachable

XiaomiBTLESens 2.4.4
Firmware ist 3.1.9

das "hcitool lescan" lief jetzt  nicht mehr, nur mit sudo und nach dem Neustart vom Bluetooth, da habe irgendwie was zerschossen, gibt es eine Möglichkeit hier alles auf Werkseinstellungen zu reseten ohne Neuinstallation?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: skyline am 20 November 2018, 09:13:15
@Typ1er

Läuft echt nicht so stabil die Sache, das Problem ist wohl gatttool an sich.

Ich hatte auch 3 USB-Bluetooth-Adapter mit Antenne bestellt und nur einer wollte laufen.

Mit diesem habe ich aber nach 1 bis 2 Tagen alles auf Error stehen.

Am besten klappt bei mir (RaspberryPi 3) die interne Bluetooth Lösung mit einer externen Antenne.

Vielleicht klappt das bei dir:
https://urbanjack.wordpress.com/2014/04/17/fix-bluez-keeps-crashing/ (https://urbanjack.wordpress.com/2014/04/17/fix-bluez-keeps-crashing/)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 20 November 2018, 09:43:42
Zitat von: Typ1er am 19 November 2018, 10:10:30
Ich habe neuerdings relativ viele Probleme die Sensoren abzufragen.

- lastGattError: The BlockingCall Process terminated unexpectedly. Timedout
- lastGattError: Transport endpoint is not connected (107)
- ExecGatttool_Run: another gatttool process is running. waiting...
- unreachable

XiaomiBTLESens 2.4.4
Firmware ist 3.1.9

das "hcitool lescan" lief jetzt  nicht mehr, nur mit sudo und nach dem Neustart vom Bluetooth, da habe irgendwie was zerschossen, gibt es eine Möglichkeit hier alles auf Werkseinstellungen zu reseten ohne Neuinstallation?

Starte bitte einmal den kompletten Rechner neu und schaue ob es dann besser läuft.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: kroonen am 20 November 2018, 16:39:15
Hi

I think have a bug. When the temperature is below 10 degrees, the humitiy is not ok. The humidity should be 66.7 and not 6.7



Internals:
   BTMAC      4C:65:A8:D1:7D:DC
   DEF        4C:65:A8:D1:7D:DC
   INTERVAL   120
   NAME       Schuurtemp
   NOTIFYDEV  global,Schuurtemp
   NR         23
   NTFY_ORDER 50-Schuurtemp
   STATE      T: 7.5  H: 6.7
   TYPE       XiaomiBTLESens
   VERSION    2.4.4
   loglevel   4
   READINGS:
     2018-11-20 06:53:52   batteryPercent  36
     2018-11-20 06:53:52   batteryState    ok
     2018-02-11 11:47:33   firmware        00.00.66
     2018-11-20 16:06:40   humidity        6.7
     2018-11-19 19:45:58   lastGattError   charWrite faild
     2018-11-20 16:06:40   state           T: 7.5  H: 6.7
     2018-11-20 16:06:40   temperature     7.5
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1542693232.29015
     updateTimestampCallBattery 2018-11-20 06:53:52
Attributes:
   interval   120
   model      thermoHygroSens
   room       XiaomiBTLESens

fhem>

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 20 November 2018, 18:07:21
Zitat von: kroonen am 20 November 2018, 16:39:15
Hi

I think have a bug. When the temperature is below 10 degrees, the humitiy is not ok. The humidity should be 66.7 and not 6.7



Internals:
   BTMAC      4C:65:A8:D1:7D:DC
   DEF        4C:65:A8:D1:7D:DC
   INTERVAL   120
   NAME       Schuurtemp
   NOTIFYDEV  global,Schuurtemp
   NR         23
   NTFY_ORDER 50-Schuurtemp
   STATE      T: 7.5  H: 6.7
   TYPE       XiaomiBTLESens
   VERSION    2.4.4
   loglevel   4
   READINGS:
     2018-11-20 06:53:52   batteryPercent  36
     2018-11-20 06:53:52   batteryState    ok
     2018-02-11 11:47:33   firmware        00.00.66
     2018-11-20 16:06:40   humidity        6.7
     2018-11-19 19:45:58   lastGattError   charWrite faild
     2018-11-20 16:06:40   state           T: 7.5  H: 6.7
     2018-11-20 16:06:40   temperature     7.5
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1542693232.29015
     updateTimestampCallBattery 2018-11-20 06:53:52
Attributes:
   interval   120
   model      thermoHygroSens
   room       XiaomiBTLESens

fhem>



can you please give me a verbose 5 log?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: kroonen am 20 November 2018, 22:53:34
Here an verbose log 5



2018.11.20 22:48:55 5: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 4C:65:A8:D1:7D:DC --char-read -a 0x18 2>&1 /dev/null and loop 0
2018.11.20 22:48:58 5: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,24

2018.11.20 22:48:58 4: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,24

2018.11.20 22:48:58 5: Cmd: >{BlockingStart('1')}<
2018.11.20 22:48:58 5: Cmd: >{XiaomiBTLESens::ExecGatttool_Done('Schuurtemp|4C:65:A8:D1:7D:DC|ok|read|0x18|{"gtResult":"24 "}')}<
2018.11.20 22:48:58 5: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Done: gatttool return string: Schuurtemp|4C:65:A8:D1:7D:DC|ok|read|0x18|{"gtResult":"24 "}
2018.11.20 22:48:58 4: XiaomiBTLESens (Schuurtemp) - ProcessingNotification
2018.11.20 22:48:58 4: XiaomiBTLESens (Schuurtemp) - ProcessingNotification: handle 0x18
2018.11.20 22:48:58 4: XiaomiBTLESens (Schuurtemp) - Thermo/Hygro Sens Handle0x18
2018.11.20 22:48:58 5: Starting notify loop for Schuurtemp, 3 event(s), first is batteryPercent: 36
2018.11.20 22:48:58 5: Notify for Schuurtemp
2018.11.20 22:48:58 5: batteryPercent: 36, 'batteryPercent', '36'
2018.11.20 22:48:58 5: MQTT mqtt message sent: Publish/at-most-once,retain /Schuurtemp/Schuurtemp/Batt
  33 36                                            36
2018.11.20 22:48:58 5: SW: 311f001b2f53636875757274656d702f53636875757274656d702f426174743336
2018.11.20 22:48:58 5: Starting notify loop for schuurtemp_mqtt, 1 event(s), first is transmission-state: outgoing publish sent
2018.11.20 22:48:58 5: End notify loop for schuurtemp_mqtt
2018.11.20 22:48:58 5: batteryState: ok, 'batteryState', 'ok'
2018.11.20 22:48:58 5: T: 7.3 H: 7.6, 'T', '7.3 H: 7.6'
2018.11.20 22:48:58 5: End notify loop for Schuurtemp
2018.11.20 22:48:58 4: XiaomiBTLESens (Schuurtemp) - WriteReadings: Readings were written
2018.11.20 22:48:58 4: XiaomiBTLESens (Schuurtemp) - Run CreateParamGatttool with mod: write
2018.11.20 22:48:58 4: BlockingCall (XiaomiBTLESens::ExecGatttool_Run): created child (28777), uses telnetPort to connect back
2018.11.20 22:48:58 5: Starting notify loop for Schuurtemp, 1 event(s), first is write sensor data
2018.11.20 22:48:58 5: Notify for Schuurtemp
2018.11.20 22:48:58 5: write sensor data, 'write sensor data', ''
2018.11.20 22:48:58 5: End notify loop for Schuurtemp
2018.11.20 22:48:58 5: XiaomiBTLESens (Schuurtemp) - Write XiaomiBTLESens_ExecGatttool_Run Schuurtemp|4C:65:A8:D1:7D:DC|write|0x10|0100
2018.11.20 22:48:58 4: Connection accepted from telnetPort_127.0.0.1_54422
2018.11.20 22:48:58 5: Cmd: >{BlockingRegisterTelnet($cl,2)}<
2018.11.20 22:48:58 5: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D1:7D:DC --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.11.20 22:49:08 5: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 37 2e 33 20 48 3d 36 37 2e 34 00
Notification handle = 0x000e value,54 3d 37 2e 32 20 48 3d 36 37 2e 36 00
Notification handle = 0x000e value,54 3d 37 2e 33 20 48 3d 36 37 2e 38 00
Notification handle = 0x000e value,54 3d 37 2e 34 20 48 3d 36 37 2e 37 00
Notification handle = 0x000e value,54 3d 37 2e 33 20 48 3d 36 37 2e 37 00
Notification handle = 0x000e value,54 3d 37 2e 33 20 48 3d 36 37 2e 38 00
Notification handle = 0x000e value,54 3d 37 2e 33 20 48 3d 36 37 2e 37 00

2018.11.20 22:49:08 4: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 37 2e 33 20 48 3d 36 37 2e 34 00
Notification handle = 0x000e value,54 3d 37 2e 32 20 48 3d 36 37 2e 36 00
Notification handle = 0x000e value,54 3d 37 2e 33 20 48 3d 36 37 2e 38 00
Notification handle = 0x000e value,54 3d 37 2e 34 20 48 3d 36 37 2e 37 00
Notification handle = 0x000e value,54 3d 37 2e 33 20 48 3d 36 37 2e 37 00
Notification handle = 0x000e value,54 3d 37 2e 33 20 48 3d 36 37 2e 38 00
Notification handle = 0x000e value,54 3d 37 2e 33 20 48 3d 36 37 2e 37 00

2018.11.20 22:49:08 5: Cmd: >{BlockingStart('2')}<
2018.11.20 22:49:08 5: Cmd: >{XiaomiBTLESens::ExecGatttool_Done('Schuurtemp|4C:65:A8:D1:7D:DC|ok|write|0x10|{"gtResult":"54 3d 37 2e 33 20 48 3d 36 37 2e 34 00 "}')}<
2018.11.20 22:49:08 5: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Done: gatttool return string: Schuurtemp|4C:65:A8:D1:7D:DC|ok|write|0x10|{"gtResult":"54 3d 37 2e 33 20 48 3d 36 37 2e 34 00 "}
2018.11.20 22:49:08 4: XiaomiBTLESens (Schuurtemp) - ProcessingNotification
2018.11.20 22:49:08 4: XiaomiBTLESens (Schuurtemp) - ProcessingNotification: handle 0x10
2018.11.20 22:49:08 4: XiaomiBTLESens (Schuurtemp) - Thermo/Hygro Sens Handle0x10
2018.11.20 22:49:08 5: Starting notify loop for Schuurtemp, 3 event(s), first is temperature: 7.3
2018.11.20 22:49:08 5: Notify for Schuurtemp
2018.11.20 22:49:08 5: temperature: 7.3 , 'temperature', '7.3 '
2018.11.20 22:49:08 5: MQTT mqtt message sent: Publish/at-most-once,retain /Schuurtemp/Schuurtemp/Temperature
  37 2e 33 20                                      7.3
2018.11.20 22:49:08 5: SW: 312800222f53636875757274656d702f53636875757274656d702f54656d7065726174757265372e3320
2018.11.20 22:49:08 5: Starting notify loop for schuurtemp_mqtt, 1 event(s), first is transmission-state: outgoing publish sent
2018.11.20 22:49:08 5: End notify loop for schuurtemp_mqtt
2018.11.20 22:49:08 5: humidity: 7.4, 'humidity', '7.4'
2018.11.20 22:49:08 5: MQTT mqtt message sent: Publish/at-most-once,retain /Schuurtemp/Schuurtemp/Humidity
  37 2e 34 00                                      7.4.
2018.11.20 22:49:08 5: SW: 3125001f2f53636875757274656d702f53636875757274656d702f48756d6964697479372e3400
2018.11.20 22:49:08 5: Starting notify loop for schuurtemp_mqtt, 1 event(s), first is transmission-state: outgoing publish sent
2018.11.20 22:49:08 5: End notify loop for schuurtemp_mqtt
2018.11.20 22:49:08 5: T: 7.3  H: 7.4, 'T', '7.3  H: 7.4'
2018.11.20 22:49:08 5: End notify loop for Schuurtemp
2018.11.20 22:49:08 4: XiaomiBTLESens (Schuurtemp) - WriteReadings: Readings were written
2018.11.20 22:49:12 4: Connection accepted from WEB_192.168.180.32_56849
2018.11.20 22:49:12 4: WEB_192.168.180.32_56849 GET /fhem; BUFLEN:0
2018.11.20 22:49:12 4: WEB: /fhem / RL:1256 / text/html; charset=UTF-8 / Content-Encoding: gzip
/
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 21 November 2018, 12:12:04
Zitat von: kroonen am 20 November 2018, 22:53:34
Here an verbose log 5



2018.11.20 22:48:55 5: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 4C:65:A8:D1:7D:DC --char-read -a 0x18 2>&1 /dev/null and loop 0
2018.11.20 22:48:58 5: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,24

2018.11.20 22:48:58 4: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,24

2018.11.20 22:48:58 5: Cmd: >{BlockingStart('1')}<
2018.11.20 22:48:58 5: Cmd: >{XiaomiBTLESens::ExecGatttool_Done('Schuurtemp|4C:65:A8:D1:7D:DC|ok|read|0x18|{"gtResult":"24 "}')}<
2018.11.20 22:48:58 5: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Done: gatttool return string: Schuurtemp|4C:65:A8:D1:7D:DC|ok|read|0x18|{"gtResult":"24 "}
2018.11.20 22:48:58 4: XiaomiBTLESens (Schuurtemp) - ProcessingNotification
2018.11.20 22:48:58 4: XiaomiBTLESens (Schuurtemp) - ProcessingNotification: handle 0x18
2018.11.20 22:48:58 4: XiaomiBTLESens (Schuurtemp) - Thermo/Hygro Sens Handle0x18
2018.11.20 22:48:58 5: Starting notify loop for Schuurtemp, 3 event(s), first is batteryPercent: 36
2018.11.20 22:48:58 5: Notify for Schuurtemp
2018.11.20 22:48:58 5: batteryPercent: 36, 'batteryPercent', '36'
2018.11.20 22:48:58 5: MQTT mqtt message sent: Publish/at-most-once,retain /Schuurtemp/Schuurtemp/Batt
  33 36                                            36
2018.11.20 22:48:58 5: SW: 311f001b2f53636875757274656d702f53636875757274656d702f426174743336
2018.11.20 22:48:58 5: Starting notify loop for schuurtemp_mqtt, 1 event(s), first is transmission-state: outgoing publish sent
2018.11.20 22:48:58 5: End notify loop for schuurtemp_mqtt
2018.11.20 22:48:58 5: batteryState: ok, 'batteryState', 'ok'
2018.11.20 22:48:58 5: T: 7.3 H: 7.6, 'T', '7.3 H: 7.6'
2018.11.20 22:48:58 5: End notify loop for Schuurtemp
2018.11.20 22:48:58 4: XiaomiBTLESens (Schuurtemp) - WriteReadings: Readings were written
2018.11.20 22:48:58 4: XiaomiBTLESens (Schuurtemp) - Run CreateParamGatttool with mod: write
2018.11.20 22:48:58 4: BlockingCall (XiaomiBTLESens::ExecGatttool_Run): created child (28777), uses telnetPort to connect back
2018.11.20 22:48:58 5: Starting notify loop for Schuurtemp, 1 event(s), first is write sensor data
2018.11.20 22:48:58 5: Notify for Schuurtemp
2018.11.20 22:48:58 5: write sensor data, 'write sensor data', ''
2018.11.20 22:48:58 5: End notify loop for Schuurtemp
2018.11.20 22:48:58 5: XiaomiBTLESens (Schuurtemp) - Write XiaomiBTLESens_ExecGatttool_Run Schuurtemp|4C:65:A8:D1:7D:DC|write|0x10|0100
2018.11.20 22:48:58 4: Connection accepted from telnetPort_127.0.0.1_54422
2018.11.20 22:48:58 5: Cmd: >{BlockingRegisterTelnet($cl,2)}<
2018.11.20 22:48:58 5: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D1:7D:DC --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.11.20 22:49:08 5: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 37 2e 33 20 48 3d 36 37 2e 34 00
Notification handle = 0x000e value,54 3d 37 2e 32 20 48 3d 36 37 2e 36 00
Notification handle = 0x000e value,54 3d 37 2e 33 20 48 3d 36 37 2e 38 00
Notification handle = 0x000e value,54 3d 37 2e 34 20 48 3d 36 37 2e 37 00
Notification handle = 0x000e value,54 3d 37 2e 33 20 48 3d 36 37 2e 37 00
Notification handle = 0x000e value,54 3d 37 2e 33 20 48 3d 36 37 2e 38 00
Notification handle = 0x000e value,54 3d 37 2e 33 20 48 3d 36 37 2e 37 00

2018.11.20 22:49:08 4: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 37 2e 33 20 48 3d 36 37 2e 34 00
Notification handle = 0x000e value,54 3d 37 2e 32 20 48 3d 36 37 2e 36 00
Notification handle = 0x000e value,54 3d 37 2e 33 20 48 3d 36 37 2e 38 00
Notification handle = 0x000e value,54 3d 37 2e 34 20 48 3d 36 37 2e 37 00
Notification handle = 0x000e value,54 3d 37 2e 33 20 48 3d 36 37 2e 37 00
Notification handle = 0x000e value,54 3d 37 2e 33 20 48 3d 36 37 2e 38 00
Notification handle = 0x000e value,54 3d 37 2e 33 20 48 3d 36 37 2e 37 00

2018.11.20 22:49:08 5: Cmd: >{BlockingStart('2')}<
2018.11.20 22:49:08 5: Cmd: >{XiaomiBTLESens::ExecGatttool_Done('Schuurtemp|4C:65:A8:D1:7D:DC|ok|write|0x10|{"gtResult":"54 3d 37 2e 33 20 48 3d 36 37 2e 34 00 "}')}<
2018.11.20 22:49:08 5: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Done: gatttool return string: Schuurtemp|4C:65:A8:D1:7D:DC|ok|write|0x10|{"gtResult":"54 3d 37 2e 33 20 48 3d 36 37 2e 34 00 "}
2018.11.20 22:49:08 4: XiaomiBTLESens (Schuurtemp) - ProcessingNotification
2018.11.20 22:49:08 4: XiaomiBTLESens (Schuurtemp) - ProcessingNotification: handle 0x10
2018.11.20 22:49:08 4: XiaomiBTLESens (Schuurtemp) - Thermo/Hygro Sens Handle0x10
2018.11.20 22:49:08 5: Starting notify loop for Schuurtemp, 3 event(s), first is temperature: 7.3
2018.11.20 22:49:08 5: Notify for Schuurtemp
2018.11.20 22:49:08 5: temperature: 7.3 , 'temperature', '7.3 '
2018.11.20 22:49:08 5: MQTT mqtt message sent: Publish/at-most-once,retain /Schuurtemp/Schuurtemp/Temperature
  37 2e 33 20                                      7.3
2018.11.20 22:49:08 5: SW: 312800222f53636875757274656d702f53636875757274656d702f54656d7065726174757265372e3320
2018.11.20 22:49:08 5: Starting notify loop for schuurtemp_mqtt, 1 event(s), first is transmission-state: outgoing publish sent
2018.11.20 22:49:08 5: End notify loop for schuurtemp_mqtt
2018.11.20 22:49:08 5: humidity: 7.4, 'humidity', '7.4'
2018.11.20 22:49:08 5: MQTT mqtt message sent: Publish/at-most-once,retain /Schuurtemp/Schuurtemp/Humidity
  37 2e 34 00                                      7.4.
2018.11.20 22:49:08 5: SW: 3125001f2f53636875757274656d702f53636875757274656d702f48756d6964697479372e3400
2018.11.20 22:49:08 5: Starting notify loop for schuurtemp_mqtt, 1 event(s), first is transmission-state: outgoing publish sent
2018.11.20 22:49:08 5: End notify loop for schuurtemp_mqtt
2018.11.20 22:49:08 5: T: 7.3  H: 7.4, 'T', '7.3  H: 7.4'
2018.11.20 22:49:08 5: End notify loop for Schuurtemp
2018.11.20 22:49:08 4: XiaomiBTLESens (Schuurtemp) - WriteReadings: Readings were written
2018.11.20 22:49:12 4: Connection accepted from WEB_192.168.180.32_56849
2018.11.20 22:49:12 4: WEB_192.168.180.32_56849 GET /fhem; BUFLEN:0
2018.11.20 22:49:12 4: WEB: /fhem / RL:1256 / text/html; charset=UTF-8 / Content-Encoding: gzip
/


Ok i have write a fix. Can you test the attatched file?

Alle anderen die auch den thermoHygroSens verwenden bitte ich ebenfalls zu testen. Es gab hier einen User mit Tifkühltruhe, und andere bei den das = im Reading stand. Bitte diese User auch testen. Dank roonen weiß ich wieder wieso ich damals diese Unterschiede gemacht hatte. Ich hoffe ich habe das passend aus gebaut.


Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: kroonen am 22 November 2018, 08:08:13
Hi,

Looks ok now, thnx for the support


   STATE      T: 7.4  H: 68.1
   TYPE       XiaomiBTLESens
   VERSION    2.4.5
   loglevel   4
   READINGS:
     2018-11-22 08:01:40   batteryPercent  36
     2018-11-22 08:01:40   batteryState    ok
     2018-02-11 11:47:33   firmware        00.00.66
     2018-11-22 08:04:09   humidity        68.1
     2018-11-21 20:58:15   lastGattError   charWrite faild
     2018-11-22 08:04:09   state           T: 7.4  H: 68.1
     2018-11-22 08:04:09   temperature     7.4
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1542870100.28165
     updateTimestampCallBattery 2018-11-22 08:01:40
Attributes:
   interval   120
   model      thermoHygroSens
   room       XiaomiBTLESens


Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 22 November 2018, 08:48:35
fine, thanks for testing.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 22 November 2018, 12:26:57
Morgen früh kommt ein Update.


Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: kroonen am 23 November 2018, 16:29:52
Hi,

I updated my other, and these took the intern temp and humidity, and this is not correct anymore (strang characters)

NOTIFYDEV  global,Mayatemp
   NR         37
   NTFY_ORDER 50-Mayatemp
   STATE      Temp 16.9°C / Hum C?b%
   TYPE       XiaomiBTLESens
   VERSION    2.4.5
   loglevel   4
   READINGS:
     2018-06-28 18:59:02   battery         ok
     2018-06-28 18:59:02   batteryLevel    79
     2018-11-23 15:38:04   batteryPercent  42
     2018-11-23 15:38:04   batteryState    ok
     2018-02-22 11:23:20   firmware        00.00.66
     2018-11-23 16:23:41   humidity        C?b
     2018-11-23 12:24:38   lastGattError   charWrite faild
     2018-11-23 16:23:41   state           T: 16.9 H: C?b
     2018-11-23 16:23:41   temperature     16.9



Debug loglevel5 2 sensors
2018.11.23 16:28:04 5: XiaomiBTLESens (Mayatemp) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,2a

2018.11.23 16:28:04 4: XiaomiBTLESens (Mayatemp) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,2a

2018.11.23 16:28:04 5: Cmd: >{BlockingStart('1')}<
2018.11.23 16:28:04 5: Cmd: >{XiaomiBTLESens::ExecGatttool_Done('Mayatemp|4C:65:A8:D1:E8:DB|ok|read|0x18|{"gtResult":"2a "}')}<
2018.11.23 16:28:04 5: XiaomiBTLESens (Mayatemp) - ExecGatttool_Done: gatttool return string: Mayatemp|4C:65:A8:D1:E8:DB|ok|read|0x18|{"gtResult":"2a "}
2018.11.23 16:28:04 4: XiaomiBTLESens (Mayatemp) - ProcessingNotification
2018.11.23 16:28:04 4: XiaomiBTLESens (Mayatemp) - ProcessingNotification: handle 0x18
2018.11.23 16:28:04 4: XiaomiBTLESens (Mayatemp) - Thermo/Hygro Sens Handle0x18
2018.11.23 16:28:04 5: Starting notify loop for Mayatemp, 3 event(s), first is batteryPercent: 42
2018.11.23 16:28:04 5: Notify for Mayatemp
2018.11.23 16:28:04 5: batteryPercent: 42, 'batteryPercent', '42'
2018.11.23 16:28:04 5: MQTT mqtt message sent: Publish/at-most-once,retain /Mayakamer-Sensor/Mayakamertemp/Batt
  34 32                                            42
2018.11.23 16:28:04 5: SW: 312800242f4d6179616b616d65722d53656e736f722f4d6179616b616d657274656d702f426174743432
2018.11.23 16:28:04 5: Starting notify loop for mayatemp_mqtt, 1 event(s), first is transmission-state: outgoing publish sent
2018.11.23 16:28:04 5: End notify loop for mayatemp_mqtt
2018.11.23 16:28:04 5: batteryState: ok, 'batteryState', 'ok'
2018.11.23 16:28:04 5: T: 17.0 H: C�r, 'T', '17.0 H: C�r'
2018.11.23 16:28:04 5: End notify loop for Mayatemp
2018.11.23 16:28:04 4: XiaomiBTLESens (Mayatemp) - WriteReadings: Readings were written
2018.11.23 16:28:04 4: XiaomiBTLESens (Mayatemp) - Run CreateParamGatttool with mod: write
2018.11.23 16:28:04 4: BlockingCall (XiaomiBTLESens::ExecGatttool_Run): created child (11789), uses telnetPort to connect back
2018.11.23 16:28:04 5: Starting notify loop for Mayatemp, 1 event(s), first is write sensor data
2018.11.23 16:28:04 5: Notify for Mayatemp
2018.11.23 16:28:04 5: write sensor data, 'write sensor data', ''
2018.11.23 16:28:04 5: End notify loop for Mayatemp
2018.11.23 16:28:04 5: XiaomiBTLESens (Mayatemp) - Write XiaomiBTLESens_ExecGatttool_Run Mayatemp|4C:65:A8:D1:E8:DB|write|0x10|0100
2018.11.23 16:28:04 4: Connection accepted from telnetPort_127.0.0.1_52630
2018.11.23 16:28:04 5: Cmd: >{BlockingRegisterTelnet($cl,3)}<
2018.11.23 16:28:04 5: XiaomiBTLESens (Mayatemp) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D1:E8:DB --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.11.23 16:28:05 4: Connection accepted from WEB_192.168.180.32_63217
2018.11.23 16:28:05 4: Connection closed for WEB_192.168.180.32_63217: EOF
2018.11.23 16:28:05 4: Connection accepted from WEB_192.168.180.32_63219
2018.11.23 16:28:08 5: XiaomiBTLESens (Slaaptemp) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,23

2018.11.23 16:28:08 4: XiaomiBTLESens (Slaaptemp) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,23

2018.11.23 16:28:08 5: Cmd: >{BlockingStart('2')}<
2018.11.23 16:28:08 5: Cmd: >{XiaomiBTLESens::ExecGatttool_Done('Slaaptemp|4C:65:A8:D1:E3:0C|ok|read|0x18|{"gtResult":"23 "}')}<
2018.11.23 16:28:08 5: XiaomiBTLESens (Slaaptemp) - ExecGatttool_Done: gatttool return string: Slaaptemp|4C:65:A8:D1:E3:0C|ok|read|0x18|{"gtResult":"23 "}
2018.11.23 16:28:08 4: XiaomiBTLESens (Slaaptemp) - ProcessingNotification
2018.11.23 16:28:08 4: XiaomiBTLESens (Slaaptemp) - ProcessingNotification: handle 0x18
2018.11.23 16:28:08 4: XiaomiBTLESens (Slaaptemp) - Thermo/Hygro Sens Handle0x18
2018.11.23 16:28:08 5: Starting notify loop for Slaaptemp, 3 event(s), first is batteryPercent: 35
2018.11.23 16:28:08 5: createNotifyHash
2018.11.23 16:28:08 5: Notify for Slaaptemp
2018.11.23 16:28:08 5: batteryPercent: 35, 'batteryPercent', '35'
2018.11.23 16:28:08 5: MQTT mqtt message sent: Publish/at-most-once,retain /Slaapkamer-Sensor/Slaapkamertemp/Batt
  33 35                                            35
2018.11.23 16:28:08 5: SW: 312a00262f536c6161706b616d65722d53656e736f722f536c6161706b616d657274656d702f426174743335
2018.11.23 16:28:08 5: Starting notify loop for slaaptemp_mqtt, 1 event(s), first is transmission-state: outgoing publish sent
2018.11.23 16:28:08 5: End notify loop for slaaptemp_mqtt
2018.11.23 16:28:08 5: batteryState: ok, 'batteryState', 'ok'
2018.11.23 16:28:08 5: T: 15.5 H: C�R, 'T', '15.5 H: C�R'
2018.11.23 16:28:08 5: End notify loop for Slaaptemp
2018.11.23 16:28:08 4: XiaomiBTLESens (Slaaptemp) - WriteReadings: Readings were written
2018.11.23 16:28:08 4: XiaomiBTLESens (Slaaptemp) - Run CreateParamGatttool with mod: write
2018.11.23 16:28:08 4: BlockingCall (XiaomiBTLESens::ExecGatttool_Run): created child (11800), uses telnetPort to connect back
2018.11.23 16:28:08 5: Starting notify loop for Slaaptemp, 1 event(s), first is write sensor data
2018.11.23 16:28:08 5: Notify for Slaaptemp
2018.11.23 16:28:08 5: write sensor data, 'write sensor data', ''
2018.11.23 16:28:08 5: End notify loop for Slaaptemp
2018.11.23 16:28:08 5: XiaomiBTLESens (Slaaptemp) - Write XiaomiBTLESens_ExecGatttool_Run Slaaptemp|4C:65:A8:D1:E3:0C|write|0x10|0100
2018.11.23 16:28:08 4: Connection accepted from telnetPort_127.0.0.1_52632
2018.11.23 16:28:08 5: Cmd: >{BlockingRegisterTelnet($cl,4)}<
2018.11.23 16:28:08 5: XiaomiBTLESens (Slaaptemp) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D1:E3:0C --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.11.23 16:28:14 5: XiaomiBTLESens (Mayatemp) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 31 36 2e 39 20 48 3d 35 30 2e 38 00
Notification handle = 0x000e value,54 3d 31 37 2e 30 20 48 3d 35 30 2e 36 00
Notification handle = 0x000e value,54 3d 31 36 2e 39 20 48 3d 35 30 2e 37 00
Notification handle = 0x000e value,54 3d 31 36 2e 39 20 48 3d 35 30 2e 36 00
Notification handle = 0x000e value,54 3d 31 36 2e 39 20 48 3d 35 30 2e 38 00
Notification handle = 0x000e value,54 3d 31 37 2e 30 20 48 3d 35 30 2e 36 00
Notification handle = 0x000e value,54 3d 31 36 2e 39 20 48 3d 35 30 2e 37 00
Notification handle = 0x000e value,54 3d 31 36 2e 39 20 48 3d 35 30 2e 36 00
Notification handle = 0x000e value,54 3d 31 36 2e 39 20 48 3d 35 30 2e 37 00
Notification handle = 0x000e value,54 3d 31 36 2e 39 20 48 3d 35 30 2e 36 00

2018.11.23 16:28:14 4: XiaomiBTLESens (Mayatemp) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 31 36 2e 39 20 48 3d 35 30 2e 38 00
Notification handle = 0x000e value,54 3d 31 37 2e 30 20 48 3d 35 30 2e 36 00
Notification handle = 0x000e value,54 3d 31 36 2e 39 20 48 3d 35 30 2e 37 00
Notification handle = 0x000e value,54 3d 31 36 2e 39 20 48 3d 35 30 2e 36 00
Notification handle = 0x000e value,54 3d 31 36 2e 39 20 48 3d 35 30 2e 38 00
Notification handle = 0x000e value,54 3d 31 37 2e 30 20 48 3d 35 30 2e 36 00
Notification handle = 0x000e value,54 3d 31 36 2e 39 20 48 3d 35 30 2e 37 00
Notification handle = 0x000e value,54 3d 31 36 2e 39 20 48 3d 35 30 2e 36 00
Notification handle = 0x000e value,54 3d 31 36 2e 39 20 48 3d 35 30 2e 37 00
Notification handle = 0x000e value,54 3d 31 36 2e 39 20 48 3d 35 30 2e 36 00

2018.11.23 16:28:14 5: Cmd: >{BlockingStart('3')}<
2018.11.23 16:28:14 5: Cmd: >{XiaomiBTLESens::ExecGatttool_Done('Mayatemp|4C:65:A8:D1:E8:DB|ok|write|0x10|{"gtResult":"54 3d 31 36 2e 39 20 48 3d 35 30 2e 38 00 "}')}<
2018.11.23 16:28:14 5: XiaomiBTLESens (Mayatemp) - ExecGatttool_Done: gatttool return string: Mayatemp|4C:65:A8:D1:E8:DB|ok|write|0x10|{"gtResult":"54 3d 31 36 2e 39 20 48 3d 35 30 2e 38 00 "}
2018.11.23 16:28:14 4: XiaomiBTLESens (Mayatemp) - ProcessingNotification
2018.11.23 16:28:14 4: XiaomiBTLESens (Mayatemp) - ProcessingNotification: handle 0x10
2018.11.23 16:28:14 4: XiaomiBTLESens (Mayatemp) - Thermo/Hygro Sens Handle0x10
2018.11.23 16:28:14 5: Starting notify loop for Mayatemp, 3 event(s), first is temperature: 16.9
2018.11.23 16:28:14 5: Notify for Mayatemp
2018.11.23 16:28:14 5: temperature: 16.9, 'temperature', '16.9'
2018.11.23 16:28:14 5: MQTT mqtt message sent: Publish/at-most-once,retain /Mayakamer-Sensor/Mayakamertemp/Temperature
  31 36 2e 39                                      16.9
2018.11.23 16:28:14 5: SW: 3131002b2f4d6179616b616d65722d53656e736f722f4d6179616b616d657274656d702f54656d706572617475726531362e39
2018.11.23 16:28:14 5: Starting notify loop for mayatemp_mqtt, 1 event(s), first is transmission-state: outgoing publish sent
2018.11.23 16:28:14 5: End notify loop for mayatemp_mqtt
2018.11.23 16:28:14 5: humidity: C�b, 'humidity', 'C�b'
2018.11.23 16:28:14 5: MQTT mqtt message sent: Publish/at-most-once,retain /Mayakamer-Sensor/Mayakamertemp/Humidity
  43 d3 13 62                                      C..b
2018.11.23 16:28:14 5: SW: 312e00282f4d6179616b616d65722d53656e736f722f4d6179616b616d657274656d702f48756d696469747943d31362
2018.11.23 16:28:14 5: Starting notify loop for mayatemp_mqtt, 1 event(s), first is transmission-state: outgoing publish sent
2018.11.23 16:28:14 5: End notify loop for mayatemp_mqtt
2018.11.23 16:28:14 5: T: 16.9 H: C�b, 'T', '16.9 H: C�b'
2018.11.23 16:28:14 5: End notify loop for Mayatemp
2018.11.23 16:28:14 4: XiaomiBTLESens (Mayatemp) - WriteReadings: Readings were written
2018.11.23 16:28:18 5: XiaomiBTLESens (Slaaptemp) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 31 35 2e 34 20 48 3d 35 35 2e 39 00
Notification handle = 0x000e value,54 3d 31 35 2e 34 20 48 3d 35 36 2e 31 00
Notification handle = 0x000e value,54 3d 31 35 2e 34 20 48 3d 35 36 2e 32 00
Notification handle = 0x000e value,54 3d 31 35 2e 35 20 48 3d 35 36 2e 31 00

2018.11.23 16:28:18 4: XiaomiBTLESens (Slaaptemp) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 31 35 2e 34 20 48 3d 35 35 2e 39 00
Notification handle = 0x000e value,54 3d 31 35 2e 34 20 48 3d 35 36 2e 31 00
Notification handle = 0x000e value,54 3d 31 35 2e 34 20 48 3d 35 36 2e 32 00
Notification handle = 0x000e value,54 3d 31 35 2e 35 20 48 3d 35 36 2e 31 00

2018.11.23 16:28:18 5: Cmd: >{BlockingStart('4')}<
2018.11.23 16:28:18 5: Cmd: >{XiaomiBTLESens::ExecGatttool_Done('Slaaptemp|4C:65:A8:D1:E3:0C|ok|write|0x10|{"gtResult":"54 3d 31 35 2e 34 20 48 3d 35 35 2e 39 00 "}')}<
2018.11.23 16:28:18 5: XiaomiBTLESens (Slaaptemp) - ExecGatttool_Done: gatttool return string: Slaaptemp|4C:65:A8:D1:E3:0C|ok|write|0x10|{"gtResult":"54 3d 31 35 2e 34 20 48 3d 35 35 2e 39 00 "}
2018.11.23 16:28:18 4: XiaomiBTLESens (Slaaptemp) - ProcessingNotification
2018.11.23 16:28:18 4: XiaomiBTLESens (Slaaptemp) - ProcessingNotification: handle 0x10
2018.11.23 16:28:18 4: XiaomiBTLESens (Slaaptemp) - Thermo/Hygro Sens Handle0x10
2018.11.23 16:28:18 5: Starting notify loop for Slaaptemp, 3 event(s), first is temperature: 15.4
2018.11.23 16:28:18 5: Notify for Slaaptemp
2018.11.23 16:28:18 5: temperature: 15.4, 'temperature', '15.4'
2018.11.23 16:28:18 5: MQTT mqtt message sent: Publish/at-most-once,retain /Slaapkamer-Sensor/Slaapkamertemp/Temperature
  31 35 2e 34                                      15.4
2018.11.23 16:28:18 5: SW: 3133002d2f536c6161706b616d65722d53656e736f722f536c6161706b616d657274656d702f54656d706572617475726531352e34
2018.11.23 16:28:18 5: Starting notify loop for slaaptemp_mqtt, 1 event(s), first is transmission-state: outgoing publish sent
2018.11.23 16:28:18 5: End notify loop for slaaptemp_mqtt
2018.11.23 16:28:18 5: humidity: C�R, 'humidity', 'C�R'
2018.11.23 16:28:18 5: MQTT mqtt message sent: Publish/at-most-once,retain /Slaapkamer-Sensor/Slaapkamertemp/Humidity
  43 d3 13 52                                      C..R
2018.11.23 16:28:18 5: SW: 3130002a2f536c6161706b616d65722d53656e736f722f536c6161706b616d657274656d702f48756d696469747943d31352
2018.11.23 16:28:18 5: Starting notify loop for slaaptemp_mqtt, 1 event(s), first is transmission-state: outgoing publish sent
2018.11.23 16:28:18 5: End notify loop for slaaptemp_mqtt
2018.11.23 16:28:18 5: T: 15.4 H: C�R, 'T', '15.4 H: C�R'
2018.11.23 16:28:18 5: End notify loop for Slaaptemp
2018.11.23 16:28:18 4: XiaomiBTLESens (Slaaptemp) - WriteReadings: Readings were written
2018.11.23 16:28:27 4: WEB_192.168.180.32_63210 GET /fhem/FileLog_logWrapper?dev=Logfile&type=text&file=fhem-2018-11.log; BUFLEN:0
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 23 November 2018, 22:28:49
Hello. I can understand the mistake and will offer a fix for the days.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 23 November 2018, 22:51:56
The fix comes tomorrow morning via update
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: kroonen am 24 November 2018, 12:09:06
Thnx, it works now for all the devices correct

regards Richard
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Typ1er am 24 November 2018, 13:32:46
Zitat von: CoolTux am 20 November 2018, 09:43:42
Starte bitte einmal den kompletten Rechner neu und schaue ob es dann besser läuft.
Das hatte ich schon mehrfach gemacht.


Habe jetzt einen neuen Pi aufgesetzt, und selbes wieder, betrifft nur an 1 Sensor von 4. Interessant ist das die Xiaomi App den Sensor gefühlt im Sekundentakt auslesen kann.
Intervall steht bei mir auf 180 Sekunden
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 24 November 2018, 13:43:17
Du lässt aber nicht die App gleichzeitig laufen wie das Modul oder?
Das geht nämlich nicht, dann blockiert die App.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Zenz am 24 November 2018, 15:24:20
Hallo CoolTux!

Habe heute erstmalig einen neu aufgesetzten Raspberry (2018-11-13-raspbian-stretch) mit Fhem (5.9) versucht den gerade aus China eingetroffenen Sensor in Betrieb zu nehmen.
Dabei zeigt sich nun folgendes Bild (siehe Anhang "Bild_1") bzw. Log ("Bild_2")

Da ich mir keinen Rat mehr weiß, ersuche ich höflich um Hilfe.

Mit der App (Android) funktioniert der Sensor bzw. konnte ich ihn auch auf Version 3.1.9 updaten.

Vielen Dank im Voraus
Zenz

I

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 24 November 2018, 15:50:21
Hallo Zens,

Leider kann ich nichts erkennen. Aber das ist nicht schlimm.
Als aller erstes so fern noch nicht geschehen bitte ein Update machen.
Dann noch mal testen, wenn das Fehlerbild geblieben ist, brauche ich ein list vom Device.
Also in die FHEMWEB Eingabekonsole eingeben
list DEVICENAME
DEVICENAME bitte durch den tatsächlichen ersetzen. Dann stellst Du den verbose des Devices, NICHT den globalen, auf 5 und machst eine Abfrage. Im FHEM Log sollten nun detaillierte Informationen zu finden sein. Das zusammen mit dem list postest Du bitte hier in Code Tags. Das ist das Rautezeichen im Forumeditors in der Symbolleiste.


Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Zenz am 24 November 2018, 16:49:11
zuerst einmal recht herzlichen Dank für deine Hilfe!

Hoffe, dass  ich das von dir benötigte, richtige gemacht habe  :-\

Beim Einfügen der Bilder (hier) scheitere ich leider - habe sie deshalb wieder als Anhang angefügt...  sorry
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 24 November 2018, 16:53:10
Zitat von: Zenz am 24 November 2018, 16:49:11
zuerst einmal recht herzlichen Dank für deine Hilfe!

Hoffe, dass  ich das von dir benötigte, richtige gemacht habe  :-\

[/code]

Bitte keine Screenshots. Bitte die Ausgabe, also das was du als Screenshot gezeigt hast, kopieren und hier in Codetags eintragen. Also nicht das was du mir so schreiben willst sondern das list und das Log in Codetags.

Das Log sollte im übrigen eigentlich länger sein.

Hast du die App noch mit dem Sensor verbunden oder das Handy? Wenn ja bitte die Verbindung lösen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Zenz am 24 November 2018, 17:03:52
Habe mit Sicherheit die App getrennt (geschlossen und Bluetooth abgeschaltet)

Raspberry nochmals neu gestartet

list
Internals:
   BTMAC      B8:27:EB:93:6E:EB
   DEF        B8:27:EB:93:6E:EB
   INTERVAL   300
   NAME       Zitrone
   NOTIFYDEV  global,Zitrone
   NR         16
   NTFY_ORDER 50-Zitrone
   STATE      error
   TYPE       XiaomiBTLESens
   VERSION    2.4.6
   loglevel   4
   READINGS:
     2018-11-24 16:56:45   lastGattError   The BlockingCall Process terminated unexpectedly. Timedout
     2018-11-24 16:56:45   state           error
   helper:
     CallBattery 0
     CallSensDataCounter 0
Attributes:
   model      flowerSens
   room       XiaomiBTLESens
   verbose    5



"get" ausgeführt
get Zitrone sensorData

=> erhalte bei den Readings
lastGattError

The BlockingCall Process terminated unexpectedly. Timedout

2018-11-24 16:56:45
state

read sensor data

2018-11-24 16:58:47


Log File
2018.11.24 16:55:14 0: Server shutdown
2018.11.24 16:55:15 1: Including fhem.cfg
2018.11.24 16:55:15 3: WEB: port 8083 opened
2018.11.24 16:55:15 2: eventTypes: loaded 7 events from ./log/eventTypes.txt
2018.11.24 16:55:15 3: XiaomiBTLESens (Zitrone) - defined with BTMAC B8:27:EB:93:6E:EB
2018.11.24 16:55:15 1: Including ./log/fhem.save
2018.11.24 16:55:15 4: XiaomiBTLESens (Zitrone) - Run CreateParamGatttool with mod: read
2018.11.24 16:55:15 3: telnetForBlockingFn_1543074915: port 41307 opened
2018.11.24 16:55:15 5: XiaomiBTLESens (Zitrone) - Read XiaomiBTLESens_ExecGatttool_Run Zitrone|B8:27:EB:93:6E:EB|read|0x38
2018.11.24 16:55:15 4: XiaomiBTLESens (Zitrone) - stateRequestTimer: Call Request Timer
2018.11.24 16:55:15 1: usb create starting
2018.11.24 16:55:16 3: Probing CUL device /dev/ttyAMA0
2018.11.24 16:55:16 3: Probing TCM_ESP3 device /dev/ttyAMA0
2018.11.24 16:55:16 3: Probing ZWDongle device /dev/ttyAMA0
2018.11.24 16:55:16 3: Probing FRM device /dev/ttyAMA0
2018.11.24 16:55:22 1: usb create end
2018.11.24 16:55:22 0: Featurelevel: 5.9
2018.11.24 16:55:22 0: Server started with 9 defined entities (fhem.pl:17779/2018-11-18 perl:5.024001 os:linux user:fhem pid:2118)
2018.11.24 16:55:22 3: FHEMWEB WEB CSRF error: csrf_117715287523099 ne csrf_263850007521562 for client WEB_10.0.0.11_52057 / command shutdown restart. For details see the csrfToken FHEMWEB attribute.
2018.11.24 16:55:22 5: XiaomiBTLESens (Zitrone) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b B8:27:EB:93:6E:EB --char-read -a 0x38 2>&1 /dev/null and loop 0
2018.11.24 16:56:02 5: XiaomiBTLESens (Zitrone) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)

2018.11.24 16:56:02 5: XiaomiBTLESens (Zitrone) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b B8:27:EB:93:6E:EB --char-read -a 0x38 2>&1 /dev/null and loop 1
2018.11.24 16:56:42 5: XiaomiBTLESens (Zitrone) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)

2018.11.24 16:56:42 5: XiaomiBTLESens (Zitrone) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b B8:27:EB:93:6E:EB --char-read -a 0x38 2>&1 /dev/null and loop 2
2018.11.24 16:56:45 1: Timeout for XiaomiBTLESens::ExecGatttool_Run reached, terminated process 2119
2018.11.24 16:56:45 4: XiaomiBTLESens (Zitrone) - WriteReadings: Readings were written
2018.11.24 16:56:45 4: XiaomiBTLESens (Zitrone) - ExecGatttool_Aborted: The BlockingCall Process terminated unexpectedly. Timedout
2018.11.24 16:58:47 4: XiaomiBTLESens (Zitrone) - Run CreateParamGatttool with mod: read
2018.11.24 16:58:47 5: XiaomiBTLESens (Zitrone) - Read XiaomiBTLESens_ExecGatttool_Run Zitrone|B8:27:EB:93:6E:EB|read|0x38
2018.11.24 16:58:47 5: XiaomiBTLESens (Zitrone) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b B8:27:EB:93:6E:EB --char-read -a 0x38 2>&1 /dev/null and loop 0
2018.11.24 16:59:27 5: XiaomiBTLESens (Zitrone) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)

2018.11.24 16:59:27 5: XiaomiBTLESens (Zitrone) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b B8:27:EB:93:6E:EB --char-read -a 0x38 2>&1 /dev/null and loop 1
2018.11.24 17:00:08 5: XiaomiBTLESens (Zitrone) - ExecGatttool_Run: gatttool loop result connect error,Connection refused (111)

2018.11.24 17:00:08 5: XiaomiBTLESens (Zitrone) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b B8:27:EB:93:6E:EB --char-read -a 0x38 2>&1 /dev/null and loop 2
2018.11.24 17:00:17 1: Timeout for XiaomiBTLESens::ExecGatttool_Run reached, terminated process 2137
2018.11.24 17:00:17 4: XiaomiBTLESens (Zitrone) - WriteReadings: Readings were written
2018.11.24 17:00:17 4: XiaomiBTLESens (Zitrone) - ExecGatttool_Aborted: The BlockingCall Process terminated unexpectedly. Timedout


Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 24 November 2018, 17:07:42
Das gatttool bekommt keine Verbindung hin.
Ist der Sensor in Nähe des FHEM Servers? Welche Distribution verwendest Du? Bitte genaue Version.
Findest Du unter /etc/os-release
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Zenz am 24 November 2018, 17:13:59
Sensor und RPI sind ca. 50cm von einander entfernt

/etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 24 November 2018, 17:23:42
Die Debian Version sollte im sein.
Welche Version hat das gatttool?
Mach mal bitte ein
bluetoothctl --version
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Zenz am 24 November 2018, 17:35:31
CoolTux entschuldige bitte, aber mit meinen bescheidenen Kenntnisse, weiss ich leider nicht,
wie ich zur "bluetoothctl --version" komme.  :-[


Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 24 November 2018, 17:37:12
Du müsstest Dich per ssh auf dem raspi anmelden und dann genau so den Befehl angeben.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Zenz am 24 November 2018, 17:37:32
habes gefunden 5.43
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 24 November 2018, 18:15:05
Da fällt mir nur noch BTMAC ein. Ist die wirklich vom Pflanzensensor?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Typ1er am 24 November 2018, 20:19:33
Zitat von: CoolTux am 24 November 2018, 13:43:17
Du lässt aber nicht die App gleichzeitig laufen wie das Modul oder?
Das geht nämlich nicht, dann blockiert die App.
Oh oh, das nicht, aber ich habe eine Lampe von Xiaomi die die Sensoren auch abfragt.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 24 November 2018, 20:35:58
Zitat von: Typ1er am 24 November 2018, 20:19:33
Oh oh, das nicht, aber ich habe eine Lampe von Xiaomi die die Sensoren auch abfragt.

Dann sind sie natürlich entweder komplett blockiert oder zu mindest zu dem Zeitpunkt der Abfrage blockiert.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Zenz am 25 November 2018, 12:58:03
@ CoolTux
vielen, vielen Dank für deine Geduld und Hilfe.

Habe soeben meine SD Karte in einen zweiten Raspberry gesteckt und es läuft ohne Probleme :-)
Bei der Gegenprobe wieder Error  =>  RPI ist wohl ein Fall für die Tonne.

LG
Zenz
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 25 November 2018, 13:44:40
Zitat von: Zenz am 25 November 2018, 12:58:03
@ CoolTux
vielen, vielen Dank für deine Geduld und Hilfe.

Habe soeben meine SD Karte in einen zweiten Raspberry gesteckt und es läuft ohne Probleme :-)
Bei der Gegenprobe wieder Error  =>  RPI ist wohl ein Fall für die Tonne.

LG
Zenz

Oh, dann bin ich nicht alleine...
Bei einem meiner hat sich wohl der WLAN Chip verabschiedet (ist glaube ich eh ein Kombi-Chip WLAN+BlueTooth)...

Neues frisches System: kein WLAN rumprobiert: will einfach nicht. Glaube sogar irgendwas mit Treiber-Fehler... Daher dachte ich zunächst an einen Kartenfehler...

Aber:

Alte Karte in anderen PI läuft prima

Neu aufgesetztes System in anderen PI läuft (natürlich) auch

Wenn's nur mal einer ist und bleibt ok...
...wenn sich's häufen sollte wäre das echt doof...

Gut mit LAN könnte ich ihn noch nutzen...
...aber bleibt die Frage: was geht vielleicht noch nicht (mehr zuverlässig)...

Hitze kann's nicht sein, der war offen ohne Gehäusedeckel und laut Sysmon immer so bei 45Grad...

Andere sind (deutlich) wärmer und laufen schon länger mit (deutlich) mehr zu tun...

Gruß, Joachim

(sorry für OT!)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Teamdrachen am 11 Dezember 2018, 12:01:21
Hallo,

ich habe die Xiaomi Temperatur/Feuchtesensoren im Einsatz und leider immer wieder Probleme.
eigentlich nur ein Problem
Too many levels of symbolic links (40)
Raspbery pi 3B
bluetoothctl 5.47
Manchmal liest FHEM Daten aus, in 99% der Fälle jedoch nicht.


Mir ist klar. Liegt nicht am Modul, aber ich hab bisher noch keine wirkliche Lösung gefunden und evtl hat jemand hier das Problem erfolgreich behoben.

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 11 Dezember 2018, 12:18:04
Zitat von: Teamdrachen am 11 Dezember 2018, 12:01:21
Hallo,

ich habe die Xiaomi Temperatur/Feuchtesensoren im Einsatz und leider immer wieder Probleme.
eigentlich nur ein Problem
Too many levels of symbolic links (40)
Raspbery pi 3B
bluetoothctl 5.47
Manchmal liest FHEM Daten aus, in 99% der Fälle jedoch nicht.


Mir ist klar. Liegt nicht am Modul, aber ich hab bisher noch keine wirkliche Lösung gefunden und evtl hat jemand hier das Problem erfolgreich behoben.

Fragst Du die Sensoren noch anders ab? App oder ein weiteres Gerät?
Was läuft sonst noch auf dem Pi was bluetooth an geht. Irgendwas mit Anwesenheit oder so?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Teamdrachen am 11 Dezember 2018, 12:57:38
Nein, Sensoren werden nicht anders abgefragt und auf dem Pi wat BT bisher ungenutzt
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 11 Dezember 2018, 13:18:02
Zu Testzwecken vielleicht den Sensor näher an den Pi sofern er nicht schon 1m davor steht.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Teamdrachen am 11 Dezember 2018, 13:39:32
der Sensor /die Sensoren werden ja erkannt
Problem ist: Too many levels of symbolic links (40)
Hin und wieder klappt mal ein connect und ich bekomme Daten.
Viel öfter jedoch eben:Too many levels of symbolic links (40)
Es liegt nicht am Modul, eher an BlueZ
Da der Fehler ein paar seiten/Wochen vorher hier schon mal auftauchte... jedoch nie wieder Thema war, hegte ich die Hoffnun es wäre mehr darüber bekannt
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 11 Dezember 2018, 14:36:44
Habe mal kurz gegoogelt (https://stackoverflow.com/questions/38086761/error-while-connecting-to-ble-device-using-gatttool/43444837)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Teamdrachen am 11 Dezember 2018, 15:29:27
Danke, aber das hab ich schon versucht... ohne Erfolg
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Neuhier am 11 Dezember 2018, 20:33:49
Vielleicht doch irgendwo einen Gateway im Haus?
Aus Versehen mit dem Smartphone o.ä. "gefunden" ?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Teamdrachen am 12 Dezember 2018, 09:12:36
kein Gateway im Haus und im Moment auch kein Smartphone.
Ich sitz 50km entfernt, der Sensor 70cm

Edit:
Ich habe einen der zwei Sensoren in FHEM disabled und bekomme vom anderen Daten.

Edit2:
ich habs...

nach dem ich alle Versionen von bluez getestet, das Netz nach dem Fehler durchsucht und mit dem Thema fast abgeschlossen habe bzw. einen pi Zero testen wollte.

Bei Sensor 2.. dem der disabled wurde fehlte in FHEM 1 Ziffer in der MAC  ::)

die fehlerhafte Abfrage hat dann Gatttool abgeschossen
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: stole am 21 Dezember 2018, 07:24:46
Hallo,

Ich habe gerade mein Mijia angekoppelt, die Temperatur richtig angezeigt aber die Feuchtigkeit komisch

Kann mir jemand dabei helfen?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 21 Dezember 2018, 08:05:07
Wenn ich das richtig gelesen habe ist das ein Branding. Original soll es Xiaomi sein. Kannst Du mir bitte ein verbose 5 geben. Brauche die ausgelesenen Werte.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: stole am 22 Dezember 2018, 09:31:02
Zitat von: CoolTux am 21 Dezember 2018, 08:05:07
Wenn ich das richtig gelesen habe ist das ein Branding. Original soll es Xiaomi sein. Kannst Du mir bitte ein verbose 5 geben. Brauche die ausgelesenen Werte.

Hi CoolTux,

Danke für die schnelle Antwort.

Was meinst du genau mit Branding, dass Device kein Xiaomi ist? Weil es von außen definitiv als Xiaomi aussieht, und auch mit Xiaomi Handy App richtig verbindet.

Kann es sein wegen Firmware?

Ich mache verbose 5 so schnell wie möglich, gerade bin ich unterwegs.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 22 Dezember 2018, 09:45:21
Es ist schon ein Xiaomi, nur wurde es von einer Firma als thirdpart eingekauft und die macht dann ihr eigenes Logo drauf und verkauft es so. Es wird aber voll umfänglich Xiaomi, inklusive Firmware.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: stole am 23 Dezember 2018, 10:36:39
Zitat von: CoolTux am 21 Dezember 2018, 08:05:07
Wenn ich das richtig gelesen habe ist das ein Branding. Original soll es Xiaomi sein. Kannst Du mir bitte ein verbose 5 geben. Brauche die ausgelesenen Werte.


2018.12.23 06:53:41 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
32 20 48 3d 36 36 2e 35 00 "}
2018.12.23 06:53:41 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 06:53:41 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 06:53:41 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 06:53:41 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 06:56:11 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 06:56:11 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 06:56:11 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 06:56:11 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 06:56:21 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 06:56:21 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 06:56:21 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
32 20 48 3d 36 36 2e 37 00 "}
2018.12.23 06:56:21 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 06:56:21 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 06:56:21 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 06:56:21 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 07:00:58 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 07:00:58 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 07:00:58 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 07:00:58 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 07:01:01 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result connect error,Transport endpoint is not connected (107)
2018.12.23 07:01:01 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 1
2018.12.23 07:01:11 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 07:01:11 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 07:01:11 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
32 20 48 3d 36 36 2e 38 00 "}
2018.12.23 07:01:11 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 07:01:11 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 07:01:11 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 07:01:11 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 07:04:05 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 07:04:05 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 07:04:05 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 07:04:05 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 07:04:15 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 07:04:15 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 07:04:15 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
32 20 48 3d 36 36 2e 38 00 "}
2018.12.23 07:04:15 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 07:04:15 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 07:04:15 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 07:04:15 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 07:07:03 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 07:07:03 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 07:07:03 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 07:07:04 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 07:07:14 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 07:07:14 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 07:07:14 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 39 00 "}
2018.12.23 07:07:14 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 07:07:14 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 07:07:14 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 07:07:14 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 07:11:26 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 07:11:26 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 07:11:26 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 07:11:26 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 07:11:37 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 07:11:37 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 07:11:37 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 37 00 "}
2018.12.23 07:11:37 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 07:11:37 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 07:11:37 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 07:11:37 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 07:14:49 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 07:14:49 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 07:14:49 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 07:14:50 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 07:15:00 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 07:15:00 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 07:15:00 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
32 20 48 3d 36 36 2e 35 00 "}
2018.12.23 07:15:00 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 07:15:00 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 07:15:00 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 07:15:00 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 07:19:54 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 07:19:54 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 07:19:54 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 07:19:55 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 07:20:05 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 07:20:05 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 07:20:05 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 37 00 "}
2018.12.23 07:20:05 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 07:20:05 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 07:20:05 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 07:20:05 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 07:26:26 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 07:26:26 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 07:26:26 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 07:26:27 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 07:26:37 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 07:26:37 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 07:26:37 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 39 00 "}
2018.12.23 07:26:37 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 07:26:37 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 07:26:37 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 07:26:37 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 07:31:52 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 07:31:53 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 07:31:53 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 07:31:53 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 07:32:03 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 07:32:03 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 07:32:03 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
32 20 48 3d 36 36 2e 38 00 "}
2018.12.23 07:32:03 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 07:32:03 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 07:32:03 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 07:32:03 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 07:36:24 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 07:36:24 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 07:36:24 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 07:36:24 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 07:36:34 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 07:36:34 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 07:36:34 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 37 00 "}
2018.12.23 07:36:34 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 07:36:34 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 07:36:34 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 07:36:34 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 07:39:50 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 07:39:50 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 07:39:50 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 07:39:50 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 07:40:00 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 07:40:00 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 07:40:00 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 38 00 "}
2018.12.23 07:40:00 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 07:40:00 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 07:40:00 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 07:40:00 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 07:42:43 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 07:42:43 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 07:42:43 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 07:42:43 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 07:42:53 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result
2018.12.23 07:42:53 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 1
2018.12.23 07:43:03 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 07:43:03 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 07:43:03 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 39 00 "}
2018.12.23 07:43:03 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 07:43:03 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 07:43:03 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 07:43:03 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 07:46:31 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 07:46:31 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 07:46:31 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 07:46:31 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 07:46:41 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 07:46:41 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 07:46:41 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 34 00 "}
2018.12.23 07:46:41 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 07:46:41 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 07:46:41 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 07:46:41 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 07:51:11 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 07:51:11 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 07:51:11 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 07:51:11 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 07:51:21 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 07:51:21 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 07:51:21 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 39 00 "}
2018.12.23 07:51:21 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 07:51:21 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 07:51:21 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 07:51:21 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 07:54:09 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 07:54:09 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 07:54:09 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 07:54:09 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 07:54:19 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 07:54:19 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 07:54:19 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
32 20 48 3d 36 36 2e 35 00 "}
2018.12.23 07:54:19 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 07:54:19 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 07:54:19 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 07:54:19 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 08:00:53 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 08:00:53 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 08:00:53 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 08:00:53 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 08:01:03 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 08:01:03 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 08:01:03 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 39 00 "}
2018.12.23 08:01:03 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 08:01:03 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 08:01:03 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 08:01:03 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 08:03:04 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 08:03:04 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 08:03:04 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 08:03:04 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 08:03:14 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 08:03:14 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 08:03:14 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 36 00 "}
2018.12.23 08:03:14 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 08:03:14 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 08:03:14 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 08:03:14 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 08:06:15 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 08:06:15 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 08:06:15 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 08:06:15 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 08:06:25 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 08:06:25 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 08:06:25 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
32 20 48 3d 36 37 2e 30 00 "}
2018.12.23 08:06:25 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 08:06:25 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 08:06:25 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 08:06:25 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 08:09:01 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 08:09:01 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 08:09:01 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 08:09:01 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 08:09:11 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 08:09:11 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 08:09:11 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 39 00 "}
2018.12.23 08:09:11 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 08:09:11 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 08:09:11 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 08:09:11 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 08:15:02 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 08:15:02 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 08:15:02 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 08:15:02 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 08:15:13 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 08:15:13 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 08:15:13 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 38 00 "}
2018.12.23 08:15:13 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 08:15:13 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 08:15:13 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 08:15:13 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 08:21:17 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 08:21:17 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 08:21:17 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 08:21:17 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 08:21:27 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 08:21:27 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 08:21:27 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 36 00 "}
2018.12.23 08:21:27 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 08:21:27 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 08:21:27 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 08:21:27 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 08:28:15 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 08:28:15 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 08:28:15 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 08:28:15 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 08:28:25 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 08:28:25 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 08:28:25 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 36 00 "}
2018.12.23 08:28:25 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 08:28:25 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 08:28:25 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 08:28:25 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 08:33:20 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 08:33:20 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 08:33:20 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 08:33:20 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 08:33:30 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 08:33:30 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 08:33:30 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 36 00 "}
2018.12.23 08:33:30 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 08:33:30 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 08:33:30 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 08:33:30 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 08:39:22 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 08:39:22 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 08:39:22 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 08:39:22 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 08:39:32 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 08:39:32 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 08:39:32 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 33 00 "}
2018.12.23 08:39:33 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 08:39:33 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 08:39:33 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 08:39:33 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 08:44:01 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 08:44:01 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 08:44:01 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 08:44:01 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 08:44:12 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 08:44:12 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 08:44:12 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 39 00 "}
2018.12.23 08:44:12 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 08:44:12 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 08:44:12 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 08:44:12 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 08:46:40 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 08:46:40 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 08:46:40 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 08:46:41 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 08:46:51 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 08:46:51 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 08:46:51 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 35 00 "}
2018.12.23 08:46:51 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 08:46:51 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 08:46:51 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 08:46:51 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 08:49:13 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 08:49:13 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 08:49:13 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 08:49:14 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 08:49:17 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result connect error,Function not implemented (38)
2018.12.23 08:49:17 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 1
2018.12.23 08:49:23 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result connect error,Function not implemented (38)
2018.12.23 08:49:23 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 2
2018.12.23 08:49:33 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 08:49:33 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 08:49:33 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 39 00 "}
2018.12.23 08:49:33 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 08:49:33 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 08:49:33 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 08:49:33 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 08:55:45 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 08:55:45 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 08:55:45 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 08:55:46 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 08:55:56 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 08:55:56 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 08:55:56 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 34 00 "}
2018.12.23 08:55:56 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 08:55:56 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 08:55:56 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 08:55:56 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 09:01:39 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 09:01:40 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 09:01:40 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 09:01:40 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 09:01:50 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 09:01:50 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 09:01:50 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 38 00 "}
2018.12.23 09:01:50 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 09:01:50 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 09:01:50 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 09:01:50 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 09:04:34 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 09:04:34 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 09:04:34 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 09:04:34 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 09:04:44 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 09:04:44 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 09:04:44 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
32 20 48 3d 36 36 2e 37 00 "}
2018.12.23 09:04:44 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 09:04:44 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 09:04:44 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 09:04:44 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 09:07:11 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 09:07:11 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 09:07:11 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 09:07:11 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 09:07:21 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 09:07:21 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 09:07:21 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 36 00 "}
2018.12.23 09:07:21 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 09:07:21 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 09:07:21 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 09:07:21 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 09:12:56 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 09:12:56 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 09:12:56 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 09:12:56 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 09:13:06 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 09:13:06 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 09:13:06 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 35 00 "}
2018.12.23 09:13:06 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 09:13:06 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 09:13:06 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 09:13:06 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 09:16:22 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 09:16:22 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 09:16:22 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 09:16:22 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 09:16:32 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 09:16:32 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 09:16:32 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 36 00 "}
2018.12.23 09:16:32 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 09:16:32 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 09:16:32 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 09:16:32 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 09:21:34 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 09:21:34 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 09:21:34 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 09:21:34 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 09:21:44 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 09:21:44 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 09:21:44 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 34 00 "}
2018.12.23 09:21:44 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 09:21:44 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 09:21:44 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 09:21:44 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 09:25:25 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 09:25:25 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 09:25:25 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 09:25:25 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 09:25:35 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 09:25:35 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 09:25:35 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"no data respon
se"}
2018.12.23 09:25:35 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 09:25:35 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 09:25:35 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 09:25:35 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 09:25:35 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 09:31:44 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 09:31:44 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 09:31:44 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 09:31:44 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 09:31:54 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 09:31:54 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 09:31:54 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
30 20 48 3d 36 36 2e 32 00 "}
2018.12.23 09:31:54 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 09:31:54 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 09:31:54 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 09:31:54 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 09:38:19 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 09:38:19 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 09:38:19 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 09:38:19 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 09:38:29 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 09:38:29 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 09:38:29 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
32 20 48 3d 36 36 2e 32 00 "}
2018.12.23 09:38:29 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 09:38:29 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 09:38:29 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 09:38:29 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 09:42:38 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 09:42:38 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 09:42:38 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 09:42:38 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 09:42:48 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 09:42:48 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 09:42:48 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 34 00 "}
2018.12.23 09:42:48 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 09:42:48 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 09:42:48 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 09:42:48 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 09:49:23 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 09:49:23 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 09:49:23 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 09:49:23 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 09:49:33 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 09:49:33 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 09:49:33 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 34 00 "}
2018.12.23 09:49:33 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 09:49:33 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 09:49:33 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 09:49:33 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 09:54:47 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 09:54:47 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 09:54:47 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 09:54:47 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 09:54:57 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 09:54:57 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: rani22 am 23 Dezember 2018, 12:25:08
Die beiden Pflanzensensoren habe ich integriert, jedoch bei den Temperatur und Feuchtesensoren komme ich nicht weiter.

2018.12.23 12:17:18 3: XiaomiBTLESens (Floribunda) - defined with BTMAC C4:7C:8D:61:9C:D0
2018.12.23 12:17:18 3: XiaomiBTLESens (Beaucarnea) - defined with BTMAC C4:7C:8D:61:7C:FF
2018.12.23 12:17:18 3: XiaomiBTLESens (test1) - defined with BTMAC 4C:65:A8:D2:64:7E
2018.12.23 12:17:18 3: XiaomiBTLESens (test1) - set interval to 120
2018.12.23 12:17:18 3: XiaomiBTLESens (test2) - defined with BTMAC 4C:65:A8:D6:77:51
2018.12.23 12:17:18 3: XiaomiBTLESens (test3) - defined with BTMAC 4C:65:A8:D2:2C:0C
2018.12.23 12:17:18 3: XiaomiBTLESens (test4) - defined with BTMAC 4C:65:A8:DA:A1:86
2018.12.23 12:17:18 1: Including /opt/loxberry/data/plugins/fhem/fhem.save
2018.12.23 12:17:18 1: usb create starting
2018.12.23 12:17:18 3: Probing ZWDongle device /dev/serial1
2018.12.23 12:17:18 3: Probing CUL device /dev/ttyAMA0
2018.12.23 12:17:18 3: Probing TCM_ESP3 device /dev/ttyAMA0
2018.12.23 12:17:19 3: Probing ZWDongle device /dev/ttyAMA0
2018.12.23 12:17:19 3: Probing FRM device /dev/ttyAMA0
2018.12.23 12:17:24 1: usb create end
2018.12.23 12:17:24 4: XiaomiBTLESens (test1) - Run CreateParamGatttool with mod: read
2018.12.23 12:17:24 5: XiaomiBTLESens (test1) - Read XiaomiBTLESens_ExecGatttool_Run test1|4C:65:A8:D2:64:7E|read|0x24
2018.12.23 12:17:24 4: XiaomiBTLESens (test1) - stateRequestTimer: Call Request Timer
2018.12.23 12:17:24 0: Featurelevel: 5.9
2018.12.23 12:17:24 0: Server started with 15 defined entities (fhem.pl:18029/2018-12-22 perl:5.024001 os:linux user:loxberry pid:955)
2018.12.23 12:17:24 5: XiaomiBTLESens (test1) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 4C:65:A8:D2:64:7E --char-read -a 0x24 2>&1 /dev/null and loop 0
2018.12.23 12:17:31 5: XiaomiBTLESens (test1) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.12.23 12:17:31 5: XiaomiBTLESens (test1) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 4C:65:A8:D2:64:7E --char-read -a 0x24 2>&1 /dev/null and loop 1
2018.12.23 12:17:31 5: XiaomiBTLESens (test1) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.12.23 12:17:31 5: XiaomiBTLESens (test1) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 4C:65:A8:D2:64:7E --char-read -a 0x24 2>&1 /dev/null and loop 2
2018.12.23 12:17:31 5: XiaomiBTLESens (test1) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.12.23 12:17:31 5: XiaomiBTLESens (test1) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 4C:65:A8:D2:64:7E --char-read -a 0x24 2>&1 /dev/null and loop 3
2018.12.23 12:17:31 5: XiaomiBTLESens (test1) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.12.23 12:17:31 5: XiaomiBTLESens (test1) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 4C:65:A8:D2:64:7E --char-read -a 0x24 2>&1 /dev/null and loop 4
2018.12.23 12:17:31 5: XiaomiBTLESens (test1) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.12.23 12:17:31 4: XiaomiBTLESens (test1) - ExecGatttool_Run: gatttool result connect error,Invalid argument (22)

2018.12.23 12:17:31 5: XiaomiBTLESens (test1) - ExecGatttool_Done: gatttool return string: test1|4C:65:A8:D2:64:7E|error|read|0x24|{"gtResult":"Invalid argument (22)"}
2018.12.23 12:17:31 4: XiaomiBTLESens (test1) - ProcessingErrors
2018.12.23 12:17:31 4: XiaomiBTLESens (test1) - WriteReadings: Readings were written

hat jemand einen Tipp was ich anderst machen muss?
Habe noch eine BLE Gatewaylampe, diese habe ich ausgesteckt, hilft auch nichts
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Neuhier am 23 Dezember 2018, 12:30:21
Meine Xiaomi / Aqara Sensoren ( Luftdruck/ Temperatur/ Feuchtigkeit/ Bewegung) arbeiten per zigbee2mqtt, nicht per BT.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: stole am 23 Dezember 2018, 12:39:03
Zitat von: Neuhier am 23 Dezember 2018, 12:30:21
Meine Xiaomi / Aqara Sensoren ( Luftdruck/ Temperatur/ Feuchtigkeit/ Bewegung) arbeiten per zigbee2mqtt, nicht per BT.

Dann bist du hier glaube ich falsch gelandet.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 23 Dezember 2018, 12:50:11
Zitat von: rani22 am 23 Dezember 2018, 12:25:08
Die beiden Pflanzensensoren habe ich integriert, jedoch bei den Temperatur und Feuchtesensoren komme ich nicht weiter.

2018.12.23 12:17:18 3: XiaomiBTLESens (Floribunda) - defined with BTMAC C4:7C:8D:61:9C:D0
2018.12.23 12:17:18 3: XiaomiBTLESens (Beaucarnea) - defined with BTMAC C4:7C:8D:61:7C:FF
2018.12.23 12:17:18 3: XiaomiBTLESens (test1) - defined with BTMAC 4C:65:A8:D2:64:7E
2018.12.23 12:17:18 3: XiaomiBTLESens (test1) - set interval to 120
2018.12.23 12:17:18 3: XiaomiBTLESens (test2) - defined with BTMAC 4C:65:A8:D6:77:51
2018.12.23 12:17:18 3: XiaomiBTLESens (test3) - defined with BTMAC 4C:65:A8:D2:2C:0C
2018.12.23 12:17:18 3: XiaomiBTLESens (test4) - defined with BTMAC 4C:65:A8:DA:A1:86
2018.12.23 12:17:18 1: Including /opt/loxberry/data/plugins/fhem/fhem.save
2018.12.23 12:17:18 1: usb create starting
2018.12.23 12:17:18 3: Probing ZWDongle device /dev/serial1
2018.12.23 12:17:18 3: Probing CUL device /dev/ttyAMA0
2018.12.23 12:17:18 3: Probing TCM_ESP3 device /dev/ttyAMA0
2018.12.23 12:17:19 3: Probing ZWDongle device /dev/ttyAMA0
2018.12.23 12:17:19 3: Probing FRM device /dev/ttyAMA0
2018.12.23 12:17:24 1: usb create end
2018.12.23 12:17:24 4: XiaomiBTLESens (test1) - Run CreateParamGatttool with mod: read
2018.12.23 12:17:24 5: XiaomiBTLESens (test1) - Read XiaomiBTLESens_ExecGatttool_Run test1|4C:65:A8:D2:64:7E|read|0x24
2018.12.23 12:17:24 4: XiaomiBTLESens (test1) - stateRequestTimer: Call Request Timer
2018.12.23 12:17:24 0: Featurelevel: 5.9
2018.12.23 12:17:24 0: Server started with 15 defined entities (fhem.pl:18029/2018-12-22 perl:5.024001 os:linux user:loxberry pid:955)
2018.12.23 12:17:24 5: XiaomiBTLESens (test1) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 4C:65:A8:D2:64:7E --char-read -a 0x24 2>&1 /dev/null and loop 0
2018.12.23 12:17:31 5: XiaomiBTLESens (test1) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.12.23 12:17:31 5: XiaomiBTLESens (test1) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 4C:65:A8:D2:64:7E --char-read -a 0x24 2>&1 /dev/null and loop 1
2018.12.23 12:17:31 5: XiaomiBTLESens (test1) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.12.23 12:17:31 5: XiaomiBTLESens (test1) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 4C:65:A8:D2:64:7E --char-read -a 0x24 2>&1 /dev/null and loop 2
2018.12.23 12:17:31 5: XiaomiBTLESens (test1) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.12.23 12:17:31 5: XiaomiBTLESens (test1) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 4C:65:A8:D2:64:7E --char-read -a 0x24 2>&1 /dev/null and loop 3
2018.12.23 12:17:31 5: XiaomiBTLESens (test1) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.12.23 12:17:31 5: XiaomiBTLESens (test1) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 4C:65:A8:D2:64:7E --char-read -a 0x24 2>&1 /dev/null and loop 4
2018.12.23 12:17:31 5: XiaomiBTLESens (test1) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.12.23 12:17:31 4: XiaomiBTLESens (test1) - ExecGatttool_Run: gatttool result connect error,Invalid argument (22)

2018.12.23 12:17:31 5: XiaomiBTLESens (test1) - ExecGatttool_Done: gatttool return string: test1|4C:65:A8:D2:64:7E|error|read|0x24|{"gtResult":"Invalid argument (22)"}
2018.12.23 12:17:31 4: XiaomiBTLESens (test1) - ProcessingErrors
2018.12.23 12:17:31 4: XiaomiBTLESens (test1) - WriteReadings: Readings were written

hat jemand einen Tipp was ich anderst machen muss?
Habe noch eine BLE Gatewaylampe, diese habe ich ausgesteckt, hilft auch nichts

Eventuell noch mit Herrn App oder so verbunden?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 23 Dezember 2018, 12:51:20
Zitat von: stole am 23 Dezember 2018, 10:36:39

2018.12.23 06:53:41 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
32 20 48 3d 36 36 2e 35 00 "}
2018.12.23 06:53:41 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 06:53:41 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 06:53:41 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 06:53:41 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 06:56:11 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 06:56:11 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 06:56:11 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 06:56:11 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 06:56:21 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 06:56:21 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 06:56:21 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
32 20 48 3d 36 36 2e 37 00 "}


Schaue ich mir die Tage einmal an.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: stole am 23 Dezember 2018, 12:53:43
Zitat von: CoolTux am 23 Dezember 2018, 12:51:20
Schaue ich mir die Tage einmal an.

Danke dir.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Neuhier am 23 Dezember 2018, 13:00:56
@stole
Wußte nicht, daß es die auch in BT-Version gibt.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: rani22 am 23 Dezember 2018, 18:35:16
Habe die Lampe ausgesteckt und beim Handy BT deaktiviert.

Habe zwischen durch wieder gültige Werte erhalten. Nach dem ich folgendes gemacht hatte:
root@loxberry:/opt/loxberry# sudo hciconfig hci0  down
root@loxberry:/opt/loxberry# sudo hciconfig hci0  up


2018.12.23 17:30:48 0: Server started with 18 defined entities (fhem.pl:18029/2018-12-22 perl:5.024001 os:linux user:loxberry pid:7807)
2018.12.23 17:32:12 1: Timeout for XiaomiBTLESens::ExecGatttool_Run reached, terminated process 7814
2018.12.23 17:32:12 1: Timeout for XiaomiBTLESens::ExecGatttool_Run reached, terminated process 7815
2018.12.23 17:32:18 1: Timeout for XiaomiBTLESens::ExecGatttool_Run reached, terminated process 7821
2018.12.23 17:32:18 1: Timeout for XiaomiBTLESens::ExecGatttool_Run reached, terminated process 7822
2018.12.23 17:32:18 1: Timeout for XiaomiBTLESens::ExecGatttool_Run reached, terminated process 7823
2018.12.23 17:32:18 1: Timeout for XiaomiBTLESens::ExecGatttool_Run reached, terminated process 7824
2018.12.23 17:32:33 3: XiaomiBTLESens (Beaucarnea) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.12.23 17:32:34 3: XiaomiBTLESens (Beaucarnea) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.12.23 17:32:35 3: XiaomiBTLESens (Beaucarnea) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.12.23 17:32:36 3: XiaomiBTLESens (Beaucarnea) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.12.23 17:32:37 3: XiaomiBTLESens (Beaucarnea) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.12.23 17:32:38 3: XiaomiBTLESens (Beaucarnea) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.12.23 17:32:39 3: XiaomiBTLESens (Beaucarnea) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.12.23 17:32:40 3: XiaomiBTLESens (Beaucarnea) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.12.23 17:32:42 3: XiaomiBTLESens (Beaucarnea) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.12.23 17:32:43 3: XiaomiBTLESens (Beaucarnea) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.12.23 17:32:44 3: XiaomiBTLESens (Beaucarnea) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.12.23 17:32:45 3: XiaomiBTLESens (Beaucarnea) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.12.23 17:32:46 3: XiaomiBTLESens (Beaucarnea) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.12.23 17:32:47 3: XiaomiBTLESens (Beaucarnea) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.12.23 17:32:48 3: XiaomiBTLESens (Beaucarnea) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.12.23 17:32:48 3: XiaomiBTLESens (Floribunda) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.12.23 17:32:49 3: XiaomiBTLESens (Beaucarnea) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.12.23 17:32:49 3: XiaomiBTLESens (Floribunda) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.12.23 17:32:50 3: XiaomiBTLESens (Beaucarnea) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.12.23 17:32:50 3: XiaomiBTLESens (Floribunda) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.12.23 17:33:39 3: n_publish_loxone return value: 1
2018.12.23 17:42:16 1: Timeout for XiaomiBTLESens::ExecGatttool_Run reached, terminated process 8451
2018.12.23 17:52:50 3: XiaomiBTLESens (TempBad) - defined with BTMAC 4C:65:A8:D2:64:7E
2018.12.23 17:59:19 1: Timeout for XiaomiBTLESens::ExecGatttool_Run reached, terminated process 9386
2018.12.23 18:01:22 3: XiaomiBTLESens (OG) - defined with BTMAC 4C:65:A8:DA:82:9C
2018.12.23 18:06:15 3: n_publish_loxone return value: 1
2018.12.23 18:06:15 3: n_publish_loxone return value: 1
2018.12.23 18:06:15 3: n_publish_loxone return value: 1
2018.12.23 18:06:15 3: n_publish_loxone return value: 1
2018.12.23 18:07:08 1: Timeout for XiaomiBTLESens::ExecGatttool_Run reached, terminated process 9919
2018.12.23 18:07:08 3: Sub XiaomiBTLESens_Undef (test1) - delete device test1
2018.12.23 18:07:14 3: Sub XiaomiBTLESens_Undef (test2) - delete device test2
2018.12.23 18:07:16 3: XiaomiBTLESens (TempBad) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.12.23 18:07:17 3: XiaomiBTLESens (TempBad) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.12.23 18:07:18 3: XiaomiBTLESens (TempBad) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.12.23 18:07:18 3: Sub XiaomiBTLESens_Undef (test3) - delete device test3
2018.12.23 18:07:19 3: XiaomiBTLESens (TempBad) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.12.23 18:07:20 3: XiaomiBTLESens (TempBad) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.12.23 18:07:21 3: XiaomiBTLESens (TempBad) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.12.23 18:07:22 3: XiaomiBTLESens (TempBad) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.12.23 18:07:23 3: XiaomiBTLESens (TempBad) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.12.23 18:07:24 3: XiaomiBTLESens (TempBad) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.12.23 18:07:26 3: XiaomiBTLESens (TempBad) - ExecGatttool_Run: another gatttool process is running. waiting...
2018.12.23 18:07:26 3: Sub XiaomiBTLESens_Undef (test4) - delete device test4
2018.12.23 18:07:36 3: XiaomiBTLESens (TempRoomPW) - defined with BTMAC 4C:65:A8:D2:2C:0C
2018.12.23 18:08:46 1: Timeout for XiaomiBTLESens::ExecGatttool_Run reached, terminated process 9944
2018.12.23 18:09:15 3: XiaomiBTLESens (TempGuestRoom) - defined with BTMAC 4C:65:A8:DA:A1:86
2018.12.23 18:14:31 3: Sub XiaomiBTLESens_Undef (OG) - delete device OG
2018.12.23 18:14:34 3: XiaomiBTLESens (TempOG) - defined with BTMAC 4C:65:A8:DA:82:9C
2018.12.23 18:14:48 3: XiaomiBTLESens (TempOffice) - defined with BTMAC 4C:65:A8:D8:E9:CF
2018.12.23 18:15:53 3: n_publish_loxone return value: 1
2018.12.23 18:15:53 3: n_publish_loxone return value: 1
2018.12.23 18:19:04 3: XiaomiBTLESens (TempBedroom) - defined with BTMAC 4C:65:A8:D6:77:51
2018.12.23 18:25:15 3: n_publish_loxone return value: 1
2018.12.23 18:25:15 3: n_publish_loxone return value: 1


Hat jemand einen Vorschlag das ganze stabiler zu machen?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 23 Dezember 2018, 19:06:26
Das kann in der Tat beim FHEM start etwas hacken. Gerade von man 5 Geräte und mehr hat. Wie schaut es denn nach einer halben Stunde so aus?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: rani22 am 23 Dezember 2018, 19:20:51
Zitat von: CoolTux am 23 Dezember 2018, 19:06:26
Das kann in der Tat beim FHEM start etwas hacken. Gerade von man 5 Geräte und mehr hat. Wie schaut es denn nach einer halben Stunde so aus?
Ohne manuelles hciconfig hci0 stehen alle auf error. Ich lasse es mal über nacht laufen. Hast du Hoffnung, dass sich dies erholt?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 23 Dezember 2018, 19:30:18
Dann kann das aber nicht an der Anzahl liegen. Eher am nicht stabilen BT Stack (Software}
Welche gatttool Version hast Du? welche Distribution?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: rani22 am 23 Dezember 2018, 20:45:04
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 9.4 (stretch)
Release:        9.4
Codename:       stretch

wie sehe ich welche version von gatttool installiert ist?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 24 Dezember 2018, 07:27:37
Zitat von: rani22 am 23 Dezember 2018, 20:45:04
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 9.4 (stretch)
Release:        9.4
Codename:       stretch

wie sehe ich welche version von gatttool installiert ist?

Das passt schon. Dann weiß ich Bescheid.
Wie sieht es im Gesamtbild aus. Bekommen Deine Pflanzensensoren so gut wie immer Daten und nur die Temperatursensoren bekommen Errors oder klemmen auch die?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: rani22 am 24 Dezember 2018, 09:28:36
Zitat von: CoolTux am 24 Dezember 2018, 07:27:37
Wie sieht es im Gesamtbild aus. Bekommen Deine Pflanzensensoren so gut wie immer Daten und nur die Temperatursensoren bekommen Errors oder klemmen auch die?
Es sind alle Sensoren, jedoch habe ich das Gefühl es betrift komischerweise nicht alle Werte. Bei z.B. Batteriestatus hat es ein OK mit einem relativ aktuellen Zeitstempel. Aber generell ist gestern kurz nach dem ins Bettgehen alles stillgestanden.

2018.12.23 23:32:07 3: n_publish_loxone return value: 1
2018.12.23 23:34:18 3: n_publish_loxone return value: 1
2018.12.23 23:34:49 3: n_publish_loxone return value: 1
2018.12.23 23:52:02 3: n_publish_loxone return value: 1
2018.12.24 01:01:22 1: Timeout for XiaomiBTLESens::ExecGatttool_Run reached, terminated process 14998
2018.12.24 02:37:14 1: Timeout for XiaomiBTLESens::ExecGatttool_Run reached, terminated process 19638
2018.12.24 04:05:14 1: Timeout for XiaomiBTLESens::ExecGatttool_Run reached, terminated process 23737
2018.12.24 09:23:27 3: n_publish_loxone return value: 1
2018.12.24 09:23:27 3: n_publish_loxone return value: 1


Heute morgen habe ich mit dm reset von hci0 wieder ein paar werte erhalten.

edit/

Um 9:49 habe ich noch einmal geresettet. Diesmal hatte ich bei einem Sensor das Verbose auf 5 gestellt:


2018.12.24 09:23:27 3: n_publish_loxone return value: 1
2018.12.24 09:23:27 3: n_publish_loxone return value: 1
2018.12.24 09:26:12 3: n_publish_loxone return value: 1
2018.12.24 09:26:12 3: n_publish_loxone return value: 1
2018.12.24 09:26:25 3: n_publish_loxone return value: 1
2018.12.24 09:26:25 3: n_publish_loxone return value: 1
2018.12.24 09:27:29 3: n_publish_loxone return value: 1
2018.12.24 09:27:29 3: n_publish_loxone return value: 1
2018.12.24 09:27:54 3: n_publish_loxone return value: 1
2018.12.24 09:27:54 3: n_publish_loxone return value: 1
2018.12.24 09:27:54 3: n_publish_loxone return value: 1
2018.12.24 09:29:17 3: n_publish_loxone return value: 1
2018.12.24 09:31:35 3: n_publish_loxone return value: 1
2018.12.24 09:40:19 4: XiaomiBTLESens (TempBedroom) - Run CreateParamGatttool with mod: write
2018.12.24 09:40:19 5: XiaomiBTLESens (TempBedroom) - Write XiaomiBTLESens_ExecGatttool_Run TempBedroom|4C:65:A8:D6:77:51|write|0x10|0100
2018.12.24 09:40:19 4: XiaomiBTLESens (TempBedroom) - stateRequestTimer: Call Request Timer
2018.12.24 09:40:20 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D6:77:51 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.24 09:40:20 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.12.24 09:40:20 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D6:77:51 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 1
2018.12.24 09:40:20 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.12.24 09:40:20 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D6:77:51 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 2
2018.12.24 09:40:20 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.12.24 09:40:20 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D6:77:51 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 3
2018.12.24 09:40:20 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.12.24 09:40:20 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D6:77:51 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 4
2018.12.24 09:40:20 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.12.24 09:40:20 4: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: gatttool result connect error,Invalid argument (22)

2018.12.24 09:40:20 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Done: gatttool return string: TempBedroom|4C:65:A8:D6:77:51|error|write|0x10|{"gtResult":"Invalid argument (22)"}
2018.12.24 09:40:20 4: XiaomiBTLESens (TempBedroom) - ProcessingErrors
2018.12.24 09:40:20 4: XiaomiBTLESens (TempBedroom) - WriteReadings: Readings were written
2018.12.24 09:46:53 4: XiaomiBTLESens (TempBedroom) - Run CreateParamGatttool with mod: write
2018.12.24 09:46:53 5: XiaomiBTLESens (TempBedroom) - Write XiaomiBTLESens_ExecGatttool_Run TempBedroom|4C:65:A8:D6:77:51|write|0x10|0100
2018.12.24 09:46:53 4: XiaomiBTLESens (TempBedroom) - stateRequestTimer: Call Request Timer
2018.12.24 09:46:54 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D6:77:51 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.24 09:46:59 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.12.24 09:46:59 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D6:77:51 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 1
2018.12.24 09:46:59 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.12.24 09:46:59 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D6:77:51 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 2
2018.12.24 09:46:59 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.12.24 09:46:59 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D6:77:51 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 3
2018.12.24 09:47:00 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.12.24 09:47:00 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D6:77:51 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 4
2018.12.24 09:47:00 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.12.24 09:47:00 4: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: gatttool result connect error,Invalid argument (22)

2018.12.24 09:47:00 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Done: gatttool return string: TempBedroom|4C:65:A8:D6:77:51|error|write|0x10|{"gtResult":"Invalid argument (22)"}
2018.12.24 09:47:00 4: XiaomiBTLESens (TempBedroom) - ProcessingErrors
2018.12.24 09:47:00 4: XiaomiBTLESens (TempBedroom) - WriteReadings: Readings were written
2018.12.24 09:50:39 3: n_publish_loxone return value: 1
2018.12.24 09:50:39 3: n_publish_loxone return value: 1
2018.12.24 09:50:39 3: n_publish_loxone return value: 1
2018.12.24 09:52:58 4: XiaomiBTLESens (TempBedroom) - Run CreateParamGatttool with mod: write
2018.12.24 09:52:58 5: XiaomiBTLESens (TempBedroom) - Write XiaomiBTLESens_ExecGatttool_Run TempBedroom|4C:65:A8:D6:77:51|write|0x10|0100
2018.12.24 09:52:58 4: XiaomiBTLESens (TempBedroom) - stateRequestTimer: Call Request Timer
2018.12.24 09:52:59 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D6:77:51 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.24 09:53:09 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: gatttool loop result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 30 2e 31 20 48 3d 35 35 2e 38 00
Notification handle = 0x000e value,54 3d 32 30 2e 32 20 48 3d 35 35 2e 37 00
Notification handle = 0x000e value,54 3d 32 30 2e 31 20 48 3d 35 35 2e 37 00
Notification handle = 0x000e value,54 3d 32 30 2e 32 20 48 3d 35 36 2e 30 00
Notification handle = 0x000e value,54 3d 32 30 2e 33 20 48 3d 35 35 2e 37 00
Notification handle = 0x000e value,54 3d 32 30 2e 32 20 48 3d 35 35 2e 39 00
Notification handle = 0x000e value,54 3d 32 30 2e 32 20 48 3d 35 35 2e 37 00
Notification handle = 0x000e value,54 3d 32 30 2e 32 20 48 3d 35 35 2e 38 00
Notification handle = 0x000e value,54 3d 32 30 2e 32 20 48 3d 35 35 2e 37 00

2018.12.24 09:53:09 4: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: gatttool result Characteristic value was written successfully
Notification handle = 0x000e value,54 3d 32 30 2e 31 20 48 3d 35 35 2e 38 00
Notification handle = 0x000e value,54 3d 32 30 2e 32 20 48 3d 35 35 2e 37 00
Notification handle = 0x000e value,54 3d 32 30 2e 31 20 48 3d 35 35 2e 37 00
Notification handle = 0x000e value,54 3d 32 30 2e 32 20 48 3d 35 36 2e 30 00
Notification handle = 0x000e value,54 3d 32 30 2e 33 20 48 3d 35 35 2e 37 00
Notification handle = 0x000e value,54 3d 32 30 2e 32 20 48 3d 35 35 2e 39 00
Notification handle = 0x000e value,54 3d 32 30 2e 32 20 48 3d 35 35 2e 37 00
Notification handle = 0x000e value,54 3d 32 30 2e 32 20 48 3d 35 35
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 24 Dezember 2018, 09:40:03
Setze mal Deine Intervalle unterschiedlicher. Die Pflanzensensor lässt Du jede Stunde abfragen und die Temperatursensoren je nach Raum etwas strecken.
Ich denke du rufst auch zu oft ab.
Generell reicht alle 5 min bei den Temperatursensoren. Das Strecker du noch bei unwichtigen Orten. Badezimmer auf 7 mm in Wohnzimmer auf 4 wegen meiner und Küche auf 9 min. Küche ist eh immer warm denke ich.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: rani22 am 24 Dezember 2018, 11:29:18
Das hat nicht wirklich was geholfen. nach ein paar abfragen ist Schluss.

2018.12.24 10:36:12 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Done: gatttool return string: TempBedroom|4C:65:A8:D6:77:51|ok|write|0x10|{"gtResult":"54 3d 32 30 2e 33 20 48 3d 35 35 2e 34 00 "}
2018.12.24 10:36:12 4: XiaomiBTLESens (TempBedroom) - ProcessingNotification
2018.12.24 10:36:12 4: XiaomiBTLESens (TempBedroom) - ProcessingNotification: handle 0x10
2018.12.24 10:36:12 4: XiaomiBTLESens (TempBedroom) - Thermo/Hygro Sens Handle0x10
2018.12.24 10:36:13 3: n_publish_loxone return value: 1
2018.12.24 10:36:13 3: n_publish_loxone return value: 1
2018.12.24 10:36:13 4: XiaomiBTLESens (TempBedroom) - WriteReadings: Readings were written
2018.12.24 10:36:37 3: n_publish_loxone return value: 1
2018.12.24 10:36:37 3: n_publish_loxone return value: 1
2018.12.24 10:52:22 4: XiaomiBTLESens (TempBedroom) - Run CreateParamGatttool with mod: write
2018.12.24 10:52:22 5: XiaomiBTLESens (TempBedroom) - Write XiaomiBTLESens_ExecGatttool_Run TempBedroom|4C:65:A8:D6:77:51|write|0x10|0100
2018.12.24 10:52:22 4: XiaomiBTLESens (TempBedroom) - stateRequestTimer: Call Request Timer
2018.12.24 10:52:23 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D6:77:51 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.24 10:52:23 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.12.24 10:52:23 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D6:77:51 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 1
2018.12.24 10:52:23 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.12.24 10:52:23 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D6:77:51 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 2
2018.12.24 10:52:23 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.12.24 10:52:23 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D6:77:51 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 3
2018.12.24 10:52:23 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.12.24 10:52:23 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D6:77:51 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 4
2018.12.24 10:52:23 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.12.24 10:52:23 4: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: gatttool result connect error,Invalid argument (22)

2018.12.24 10:52:23 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Done: gatttool return string: TempBedroom|4C:65:A8:D6:77:51|error|write|0x10|{"gtResult":"Invalid argument (22)"}
2018.12.24 10:52:23 4: XiaomiBTLESens (TempBedroom) - ProcessingErrors
2018.12.24 10:52:23 4: XiaomiBTLESens (TempBedroom) - WriteReadings: Readings were written
2018.12.24 11:06:34 4: XiaomiBTLESens (TempBedroom) - Run CreateParamGatttool with mod: write
2018.12.24 11:06:34 5: XiaomiBTLESens (TempBedroom) - Write XiaomiBTLESens_ExecGatttool_Run TempBedroom|4C:65:A8:D6:77:51|write|0x10|0100
2018.12.24 11:06:34 4: XiaomiBTLESens (TempBedroom) - stateRequestTimer: Call Request Timer
2018.12.24 11:06:34 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D6:77:51 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.24 11:06:41 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.12.24 11:06:41 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D6:77:51 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 1
2018.12.24 11:06:41 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.12.24 11:06:41 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D6:77:51 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 2
2018.12.24 11:06:41 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.12.24 11:06:41 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D6:77:51 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 3
2018.12.24 11:06:42 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.12.24 11:06:42 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D6:77:51 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 4
2018.12.24 11:06:42 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: gatttool loop result connect error,Invalid argument (22)

2018.12.24 11:06:42 4: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: gatttool result connect error,Invalid argument (22)

2018.12.24 11:06:42 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Done: gatttool return string: TempBedroom|4C:65:A8:D6:77:51|error|write|0x10|{"gtResult":"Invalid argument (22)"}
2018.12.24 11:06:42 4: XiaomiBTLESens (TempBedroom) - ProcessingErrors
2018.12.24 11:06:42 4: XiaomiBTLESens (TempBedroom) - WriteReadings: Readings were written
2018.12.24 11:24:38 4: XiaomiBTLESens (TempBedroom) - Run CreateParamGatttool with mod: write
2018.12.24 11:24:38 5: XiaomiBTLESens (TempBedroom) - Write XiaomiBTLESens_ExecGatttool_Run TempBedroom|4C:65:A8:D6:77:51|write|0x10|0100
2018.12.24 11:24:38 4: XiaomiBTLESens (TempBedroom) - stateRequestTimer: Call Request Timer
2018.12.24 11:24:38 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D6:77:51 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.24 11:24:38 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: gatttool loop result connect error,Too many levels of symbolic links (40)

2018.12.24 11:24:38 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D6:77:51 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 1
2018.12.24 11:24:38 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: gatttool loop result connect error,Too many levels of symbolic links (40)

2018.12.24 11:24:38 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D6:77:51 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 2
2018.12.24 11:24:38 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: gatttool loop result connect error,Too many levels of symbolic links (40)

2018.12.24 11:24:38 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D6:77:51 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 3
2018.12.24 11:24:38 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: gatttool loop result connect error,Too many levels of symbolic links (40)

2018.12.24 11:24:38 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D6:77:51 --char-write-req -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 4
2018.12.24 11:24:38 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: gatttool loop result connect error,Too many levels of symbolic links (40)

2018.12.24 11:24:38 4: XiaomiBTLESens (TempBedroom) - ExecGatttool_Run: gatttool result connect error,Too many levels of symbolic links (40)

2018.12.24 11:24:38 5: XiaomiBTLESens (TempBedroom) - ExecGatttool_Done: gatttool return string: TempBedroom|4C:65:A8:D6:77:51|error|write|0x10|{"gtResult":"Too many levels of symbolic links (40)"}
2018.12.24 11:24:38 4: XiaomiBTLESens (TempBedroom) - ProcessingErrors
2018.12.24 11:24:38 4: XiaomiBTLESens (TempBedroom) - WriteReadings: Readings were written
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 24 Dezember 2018, 12:02:56
OK dann schalte bitte mal nur die 3 Temposensoren und die 2 Pflanzensensoren ein und schaue dann mal.
Möglich das Du Dir einen zweiten BT Stick besorgen musst um das ganze auf zu teilen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: rani22 am 24 Dezember 2018, 14:55:37
Ich habe nun noch ein Systemupdate gemacht. Die Config etwas aufgeräumt und neu gestartet.
Mit 5 BLE sensoren scheint es nun zu laufen:

2018.12.24 13:03:24 1: Including /opt/loxberry/config/plugins/fhem/fhem.cfg
2018.12.24 13:03:24 3: telnetPort: port 7072 opened
2018.12.24 13:03:24 3: WEB: port 8083 opened
2018.12.24 13:03:24 3: WEBphone: port 8084 opened
2018.12.24 13:03:24 3: WEBtablet: port 8085 opened
2018.12.24 13:03:24 2: eventTypes: loaded 79 events from /opt/loxberry/data/plugins/fhem/eventTypes.txt
2018.12.24 13:03:24 3: XiaomiBTLESens (Floribunda) - defined with BTMAC C4:7C:8D:61:9C:D0
2018.12.24 13:03:24 3: XiaomiBTLESens (Floribunda) - set interval to 1750
2018.12.24 13:03:24 3: XiaomiBTLESens (Beaucarnea) - defined with BTMAC C4:7C:8D:61:7C:FF
2018.12.24 13:03:24 3: XiaomiBTLESens (Beaucarnea) - set interval to 1800
2018.12.24 13:03:24 3: XiaomiBTLESens (TempBath) - defined with BTMAC 4C:65:A8:D2:64:7E
2018.12.24 13:03:24 3: XiaomiBTLESens (TempBath) - set interval to 622
2018.12.24 13:03:24 3: XiaomiBTLESens (TempRoomPW) - defined with BTMAC 4C:65:A8:D2:2C:0C
2018.12.24 13:03:24 3: XiaomiBTLESens (TempRoomPW) - set interval to 1022
2018.12.24 13:03:24 3: XiaomiBTLESens (TempOffice) - defined with BTMAC 4C:65:A8:D8:E9:CF
2018.12.24 13:03:24 3: XiaomiBTLESens (TempOffice) - set interval to 822
2018.12.24 13:03:24 1: Including /opt/loxberry/data/plugins/fhem/fhem.save
2018.12.24 13:03:24 1: usb create starting
2018.12.24 13:03:25 3: Probing ZWDongle device /dev/serial1
2018.12.24 13:03:25 3: Probing CUL device /dev/ttyAMA0
2018.12.24 13:03:25 3: Probing TCM_ESP3 device /dev/ttyAMA0
2018.12.24 13:03:26 3: Probing ZWDongle device /dev/ttyAMA0
2018.12.24 13:03:26 3: Probing FRM device /dev/ttyAMA0
2018.12.24 13:03:38 1: usb create end
2018.12.24 13:03:38 0: Featurelevel: 5.9
2018.12.24 13:03:38 0: Server started with 17 defined entities (fhem.pl:18029/2018-12-22 perl:5.024001 os:linux user:loxberry pid:1057)
2018.12.24 13:03:41 3: n_publish_loxone return value: 1
2018.12.24 13:03:41 3: n_publish_loxone return value: 1
2018.12.24 13:03:41 3: n_publish_loxone return value: 1
2018.12.24 13:03:46 3: n_publish_loxone return value: 1
2018.12.24 13:03:46 3: n_publish_loxone return value: 1
2018.12.24 13:03:51 3: n_publish_loxone return value: 1
2018.12.24 13:03:51 3: n_publish_loxone return value: 1
2018.12.24 13:14:13 3: n_publish_loxone return value: 1
2018.12.24 13:25:13 3: n_publish_loxone return value: 1
2018.12.24 13:25:13 3: n_publish_loxone return value: 1
2018.12.24 13:25:59 3: n_publish_loxone return value: 1
2018.12.24 13:33:30 3: n_publish_loxone return value: 1
2018.12.24 13:33:30 3: n_publish_loxone return value: 1
2018.12.24 13:33:30 3: n_publish_loxone return value: 1
2018.12.24 13:38:21 3: n_publish_loxone return value: 1
2018.12.24 13:39:03 3: n_publish_loxone return value: 1
2018.12.24 13:39:03 3: n_publish_loxone return value: 1
2018.12.24 13:46:03 3: n_publish_loxone return value: 1
2018.12.24 13:46:03 3: n_publish_loxone return value: 1
2018.12.24 13:47:27 3: n_publish_loxone return value: 1
2018.12.24 13:47:27 3: n_publish_loxone return value: 1
2018.12.24 13:51:22 3: n_publish_loxone return value: 1
2018.12.24 13:52:09 3: n_publish_loxone return value: 1
2018.12.24 13:52:09 3: n_publish_loxone return value: 1
2018.12.24 14:02:24 3: n_publish_loxone return value: 1
2018.12.24 14:05:31 3: n_publish_loxone return value: 1
2018.12.24 14:05:31 3: n_publish_loxone return value: 1
2018.12.24 14:07:23 3: n_publish_loxone return value: 1
2018.12.24 14:07:23 3: n_publish_loxone return value: 1
2018.12.24 14:07:23 3: n_publish_loxone return value: 1
2018.12.24 14:09:51 3: n_publish_loxone return value: 1
2018.12.24 14:09:51 3: n_publish_loxone return value: 1
2018.12.24 14:10:53 3: n_publish_loxone return value: 1
2018.12.24 14:17:18 3: n_publish_loxone return value: 1
2018.12.24 14:24:33 3: n_publish_loxone return value: 1
2018.12.24 14:24:33 3: n_publish_loxone return value: 1
2018.12.24 14:26:34 3: n_publish_loxone return value: 1
2018.12.24 14:26:34 3: n_publish_loxone return value: 1
2018.12.24 14:27:49 3: n_publish_loxone return value: 1
2018.12.24 14:27:49 3: n_publish_loxone return value: 1
2018.12.24 14:40:26 3: n_publish_loxone return value: 1
2018.12.24 14:40:27 3: n_publish_loxone return value: 1
2018.12.24 14:40:27 3: n_publish_loxone return value: 1
2018.12.24 14:40:40 3: n_publish_loxone return value: 1
2018.12.24 14:40:40 3: n_publish_loxone return value: 1
2018.12.24 14:44:24 3: n_publish_loxone return value: 1
2018.12.24 14:44:24 3: n_publish_loxone return value: 1
2018.12.24 14:44:57 3: n_publish_loxone return value: 1
2018.12.24 14:50:49 3: n_publish_loxone return value: 1


Hast du eine empfehlung, welchen BT-Stick ich kaufen soll und wie ich die aufteilung machen kann?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 24 Dezember 2018, 15:22:49
Sagen wir mal so. Ich würde kein 5 Euro Teil kaufen. Meine haben immer um die 14 Euro gekostet und ich bin zufrieden damit. Mit der Aufteilung mach es doch einfach halb halb.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: rani22 am 25 Dezember 2018, 12:01:19
So wies aussieht lag es nicht an der Anzahl Sensoren. Ich habe nun seit 20h ohne Probleme alle 8 Sensoren am laufen.


Raspberry Pi3 B+
Linux loxberry 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
Release:        9.6
Codename:       stretch



# Xiaomi BLE Sensors
# Flora Sensors
define Floribunda XiaomiBTLESens C4:7C:8D:61:9C:D0
attr Floribunda event-on-change-reading fertility,lux,moisture,temperature
attr Floribunda interval 1750
attr Floribunda loxone true
attr Floribunda model flowerSens
attr Floribunda room XiaomiBTLESens
attr Floribunda verbose 3
define Beaucarnea XiaomiBTLESens C4:7C:8D:61:7C:FF
attr Beaucarnea event-on-change-reading moisture,temperature
attr Beaucarnea interval 1800
attr Beaucarnea loxone true
attr Beaucarnea model flowerSens
attr Beaucarnea room XiaomiBTLESens
attr Beaucarnea verbose 3
# Temperature and Humidity Sensors
define TempBath XiaomiBTLESens 4C:65:A8:D2:64:7E
attr TempBath event-on-change-reading humidity,temperature
attr TempBath interval 622
attr TempBath loxone true
attr TempBath model thermoHygroSens
attr TempBath room XiaomiBTLESens
attr TempBath verbose 3
define TempRoomPW XiaomiBTLESens 4C:65:A8:D2:2C:0C
attr TempRoomPW event-on-change-reading humidity,temperature
attr TempRoomPW interval 1022
attr TempRoomPW loxone true
attr TempRoomPW model thermoHygroSens
attr TempRoomPW room XiaomiBTLESens
attr TempRoomPW verbose 3
define TempOffice XiaomiBTLESens 4C:65:A8:D8:E9:CF
attr TempOffice event-on-change-reading humidity,temperature
attr TempOffice interval 822
attr TempOffice loxone true
attr TempOffice model thermoHygroSens
attr TempOffice room XiaomiBTLESens
attr TempOffice verbose 3
define TempDG XiaomiBTLESens 4C:65:A8:DA:82:9C
attr TempDG event-on-change-reading humidity,temperature
attr TempDG interval 520
attr TempDG loxone true
attr TempDG model thermoHygroSens
attr TempDG room XiaomiBTLESens
attr TempDG verbose 3
define TempBedroom XiaomiBTLESens 4C:65:A8:D6:77:51
attr TempBedroom event-on-change-reading humidity,temperature
attr TempBedroom interval 850
attr TempBedroom loxone true
attr TempBedroom model thermoHygroSens
attr TempBedroom room XiaomiBTLESens
attr TempBedroom verbose 3
define TempGuestRoom XiaomiBTLESens 4C:65:A8:DA:A1:86
attr TempGuestRoom event-on-change-reading humidity,temperature
attr TempGuestRoom interval 955
attr TempGuestRoom loxone true
attr TempGuestRoom model thermoHygroSens
attr TempGuestRoom room XiaomiBTLESens
attr TempGuestRoom verbose 3
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 25 Dezember 2018, 13:08:32
Und was genau hast du verändert?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: rani22 am 25 Dezember 2018, 19:30:21
Zitat von: CoolTux am 25 Dezember 2018, 13:08:32
Und was genau hast du verändert?

Raspian von 9.4 auf 9.6

und in der config die reihenfolge der defines. Ich denkke jedoch es lag am kernel update.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 30 Dezember 2018, 09:22:22
Zitat von: stole am 23 Dezember 2018, 10:36:39

2018.12.23 06:53:41 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
32 20 48 3d 36 36 2e 35 00 "}
2018.12.23 06:53:41 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 06:53:41 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 06:53:41 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 06:53:41 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 06:56:11 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 06:56:11 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 06:56:11 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 06:56:11 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 06:56:21 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 06:56:21 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 06:56:21 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
32 20 48 3d 36 36 2e 37 00 "}
2018.12.23 06:56:21 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 06:56:21 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 06:56:21 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 06:56:21 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 07:00:58 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 07:00:58 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 07:00:58 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 07:00:58 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 07:01:01 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result connect error,Transport endpoint is not connected (107)
2018.12.23 07:01:01 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 1
2018.12.23 07:01:11 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 07:01:11 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 07:01:11 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
32 20 48 3d 36 36 2e 38 00 "}
2018.12.23 07:01:11 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 07:01:11 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 07:01:11 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 07:01:11 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 07:04:05 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 07:04:05 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 07:04:05 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 07:04:05 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 07:04:15 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 07:04:15 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 07:04:15 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
32 20 48 3d 36 36 2e 38 00 "}
2018.12.23 07:04:15 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 07:04:15 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 07:04:15 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 07:04:15 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 07:07:03 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 07:07:03 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 07:07:03 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 07:07:04 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 07:07:14 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 07:07:14 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 07:07:14 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 39 00 "}
2018.12.23 07:07:14 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 07:07:14 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 07:07:14 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 07:07:14 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 07:11:26 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 07:11:26 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 07:11:26 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 07:11:26 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 07:11:37 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 07:11:37 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 07:11:37 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 37 00 "}
2018.12.23 07:11:37 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 07:11:37 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 07:11:37 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 07:11:37 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 07:14:49 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 07:14:49 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 07:14:49 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 07:14:50 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 07:15:00 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 07:15:00 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 07:15:00 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
32 20 48 3d 36 36 2e 35 00 "}
2018.12.23 07:15:00 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 07:15:00 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 07:15:00 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 07:15:00 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 07:19:54 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 07:19:54 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 07:19:54 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 07:19:55 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 07:20:05 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 07:20:05 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 07:20:05 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 37 00 "}
2018.12.23 07:20:05 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 07:20:05 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 07:20:05 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 07:20:05 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 07:26:26 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 07:26:26 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 07:26:26 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 07:26:27 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 07:26:37 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 07:26:37 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 07:26:37 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 39 00 "}
2018.12.23 07:26:37 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 07:26:37 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 07:26:37 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 07:26:37 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 07:31:52 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 07:31:53 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 07:31:53 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 07:31:53 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 07:32:03 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 07:32:03 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 07:32:03 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
32 20 48 3d 36 36 2e 38 00 "}
2018.12.23 07:32:03 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 07:32:03 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 07:32:03 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 07:32:03 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 07:36:24 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 07:36:24 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 07:36:24 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 07:36:24 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 07:36:34 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 07:36:34 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 07:36:34 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 37 00 "}
2018.12.23 07:36:34 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 07:36:34 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 07:36:34 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 07:36:34 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 07:39:50 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 07:39:50 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 07:39:50 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 07:39:50 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 07:40:00 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 07:40:00 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 07:40:00 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 38 00 "}
2018.12.23 07:40:00 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 07:40:00 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 07:40:00 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 07:40:00 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 07:42:43 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 07:42:43 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 07:42:43 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 07:42:43 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 07:42:53 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result
2018.12.23 07:42:53 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 1
2018.12.23 07:43:03 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 07:43:03 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 07:43:03 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 39 00 "}
2018.12.23 07:43:03 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 07:43:03 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 07:43:03 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 07:43:03 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 07:46:31 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 07:46:31 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 07:46:31 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 07:46:31 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 07:46:41 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 07:46:41 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 07:46:41 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 34 00 "}
2018.12.23 07:46:41 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 07:46:41 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 07:46:41 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 07:46:41 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 07:51:11 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 07:51:11 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 07:51:11 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 07:51:11 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 07:51:21 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 07:51:21 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 07:51:21 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 39 00 "}
2018.12.23 07:51:21 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 07:51:21 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 07:51:21 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 07:51:21 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 07:54:09 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 07:54:09 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 07:54:09 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 07:54:09 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 07:54:19 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 07:54:19 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 07:54:19 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
32 20 48 3d 36 36 2e 35 00 "}
2018.12.23 07:54:19 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 07:54:19 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 07:54:19 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 07:54:19 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 08:00:53 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 08:00:53 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 08:00:53 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 08:00:53 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 08:01:03 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 08:01:03 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 08:01:03 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 39 00 "}
2018.12.23 08:01:03 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 08:01:03 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 08:01:03 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 08:01:03 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 08:03:04 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 08:03:04 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 08:03:04 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 08:03:04 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 08:03:14 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 08:03:14 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 08:03:14 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 36 00 "}
2018.12.23 08:03:14 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 08:03:14 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 08:03:14 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 08:03:14 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 08:06:15 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 08:06:15 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 08:06:15 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 08:06:15 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 08:06:25 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 08:06:25 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 08:06:25 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
32 20 48 3d 36 37 2e 30 00 "}
2018.12.23 08:06:25 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 08:06:25 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 08:06:25 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 08:06:25 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 08:09:01 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 08:09:01 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 08:09:01 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 08:09:01 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 08:09:11 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 08:09:11 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 08:09:11 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 39 00 "}
2018.12.23 08:09:11 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 08:09:11 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 08:09:11 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 08:09:11 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 08:15:02 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 08:15:02 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 08:15:02 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 08:15:02 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 08:15:13 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 08:15:13 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 08:15:13 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 38 00 "}
2018.12.23 08:15:13 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 08:15:13 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 08:15:13 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 08:15:13 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 08:21:17 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 08:21:17 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 08:21:17 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 08:21:17 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 08:21:27 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 08:21:27 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 08:21:27 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 36 00 "}
2018.12.23 08:21:27 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 08:21:27 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 08:21:27 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 08:21:27 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 08:28:15 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 08:28:15 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 08:28:15 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 08:28:15 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 08:28:25 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 08:28:25 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 08:28:25 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 36 00 "}
2018.12.23 08:28:25 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 08:28:25 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 08:28:25 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 08:28:25 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 08:33:20 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 08:33:20 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 08:33:20 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 08:33:20 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 08:33:30 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 08:33:30 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 08:33:30 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 36 00 "}
2018.12.23 08:33:30 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 08:33:30 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 08:33:30 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 08:33:30 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 08:39:22 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 08:39:22 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 08:39:22 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 08:39:22 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 08:39:32 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 08:39:32 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 08:39:32 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 33 00 "}
2018.12.23 08:39:33 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 08:39:33 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 08:39:33 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 08:39:33 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 08:44:01 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 08:44:01 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 08:44:01 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 08:44:01 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 08:44:12 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 08:44:12 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 08:44:12 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 39 00 "}
2018.12.23 08:44:12 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 08:44:12 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 08:44:12 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 08:44:12 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 08:46:40 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 08:46:40 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 08:46:40 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 08:46:41 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 08:46:51 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 08:46:51 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 08:46:51 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 35 00 "}
2018.12.23 08:46:51 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 08:46:51 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 08:46:51 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 08:46:51 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 08:49:13 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 08:49:13 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 08:49:13 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 08:49:14 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 08:49:17 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result connect error,Function not implemented (38)
2018.12.23 08:49:17 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 1
2018.12.23 08:49:23 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result connect error,Function not implemented (38)
2018.12.23 08:49:23 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 2
2018.12.23 08:49:33 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 08:49:33 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 08:49:33 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 39 00 "}
2018.12.23 08:49:33 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 08:49:33 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 08:49:33 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 08:49:33 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 08:55:45 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 08:55:45 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 08:55:45 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 08:55:46 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 08:55:56 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 08:55:56 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 08:55:56 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 34 00 "}
2018.12.23 08:55:56 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 08:55:56 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 08:55:56 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 08:55:56 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 09:01:39 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 09:01:40 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 09:01:40 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 09:01:40 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 09:01:50 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 09:01:50 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 09:01:50 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 38 00 "}
2018.12.23 09:01:50 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 09:01:50 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 09:01:50 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 09:01:50 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 09:04:34 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 09:04:34 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 09:04:34 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 09:04:34 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 09:04:44 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 09:04:44 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 09:04:44 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
32 20 48 3d 36 36 2e 37 00 "}
2018.12.23 09:04:44 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 09:04:44 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 09:04:44 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 09:04:44 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 09:07:11 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 09:07:11 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 09:07:11 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 09:07:11 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 09:07:21 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 09:07:21 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 09:07:21 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 36 00 "}
2018.12.23 09:07:21 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 09:07:21 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 09:07:21 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 09:07:21 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 09:12:56 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 09:12:56 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 09:12:56 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 09:12:56 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 09:13:06 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 09:13:06 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 09:13:06 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 35 00 "}
2018.12.23 09:13:06 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 09:13:06 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 09:13:06 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 09:13:06 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 09:16:22 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 09:16:22 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 09:16:22 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 09:16:22 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 09:16:32 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 09:16:32 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 09:16:32 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 36 00 "}
2018.12.23 09:16:32 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 09:16:32 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 09:16:32 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 09:16:32 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 09:21:34 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 09:21:34 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 09:21:34 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 09:21:34 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 09:21:44 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 09:21:44 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 09:21:44 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 34 00 "}
2018.12.23 09:21:44 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 09:21:44 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 09:21:44 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 09:21:44 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 09:25:25 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 09:25:25 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 09:25:25 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 09:25:25 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 09:25:35 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 09:25:35 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 09:25:35 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"no data respon
se"}
2018.12.23 09:25:35 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 09:25:35 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 09:25:35 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 09:25:35 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 09:25:35 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 09:31:44 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 09:31:44 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 09:31:44 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 09:31:44 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 09:31:54 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 09:31:54 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 09:31:54 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
30 20 48 3d 36 36 2e 32 00 "}
2018.12.23 09:31:54 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 09:31:54 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 09:31:54 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 09:31:54 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 09:38:19 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 09:38:19 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 09:38:19 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 09:38:19 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 09:38:29 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 09:38:29 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 09:38:29 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
32 20 48 3d 36 36 2e 32 00 "}
2018.12.23 09:38:29 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 09:38:29 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 09:38:29 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 09:38:29 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 09:42:38 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 09:42:38 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 09:42:38 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 09:42:38 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 09:42:48 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 09:42:48 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 09:42:48 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 34 00 "}
2018.12.23 09:42:48 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 09:42:48 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 09:42:48 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 09:42:48 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 09:49:23 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 09:49:23 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 09:49:23 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 09:49:23 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 09:49:33 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 09:49:33 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully
2018.12.23 09:49:33 5: XiaomiBTLESens (xSense1) - ExecGatttool_Done: gatttool re
turn string: xSense1|4C:65:A8:D5:E1:96|ok|write|0x10|{"gtResult":"54 3d 31 38 2e
31 20 48 3d 36 36 2e 34 00 "}
2018.12.23 09:49:33 4: XiaomiBTLESens (xSense1) - ProcessingNotification       
2018.12.23 09:49:33 4: XiaomiBTLESens (xSense1) - ProcessingNotification: handle
0x10
2018.12.23 09:49:33 4: XiaomiBTLESens (xSense1) - Thermo/Hygro Sens Handle0x10 
2018.12.23 09:49:33 4: XiaomiBTLESens (xSense1) - WriteReadings: Readings were w
ritten
2018.12.23 09:54:47 4: XiaomiBTLESens (xSense1) - Run CreateParamGatttool with m
od: write
2018.12.23 09:54:47 5: XiaomiBTLESens (xSense1) - Write XiaomiBTLESens_ExecGattt
ool_Run xSense1|4C:65:A8:D5:E1:96|write|0x10|0100                               
2018.12.23 09:54:47 4: XiaomiBTLESens (xSense1) - stateRequestTimer: Call Reques
t Timer
2018.12.23 09:54:47 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: call gatttoo
l with command: timeout 10 gatttool -i hci0 -b 4C:65:A8:D5:E1:96 --char-write-re
q -a 0x10 -n 0100 --listen 2>&1 /dev/null and loop 0
2018.12.23 09:54:57 5: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool loo
p result Characteristic value was written successfully
2018.12.23 09:54:57 4: XiaomiBTLESens (xSense1) - ExecGatttool_Run: gatttool res
ult Characteristic value was written successfully


Kann es sein das Du nicht die neuste Version verwendest? Ich habe das mal eben bei mir getestet, da funktioniert das.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: cmdr_tom am 03 Januar 2019, 19:02:07
Hallo,

ich habe heute ein Thermometer in Betrieb genommen. Es scheint aber, dass Werte falsch ausgelesen werden bzw. verdreht sind.
defmod Balkonthermometer XiaomiBTLESens 4C:65:A8:DA:C7:4D
attr Balkonthermometer icon temperature_humidity
attr Balkonthermometer interval 300
attr Balkonthermometer model thermoHygroSens
attr Balkonthermometer room Balkon
attr Balkonthermometer verbose 0

setstate Balkonthermometer T: 1.5  H: 8.9
setstate Balkonthermometer 2019-01-03 17:56:18 batteryPercent 64
setstate Balkonthermometer 2019-01-03 17:56:18 batteryState ok
setstate Balkonthermometer 2019-01-03 18:43:05 fertility 0
setstate Balkonthermometer 2019-01-03 17:49:29 firmware 00.00.66
setstate Balkonthermometer 2019-01-03 18:53:05 humidity 8.9
setstate Balkonthermometer 2019-01-03 18:43:19 lastGattError charWrite faild
setstate Balkonthermometer 2019-01-03 18:43:05 lux 16
setstate Balkonthermometer 2019-01-03 18:43:05 moisture 0
setstate Balkonthermometer 2019-01-03 18:53:05 state T: 1.5  H: 8.9
setstate Balkonthermometer 2019-01-03 18:53:05 temperature 1.5


Der Wert der Humidity liegt bei eigentlich 66%. Es scheint, dass dieser Wert als Firmware angezeigt wird. XiaomiBTLESens Version ist die 2.4.4.

Viele Grüße

Tom
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 03 Januar 2019, 19:16:22
Hallo Tom,

Anscheinend hattest du das model Attribut mal falsch gesetzt. Am besten lösche alle Readings einmal und lasse neu einlesen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: cmdr_tom am 04 Januar 2019, 13:41:36
Hi,

das hat geholfen. Besten Dank.

Viele Grüße

Thomas
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: betelgeuze am 05 Januar 2019, 15:12:13
Hallo,
ich habe 4 Temperatursensoren mit dem Modul einfach und schnell an einem Raspberry 3B+ in Betrieb nehmen können - vielen dank.

Wisst ihr ob man etwas mit der Reichtweite machen kann? Ich bin momentan entsetzt, dass die Sensoren nur ca. 3m Reichweite haben. Das passt natürlich nicht zum geplanten Einsatzzweck mit einem zentralen RPI und einem Sensor in jedem Raum.

Lässt sich irgendwie die Leistung der Sensoren erhöhen? Bisher habe ich nirgends etwas dazu gefunden.

Viele Grüße
Tobias
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Neuhier am 05 Januar 2019, 20:28:02
Falls noch jemand günstig (?) einen 4er-Pack benötigt: gibt es unter der Rubrik "Royal Gardineer" für 80Eu bei Pearl.
Best.Nr. ZX-2812-901
Sind aber die Xiaomi´s.
Erkennbar an der MAC, die mit C4:7C:8D anfängt, die auch die Xiaomi´s haben.
Beim Ali sind die nicht mehr unter 25$ zu finden, von der "Reisezeit" mal abgesehen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: stole am 07 Januar 2019, 02:23:44
Zitat von: CoolTux am 30 Dezember 2018, 09:22:22
Kann es sein das Du nicht die neuste Version verwendest? Ich habe das mal eben bei mir getestet, da funktioniert das.

Yup, upgedated und tut's.

Entschuldigung für dumme Frage, habe ich komplett übersehen.

Danke sehr
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Typ1er am 12 Januar 2019, 17:03:14
Ich brauch mal einen Tip, ich nutze am Pi, 8 Pflanzensensoren. Das Bluetooth hängt sich seit einer Zeit immer mal wieder auf, Am Bluetooth hängt sonst nicht weiter. Hat solche Beobachtungen noch jemand?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Clue am 13 Januar 2019, 13:11:09
Zitat von: Typ1er am 12 Januar 2019, 17:03:14
Ich brauch mal einen Tip, ich nutze am Pi, 8 Pflanzensensoren. Das Bluetooth hängt sich seit einer Zeit immer mal wieder auf, Am Bluetooth hängt sonst nicht weiter. Hat solche Beobachtungen noch jemand?

Hi Typ1er,

schau mal meinen Beitrag "Antwort #455" in diesem Thread und ob du das selbe Problem hast. Ich habe keine Lösung gefunden, da ich das Projekt "Pflanzsensoren" erstmal aufgeschoben habe, habe aber festgestellt, dass es mit der Reichweite zusammenhängt. Der gatttool Prozess bleibt aus irgendeinem Grund bestehen wenn der Sensor ausser Reichweite ist, sollte aber eigentlich gekillt werden.

Gruß
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 13 Januar 2019, 13:33:06
Ich habe seit 2 Jahren (im Sommer) 10 Pflanzensensoren an einem RaspberryPI ZeroW (der in der Nähe des Balkons am Fenster weilt) angebunden und keine Probleme...

...Raspi wird vom Modul auf dem fhem-Server (RaspPi3) per ssh abgefragt...

Gruß, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: mi.ke am 13 Januar 2019, 18:36:08
Zitat von: Typ1er am 12 Januar 2019, 17:03:14
Ich brauch mal einen Tip, ich nutze am Pi, 8 Pflanzensensoren. Das Bluetooth hängt sich seit einer Zeit immer mal wieder auf, Am Bluetooth hängt sonst nicht weiter. Hat solche Beobachtungen noch jemand?

Ich tippe auch auf Reichweitenproblemen und/oder zu kurze Abfrage-Intervalle

Bei Reichweitenproblemen zusätzlichen RPiZ über SSH verwenden !

Hier laufen z.Z. (Winter)  17 Stk.
Im Sommer sind es dann wieder ca. 30.
Bluetooth ist auf diesem RPi auch noch mit Anwesenheitskennung und Batterieüberwachung beschäftigt.
Allerdings auf einem anderen hcidevice.

Bei mehrere Sensoren muss/darf der interval nicht zu kurz sein, sonst versuchen doch mehrere Devices/Sensoren gleichzeitig Daten zu bekommen. Cooltux hatte seinerzeit schon eine zufällige Verzögerungszeit eingebaut, die das kompensiert.
Aber mal ehrlich. Pflanzen sind nicht wirklich "plötzlich" trocken und müssen nicht alle 10 Minuten abgefragt werden. 8)

Das einzige "Problem" ist, dass nach dem fhem-Start alle Devices zur gleichen Zeit starten wollen.
Hier hab ich mir ein Script geschrieben, dass nach starten des Hostes alle Devices deaktiviert und dann im Zeitversatz von einigen Minuten nacheinander aktiviert. Das funktioniert dann sehr gut.

Da die Sensoren aber mehr können als "Erde Trocken||Nass" setze ich sie auch z.B. zur Beschattung ein.
Diese haben eine dann einen kürzeren Interval und dafür auch eine höhere Prio beim automatisierten Startvorgang.

Cheers
mi.ke
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Neuhier am 13 Januar 2019, 18:49:53
Die Lux-Werte ( und nicht nur die ) von denen sind sehr sprunghaft.
Ohne Änderung der Lichtstärke geht es hier von 0 bis über 100 und retour.
2019-01-13_01:28:37 Flower3 read sensor data
2019-01-13_01:28:37 Flower3 lux: 30
2019-01-13_01:28:37 Flower3 fertility: 215
2019-01-13_01:28:37 Flower3 temperature: 5.5
2019-01-13_01:28:37 Flower3 moisture: 24
2019-01-13_01:28:37 Flower3 active
2019-01-13_01:36:50 Flower3 write sensor data
2019-01-13_01:36:55 Flower3 read sensor data
2019-01-13_01:36:56 Flower3 temperature: 5.5
2019-01-13_01:36:56 Flower3 fertility: 215
2019-01-13_01:36:56 Flower3 lux: 95
2019-01-13_01:36:56 Flower3 moisture: 24
2019-01-13_01:36:56 Flower3 active
2019-01-13_01:42:48 Flower3 write sensor data
2019-01-13_01:42:52 Flower3 read sensor data
2019-01-13_01:42:52 Flower3 lux: 14
2019-01-13_01:42:52 Flower3 temperature: 5.5
2019-01-13_01:42:52 Flower3 fertility: 214
2019-01-13_01:42:52 Flower3 moisture: 24
2019-01-13_01:42:52 Flower3 active
2019-01-13_01:50:44 Flower3 write sensor data
2019-01-13_01:50:47 Flower3 read sensor data
2019-01-13_01:50:47 Flower3 temperature: 5.4
2019-01-13_01:50:47 Flower3 fertility: 218
2019-01-13_01:50:47 Flower3 lux: 34
2019-01-13_01:50:47 Flower3 moisture: 24
2019-01-13_01:50:47 Flower3 active
2019-01-13_01:57:23 Flower3 write sensor data
2019-01-13_01:57:27 Flower3 read sensor data
2019-01-13_01:57:27 Flower3 fertility: 216
2019-01-13_01:57:27 Flower3 temperature: 5.4
2019-01-13_01:57:27 Flower3 lux: 74
2019-01-13_01:57:27 Flower3 moisture: 24
2019-01-13_01:57:27 Flower3 active
2019-01-13_02:06:04 Flower3 write sensor data
2019-01-13_02:06:07 Flower3 read sensor data
2019-01-13_02:06:08 Flower3 lux: 53
2019-01-13_02:06:08 Flower3 fertility: 215

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: mi.ke am 13 Januar 2019, 19:29:03
Zitat von: Neuhier am 13 Januar 2019, 18:49:53
Die Lux-Werte ( und nicht nur die ) von denen sind sehr sprunghaft.
Ohne Änderung der Lichtstärke geht es hier von 0 bis über 100 und retour.

na und . . . !?!

. . .  für 10,- € !

Heller Sonnentag    60.000 lx
Bedeckter Sommertag    20.000 lx
Im Schatten im Sommer    10.000 lx
Bedeckter Wintertag    3.500 lx
Büro-/Zimmerbeleuchtung    500 lx
Flurbeleuchtung    100 lx
Wohnzimmer[6]    50 lx
Straßenbeleuchtung    10 lx
Kerze ca. 1 Meter entfernt    1 lx

Deiner Pflanze ist es egal ob sie in Flur oder im Wohnzimmer steht.
Wenn dat Dingen 30000-40000 anzeigt scheint auf jeden Fall die Sonne
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Neuhier am 13 Januar 2019, 19:47:19
Ist aber für Schaltaufgaben etwas unsicher.
Nimmt man den Wert zu hoch, passiert gar nix, ist er zu niedrig, wird dauernd an- und ausgeschaltet.
Eine Glättung wäre nicht übel, das geht aber nicht so einfach.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: mi.ke am 13 Januar 2019, 19:52:49
Zitat von: Neuhier am 13 Januar 2019, 19:47:19
Eine Glättung wäre nicht übel, das geht aber nicht so einfach.

https://forum.fhem.de/index.php/topic,95759.msg886621.html#msg886621
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ToM_ToM am 24 Januar 2019, 07:27:36
ZitatIch brauch mal einen Tip, ich nutze am Pi, 8 Pflanzensensoren. Das Bluetooth hängt sich seit einer Zeit immer mal wieder auf, Am Bluetooth hängt sonst nicht weiter. Hat solche Beobachtungen noch jemand?
Was genau meinst du mit "hängt sich auf"? Ich habe die Beobachtung machen können dass mein Bluetooth-Modul nach einem Neustart des Pis weg sein kann. Dann muss ich es einmal trennen und wieder einstecken dass es als Device wieder erkannt wird.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 24 Januar 2019, 07:40:45
Zitat von: ToM_ToM am 24 Januar 2019, 07:27:36
Was genau meinst du mit "hängt sich auf"? Ich habe die Beobachtung machen können dass mein Bluetooth-Modul nach einem Neustart des Pis weg sein kann. Dann muss ich es einmal trennen und wieder einstecken dass es als Device wieder erkannt wird.

Für "Trennen und wieder Stecken" gibt es unter Linux wohl auch einen Befehl...
Hab ich zumindest in einem andern Thread wo gelesen...
(weiß aber nicht, ob ich das jetzt noch mal finde)

Gruß, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ToM_ToM am 24 Januar 2019, 09:08:21
ZitatFür "Trennen und wieder Stecken" gibt es unter Linux wohl auch einen Befehl...

Hi Joachim, der würde mich brennend interessieren  :D

Du meinst aber nicht folgenden:

hciconfig hci0 down
hciconfig hci0 up


Oder? Das funktioniert nämlich nicht da laut des Pis ja kein Device angeschlossen ist.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 24 Januar 2019, 10:42:20
Zitat von: ToM_ToM am 24 Januar 2019, 09:08:21
Hi Joachim, der würde mich brennend interessieren  :D

Du meinst aber nicht folgenden:

hciconfig hci0 down
hciconfig hci0 up


Oder? Das funktioniert nämlich nicht da laut des Pis ja kein Device angeschlossen ist.

Nein, ist auf "USB-Ebene"...

Vielleicht finde ich das noch mal...

Gruß, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Neuhier am 24 Januar 2019, 22:15:16
Sowas ?

https://www.bitblokes.de/usb-ports-raspberry-pi-anschalten-ausschalten-deaktivieren/
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: NEA am 09 Februar 2019, 18:09:48
Zitat von: Neuhier am 05 Januar 2019, 20:28:02
Beim Ali sind die nicht mehr unter 25$ zu finden, von der "Reisezeit" mal abgesehen.

bei Gearbest kosten die 14,16€ - da habe ich meine letzte Sendung her. Lieferung dauert ca. 2-3 Wochen. Die letzten, die ich bekommen habe sind jetzt aber etwas grünlich und nicht mehr weiss. Ich konnte die direkt in der App anmelden, also ohne VPN oder irgendwas...
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: NEA am 09 Februar 2019, 18:21:14
Zitat von: Typ1er am 12 Januar 2019, 17:03:14
Ich brauch mal einen Tip, ich nutze am Pi, 8 Pflanzensensoren. Das Bluetooth hängt sich seit einer Zeit immer mal wieder auf, Am Bluetooth hängt sonst nicht weiter. Hat solche Beobachtungen noch jemand?

genau das gleiche Problem habe ich seit gestern auch. Ich hatte ein Update am raspi laufen lassen (apt-get update/upgrade) und ein Update in fhem durchgeführt, seither wird nichts mehr empfangen. In fhem bekomme ich unter "lastGattError" ein
Invalid argument (22)
Ein sudo hcitool lescan an der Konsole führt zu einem Disable scan failed: Input/output error. Man kann bluetooth zwar mit sudo hciconfig hci0 down und anschliessendem sudo hciconfig hci0 up neu starten, der IO-error kommt dann aber wieder, sobald ich in fhem einen "get Device sensorData" anstoße. Mit user pi kann ich weder einen scan noch den restart durchführen.

Nachtrag: im FHEM-log habe ich jetzt unzählige Einträge
Timeout for XiaomiBTLESens::ExecGatttool_Run reached, terminated process xxxx

Nachtrag2: unter lastGatterror bekomme ich jetzt
Too many levels of symbolic links (40)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ToM_ToM am 11 Februar 2019, 23:25:17
ZitatSowas ?
Klang interessant, funktioniert aber leider nicht.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: KyleK am 15 Februar 2019, 09:25:09
Hi,

zur Information, bei mir bringt das Modul FHEM zum Absturz wenn ich "set devicename" ausführe:
Undefined subroutine &XiaomiBTLESens::makeDeviceName called at /opt/fhem/FHEM/74_XiaomiBTLESens.pm line 417.

Ich hab "makDeviceName" zur GP_Import Liste am Anfang des Moduls hinzugefügt, damit stürzt es nicht mehr ab :)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 15 Februar 2019, 09:34:51
Vielen Dank für die Info.
Wid gefixt.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 15 Februar 2019, 09:44:50
gefixte Version kommt morgen per Update.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: skyline am 19 Februar 2019, 07:48:18
Kann ich mit dem Modul auch mehrere Bluetooth-Dongle betreiben?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 19 Februar 2019, 07:53:28
Nein. Mit dem Modul kann man keine Bluetoothdongel betreiben sondern Sensoren abrufen. Du kannst aber gerne pro FHEM Device ein entsprechendes hci Device über das Du dann die Sensoren abfragst angeben.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: skyline am 19 Februar 2019, 08:06:37
So war es ja auch gemeint ;)

ZitatMoin miteinander,

nachdem mir das alles keine Ruhe gelassen hat, hier mal ein neuer Zwischenstand.
Hab mir jetzt nochmal einen weiteren BT-Stick besorgt, wurde auch wieder ohne Probleme erkannt,
Interne Bluetooth Verbindung hab ich mal aktiv gelassen, nach ca. 5 min. hat sich das interne BT scheinbar wieder aufgehängt, jetzt hat der neue BT-Stick übernommen

Code: [Auswählen]

bluetoothDevice       hci1

lief dann ohne Fehlermeldungen ca. 5 Stunden durch und hat auch alle Befehle ausgeführt...
Nun habe ich den Crontab Eintrag von NEA noch hinzugefügt

Code: [Auswählen]

*/3 * * * *     root    hciconfig hci0 down && hciconfig hci0 up

dann einen reboot und siehe da, jetzt wechselt er lustig zwischen hci0 und hci1, es kommen keine Fehler, er übernimmt die Befehle alles super!
Danke an alle Helfer und danke  für das Modul!!!

Gruß
Rudy
https://forum.fhem.de/index.php/topic,60595.msg906449.html#msg906449


Aus dem Beitrag geht ja hervor, dass zwischen den Dongles gewechselt wird.

Ist das Verhalten bei dem Modul genau so?

Sind ja beide von dir ;)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 19 Februar 2019, 08:17:11
Das EQ3BTLE Modul ist von Dominik. Ich habe lediglich die ssh Fähigkeit beigetragen und ein bisschen Logik. Mehr nicht.
Das XiaomiBTLESens.pm verwendet keine Automatik. Einmal fest eingestellt als Attribut bleibt das Modul bei der Abfrage über das Device welches eingetragen wurde.
Das Feature ist aber interessant  :)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: frank_41 am 23 Februar 2019, 01:25:52
Zitat von: MadMax-FHEM am 24 Januar 2019, 07:40:45
Für "Trennen und wieder Stecken" gibt es unter Linux wohl auch einen Befehl...
Hab ich zumindest in einem andern Thread wo gelesen...
(weiß aber nicht, ob ich das jetzt noch mal finde)

Gruß, Joachim

ich habe mehrere Sensoren über Raspi 3. Nach einiger Zeit fingen die an zu "spinnen", waren nicht mehr erreichbar. Nach einem Reboot des Raspi gingen sie dann wieder eine Weile, um dann wieder zu "spinnen". Ich habe jetzt einen cronjob gebaut mit "sudo hciconfig hci0 reset", der alle 2 Stunden zuschlägt. Und siehe da, alle Sensoren sind wieder erreichbar und ich kriege wieder Werte. Bluetooth im Raspi ist wohl irgendwie madig ??
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: NEA am 24 Februar 2019, 11:57:16
Zitat von: frank_41 am 23 Februar 2019, 01:25:52
Bluetooth im Raspi ist wohl irgendwie madig ??

das Gefühl habe ich auch - aber erst seit einem der (Raspbian) Updates mitte Januar etwa. Vorher hatte ich zumindest keine solchen Probleme.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Koersten am 24 Februar 2019, 13:00:08
Zitat von: frank_41 am 23 Februar 2019, 01:25:52
ich habe mehrere Sensoren über Raspi 3. Nach einiger Zeit fingen die an zu "spinnen", waren nicht mehr erreichbar. Nach einem Reboot des Raspi gingen sie dann wieder eine Weile, um dann wieder zu "spinnen". Ich habe jetzt einen cronjob gebaut mit "sudo hciconfig hci0 reset", der alle 2 Stunden zuschlägt. Und siehe da, alle Sensoren sind wieder erreichbar und ich kriege wieder Werte. Bluetooth im Raspi ist wohl irgendwie madig ??

Ja das kann ich leider bestätigen. Irgendetwas läuft da aus dem Ruder.
Ich habe mir auch so beholfen wie du. Auch wenn das natürlich keine "saubere" Lösung ist... :o
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Neuhier am 24 Februar 2019, 20:15:39
Bei mir laufen die FlowerSens und die GTags parallel.
Hier steigt oft Lepresence aus, die FlowerSens bleiben aktiv.
Einfaches systemctl restart lepresenced hilft aber auch hier weiter.
Wollte mal testweise das BT vom Raspi nur für einen Dienst nutzen und einen BT-Dongle für den anderen anklemmen.
Habe ich aber noch nicht realisiert.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Vtcop am 27 Februar 2019, 22:15:41
For Xiaomi flower care there is well known process to get historical data.

Do you know any way for getting historical data from Xiaomi hygrometer?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Invers am 30 März 2019, 15:03:19
Ich habe ebenfalls Fehler im Log. Habe auch auf der Konsole probiert:

pi@fhemPi:~ $ sudo hcitool lescan
Set scan parameters failed: Input/output error
pi@fhemPi:~ $ sudo hciconfig hci0 down
pi@fhemPi:~ $ sudo hciconfig hci0 up
pi@fhemPi:~ $ sudo hcitool lescan
LE Scan ...
C4:7C:8D:61:A5:18 (unknown)
C4:7C:8D:61:A5:18 Flower care
4C:65:A8:D2:53:8C (unknown)
4C:65:A8:D2:53:8C MJ_HT_V1
9C:8C:6E:EC:1F:F9 (unknown)
4C:65:A8:D2:9B:E3 (unknown)
4C:65:A8:D2:9B:E3 MJ_HT_V1
^Cpi@fhemPi:~ $


Keinerlei Änderungen vorgenommen und es passierte vor einigen Tagen schon einmal. Habe ich diesmal bemerkt, weil auch meine Xiaomi - Thermometer nicht mehr empfangen wurden, zumindest einer davon.

Fehlermeldungen im Log:
2019.03.30 13:08:35 1: Timeout for XiaomiBTLESens::ExecGatttool_Run reached, terminated process 17268

Und hier noch das List:

Internals:
   BTMAC      C4:7C:8D:61:A5:18
   DEF        C4:7C:8D:61:A5:18
   FUUID      5c6428f1-f33f-edf9-cfae-1a0c1dab3be5879c
   INTERVAL   7200
   NAME       Blume1
   NOTIFYDEV  global,Blume1
   NR         416
   NTFY_ORDER 50-Blume1
   STATE      error
   TYPE       XiaomiBTLESens
   VERSION    2.4.7
   loglevel   4
   READINGS:
     2019-03-30 09:29:14   batteryPercent  99
     2019-03-30 09:29:14   batteryState    ok
     2019-03-30 11:32:57   fertility       1212
     2019-03-30 09:29:14   firmware        3.1.9
     2019-03-30 13:36:05   lastGattError   Invalid argument (22)
     2019-03-30 11:32:57   lux             297
     2019-03-30 11:32:57   moisture        53
     2019-03-30 13:36:05   state           error
     2019-03-30 11:32:57   temperature     20
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1553934554.57657
     updateTimestampCallBattery 2019-03-30 09:29:14
Attributes:
   alias      Ranke
   comment    Batteriewechsel
06/11/2018
   devStateIcon devStateIcon .*active:scene_garden@lime .*unreachable:scene_garden@red
   disabledForIntervals 20:00-08:00
   group      Pflanzen
   hciDevice  hci0
   icon       hue_room_garden
   interval   7200
   minMoisture 35
   model      flowerSens
   room       Wohnung->Wohnzimmer



Mal sehen, wie lange es jetzt läuft, bevor der Fehler wieder kommt.

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: mi.ke am 06 April 2019, 14:59:06
Hi Leon,

kurze Frage.

Gibt es eine Möglichkeit oder hast Du eine Idee (Trick), wie man bei Abragen über "moisture" und "minMoisture" einen Offset einzubauen kann.

Hintergrund ist, dass meine Pflanzen in unterschiedlicher Erde /Seramis stehen. Eigentlich sind die bereits über "moisture" und "minMoisture" gut eingestellt.

Ich hab allerdings einige Patienten, da wäre eine Faktor wie z.B. (offset = moisture * 5), genau richtig.
Hab es mit userReadings versucht, aber der "minMoisture" greift vor meinem userReading.

Hast Du/Ihr eine Idee?

Danke und Grüße

Cheers
mi.ke
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 06 April 2019, 19:23:58
Zitat von: mi.ke am 06 April 2019, 14:59:06
Hi Leon,

kurze Frage.

Gibt es eine Möglichkeit oder hast Du eine Idee (Trick), wie man bei Abragen über "moisture" und "minMoisture" einen Offset einzubauen kann.

Hintergrund ist, dass meine Pflanzen in unterschiedlicher Erde /Seramis stehen. Eigentlich sind die bereits über "moisture" und "minMoisture" gut eingestellt.

Ich hab allerdings einige Patienten, da wäre eine Faktor wie z.B. (offset = moisture * 5), genau richtig.
Hab es mit userReadings versucht, aber der "minMoisture" greift vor meinem userReading.

Hast Du/Ihr eine Idee?

Danke und Grüße

Cheers
mi.ke

Behalte doch das userReadings und schalte den minMoisture ab.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Invers am 10 April 2019, 10:59:56
Hi, die Lage spitzt sich zu.
Wie im Beitrag #696 geschildert, habe ich noch immer die Probleme.
Alles läuft einige Zeit ohne Probleme, dann häufen sich langsam und dann immer schneller die
Das betrifft dann auch meine Thermo/Hygrometer.

Nach vielen Fehlermeldungen der Art:
2019.04.10 10:00:31 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:00:32 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:00:33 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:00:35 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:00:36 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:00:37 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:00:38 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:00:39 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:00:40 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:00:41 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:00:42 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:00:43 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:00:44 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:00:46 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:00:47 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:00:48 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:00:49 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:00:50 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:00:51 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:00:52 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:00:53 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:00:54 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:00:55 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:00:57 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:00:58 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:00:59 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:01:00 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:01:01 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:01:02 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:01:03 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:01:04 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:01:05 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:01:06 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:01:08 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:01:09 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...
2019.04.10 10:01:10 3: XiaomiBTLESens (TMP_Bu) - ExecGatttool_Run: another gatttool process is running. waiting...


kommt dann im Anschluss eine Meldung:
2019.04.10 10:01:10 1: Timeout for XiaomiBTLESens::ExecGatttool_Run reached, terminated process 20010


Ein Neustart von FHEM hilft gar nicht. Ein Neustart des Pi hilft zeitweilig, bis wieder alles zu ist. Das dauert etwa 1 - 2  Tage. Weiss nicht genau.
Es beginnt langsam und wird dann immer mehr.

FHEM ist auf dem neuesten Stand und auch der Pi. Habe gestern für alles noch einmal Update/Upgrade gemacht. Also auch Treiber und Firmware des Pi.

Ein Thermometer zeigte den Fehler Invalid argument (22) an. Jetzt aber gerade nicht mehr. Vielleicht wieder, wenn ich den Pi noch einmal neu boote.
Das wollte ich aber momentan noch nicht, falls noch Infos zum Jetzigen Zustand benötigt werden sollten.

Für Tipps und Ideen zur Fehlersuche/Beseitigung bin ich dankbar. Ich könnte allerdings, falls keiner eine Idee haben sollte,  auch mal mit einem Stick versuchen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 10 April 2019, 11:11:07
Wie ist es wenn Du den Bluetoothstack stoppst und wieder startest?

Zitat von: Invers am 30 März 2019, 15:03:19
Ich habe ebenfalls Fehler im Log. Habe auch auf der Konsole probiert:

pi@fhemPi:~ $ sudo hciconfig hci0 down
pi@fhemPi:~ $ sudo hciconfig hci0 up

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Invers am 10 April 2019, 11:48:05
Da bekomme ich gar keine Antwort mehr und komme auch nicht mehr zur Eingabeaufforderung zurück. Hänge fest, wie in einem Texteditor. Muss ich nun den Pi einfach ausknipsen, oder benötige ich nach dem Absetzen des Befehls noch eine Tastenkombi zum Ausstieg aus hciconfig? Letztes mal hatte ich diese Probleme nicht.

Ich sehe gerade, dass ich einen Fehler von Kitty angezeigt bekomme, gelber Schraubenschlüssel im Icon. Die Kommunikation zum Pi ist nach Befehlseingabe also offenbar nicht mehr möglich.
Eine neue Verbindung per Kitty wird aber akzeptiert und geht auch.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 10 April 2019, 12:07:07
Kann es sein das eventuell Dein Bluetooth Dongle defekt ist?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Invers am 10 April 2019, 12:56:55
Ist Bestandteil vom Pi3b. Falls der kaputt ist, ist der Pi kaputt. Ich nehme aber einfach mal einen USB-Stick. Mal sehen, was passiert.

Danke.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: binford6000 am 10 April 2019, 13:34:31
Zitat von: Invers am 10 April 2019, 12:56:55
Ist Bestandteil vom Pi3b. Falls der kaputt ist, ist der Pi kaputt. Ich nehme aber einfach mal einen USB-Stick. Mal sehen, was passiert.

Danke.
Hallo,
ich hatte exakt das gleiche Verhalten vor ein paar Wochen.
Glücklicherweise hatte ich noch einen USB-BT-Dongle rumfliegen und konnte das Problem damit lösen.
VG Sebastian
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Invers am 10 April 2019, 13:55:51
Hab ich ja nun auch gemacht. Finde ich aber eigentlich doof, da ja der Pi alles kann. Da geistern allerdings nun Gerüchte im Net, dass es da wohl Probleme mit der Firmware und den Treibern geben soll. Zusammen mit WiFi hatte es ja eh nie funktioniert. Alleine nun offenbar auch nicht mehr. Ich frage mich, ob es mit dem 3b+ dieselben Probleme gibt.

OT:
in letzter Zeit muss ich feststellen, dass alles, was man kauft, Probleme macht. Der Spass, den ich früher an neuen Dingen hatte, ist nun gegen Frust ausgetauscht worden.
Meine letzte Couch habe ich beispielsweise 2 mal ausgetauscht bekommen. Nun wurde gewandelt. Bei Technik verhält es sich ähnlich. Da spielt offenbar selbst der Preis keine Rolle. Ich kaufe eigentlich fast nie Billigkram. Gestern war ich bei Fielmann, weil mein Brillenrahmen nach 4 Jahren ober aufgerissen ist und das Glas natürlich nicht halten kann. Ist ja offen. Rahmen kann nicht reparieret werden, angeblich geht löten an der Stelle nicht, hatte mal 100 Euro gekostet. Ein Ramen, wo die Gläser reinpassen, ist nicht verfügbar/beschaffbar. Ergebnis: Brille von Fielmann Totalschaden und neue Birlle 340 Euro. So zieht sich das momentan durch mein Leben. Würde gerne wieder einmal was kaufen, jubeln und glücklich sein. Vielleicht gibt es wieder mehr Qualität, wenn weniger verkauft werden kann. Dann bleibt mehr Zeit für Qualität.
Sorry, falls wer sauer ist, einfach löschen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: mi.ke am 11 April 2019, 13:57:23
Zitat von: Invers am 10 April 2019, 10:59:56
Hi, die Lage spitzt sich zu.
Wie im Beitrag #696 geschildert, habe ich noch immer die Probleme.
Alles läuft einige Zeit ohne Probleme, dann häufen sich langsam und dann immer schneller die
Das betrifft dann auch meine Thermo/Hygrometer.


Ein Neustart von FHEM hilft gar nicht. Ein Neustart des Pi hilft zeitweilig, bis wieder alles zu ist. Das dauert etwa 1 - 2  Tage. Weiss nicht genau.
Es beginnt langsam und wird dann immer mehr.


hi,
bin zwar grad im Urlaub (autsch, schon Sonnenbrand, weil UV-Meter nur zu hause warnt   8) )

Das Problem hört sich nach gatttool an. Ich hab auch einen ganzen Stall voll von den Sensoren am laufen. Die mit dem schlechtesen Empfang machen meisst als erstes Probleme.

Wenn wieder einige (oder einer) der Sensoren ausgefallen ist, mach mal bitte folgendes:

console aufrufen, und
ps ax | grep gatttool     
vermutlich wird dann mehr als ein Prozess angezeigt wird


Ich hab mir ein DOIF gebastelt, das alle "hängengebliebenen" (und aktive) gatttool-Prozesse auf Knopfdruckt killt.
Danach läuft die Abfrage wieder rund
defmod GATKILL DOIF ([$SELF:"on"]) ("sudo kill $(ps aux | grep gatttool | awk '{print $2}')") (set $SELF off)

Das DOIF kann man natürlich auch automatisch laufen lassen, wenn z.B. mehr als 2 oder 3 Sensoren sich über eine längere zeit nicht mehr gemeldet haben.

Ausser dem lass ich bei z.B. einem Neustart (wo ja alle sensoren hektisch abgefragt werden), die Abfragen zeitversetzt laufen. Zusammen mit dem von Leon eingebauten zufälligen Zeit-Versatz haben die Abfragen genug Sekunden zwischen ihren Abfrageintervallen.

Ich kann damit bisher gut leben.

Vielleicht hilft Euch der Tip ja weiter.

Cheers

mi.ke

PS.
kurz weil mobil
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Invers am 11 April 2019, 20:54:39
Danke. Ich werde das auf alle Fälle ausprobieren und somit mein internes BT wieder aktivieren.
Interessant zu sehen, was dann passiert.
Momentan bekome ich nur eine Prozess:
20084 pts/0    S+     0:00 grep --color=auto gatttool

Keine Ahnung, was das ist, aber egal. Fehler im Log kommen erst immer mehrere Tage später.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Steigerbalett am 11 April 2019, 23:17:44
Zitat von: Invers am 10 April 2019, 13:55:51
... Alleine nun offenbar auch nicht mehr. Ich frage mich, ob es mit dem 3b+ dieselben Probleme gibt. ...
Kann ich bestätigen, mit dem 3B+ besteht das Problem auch.
Leider kann ich auch nicht mehr nachvollziehen seit welchem Update (von Raspbian) das Bluetoothmodul des RaspberryPi nicht mehr richtig mitspielen möchte.
Hab jetzt erstmal auch die alle zwei Stunden Reset per Cronjob Variante gewählt.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Skjall am 18 April 2019, 19:15:45
Moin zusammen,

ich habe auch die Probleme. Ich habe die Sensoren neu und über einen RPi 3+ remote angebunden. Nach ner weile hängt sich die hci0 auf und das ding bekommt keine daten mehr.
Ich habe jetzt mal 2 neue Dongel beim Saturn gekauft (SL7411...) und die Geräte verteilt.

Vielleicht wäre es eine Idee, dass das Modul erkennt, dass die Schnittstelle nicht funktioniert und sie down und wieder up nimmt? Und ein Load-Balancing wäre auch gut, sodass man die Interfaces nicht fest zuweisen muss.

VG Jan
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Invers am 18 April 2019, 19:42:35
Mit Extra-Bluetooth bisher keine Probleme
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Skjall am 18 April 2019, 21:54:09
Leider das gleiche in grün, sobald man mehr als einen Sensor auf einem Dongel hat.
Ich habe 4 Sensoren und 3 BT-Interfaces. gerade gingen die beiden devices, die sich ein Interface teilen wieder in den error State. :(
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 18 April 2019, 22:18:42
Ich habe 5 Sensoren und ein BT Dongle und nur hin und wieder mal ein Error. Den kann ich aber verkraften. Vielleicht so 2 mal am Tag vobei ich alle 10min abrufe.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Typ1er am 19 April 2019, 14:14:35
Ich habe die Fehler auch, Frage meine Sensoren in 180sek Intervall ab.

Auch bei mir läuft das gatttool mehrfach:
pi@RPi3-fhem:~ $ ps ax | grep gatttool   
5885 ?        S      0:00 sh -c gatttool -i hci0 -b C4:7C:8D:66:48:6E --char-read -a 0x38 2>&1 /dev/null
5886 ?        S      0:00 gatttool -i hci0 -b C4:7C:8D:66:48:6E --char-read -a 0x38 /dev/null
5929 ?        S      0:00 sh -c gatttool -i hci0 -b C4:7C:8D:67:69:83 --char-write-req -a 0x33 -n A01F 2>&1 /dev/null
5930 ?        S      0:00 gatttool -i hci0 -b C4:7C:8D:67:69:83 --char-write-req -a 0x33 -n A01F /dev/null
5932 pts/0    S+     0:00 grep --color=auto gatttool
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Skjall am 20 April 2019, 11:31:52
Moin zusammen,

da ich meine Bewässerung darüber steuere, ist das für mich kein akzeptabler zustand. Insbesondere wenn ich in den Urlaub fahre will ich nicht, dass mir alles vertrocknet.
Deswegen habe ich mir mit einem notify abgeholfen:

define n_21300.Flowersensor.Watchdog notify 213\d\d\.Flowersensor\.\d*:state.error {\
my $COMMAND = "ssh ".AttrVal($NAME, "sshHost", "unknown")." 'sudo hciconfig ".AttrVal($NAME, "hciDevice", "unknown")." down && sudo hciconfig ".AttrVal($NAME, "hciDevice", "unknown")." up'";;\
system($COMMAND);;\
Log 1, $NAME." in error state. ".AttrVal($NAME, "hciDevice", "unknown")." on ".AttrVal($NAME, "sshHost", "unknown")." restarted.";;\
}


Wichtig ist, dass der user FHEM auf dem Remote-Rechner den hciconfig-Befehl mittels sudo ausführen kann. Dazu habe ich noch eine File angelegt:

/etc/sudoers.d/010_fhem-nopasswd
# Allow fhem to execute hcuiconfig
fhem ALL=(ALL) NOPASSWD: /bin/hciconfig


Die Tests per Trigger liefen gut. Werde das jetzt mal beobachten.

Gruß Jan

Edit 1: Ups. Falsche Config kopiert. War noch aus dem Notepad. :)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: kotaro am 20 April 2019, 16:02:31
Hallo,

ich habe Versucht, mein Flower Sensor einzubinden. Mein Fhem läuft im Docker-Modus.. leider kriege ich den folgenden Fehler:

2019.04.20 15:58:03 4: XiaomiBTLESens (xiaomi_FlowerCare_Bonsai) - Run CreateParamGatttool with mod: read,
2019.04.20 15:58:03 5: XiaomiBTLESens (xiaomi_FlowerCare_Bonsai) - Read XiaomiBTLESens_ExecGatttool_Run xiaomi_FlowerCare_Bonsai|C4:7C:8D:6A:91:5C|read|0x38,
2019.04.20 15:58:03 4: XiaomiBTLESens (xiaomi_FlowerCare_Bonsai) - stateRequestTimer: Call Request Timer,
2019.04.20 15:58:03 5: XiaomiBTLESens (xiaomi_FlowerCare_Bonsai) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:6A:91:5C --char-read -a 0x38 2>&1 /dev/null and loop 0,
2019.04.20 15:58:03 5: XiaomiBTLESens (xiaomi_FlowerCare_Bonsai) - ExecGatttool_Run: gatttool loop result socket(SEQPACKET, L2CAP),Address family not supported by protocol (97),
2019.04.20 15:58:03 4: XiaomiBTLESens (xiaomi_FlowerCare_Bonsai) - ExecGatttool_Run: gatttool result socket(SEQPACKET, L2CAP),Address family not supported by protocol (97),
2019.04.20 15:58:03 5: XiaomiBTLESens (xiaomi_FlowerCare_Bonsai) - ExecGatttool_Done: gatttool return string: xiaomi_FlowerCare_Bonsai|C4:7C:8D:6A:91:5C|error|read|0x38|{"gtResult":"Address family not supported by protocol (97)"},
2019.04.20 15:58:03 4: XiaomiBTLESens (xiaomi_FlowerCare_Bonsai) - ProcessingErrors,
2019.04.20 15:58:03 4: XiaomiBTLESens (xiaomi_FlowerCare_Bonsai) - WriteReadings: Readings were written


könnt ihr mir helfe?
ich nutze das offizielle Docker-Image vom Docker-Hub für Raspi 2 mit CLS-BT-Dongle
weiß leide rnicht mehr weiter...
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 20 April 2019, 16:12:31
Versuche erstmal das BT zum laufen zu bringen. Also kannst Du in der Linux Konsole nach den Sensoren scannen? Bekommst Du eine Meldung wenn Du mit gatttool in der Linux Konsole abrufen willst und so weiter.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: kotaro am 20 April 2019, 16:37:43
Meinst du im host System, oder im Docker? Zumindest läuft lescan schon auf dem Host system
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 20 April 2019, 16:47:10
Nein. Natürlich im Docker.
Unter Proxmox im LXC geht BT zum Beispiel nicht.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: oelidoc am 28 April 2019, 21:42:58
Hallo,
habe hier 6 FlowerSens über einen Raspi Zero W per SSH in FHEM eingebunden. Während der Empfang bis auf seltene Ausnahmen meist gut funktioniert, bekomme ich seit einiger Zeit im FHEM Log immerconnect error: Transport endpoint is not connected (107)
Irgendwie kann ich v.a. zeitlich keinen Zusammenhang zu der Sensor Abfrage erkennen.
Auch bin ich mir unsicher, ob der Fehler seit der Einbindung der beiden neuesten Sensoren aufgetreten ist. Diese sind jetzt "lindgrün" statt weiss und kamen mit der Firmware Vers. 3.2.1 aus China  :-\
Vielleicht ist es ja nur ein Schönheitsfehler im Log, aber ich wüßt halt gern die Ursache...

Gruß

oelidoc
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: oelidoc am 28 April 2019, 21:48:29
Hier mal ein list des neuen Sensors:
Internals:
   BTMAC      C4:7C:8D:6A:48:2F
   DEF        C4:7C:8D:6A:48:2F
   FUUID      5caf82c9-f33f-74ea-ea36-5d21d14d47765789
   INTERVAL   1800
   NAME       FlowerSens_Oleander
   NOTIFYDEV  global,FlowerSens_Oleander
   NR         476
   NTFY_ORDER 50-FlowerSens_Oleander
   STATE      Feuchtigkeit: 37 %
   TYPE       XiaomiBTLESens
   VERSION    2.4.7
   loglevel   4
   OLDREADINGS:
   READINGS:
     2019-04-28 17:29:19   batteryPercent  98
     2019-04-28 17:29:19   batteryState    ok
     2019-04-28 21:19:33   fertility       266
     2019-04-28 17:29:19   firmware        3.2.1
     2019-04-28 21:19:33   lux             0
     2019-04-28 21:19:33   moisture        37
     2019-04-28 21:19:33   state           active
     2019-04-28 21:19:33   temperature     7.4
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1556465359.61543
     updateTimestampCallBattery 2019-04-28 17:29:19
Attributes:
   alias      Oleander
   batteryFirmwareAge 48h
   disabledForIntervals 23:00-24:00 00:00-07:00
   event-min-interval temperature:3600,moisture:3600,fertility:3600,lux:3600
   event-on-change-reading batteryState,fertility,lastGattError,lux,moisture,temperature
   interval   1800
   maxFertility 2000
   maxMoisture 60
   minFertility 350
   minMoisture 15
   minTemp    5
   model      flowerSens
   room       Garten
   sshHost    -p 45147 oelidoc@192.168.178.57
   stateFormat Feuchtigkeit: moisture %
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 28 April 2019, 21:48:56
Ich habe 9 Sensoren an einem PI ZeroW per ssh hängen und ebenfalls diese und andere Meldungen.

Aber da es meist gut funktioniert, also vielleicht mal 1-2-3 Abfragen pro Sensor pro Tag mal nicht klappen kann ich gut damit leben, so schnell ändert sich die Feuchtigkeit ja nicht...

Gruß, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: oelidoc am 28 April 2019, 21:51:13
Ja stimmt,
aber ich halt mein Log gerne sauber  8)
Deshalb die Frage nach dem Warum?
Aber ansonsten hast du natürlich volkommen Recht.
Gruß
oelidoc
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 28 April 2019, 21:54:14
Kommen denn trotzdem Daten von den Sensoren?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: oelidoc am 28 April 2019, 21:56:29
Ja,
die Fehlermeldung kam z.B. gerade zweimal im Log, alle Sensoren haben jedoch den state active - keine Fehler. Daten sind aktuell.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 28 April 2019, 22:01:45
Die Meldung kommt vom gatttool und kann alles mögliche sein
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: oelidoc am 28 April 2019, 22:05:50
Was rätst du? So lassen? Ignorieren?

Kann es denn was mit der neuen FW der Sensoren zu tun haben? Kennst du die schon? Ist die für das Modul relevant?

Vielen Dank für deine Mühe

Gruß oelidoc
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 28 April 2019, 22:09:57
Zitat von: oelidoc am 28 April 2019, 22:05:50
Was rätst du? So lassen? Ignorieren?

Kann es denn was mit der neuen FW der Sensoren zu tun haben? Kennst du die schon? Ist die für das Modul relevant?

Vielen Dank für deine Mühe

Gruß oelidoc

Ich habe (noch) relativ alte FWs:

6x 2.6.2
3x 2.7.0
(3x 2.7.0 noch nicht in Betrieb: folgt wenn ich demnächst wieder anpflanze)

...konnte nicht rauskriegen was bei den neuen FWs besser ist/sein soll...
Hatte die auch noch nie an der App angelernt sondern immer gleich an fhem :)

Gruß, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: oelidoc am 28 April 2019, 22:14:17
ZitatIch habe (noch) relativ alte FWs:

2.6.2
2.7.0
Ja, aber die Meldungen im FHEM Log hatte ich früher nicht. Deshalb meine vage Vermutung es könnte mit der FW der zuletzt hinzugefügten zwei Sensoren zu tun haben...
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 28 April 2019, 22:19:01
Ignorieren.
Hast Du ein Update auf den Pi gemacht? Also ein großes OS Update? Eventuell ist ein neues WLAN Gerät in der Nähe dazu gekommen. Es kann alles mögliche sein.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: oelidoc am 28 April 2019, 22:24:04
ZitatHast Du ein Update auf den Pi gemacht? Also ein großes OS Update?
Nein, nicht als die Einträge im Log auftauchten. Heute dann aus"Verzweiflung" nur sudo apt-get update & upgrade auf dem Zero ::)
ZitatEventuell ist ein neues WLAN Gerät in der Nähe dazu gekommen
? ? ? ?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 28 April 2019, 22:49:25
Zitat von: oelidoc am 28 April 2019, 22:24:04
Nein, nicht als die Einträge im Log auftauchten. Heute dann aus"Verzweiflung" nur sudo apt-get update & upgrade auf dem Zero ::)? ? ? ?

Bluetooth und WLAN 2.4GHz können sich unter bestimmten Umständen stören.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: oelidoc am 28 April 2019, 22:50:44
Ahh, das wusste ich nicht - Danke.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Typ1er am 04 Mai 2019, 01:57:51
ich habe heute mal versucht die Firmware zu aktualisieren, sowohl die Xiaomi Mi-Home app, als auch die HHCC.App zeigen kein Update an, gibt es hierzu einen Trick?

Sensoren sind alle die Internatinale Ausführung und laufen unter Mainland China. Getestet jeweils die iPhone und Android Version.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Razor am 04 Mai 2019, 15:27:46
Es gibt die App Flower App für Android.
Updaten, App löschen, App Seriel Bluetooth laden und Mac Adressen scannen.
Dann bequem in Fhem einbinden und Glücklich sein
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: grappa24 am 06 Mai 2019, 19:55:39
Hallo Ihr Pflanzenflüsterer  ;)

hab seit heute auch 5 Xiaomi Sensoren am arbeiten und teilweise heftige Probleme mit dem hcitool lescan, bis ich auf diesen Artikel gestoßen bin:
https://stackoverflow.com/questions/22062037/hcitool-lescan-shows-i-o-error

Bei mir hat folgendes geholfen, jetzt werden alle Sensoren schön erkannt:

hciconfig hci0 down
hciconfig hci0 up

service bluetooth restart
service dbus restart
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: grappa24 am 07 Mai 2019, 06:44:02
zu früh gefreut, heute Nacht dann folgendes:

019.05.07 06:36:55 1: Timeout for XiaomiBTLESens::ExecGatttool_Run reached, terminated process 8219
2019.05.07 06:36:55 1: Timeout for XiaomiBTLESens::ExecGatttool_Run reached, terminated process 8220
2019.05.07 06:36:55 1: Timeout for XiaomiBTLESens::ExecGatttool_Run reached, terminated process 8221
2019.05.07 06:36:55 1: Timeout for XiaomiBTLESens::ExecGatttool_Run reached, terminated process 8222
2019.05.07 06:36:55 1: Timeout for XiaomiBTLESens::ExecGatttool_Run reached, terminated process 8223
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Neuhier am 07 Mai 2019, 09:19:10
Ein RPi 3B als Zentrale?
Bei mir hat geholfen, dem ein ordentliches Netzteil zu spendieren ( kein Ladegerät ! ).
5V / 4A und seither keine Ausfälle seitens des Bluetooth mehr.
Habe FW-Version 2.7.0 auf allen Flowersens.
Es laufen hier nebenher auch noch GTags.

Parallel dazu ist das WLAN am RPi an, keine gegenseitige Beeinflussung mehr feststellbar.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Razor am 07 Mai 2019, 11:12:47
Was verstehst du unter ordentlichen Netzteil (abgesehen von den 4 Ampere)?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Neuhier am 07 Mai 2019, 11:17:04
Es gibt Netzteile und Ladegeräte.
Ein Netzteil versucht, die Spannung konstant zu halten, ein Ladegerät den Strom.

ZitatLaut Spezifikation benötigt der Raspberry Pi eine Spannung von 4,75 – 5,25 Volt (über USB). Der Raspberry Pi reagiert erfahrungsgemäß auf Spannungsschwankungen, speziell wenn sie unter 5V fallen, sehr empfindlich. Dann sind die oben genannten Probleme meist die Folge. Für einen stabilen Betrieb verwendet man daher ein Netzteil mit 5,1 Volt, um die durch die Steckverbindungen und Leitungen entstehenden Verluste auszugleichen.

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: grappa24 am 07 Mai 2019, 11:33:52
Zitat von: Neuhier am 07 Mai 2019, 09:19:10
Ein RPi 3B als Zentrale?
Habe FW-Version 2.7.0 auf allen Flowersens.
Parallel dazu ist das WLAN am RPi an, keine gegenseitige Beeinflussung mehr feststellbar.
Läuft bei mir auf einen RPi 3B+ mit Stretch und dem "offiziellen" Netzteil  5,1V bei 2,5A
Die Sensoren haben alle fw 3.2.1
WLAN am RasPi ist aus, allerdings steckt an dem RasPi noch ein CUL868 für FS20
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Neuhier am 07 Mai 2019, 11:39:51
Irgendwo war mal was, daß sich die Batterieüberwachung (GTAG ) mit den Leprecensed hakt.
In der Richtung mal schauen?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Typ1er am 07 Mai 2019, 12:32:59
Die Probleme habe ich auch mit dem Original Netzteil.

Und habe am Pi nur noch einen Z-Wave Stick. Ich bezweifle das ein stärkeres Netzteil Abhilfe bringt.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Neuhier am 07 Mai 2019, 12:40:41
Meiner ist "voll" bestückt.
Zitat von: Neuhier am 03 Mai 2019, 22:49:11
Mein Raspi hat das HM-MOD-RPI-PCB dran.
Weiterhin ein 434MHz-CUL, ein 868MHz-CUL, ein UZB1, ein CC2531, macht nebenbei die Soundausgabe, läuft für Leprecensed und FlowerSens mit BT, WLAN sowieso.
Ist ein Raspi 3B, hat ein stabilisiertes Netzteil mit 5V/4A, 32GB Stick ( keine SD-Karte ) und paar Kühlkörper.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: grappa24 am 07 Mai 2019, 14:31:56
Der lescan läuft jetzt nach 8 Stunden immer noch sauber, die Sensoren werden alle Stunde abgefragt.
Was mich jedoch wundert, der RasPi braucht nach der Passworteingabe seeeeeeeeehr lange, bis er bereit ist - hatte ich in dieser Form noch nie ....

ah, sehe gerade (top), der Speicher läuft langsam aber sicher voll .... >:(
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: grappa24 am 09 Mai 2019, 16:19:41
hatte jetzt mal die Abfrageintervalle der fünf Devices "entzerrt", nicht dass die alle gleichzeitig abgefragt werden. Jetzt läufts seit zwei Tagen stabil. Sollte es trotzdem mal hängen hilft immer das runter/hochfahren des hci0-Interfaces.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 09 Mai 2019, 16:54:02
entzerren sollte es schon von Hause aus da das Abrufinterval sich zusammen setzt aus Interval + einen Zufallswert zwischen 0 und glaube 180 oder so.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: grappa24 am 17 Mai 2019, 14:25:10
Ich mach jetzt meine ersten Langzeit-Erfahrungen mit dem XIAOMI Flower Sens und hatte jetzt bei einer Pflanze, die draußen in der vollen Sonne steht immer um die Mittagszeit heftige Einbrüche bei der Feuchtigkeit. Interessant, kann m.E. nur an der Mittagssonne liegen, was meint Ihr?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Razor am 17 Mai 2019, 15:20:33
Ich tippe darauf, dass die Sonne den "Stab" aufheizt, der Leitwert für "Wärme" höher ist und somit das Wasser in der Umgebung des Stabes schneller verdunstet. Geht die Sonne weg, verteilt sich die Feuchtigkeit wieder um den Stab.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 17 Mai 2019, 17:27:56
Zitat von: grappa24 am 17 Mai 2019, 14:25:10
Ich mach jetzt meine ersten Langzeit-Erfahrungen mit dem XIAOMI Flower Sens und hatte jetzt bei einer Pflanze, die draußen in der vollen Sonne steht immer um die Mittagszeit heftige Einbrüche bei der Feuchtigkeit. Interessant, kann m.E. nur an der Mittagssonne liegen, was meint Ihr?

Mhh schon ziemlich dolle der Einbruch, ansonsten ist das eigentlich normal das es etwas runter geht. Es ist besser wenn du den Sensor unten verbuddelst im Boden. Geht bei dem Modell natürlich nicht ab er wäre dann etwas unempfindlicher. Also möglichst tief messen, die Sonne zieht da wirklich das Wasser oben raus und dann sickert das wieder langsam nach. Ob das jetzt was mit dem Leitwert zu tun hat, der wird ja im dem Sinne nicht gemessen, das ist ja ne Kapazitive Messmethode. Ich habe solche Ausschläge auch wenn ich über das Verfahren messe die Erde aufzuheizen und dann schauen wie schnell es wieder abkühlt. Diese Methode ist sehr genau und völlig unabhängig von Temperaturschwankungen und Salzgehalt im Boden.

Aber an sich ist das doch egal oder? Stört dich das? Man misst doch eh nur einmal/zweimal am Tag das reicht, und das kannste doch in der Nacht machen wenn die Sonne nicht scheint.


/Daniel
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ChristianMUC am 27 Mai 2019, 11:42:06
Hallo,

ich habe den FlowerSens schon länger im Einsatz und bin echt zufrieden damit.
Jetzt habe ich mir beim Chinesen noch den eckigen Typ vom Hygrometer gekauft.
Mit FHEM verbunden, allerdings stimmen die Werten nicht.


Internals:
   BTMAC      3F:59:C8:71:50:1E
   CFGFN     
   DEF        3F:59:C8:71:50:1E
   FUUID      5cebb2cc-f33f-c88c-ec01-5fa5a7f71f5907ba
   INTERVAL   300
   NAME       XiaomiWatch
   NOTIFYDEV  global,XiaomiWatch
   NR         678
   NTFY_ORDER 50-XiaomiWatch
   STATE      write sensor data
   TYPE       XiaomiBTLESens
   VERSION    2.4.7
   loglevel   4
   Helper:
     DBLOG:
       batteryPercent:
         logdb:
           TIME       1558950646.4872
           VALUE      33330855172415
       batteryState:
         logdb:
           TIME       1558950646.4872
           VALUE      ok
       lastGattError:
         logdb:
           TIME       1558950808.34472
           VALUE      charWrite faild
       state:
         logdb:
           TIME       1558950808.39417
           VALUE      write sensor data
   READINGS:
     2019-05-27 11:50:46   batteryPercent  33330855172415
     2019-05-27 11:50:46   batteryState    ok
     2019-05-27 11:50:13   firmware        %�\j�
��F�y��x_
     2019-05-27 11:53:28   lastGattError   charWrite faild
     2019-05-27 11:53:28   state           write sensor data
   helper:
     CallBattery 1
     CallSensDataCounter 1
     updateTimeCallBattery 1558950646.48285
     updateTimestampCallBattery 2019-05-27 11:50:46
     RUNNING_PID:
       abortFn    XiaomiBTLESens::ExecGatttool_Aborted
       arg        XiaomiWatch|3F:59:C8:71:50:1E|write|0x10|0100|1
       bc_pid     135
       finishFn   XiaomiBTLESens::ExecGatttool_Done
       fn         XiaomiBTLESens::ExecGatttool_Run
       pid        2899
       telnet     telnetPort_127.0.0.1_43300
       timeout    90
       abortArg:
Attributes:
   model      thermoHygroSens
   room       XiaomiBTLESens


Passt das Modul nicht zu meinem Device?

Danke und Gruß
Christian
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 27 Mai 2019, 12:10:14
Gute Frage. Keine Ahnung. Was haben den die anderen User für ein thermoHygroSens Gerät?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: grappa24 am 28 Mai 2019, 20:27:20
Hallo,

ich hab mir jetzt auch ein notify gebastelt, welches für den Fall, dass alle Flower Sens in den state "error" gehen, die folgenden Befehle ausführen soll: sudo hciconfig hci0 down
sudo hciconfig hci0 up

Dann hab ich in /etc/sudoers.d die Datei "010_fhem-nopasswd" erstellt:fhem ALL=(ALL) NOPASSWD: ALL und in /etc/passwd die letzte Zeile wie folgt editiert: fhem:x:999:20::/opt/fhem:/bin/bash

Ich kann jetzt zwar von der fhem-Kommandozeile den RasPi runterfahren { system("sudo shutdown -r now") } aber wenn ich den Befehl gebe { system("sudo hciconfig hci0 down") } kommt die Fehlermeldung: Can't down device hci0: Operation not permitted (1)
Wo liegt da mein Fehler - oder geht das nicht?

Geht doch - hatte mich u.a. von der Rückmeldung "-1" an fhem verwirren lassen
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: thymjan am 16 Juni 2019, 10:55:09
Habe 3 Flower Sensoren am raspi 3 in Betrieb. Bisher unter raspbian jessie ohne Probleme. Jetzt ging mir die sd-Karte kaputt und ich habe das System unter raspbian stretch neu aufgesetzt.

Das AnlernenDefinieren der Sensoren (firmware 3.1.9) hat ohne Probleme funktioniert. Leider bricht die Übertragung der Sensor-Werte nach kurzer Zeit (wenige Stunden) ab und bleibt ohne manuelles Eingreifen (sudo hcitool hci0 down/up) in der Havarie.

Es gibt dann einen ganzen Blumenstrauß an lastGattError-Fehlermeldungen:

So sind die Sensoren nicht mehr benutzbar. Ich hatte die für eine Bewässerungsanlage in Betrieb.
Was habt Ihr denn für Vorschläge wie ich das Problem angehen kann?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 16 Juni 2019, 10:56:57
Wie und wo hast Du die Sensoren denn angelernt?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: thymjan am 16 Juni 2019, 10:59:16
Wie beschrieben in https://wiki.fhem.de/wiki/XiaomiBTLESens (https://wiki.fhem.de/wiki/XiaomiBTLESens) mit
sudo hcitool lescan

die Adressen ausgelesen und dann mit

defmod Philo1 XiaomiBTLESens XX:XX:XX:XX:XX:XX
angelegt.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Neuhier am 16 Juni 2019, 11:09:13
Den internen oder einen externen BT-Anschluß in Verwendung?
Nebenher noch andere BT-Geräte/ -Verwendungen eingerichtet?
Netzteil ausreichend?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 16 Juni 2019, 11:09:35
Ah ok, verstehe. Also nicht angelernt sondern in FHEM definiert und gatttool liest dann aus.

Leider scheint es mit neueren Versionen Probleme mit gatttool zu geben. Was für einen Bluetooth Stick verwendest Du?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: thymjan am 16 Juni 2019, 11:12:10
Wie bisher unter jessie verwende ich die integrierte Bluetooth hardware vom raspi 3. WLAN ist ausgeschalten, der raspi hängt am LAN.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: thymjan am 16 Juni 2019, 11:21:26
So sieht's aus wenns funktioniert (get sensorData):
sudo btmon -t
Bluetooth monitor ver 5.43
= Note: Linux version 4.19.42-v7+ (armv7l)                                                                                                     11:18:52.233196
= Note: Bluetooth subsystem version 2.22                                                                                                       11:18:52.233202
= New Index: B8:27:EB:D6:D2:A8 (Primary,UART,hci0)                                                                                      [hci0] 11:18:52.233204
= Open Index: B8:27:EB:D6:D2:A8                                                                                                         [hci0] 11:18:52.233206
= Index Info: B8:27:EB:D6:D2:A8 (Broadcom Corporation)                                                                                  [hci0] 11:18:52.233208
@ MGMT Open: bluetoothd (privileged) version 1.14                                                                                     {0x0001} 11:18:52.233211
@ MGMT Open: btmon (privileged) version 1.14                                                                                          {0x0002} 11:18:52.233441
@ RAW Open: gatttool version 2.22                                                                                                     {0x0003} 11:19:06.848306
@ RAW Close: gatttool                                                                                                                 {0x0003} 11:19:06.848341
< HCI Command: LE Remove Device From White List (0x08|0x0012) plen 7                                                                    [hci0] 11:19:06.848524
        Address type: Public (0x00)
        Address: C4:7C:8D:66:42:D7 (OUI C4-7C-8D)
> HCI Event: Command Complete (0x0e) plen 4                                                                                             [hci0] 11:19:06.849133
      LE Remove Device From White List (0x08|0x0012) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Add Device To White List (0x08|0x0011) plen 7                                                                         [hci0] 11:19:06.849172
        Address type: Public (0x00)
        Address: C4:7C:8D:67:38:F7 (OUI C4-7C-8D)
> HCI Event: Command Complete (0x0e) plen 4                                                                                             [hci0] 11:19:06.849933
      LE Add Device To White List (0x08|0x0011) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7                                                                              [hci0] 11:19:06.849964
        Type: Passive (0x00)
        Interval: 60.000 msec (0x0060)
        Window: 30.000 msec (0x0030)
        Own address type: Public (0x00)
        Filter policy: Ignore not in white list (0x01)
> HCI Event: Command Complete (0x0e) plen 4                                                                                             [hci0] 11:19:06.850506
      LE Set Scan Parameters (0x08|0x000b) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2                                                                                  [hci0] 11:19:06.850534
        Scanning: Enabled (0x01)
        Filter duplicates: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4                                                                                             [hci0] 11:19:06.851129
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 40                                                                                               [hci0] 11:19:07.235558
      LE Advertising Report (0x02)
        Num reports: 1
        Event type: Connectable undirected - ADV_IND (0x00)
        Address type: Public (0x00)
        Address: C4:7C:8D:67:38:F7 (OUI C4-7C-8D)
        Data length: 28
        Flags: 0x06
          LE General Discoverable Mode
          BR/EDR Not Supported
        16-bit Service UUIDs (partial): 1 entry
          Xiaomi Inc. (0xfe95)
        Service Data (UUID 0xfe95): 712098004df738678d7cc40d091002cd02
        RSSI: -81 dBm (0xaf)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2                                                                                  [hci0] 11:19:07.235618
        Scanning: Disabled (0x00)
        Filter duplicates: Disabled (0x00)
> HCI Event: Command Complete (0x0e) plen 4                                                                                             [hci0] 11:19:07.237590
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Create Connection (0x08|0x000d) plen 25                                                                               [hci0] 11:19:07.237631
        Scan interval: 60.000 msec (0x0060)
        Scan window: 60.000 msec (0x0060)
        Filter policy: White list is not used (0x00)
        Peer address type: Public (0x00)
        Peer address: C4:7C:8D:67:38:F7 (OUI C4-7C-8D)
        Own address type: Public (0x00)
        Min connection interval: 30.00 msec (0x0018)
        Max connection interval: 50.00 msec (0x0028)
        Connection latency: 0x0000
        Supervision timeout: 420 msec (0x002a)
        Min connection length: 0.000 msec (0x0000)
        Max connection length: 0.000 msec (0x0000)
> HCI Event: Command Status (0x0f) plen 4                                                                                               [hci0] 11:19:07.238517
      LE Create Connection (0x08|0x000d) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 19                                                                                               [hci0] 11:19:08.245196
      LE Connection Complete (0x01)
        Status: Success (0x00)
        Handle: 64
        Role: Master (0x00)
        Peer address type: Public (0x00)
        Peer address: C4:7C:8D:67:38:F7 (OUI C4-7C-8D)
        Connection interval: 48.75 msec (0x0027)
        Connection latency: 0.00 msec (0x0000)
        Supervision timeout: 420 msec (0x002a)
        Master clock accuracy: 0x00
@ MGMT Event: Device Connected (0x000b) plen 41                                                                                {0x0002} [hci0] 11:19:08.245246
        LE Address: C4:7C:8D:67:38:F7 (OUI C4-7C-8D)
        Flags: 0x00000000
        Data length: 28
        Flags: 0x06
          LE General Discoverable Mode
          BR/EDR Not Supported
        16-bit Service UUIDs (partial): 1 entry
          Xiaomi Inc. (0xfe95)
        Service Data (UUID 0xfe95): 712098004df738678d7cc40d091002cd02
@ MGMT Event: Device Connected (0x000b) plen 41                                                                                {0x0001} [hci0] 11:19:08.245246
        LE Address: C4:7C:8D:67:38:F7 (OUI C4-7C-8D)
        Flags: 0x00000000
        Data length: 28
        Flags: 0x06
          LE General Discoverable Mode
          BR/EDR Not Supported
        16-bit Service UUIDs (partial): 1 entry
          Xiaomi Inc. (0xfe95)
        Service Data (UUID 0xfe95): 712098004df738678d7cc40d091002cd02
< HCI Command: LE Read Remote Used Features (0x08|0x0016) plen 2                                                                        [hci0] 11:19:08.245435
        Handle: 64
> HCI Event: Command Status (0x0f) plen 4                                                                                               [hci0] 11:19:08.248224
      LE Read Remote Used Features (0x08|0x0016) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 12                                                                                               [hci0] 11:19:08.430917
      LE Read Remote Used Features (0x04)
        Status: Success (0x00)
        Handle: 64
        Features: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00
          LE Encryption
< ACL Data TX: Handle 64 flags 0x00 dlen 9                                                                                              [hci0] 11:19:08.434446
      ATT: Write Request (0x12) len 4
        Handle: 0x0033
          Data: a01f
> ACL Data RX: Handle 64 flags 0x02 dlen 5                                                                                              [hci0] 11:19:08.528262
      ATT: Write Response (0x13) len 0
> HCI Event: Number of Completed Packets (0x13) plen 5                                                                                  [hci0] 11:19:08.669181
        Num handles: 1
        Handle: 64
        Count: 1
@ RAW Open: gatttool version 2.22                                                                                                     {0x0003} 11:19:08.758690
@ RAW Close: gatttool                                                                                                                 {0x0003} 11:19:08.758732
< ACL Data TX: Handle 64 flags 0x00 dlen 7                                                                                              [hci0] 11:19:08.762109
      ATT: Read Request (0x0a) len 2
        Handle: 0x0035
> ACL Data RX: Handle 64 flags 0x02 dlen 21                                                                                             [hci0] 11:19:08.821051
      ATT: Read Response (0x0b) len 16
        Value: e300007c0300002bc802023c00fb349b
> HCI Event: Number of Completed Packets (0x13) plen 5                                                                                  [hci0] 11:19:08.919093
        Num handles: 1
        Handle: 64
        Count: 1
< HCI Command: Disconnect (0x01|0x0006) plen 3                                                                                          [hci0] 11:19:10.901187
        Handle: 64
        Reason: Remote User Terminated Connection (0x13)
> HCI Event: Command Status (0x0f) plen 4                                                                                               [hci0] 11:19:10.901612
      Disconnect (0x01|0x0006) ncmd 1
        Status: Success (0x00)
> HCI Event: Disconnect Complete (0x05) plen 4                                                                                          [hci0] 11:19:10.917572
        Status: Success (0x00)
        Handle: 64
        Reason: Connection Terminated By Local Host (0x16)
@ MGMT Event: Device Disconnected (0x000c) plen 8                                                                              {0x0002} [hci0] 11:19:10.917603
        LE Address: C4:7C:8D:67:38:F7 (OUI C4-7C-8D)
        Reason: Connection terminated by local host (0x02)
@ MGMT Event: Device Disconnected (0x000c) plen 8                                                                              {0x0001} [hci0] 11:19:10.917603
        LE Address: C4:7C:8D:67:38:F7 (OUI C4-7C-8D)
        Reason: Connection terminated by local host (0x02)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 16 Juni 2019, 11:27:25
Wenn es Dir so wichtig ist wie Du es sagst, dann holst Du Dir einen externen USB Bluetooth Stick und betreibst es damit. Ich habe damit an einem Raspi3 nur sehr selten einen Fehler.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: thymjan am 16 Juni 2019, 11:43:34
Zitat von: Neuhier am 16 Juni 2019, 11:09:13
Nebenher noch andere BT-Geräte/ -Verwendungen eingerichtet?
Habe noch zwei PRESENCE-Module in Betrieb die alle 300sec die Bluetooth-MAC von zwei Smartphones suchen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Neuhier am 16 Juni 2019, 12:04:53
Bei mir hängen 3 GTags und 5 BTLeSens am RPi3 B, interne BT-Anschluß.
Ausfälle und Fehlermeldungen habe ich nicht mehr, seit ich mein Netzteil geändert habe.
Ob es nun primär damit zu tun hat, kann ich nicht sagen, gehe aber davon aus.
Das neue hat 5V 4A.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 16 Juni 2019, 12:05:49
Ich habe jetzt zwei China Versionen der Flower Care Sensoren, aber irgendwie haben die solche Sprünge drin, hat das noch jemand? Bei meinen Int Versionen ist das noch nicht aufgefallen.

/Daniel
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Neuhier am 16 Juni 2019, 12:11:15
Die Sprünge in der Helligkeit sind wohl bei allen.
Aber Feuchtigkeit und "Gesundheit" sind hier nicht so sprunghaft.
Hatte damals ein 4-er Pack bei Pearl gekauft.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 16 Juni 2019, 12:19:38
Genau, ich meine nur die Bodenfeuchtigkeit ja, der Rest ist OK so.

mhh

/Daniel
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Neuhier am 16 Juni 2019, 12:53:27
Hier 3 meiner FlowerSens, Sprünge sind da keine. Lux wird woanderst aufgezeichnet.

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: grappa24 am 16 Juni 2019, 14:16:46
Ich hab die "Sprünge" teilweise auch, aber der Reihe nach. Nicht bei Zimmerpflanzen, da läufts stetig; aber bei meinen Pflanzen draußen in relativ großen Gefäßen (ca. 40-50 cm tief) schwankts auch und zwar wie folgt:

- Kurz nach dem Gießen steigts heftig an, um dann aber wieder zu sinken (liegt m.E. an den tiefen Gefäßen)

- Um die Mittagszeit bei Sonne hab ich heftige Ausschläge der Feuchte nach unten, die dann Nachm. wieder hoch geht

Unterm Strich sind die "kleinen" Sensoren für große Außengefäßge m.E. nicht so der Bringer, aber man sieht halt schon die Ereignisse ...
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 16 Juni 2019, 18:08:12
Bei mir sind das nur kleine Töpfe aber wie gesagt ich habe 4 Sensoren, zwei alte Int. und zwei neue Chine, und die neuen spinnen...

/Daniel
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: thymjan am 16 Juni 2019, 19:46:46
Habe mir jetzt zunächst mit dem cron-job
*/3 *   * * *   root    hciconfig hci0 down && hciconfig hci0 up

beholfen. Damit liefen meine 3 Sensoren für 6 Stunden mit dem raspi-bluetooth bis eben jetzt.

Jetzt hat der Kernel sogar einen Fehler geworfen:
Message from syslogd@hochdorf at Jun 16 16:44:47 ...
kernel:[21270.830845] Internal error: Oops: 17 [#1] SMP ARM

Message from syslogd@hochdorf at Jun 16 16:44:47 ...
kernel:[21270.886278] Process kworker/u9:1 (pid: 10497, stack limit = 0x9ee196bf)

Message from syslogd@hochdorf at Jun 16 16:44:47 ...
kernel:[21270.889164] Stack: (0xa2189dd0 to 0xa218a000)


Und weder hci0, bluetooth oder dbus lässt sich stoppen/starten/resetten.

top spricht auch für sich (siehe Anlage).

Bleibt nur noch der reboot...

Ja, denkste. Jetzt musste ich auch noch die Stromversorgung kappen, damit er wieder bootet.
@Neuhier: Wo gibt's das starke Netzteil?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Neuhier am 16 Juni 2019, 22:57:23
Hatte meins bei Amazon bekommen, ist aber ausverkauft. :-[
Bei Conrad gibts den Nachfolger, 5V 5A. :)

https://www.conrad.com/p/acdc-psu-module-sunpower-technologies-sps-025-05-5-vdc-5-a-25-w-510223
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: thymjan am 16 Juni 2019, 23:02:16
Danke, ist ja größer als der raspi selbst   :o
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 16 Juni 2019, 23:18:09
Stimmt, ganz schön "mächtig" und mächtig teuer...

25W ist auch ganz schön viel für einen PI der so max. 5-6-7 W "verbrät"...

Ich fahre mit denen eigentlich ganz gut: Aukru Micro-USB 5 V 3000 mA

So um die 10€

EDIT: 1 PI läuft damit von SSD und 2 USB-TVB-C Empfängern und ein weiterer (mit fhem) mit 2 USB (ZWave und HM-CFG-USB) und einem Aufsteckmodul (EnOcean)... Und nat. meine Testsysteme aber da steckt kaum was dran, laufen aber trotzdem sehr gut... ;)

Gruß, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Pati_Alpha am 23 Juni 2019, 14:14:01
Hey,

ich habe auch eine Frage zu dem Modul:
Mein FHEM läuft auf einem NUC in einer VM, steht damit sowieso zu weit weg und hat auch keinen Bluetooth-Empfänger zur Verfügung.
Ich habe aber im Wohnzimmer sowieso einen RPi3 stehen, der dort natürlich in Kopplung mit FHEM 433MHz Funk sendet/empfängt und Infrarot sendet/empfängt.

Gibt es nun beim Modul XiaomiBTLESens auch eine Möglichkeit, einen entfernten RPi zu nutzen?
Bei dem Presenced gibt es ja zB auch den Collectord (hier auch im Einsatz), der dann die Bluetooth-Scan-Ergebnisse anderer RPis einsammelt.

Viele Grüße und vielen Dank! :)
Pati
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 23 Juni 2019, 14:22:26
Wenn du per ssh OHNE Passwortabfrage auf den externen PI kommst, dann gibt es die Möglichkeit darüber abzufragen...

Attribut sshHost...

Mache ich so mit einem PI-ZeroW in Balkonnähe...

Gruß, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Pati_Alpha am 23 Juni 2019, 19:14:45
Das kriege ich hin, arbeite überall mit Schlüsselpaaren, sodass ich kein PW für ssh brauche.
Cool!!

Dann bestelle ich mir mal eins zum Testen. Danke dir! :)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: tpunkt am 25 Juni 2019, 15:10:47
Zitat von: ext23 am 16 Juni 2019, 18:08:12
Bei mir sind das nur kleine Töpfe aber wie gesagt ich habe 4 Sensoren, zwei alte Int. und zwei neue Chine, und die neuen spinnen...

/Daniel

Drei neue Sensoren hier, die alle hin und wieder entweder die Bodenfeuchtigkeit nicht mehr aktualisieren (Lavendel im Blumenkasten draußen ist seit Tagen bei 65% obwohl der Boden relativ trocken ist) oder im Sekundentakt große Sprünge machen (zwischen 16 und 40 Prozent bei einer innen stehenden Palme). Keiner der Blumenkästen und -töpfe sind nicht höher als 15-20cm.

Kann man wohl nur hoffen, dass demnächst ein update Abhilfe schafft.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Flipper92 am 30 Juni 2019, 00:57:50
Hallo Zusammen,
Ich hab bei mir zuhause das Problem, das irgendwie immer ein paar Sensoren nicht in FHEM ankommen. (Viel WLAN am Balkon :-) )
Nun wollte ich ein Pi Zero W auf den Balkon setzen, so das es keine Wände mehr gibt und der Abstand sehr klein ist.

Ich hab nun mit dieser Anleitung (https://raspberrypi.blar.de/2017/05/24/authentifizierung-mit-ssh-ohne-passwort/) es hinbekommen das ich folgende Verbindungen ohne Passwörter aus dem Terminal abrufen kann:

(Pi3 mit Fhem) -> (Pi Zero)
root -> pi
pi -> pi
fhem -> pi

Doch in Fhem selber kommt immer noch:
LOG
Permission denied, please try again.

Sensor:


Internals:
   BTMAC      C4:7C:8D:65:E7:F8
   DEF        C4:7C:8D:65:E7:F8
   FUUID      5d0e99d0-f33f-39e8-d1da-c02bb5a006d8b97e
   FVERSION   74_XiaomiBTLESens.pm:v2.4.7-s18600/2019-02-15
   INTERVAL   1751
   NAME       Balkon.Sensor.1
   NOTIFYDEV  global,Balkon.Sensor.1
   NR         75
   NTFY_ORDER 50-Balkon.Sensor.1
   STATE      error
   TYPE       XiaomiBTLESens
   VERSION    2.4.7
   loglevel   4
   READINGS:
     2019-06-22 23:42:16   Feuchte         ok
     2019-06-23 00:04:43   Fruchtbar       ok
     2019-06-27 20:20:06   batteryPercent  99
     2019-06-27 20:20:06   batteryState    ok
     2019-06-27 20:49:13   fertility       80
     2019-06-27 20:20:06   firmware        3.1.9
     2019-06-30 00:54:23   lastGattError   no gatttool binary found. Please check if bluez-package is properly installed
     2019-06-27 20:49:13   lux             765
     2019-06-22 23:42:16   maxFeuchte      ok
     2019-06-23 00:04:43   maxFruchtbar    ok
     2019-06-22 23:42:16   minFeuchte      ok
     2019-06-23 00:04:43   minFruchtbar    ok
     2019-06-27 20:49:13   moisture        17
     2019-06-30 00:54:23   statTemperatureDay Min: 28.0 Avg: 28.0 Max: 28.0
     2019-06-29 23:59:55   statTemperatureDayLast Min: 28.0 Avg: 28.0 Max: 28.0
     2019-06-30 00:54:23   statTemperatureMonth Min: 16.5 Avg: 27.5 Max: 42.9 (since: 2019-06-22_23:39:15 )
     2019-06-30 00:54:23   statTemperatureYear Min: 16.5 Avg: 27.5 Max: 42.9 (since: 2019-06-22_23:39:15 )
     2019-06-30 00:54:23   state           error
     2019-06-27 20:49:13   temperature     28
   helper:
     CallBattery 0
     CallSensDataCounter 0
     _98_statistics myStatDevice
     updateTimeCallBattery 0
Attributes:
   event-on-change-reading .*
   interval   1751
   maxFertility 1000
   maxLux     6600
   maxMoisture 50
   maxTemp    35
   minFertility 300
   minLux     2700
   minMoisture 7
   minTemp    35
   model      flowerSens
   room       XiaomiBTLESens
   sshHost    192.168.178.27


Wo hat wieder meine Unwissenheit zugeschlagen?

Gruß Flipper


PS: Könnte man das SSH Thema in dem Wikibeitrag zu den XiaomiBTLESens irgendwie ausführlicher beschrieben? Es scheint mir so, das hier viele SSH für die Sensoren nutzen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 30 Juni 2019, 07:33:01
Zitat
no gatttool binary found. Please check if bluez-package is properly installed
Hast Du auf dem FHEM Server selbst gatttool installiert? Wäre besser.
Und natürlich auf dem Pi Zero W auch.

fhem->pi klingt schon mal gut. Du kannst also vom FHEM Server als User fhem eine Verbindung zum Pi Zero W als User Pi aufbauen!?

sshHost    192.168.178.27
Hast Du für SSH eine Konfig? Wenn nicht fehlt hier der User für die SSH Verbindung
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 30 Juni 2019, 08:03:24
Besser wäre eine fhem ssh-Anleitung gewesen, z.B.: http://heinz-otto.blogspot.com/2017/01/per-ssh-remote-befehle-direkt-ausfuhren.html?m=1

Wichtig ist, dass eben der User fhem auf PI A per ssh ohne Passwort User pi auf PI B "werden" kann...

Also wenn du:

sudo -su fhem bash

auf dem fhem PI eingibst und dann:

ssh -l pi IP-Adresse-PI-Zero

Sollte das ohne Passwort gehen...

Wenn das nicht geht: ssh-Zugang falsch...

Wenn das geht, dann mal beim Attrinut pi@IP-Adresse-PI-Zero setzen oder eine ssh-conf...

EDIT: evtl. auch mal hier https://forum.fhem.de/index.php/topic,87835.msg884492.html#msg884492 oder hier https://forum.fhem.de/index.php/topic,79952.msg864874.html#msg864874 lesen

Gruß, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Flipper92 am 30 Juni 2019, 16:09:32
Zitat von: MadMax-FHEM am 30 Juni 2019, 08:03:24
Besser wäre eine fhem ssh-Anleitung gewesen, z.B.: http://heinz-otto.blogspot.com/2017/01/per-ssh-remote-befehle-direkt-ausfuhren.html?m=1
##
und dann:

ssh -l pi IP-Adresse-PI-Zero

Sollte das ohne Passwort gehen...

Wenn das nicht geht: ssh-Zugang falsch...

Jetzt klappt es. Hab den Pi Zero nochmal neu Installiert.
Hab scheinbar mit meinen vielen Vesuchen irgendwas geschrottet :-)

Danke für eure schnelle Hilfe. Die Sensoren werden nun auch gut erkannt.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 24 Juli 2019, 13:49:49
Hallo,

gibt es eigentlich schon ein ESP32 Projekt die Dinger abzufragen? Mein spinnen doch arg, also alles was weiter als 6 Meter weg ist wird bei mir nur sehr sehr sporadisch erkannt. Eine Wohnung mit einem RPi abzudecken ist schier unmöglich.

Gibt es eigentlich BT Dingle mit externer Antenne? Das man in der Richtung vielleicht noch was machen kann?

/Daniel
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 24 Juli 2019, 14:04:52
Zitat von: ext23 am 24 Juli 2019, 13:49:49
Hallo,

gibt es eigentlich schon ein ESP32 Projekt die Dinger abzufragen? Mein spinnen doch arg, also alles was weiter als 6 Meter weg ist wird bei mir nur sehr sehr sporadisch erkannt. Eine Wohnung mit einem RPi abzudecken ist schier unmöglich.

Gibt es eigentlich BT Dingle mit externer Antenne? Das man in der Richtung vielleicht noch was machen kann?

/Daniel

Gibt es wohl beides:
https://forum.fhem.de/index.php/topic,65818.0.html

EDIT: könnte auch passen https://forum.fhem.de/index.php/topic,84267.msg765108.html#msg765108

Und es gibt mindestens einen weiteren Thread (finde ihn nur grad nicht) der sich mit dem Thema ESP -> BT-Sensoren und MQTT beschäftigt.

Da ich meine Reichweite mit einem PI ZeroW im Griff habe, habe ich aber nicht verfolgt, ob das schon funktioniert...

Und BT-Sticks mit externer Antenne hab ich (gefühlt) auch schon mal gesehen...

Gruß, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 24 Juli 2019, 14:26:28
Ah ich hab immer nur den Presence Thread gefunden, das hilft aber nicht. Aber der erste ist gut, mensch das probiere ich doch mal aus.

Ich glaube ich werd aber auch mal versuchen eine Antenne an den BT Dongle zu löten.

/Daniel
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: skyline am 24 Juli 2019, 23:07:43
Habe den Dongle mit Antenne getestet:
https://www.bressner.de/shop/connectivity-iot/serial-adapter/sena-parani-ud100/
(https://www.bressner.de/shop/connectivity-iot/serial-adapter/sena-parani-ud100/)
konnte aber keine Verbesserung zum Raspberry mit Antenne feststellen.
https://geeks-r-us.de/2018/01/07/raspberry-pi3-reichweite-von-wlan-und-bluetooth-verbessern/
(https://geeks-r-us.de/2018/01/07/raspberry-pi3-reichweite-von-wlan-und-bluetooth-verbessern/)
Den Dongle kann man natürlich noch über eine Verlängerung besser positionieren.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 24 Juli 2019, 23:29:53
Cool danke, und im Vergleich zu "ohne Antenne" bzw. Printantenne von einem normalen BT Dongle?

Ich wusste gar nicht, dass beim RPi WLAN und BT dieselbe Antenne nutzen ...

/Daniel
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: skyline am 24 Juli 2019, 23:59:11
Bluetooth ist ja in Klassen aufgeteilt.
Kommt also auf die Klasse des Dongle an.

Klasse 1 ist die Beste.
https://de.m.wikipedia.org/wiki/Bluetooth (https://de.m.wikipedia.org/wiki/Bluetooth)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 25 Juli 2019, 07:38:06
Ja das ist richtig aber bei BLE ist es auf 10 Meter begrenzt. Da nützt eine bessere Klasse nicht viel. Geht ja mehr um den Empfang, daher auch die Idee mit einer größeren Antenne etwas zu bewirken.

/Daniel
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: skyline am 25 Juli 2019, 21:30:16
ZitatDie Datenübertragungsrate liegt bei Bluetooth LE bei 1 MBit/s, identisch mit dem Wert der Basic Rate BR. Maximal ist für Bluetooth Smart-Geräte eine Sendeleistung von 10 mW vorgesehen, sodass die typische Reichweite bei 40 Metern liegt. Im Bluetooth-Standard gibt es auch Klasse 1 Bluetooth-Geräte, die mit 100 mW senden können (typische Reichweite von 100 Metern). Silicon Laboratories stellten Ende 2016 ein BLE-SoC vor, welches eine Reichweite von bis zu 200 m erreichen soll. Diese Sendeleistung wird bei Bluetooth Smart jedoch aus Energiespargründen meist nicht angewendet.
https://de.m.wikipedia.org/wiki/Bluetooth_Low_Energy (https://de.m.wikipedia.org/wiki/Bluetooth_Low_Energy)

Zu der Reichweite von BLE finde ich zum Dongle leider nichts Direktes.
Es gibt aber wohl auch mehr als 10m.

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 25 Juli 2019, 21:41:22
Jupp, naja die Xiaomi Dinger machen aber nur 10 Meter, das nützt es nichts wenn es was besseres gibt ;-)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: raiderxxl am 26 Juli 2019, 17:26:50
Hallo,
Ich hab seit nem Jahr das laufen...

https://github.com/1technophile/OpenMQTTGateway

Kannst du mehrere davon im Haus verteilen...

Grüßle

Pascal
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Steffen am 13 August 2019, 06:01:49
Hallo!

Mir ist jetzt was in letzter Zeit aufgefallen, das wollte ich mal hier ansprechen und vielleicht hat jemand einen Rat dazu.

Ich nutze eigentlich seit langer Zeit diese Modul hier zusammen mit dem "lepresenced/collectord" Modul, jetzt ist mir aufgefallen
das wenn das "XiaomiBTLESens" Modul den Sensor nicht erreichen kann also eine "Error" anzeigt, exakt auch zu der Zeit bricht das "PRESENCE" Modul
ein und keiner meiner Bluetooth Tags werden mehr gefunden.

Wenn ich dann "XiaomiBTLESens" auf "attr Disable 1" setzte und "lepresenced Service" per Ssh auf dem Pi3 neustarte, findet er meine Bluetooth Tags wieder sofort.

Ist es möglich das beide zusammen Arbeiten können oder muss dann extra das "XiaomiBTLESens" auf ein sagen wir PiZero ausgelagert werden?!?

Mfg Steffen
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Steffen am 15 August 2019, 19:11:11
Zitat von: Steffen am 13 August 2019, 06:01:49
Hallo!

Mir ist jetzt was in letzter Zeit aufgefallen, das wollte ich mal hier ansprechen und vielleicht hat jemand einen Rat dazu.

Ich nutze eigentlich seit langer Zeit diese Modul hier zusammen mit dem "lepresenced/collectord" Modul, jetzt ist mir aufgefallen
das wenn das "XiaomiBTLESens" Modul den Sensor nicht erreichen kann also eine "Error" anzeigt, exakt auch zu der Zeit bricht das "PRESENCE" Modul
ein und keiner meiner Bluetooth Tags werden mehr gefunden.

Wenn ich dann "XiaomiBTLESens" auf "attr Disable 1" setzte und "lepresenced Service" per Ssh auf dem Pi3 neustarte, findet er meine Bluetooth Tags wieder sofort.

Ist es möglich das beide zusammen Arbeiten können oder muss dann extra das "XiaomiBTLESens" auf ein sagen wir PiZero ausgelagert werden?!?

Mfg Steffen

Ich habe jetzt nochmal einen Usb-Bluetooth Stick extra an den Pi3 gemacht und dann in Fhem am "XiaomiBTLESens" als "hciDevice = Hci1" eingestellt aber trotzdem brechen beide Module zusammen...

gibt es denn wirklich keine Lösung dafür???

Mfg Steffen
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: jay-jey am 23 August 2019, 08:18:18
Hallo,

vorab: ich habe hier nicht die 53 Seiten Forum durchgelesen, aber versucht anhand der Suche eine Lösung zu finden, habe den Fehler auch gefunden aber keine Lösung dazu. Also bitte erschlagt mich nicht gleich wenn ich etwas übersehen habe: Ich habe das Problem, dass an bei mir irgendwie immer nur 2 von 3 Sensoren gleichzeitig funktionieren wollen. Zuvor hatte ich den Fehler bei einer anderen Pflanze, aber als ich da die Batterie mal aus dem Sensor genommen habe und wieder eingesetz hab funktionier der wieder. Bei einem der Sensoren bekomme ich aber ein: lastGattError The BlockingCall Process terminated unexpectedly. Timedout

Wie bekomme ich das wieder hin?

hier mal list von dem Gerät:


1_Arbeitszimmer
2_Kueche
3_Wohnzimmer
4_Bad
5_Schlafzimmer
6_Aussen
7_Flur
HUEDevice
Hardware
Heizung
IT
Logik
MQTT
Plots
Revolt
SD_RSL
Unsorted
XiaomiMQTTDevice
ZWave
harmony
icoEverythingEverything
Logfile
Commandref
Remote doc
Edit files
Select style
Event monitor
Theme-Fehler melden (v2.11)

Internals:
   BTMAC      C4:7C:8D:6A:BC:D7
   DEF        C4:7C:8D:6A:BC:D7
   FUUID      5ce52894-f33f-6fd6-7e52-72a126a29eaa394b
   FVERSION   74_XiaomiBTLESens.pm:v2.6.0-s19768/2019-07-03
   INTERVAL   7200
   NAME       Drachenbaum
   NOTIFYDEV  global,Drachenbaum
   NR         213
   NTFY_ORDER 50-Drachenbaum
   STATE      error Temp: 21.8 Moist: 0 Lux: 8
   TYPE       XiaomiBTLESens
   VERSION    v2.6.0
   loglevel   4
   Helper:
     DBLOG:
       fertility:
         DBLogging:
           TIME       1566323618.051
           VALUE      72
       lux:
         DBLogging:
           TIME       1566323618.051
           VALUE      8
       moisture:
         DBLogging:
           TIME       1566323618.051
           VALUE      0
       temperature:
         DBLogging:
           TIME       1566323618.051
           VALUE      21.8
   READINGS:
     2019-08-19 23:31:25   batteryPercent  98
     2019-08-19 23:31:25   batteryState    ok
     2019-08-20 19:53:38   fertility       72
     2019-08-19 23:31:25   firmware        3.2.1
     2019-08-23 07:11:28   lastGattError   The BlockingCall Process terminated unexpectedly. Timedout
     2019-08-20 19:53:38   lux             8
     2019-08-20 19:53:38   moisture        0
     2019-08-23 07:11:28   state           error
     2019-08-20 19:53:38   temperature     21.8
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1566250285.97627
     updateTimestampCallBattery 2019-08-19 23:31:25
Attributes:
   DbLogExclude .*
   DbLogInclude temperature,moisture,lux,fertility
   interval   7200
   model      flowerSens
   mqttName   4in1_Sensor_Drachenbaum
   mqttRoom   Wohnzimmer
   room       3_Wohnzimmer
   stateFormat state Temp: temperature Moist: moisture Lux: lux

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 21 September 2019, 08:14:45
So, ich habe den Fehler gefunden, das lag echt an den "vollen" Batterien aus China die original drin waren! Ich hab die vollen Batterien jetzt gegen Deutsche volle getauscht und siehe da die Dinger funktionieren jetzt ohne die besagten Sprünge!

/Daniel


Zitat von: ext23 am 16 Juni 2019, 12:05:49
Ich habe jetzt zwei China Versionen der Flower Care Sensoren, aber irgendwie haben die solche Sprünge drin, hat das noch jemand? Bei meinen Int Versionen ist das noch nicht aufgefallen.

/Daniel
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 26 September 2019, 17:12:31
Moin liebes Forum, moin Leon,

ich habe heute versucht einen Xiaomi Cleargrass Sensor in Betrieb zu nehmen.
Bisher habe ich diverse Sensoren von dem Vorgängermodell im Einsatz, problemlos.

Link zum Gerät:
https://www.aliexpress.com/item/32988756893.html?spm=a2g0s.9042311.0.0.3e434c4dFMB94D (https://www.aliexpress.com/item/32988756893.html?spm=a2g0s.9042311.0.0.3e434c4dFMB94D)

Zuerst einmal die BT Mac rausgesucht:

58:2D:34:10:4C:FA ClearGrass Temp & RH


Eingebunden via:

define wz_Xiaomi_Sensor_unten XiaomiBTLESens 58:2D:34:10:4C:FA

Danach noch als Modell "thermoHygroSens" gesetzt und ein
get wz_Xiaomi_Sensor_unten sensorData

List vom Device:

Internals:
   BTMAC      58:2D:34:10:4C:FA
   CFGFN     
   DEF        58:2D:34:10:4C:FA
   FUUID      5d8cd259-f33f-5bc8-f8d0-febfa4c6b28c768c
   INTERVAL   300
   NAME       wz_Xiaomi_Sensor_unten
   NOTIFYDEV  global,wz_Xiaomi_Sensor_unten
   NR         120801
   NTFY_ORDER 50-wz_Xiaomi_Sensor_unten
   STATE      write sensor data
   TYPE       XiaomiBTLESens
   VERSION    2.4.7
   loglevel   4
   READINGS:
     2019-09-26 17:00:17   batteryPercent  51959038720
     2019-09-26 17:00:17   batteryState    ok
     2019-09-26 16:59:59   firmware        CGG1
     2019-09-26 17:14:23   lastGattError   charWrite faild
     2019-09-26 17:14:23   state           write sensor data
   helper:
     CallBattery 1
     CallSensDataCounter 1
     updateTimeCallBattery 1569510017.9597
     updateTimestampCallBattery 2019-09-26 17:00:17
     RUNNING_PID:
       abortFn    XiaomiBTLESens::ExecGatttool_Aborted
       arg        wz_Xiaomi_Sensor_unten|58:2D:34:10:4C:FA|write|0x10|0100|1
       bc_pid     120758
       finishFn   XiaomiBTLESens::ExecGatttool_Done
       fn         XiaomiBTLESens::ExecGatttool_Run
       pid        5511
       telnet     telnetPort_127.0.0.1_54660
       timeout    90
       abortArg:
Attributes:
   model      thermoHygroSens
   room       XiaomiBTLESens


Hatte das Gerät nun aber erstmal auf disable gesetzt, damit es meine Logs nicht vollspammt.

Bekomme im Log direkt folgenden Fehler:

2019.09.26 16:59:37 3: XiaomiBTLESens (wz_Xiaomi_Sensor_unten) - defined with BTMAC 58:2D:34:10:4C:FA
2019.09.26 17:00:17 1: PERL WARNING: Hexadecimal number > 0xffffffff non-portable at ./FHEM/74_XiaomiBTLESens.pm line 868.
2019.09.26 17:00:17 3: eval: {XiaomiBTLESens::ExecGatttool_Done('wz_Xiaomi_Sensor_unten|58:2D:34:10:4C:FA|ok|read|0x18|{"gtResult":"0c 19 00 03 00 "}')}
2019.09.26 17:00:17 1: PERL WARNING: Hexadecimal number > 0xffffffff non-portable at ./FHEM/74_XiaomiBTLESens.pm line 869.
2019.09.26 17:00:17 3: eval: {XiaomiBTLESens::ExecGatttool_Done('wz_Xiaomi_Sensor_unten|58:2D:34:10:4C:FA|ok|read|0x18|{"gtResult":"0c 19 00 03 00 "}')}
2019.09.26 17:00:38 1: ERROR evaluating {XiaomiBTLESens::ExecGatttool_Done('wz_Xiaomi_Sensor_unten|58:2D:34:10:4C:FA|ok|write|0x10|{"gtResult":"Unexpected error code"}')}: Can't use string ("1") as a HASH ref while "strict refs" in use at ./FHEM/74_XiaomiBTLESens.pm line 941.


Der Sensor wird vermutlich noch nicht unterstützt oder?

Gruß
Mathze
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 26 September 2019, 21:20:20
Hallo,

Leider nein. Und ich habe aktuell leider auch keine Zeit es mir genauer an zu schauen. Wenn Du also nicht genau weißt welche Werte was darstellen wird es schwierig.



Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 27 September 2019, 12:35:31
Zitat von: CoolTux am 26 September 2019, 21:20:20
Hallo,

Leider nein. Und ich habe aktuell leider auch keine Zeit es mir genauer an zu schauen. Wenn Du also nicht genau weißt welche Werte was darstellen wird es schwierig.

Grüße

Moin, danke für deine Antwort.
Was für Informationen benötigst du denn genau?
Bzw. wie kann ich mir die Hex-Werte anzeigen lassen?
Die Werte auf dem Display sehe ich zum Abrufzeitpunkt ja genau, sodass ich hier eine "Übersetzung" machen könnte.

Gruß
Mathze
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 27 September 2019, 13:07:39

gatttool -b BTMAC --characteristics


Das hier in der Konsole eines Linuxsystems eingeben.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 27 September 2019, 18:58:56
Zitat von: CoolTux am 27 September 2019, 13:07:39

gatttool -b BTMAC --characteristics


Das hier in der Konsole eines Linuxsystems eingeben.

Angezeigt werden:
20,1 Grad
66,2% Luftfeuchtigkeit

Als Ausgabe bekomme ich:

root@raspberrypi:~# gatttool -b 58:2D:34:10:4C:FA --characteristics
handle = 0x0002, char properties = 0x0a, char value handle = 0x0003, uuid = 00002a00-0000-1000-8000-00805f9b34fb
handle = 0x0004, char properties = 0x02, char value handle = 0x0005, uuid = 00002a01-0000-1000-8000-00805f9b34fb
handle = 0x0006, char properties = 0x02, char value handle = 0x0007, uuid = 00002a04-0000-1000-8000-00805f9b34fb
handle = 0x0008, char properties = 0x02, char value handle = 0x0009, uuid = 00002aa6-0000-1000-8000-00805f9b34fb
handle = 0x000b, char properties = 0x20, char value handle = 0x000c, uuid = 00002a05-0000-1000-8000-00805f9b34fb
handle = 0x000f, char properties = 0x18, char value handle = 0x0010, uuid = 8ec90003-f315-4f60-9fb8-838830daea50
handle = 0x0013, char properties = 0x0c, char value handle = 0x0014, uuid = 00000001-0000-1000-8000-00805f9b34fb
handle = 0x0015, char properties = 0x10, char value handle = 0x0016, uuid = 00000002-0000-1000-8000-00805f9b34fb
handle = 0x0018, char properties = 0x0c, char value handle = 0x0019, uuid = 00000003-0000-1000-8000-00805f9b34fb
handle = 0x001a, char properties = 0x10, char value handle = 0x001b, uuid = 00000004-0000-1000-8000-00805f9b34fb
handle = 0x001d, char properties = 0x10, char value handle = 0x001e, uuid = 00000100-0000-1000-8000-00805f9b34fb
handle = 0x0021, char properties = 0x02, char value handle = 0x0022, uuid = 00002a29-0000-1000-8000-00805f9b34fb
handle = 0x0023, char properties = 0x02, char value handle = 0x0024, uuid = 00002a24-0000-1000-8000-00805f9b34fb
handle = 0x0025, char properties = 0x02, char value handle = 0x0026, uuid = 00002a25-0000-1000-8000-00805f9b34fb
handle = 0x0027, char properties = 0x02, char value handle = 0x0028, uuid = 00002a27-0000-1000-8000-00805f9b34fb
handle = 0x0029, char properties = 0x02, char value handle = 0x002a, uuid = 00002a26-0000-1000-8000-00805f9b34fb
handle = 0x002c, char properties = 0x18, char value handle = 0x002d, uuid = 00000001-0000-1000-8000-00805f9b34fb
handle = 0x002f, char properties = 0x02, char value handle = 0x0030, uuid = 00000002-0000-1000-8000-00805f9b34fb
handle = 0x0031, char properties = 0x02, char value handle = 0x0032, uuid = 00000004-0000-1000-8000-00805f9b34fb
handle = 0x0033, char properties = 0x18, char value handle = 0x0034, uuid = 00000005-0000-1000-8000-00805f9b34fb
handle = 0x0036, char properties = 0x08, char value handle = 0x0037, uuid = 00000010-0000-1000-8000-00805f9b34fb
handle = 0x0038, char properties = 0x0a, char value handle = 0x0039, uuid = 00000013-0000-1000-8000-00805f9b34fb
handle = 0x003a, char properties = 0x02, char value handle = 0x003b, uuid = 00000014-0000-1000-8000-00805f9b34fb


Angezeigt werden:
20,2 Grad
65,9% Luftfeuchtigkeit

Als Ausgabe bekomme ich:

handle = 0x0002, char properties = 0x0a, char value handle = 0x0003, uuid = 00002a00-0000-1000-8000-00805f9b34fb
handle = 0x0004, char properties = 0x02, char value handle = 0x0005, uuid = 00002a01-0000-1000-8000-00805f9b34fb
handle = 0x0006, char properties = 0x02, char value handle = 0x0007, uuid = 00002a04-0000-1000-8000-00805f9b34fb
handle = 0x0008, char properties = 0x02, char value handle = 0x0009, uuid = 00002aa6-0000-1000-8000-00805f9b34fb
handle = 0x000b, char properties = 0x20, char value handle = 0x000c, uuid = 00002a05-0000-1000-8000-00805f9b34fb
handle = 0x000f, char properties = 0x18, char value handle = 0x0010, uuid = 8ec90003-f315-4f60-9fb8-838830daea50
handle = 0x0013, char properties = 0x0c, char value handle = 0x0014, uuid = 00000001-0000-1000-8000-00805f9b34fb
handle = 0x0015, char properties = 0x10, char value handle = 0x0016, uuid = 00000002-0000-1000-8000-00805f9b34fb
handle = 0x0018, char properties = 0x0c, char value handle = 0x0019, uuid = 00000003-0000-1000-8000-00805f9b34fb
handle = 0x001a, char properties = 0x10, char value handle = 0x001b, uuid = 00000004-0000-1000-8000-00805f9b34fb
handle = 0x001d, char properties = 0x10, char value handle = 0x001e, uuid = 00000100-0000-1000-8000-00805f9b34fb
handle = 0x0021, char properties = 0x02, char value handle = 0x0022, uuid = 00002a29-0000-1000-8000-00805f9b34fb
handle = 0x0023, char properties = 0x02, char value handle = 0x0024, uuid = 00002a24-0000-1000-8000-00805f9b34fb
handle = 0x0025, char properties = 0x02, char value handle = 0x0026, uuid = 00002a25-0000-1000-8000-00805f9b34fb
handle = 0x0027, char properties = 0x02, char value handle = 0x0028, uuid = 00002a27-0000-1000-8000-00805f9b34fb
handle = 0x0029, char properties = 0x02, char value handle = 0x002a, uuid = 00002a26-0000-1000-8000-00805f9b34fb
handle = 0x002c, char properties = 0x18, char value handle = 0x002d, uuid = 00000001-0000-1000-8000-00805f9b34fb
handle = 0x002f, char properties = 0x02, char value handle = 0x0030, uuid = 00000002-0000-1000-8000-00805f9b34fb
handle = 0x0031, char properties = 0x02, char value handle = 0x0032, uuid = 00000004-0000-1000-8000-00805f9b34fb
handle = 0x0033, char properties = 0x18, char value handle = 0x0034, uuid = 00000005-0000-1000-8000-00805f9b34fb
handle = 0x0036, char properties = 0x08, char value handle = 0x0037, uuid = 00000010-0000-1000-8000-00805f9b34fb
handle = 0x0038, char properties = 0x0a, char value handle = 0x0039, uuid = 00000013-0000-1000-8000-00805f9b34fb
handle = 0x003a, char properties = 0x02, char value handle = 0x003b, uuid = 00000014-0000-1000-8000-00805f9b34fb


Wenn du mir jetzt noch erklärst, wie ich aus diesen Informationen die angezeigten Werte rausbekomme, kann ich gerne weitere Werte liefern.

Gruß
Mathze
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 27 September 2019, 19:06:46
Hieraus noch nicht, das sind erstmal nur die Handles.

Ich muss mir das noch mal in Ruhe anschauen und dann bekommst Hausaufgaben. Dauert aber etwas.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 27 September 2019, 19:10:46
Zitat von: CoolTux am 27 September 2019, 19:06:46
Hieraus noch nicht, das sind erstmal nur die Handles.

Ich muss mir das noch mal in Ruhe anschauen und dann bekommst Hausaufgaben. Dauert aber etwas.

Keine Hektik!  :)
Hausaufgaben werden dann erledigt  ;D

Gruß
Mathze
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 07 Oktober 2019, 11:43:58
Zitat von: t1me2die am 27 September 2019, 18:58:56
Angezeigt werden:
20,1 Grad
66,2% Luftfeuchtigkeit

Als Ausgabe bekomme ich:

root@raspberrypi:~# gatttool -b 58:2D:34:10:4C:FA --characteristics
handle = 0x0002, char properties = 0x0a, char value handle = 0x0003, uuid = 00002a00-0000-1000-8000-00805f9b34fb
handle = 0x0004, char properties = 0x02, char value handle = 0x0005, uuid = 00002a01-0000-1000-8000-00805f9b34fb
handle = 0x0006, char properties = 0x02, char value handle = 0x0007, uuid = 00002a04-0000-1000-8000-00805f9b34fb
handle = 0x0008, char properties = 0x02, char value handle = 0x0009, uuid = 00002aa6-0000-1000-8000-00805f9b34fb
handle = 0x000b, char properties = 0x20, char value handle = 0x000c, uuid = 00002a05-0000-1000-8000-00805f9b34fb
handle = 0x000f, char properties = 0x18, char value handle = 0x0010, uuid = 8ec90003-f315-4f60-9fb8-838830daea50
handle = 0x0013, char properties = 0x0c, char value handle = 0x0014, uuid = 00000001-0000-1000-8000-00805f9b34fb
handle = 0x0015, char properties = 0x10, char value handle = 0x0016, uuid = 00000002-0000-1000-8000-00805f9b34fb
handle = 0x0018, char properties = 0x0c, char value handle = 0x0019, uuid = 00000003-0000-1000-8000-00805f9b34fb
handle = 0x001a, char properties = 0x10, char value handle = 0x001b, uuid = 00000004-0000-1000-8000-00805f9b34fb
handle = 0x001d, char properties = 0x10, char value handle = 0x001e, uuid = 00000100-0000-1000-8000-00805f9b34fb
handle = 0x0021, char properties = 0x02, char value handle = 0x0022, uuid = 00002a29-0000-1000-8000-00805f9b34fb
handle = 0x0023, char properties = 0x02, char value handle = 0x0024, uuid = 00002a24-0000-1000-8000-00805f9b34fb
handle = 0x0025, char properties = 0x02, char value handle = 0x0026, uuid = 00002a25-0000-1000-8000-00805f9b34fb
handle = 0x0027, char properties = 0x02, char value handle = 0x0028, uuid = 00002a27-0000-1000-8000-00805f9b34fb
handle = 0x0029, char properties = 0x02, char value handle = 0x002a, uuid = 00002a26-0000-1000-8000-00805f9b34fb
handle = 0x002c, char properties = 0x18, char value handle = 0x002d, uuid = 00000001-0000-1000-8000-00805f9b34fb
handle = 0x002f, char properties = 0x02, char value handle = 0x0030, uuid = 00000002-0000-1000-8000-00805f9b34fb
handle = 0x0031, char properties = 0x02, char value handle = 0x0032, uuid = 00000004-0000-1000-8000-00805f9b34fb
handle = 0x0033, char properties = 0x18, char value handle = 0x0034, uuid = 00000005-0000-1000-8000-00805f9b34fb
handle = 0x0036, char properties = 0x08, char value handle = 0x0037, uuid = 00000010-0000-1000-8000-00805f9b34fb
handle = 0x0038, char properties = 0x0a, char value handle = 0x0039, uuid = 00000013-0000-1000-8000-00805f9b34fb
handle = 0x003a, char properties = 0x02, char value handle = 0x003b, uuid = 00000014-0000-1000-8000-00805f9b34fb


Angezeigt werden:
20,2 Grad
65,9% Luftfeuchtigkeit

Als Ausgabe bekomme ich:

handle = 0x0002, char properties = 0x0a, char value handle = 0x0003, uuid = 00002a00-0000-1000-8000-00805f9b34fb
handle = 0x0004, char properties = 0x02, char value handle = 0x0005, uuid = 00002a01-0000-1000-8000-00805f9b34fb
handle = 0x0006, char properties = 0x02, char value handle = 0x0007, uuid = 00002a04-0000-1000-8000-00805f9b34fb
handle = 0x0008, char properties = 0x02, char value handle = 0x0009, uuid = 00002aa6-0000-1000-8000-00805f9b34fb
handle = 0x000b, char properties = 0x20, char value handle = 0x000c, uuid = 00002a05-0000-1000-8000-00805f9b34fb
handle = 0x000f, char properties = 0x18, char value handle = 0x0010, uuid = 8ec90003-f315-4f60-9fb8-838830daea50
handle = 0x0013, char properties = 0x0c, char value handle = 0x0014, uuid = 00000001-0000-1000-8000-00805f9b34fb
handle = 0x0015, char properties = 0x10, char value handle = 0x0016, uuid = 00000002-0000-1000-8000-00805f9b34fb
handle = 0x0018, char properties = 0x0c, char value handle = 0x0019, uuid = 00000003-0000-1000-8000-00805f9b34fb
handle = 0x001a, char properties = 0x10, char value handle = 0x001b, uuid = 00000004-0000-1000-8000-00805f9b34fb
handle = 0x001d, char properties = 0x10, char value handle = 0x001e, uuid = 00000100-0000-1000-8000-00805f9b34fb
handle = 0x0021, char properties = 0x02, char value handle = 0x0022, uuid = 00002a29-0000-1000-8000-00805f9b34fb
handle = 0x0023, char properties = 0x02, char value handle = 0x0024, uuid = 00002a24-0000-1000-8000-00805f9b34fb
handle = 0x0025, char properties = 0x02, char value handle = 0x0026, uuid = 00002a25-0000-1000-8000-00805f9b34fb
handle = 0x0027, char properties = 0x02, char value handle = 0x0028, uuid = 00002a27-0000-1000-8000-00805f9b34fb
handle = 0x0029, char properties = 0x02, char value handle = 0x002a, uuid = 00002a26-0000-1000-8000-00805f9b34fb
handle = 0x002c, char properties = 0x18, char value handle = 0x002d, uuid = 00000001-0000-1000-8000-00805f9b34fb
handle = 0x002f, char properties = 0x02, char value handle = 0x0030, uuid = 00000002-0000-1000-8000-00805f9b34fb
handle = 0x0031, char properties = 0x02, char value handle = 0x0032, uuid = 00000004-0000-1000-8000-00805f9b34fb
handle = 0x0033, char properties = 0x18, char value handle = 0x0034, uuid = 00000005-0000-1000-8000-00805f9b34fb
handle = 0x0036, char properties = 0x08, char value handle = 0x0037, uuid = 00000010-0000-1000-8000-00805f9b34fb
handle = 0x0038, char properties = 0x0a, char value handle = 0x0039, uuid = 00000013-0000-1000-8000-00805f9b34fb
handle = 0x003a, char properties = 0x02, char value handle = 0x003b, uuid = 00000014-0000-1000-8000-00805f9b34fb


Wenn du mir jetzt noch erklärst, wie ich aus diesen Informationen die angezeigten Werte rausbekomme, kann ich gerne weitere Werte liefern.

Gruß
Mathze

Bitte einmal dieses hier aus führen

gatttool -b $MAC --char-read -a 0x16
und
gatttool -b $MAC --char-read -a 0x16 0x19

Ausgabe hier bitte posten.


Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 07 Oktober 2019, 16:16:34
Zitat von: CoolTux am 07 Oktober 2019, 11:43:58
Bitte einmal dieses hier aus führen

gatttool -b $MAC --char-read -a 0x16
und
gatttool -b $MAC --char-read -a 0x16 0x19

Ausgabe hier bitte posten.


Grüße

Hier die Ausgabe:

root@raspberrypi:~# gatttool -b 58:2D:34:10:4C:FA --char-read -a 0x16
Characteristic value/descriptor: f2
root@raspberrypi:~# gatttool -b 58:2D:34:10:4C:FA --char-read -a 0x16 0x19
Characteristic value/descriptor: f2


Gruß
Mathze
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 07 Oktober 2019, 16:21:46
Sorry mein Fehler.
Das letzte sollte ein
gatttool -b $MAC --char-read -a 0x19
werden
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 07 Oktober 2019, 16:28:51
Zitat von: CoolTux am 07 Oktober 2019, 16:21:46
Sorry mein Fehler.
Das letzte sollte ein
gatttool -b $MAC --char-read -a 0x19
werden


root@raspberrypi:~# gatttool -b 58:2D:34:10:4C:FA --char-read -a 0x19
Characteristic value/descriptor: fe


Gruß
Mathze
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 07 Oktober 2019, 16:33:23
Ok und jetzt das selbe mit 37 und 39 bitte.
also 0x37 und 0x39
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 07 Oktober 2019, 16:49:45
Zitat von: CoolTux am 07 Oktober 2019, 16:33:23
Ok und jetzt das selbe mit 37 und 39 bitte.
also 0x37 und 0x39


root@raspberrypi:~# gatttool -b 58:2D:34:10:4C:FA --char-read -a 0x37
Characteristic value/descriptor read failed: Attribute can't be read
root@raspberrypi:~# gatttool -b 58:2D:34:10:4C:FA --char-read -a 0x39
Characteristic value/descriptor: 52 f6 f9 e3 1c c2 3a e0 c0 8d b9 df e6 78 ae 8b 90 ee 0a d4


Gruß
Mathze
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 07 Oktober 2019, 16:52:07
Ist Deine Batterie bei 82 Prozent?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 07 Oktober 2019, 17:29:53
Zitat von: CoolTux am 07 Oktober 2019, 16:52:07
Ist Deine Batterie bei 82 Prozent?

Wenn du mir nun noch verraten würdest, wo ich die Information finde, dann teile ich Dir die gerne mit.
Auf dem Gerät selbst habe ich aktuell 3 von 5 Balken.
In der Xiaomi Mi Home App, finde ich keine Batterieinformationen, oder ich bin blind  :o
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 07 Oktober 2019, 18:36:42
Nicht schlimm, wir nehmen das erstmal so.

Jetzt

0x34
Kann sein das die Daten auf die 0x37 kommt wir aber vorher was schreiben müssen. Wir schauen mal.

Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 07 Oktober 2019, 18:55:35

root@raspberrypi:~# gatttool -b 58:2D:34:10:4C:FA --char-read -a 0x34
Characteristic value/descriptor read failed: Attribute can't be read
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 07 Oktober 2019, 19:01:14
ok was bekommst Du bei

gatttool -b MAC --char-write-req -a 0x32 -n A01F

oder

gatttool -b MAC --char-write-req -a 0x34 -n A01F
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 07 Oktober 2019, 19:04:37

root@raspberrypi:~# gatttool -b 58:2D:34:10:4C:FA --char-write-req -a 0x32 -n A01F
Characteristic Write Request failed: Attribute can't be written
root@raspberrypi:~# gatttool -b 58:2D:34:10:4C:FA --char-write-req -a 0x34 -n A01F
Characteristic value was written successfully
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 07 Oktober 2019, 19:10:50
So jetzt wird es lustig.

gatttool -b MAC --char-write-req -a 0x34 -n A01F && gatttool -b MAC --char-read -a 0x37
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 07 Oktober 2019, 19:14:18

root@raspberrypi:~# gatttool -b 58:2D:34:10:4C:FA --char-write-req -a 0x34 -n A01F && gatttool -b 58:2D:34:10:4C:FA --char-read -a 0x37
Characteristic value was written successfully
Characteristic value/descriptor read failed: Attribute can't be read
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 07 Oktober 2019, 19:16:42
gatttool -b 58:2D:34:10:4C:FA --char-write-req -a 0x34 -n A01F && gatttool -b 58:2D:34:10:4C:FA --char-read -a 0x32
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 07 Oktober 2019, 19:19:13

root@raspberrypi:~# gatttool -b 58:2D:34:10:4C:FA --char-write-req -a 0x34 -n A01F && gatttool -b 58:2D:34:10:4C:FA --char-read -a 0x32
Characteristic value was written successfully
Characteristic value/descriptor: 0a 58 c4 7c d3 b7 2a 2b f1 13
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 07 Oktober 2019, 19:39:07
Schon mal nicht schlecht. Und jetzt versuche mal bitte die 32 zu lesen ohne vorher das write zu machen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 07 Oktober 2019, 19:46:43

root@raspberrypi:~# gatttool -b 58:2D:34:10:4C:FA --char-read -a 0x32
Characteristic value/descriptor: 0a 58 c4 7c d3 b7 2a 2b f1 13
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 07 Oktober 2019, 19:48:04
Wie warm ist es aktuell bei Dir?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 07 Oktober 2019, 19:53:04
18,4Grad
60,0% Luftfeuchtigkeit


root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read -a 0x32
Characteristic value/descriptor: 0a 58 c4 7c d3 b7 2a 2b f1 13
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 07 Oktober 2019, 20:01:31
Mach mal bitte die

0x36 und 0x38. Nur ein Read bitte
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 07 Oktober 2019, 20:05:50

root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read -a 0x36
Characteristic value/descriptor: 08 37 00 10 00
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read -a 0x38
Characteristic value/descriptor: 0a 39 00 13 00
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 07 Oktober 2019, 20:39:08
Zitat von: t1me2die am 07 Oktober 2019, 20:05:50

root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read -a 0x36
Characteristic value/descriptor: 08 37 00 10 00
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read -a 0x38
Characteristic value/descriptor: 0a 39 00 13 00


Kannst Du mir bitte das noch mal machen und dann gleich dazu schreiben was Dein Display sagt?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 07 Oktober 2019, 20:42:44
Hier die Werte direkt beim Abruf im Terminal  :)

18,7Grad
62,2% Luftfeuchtigkeit


root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read -a 0x36
Characteristic value/descriptor: 08 37 00 10 00
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read -a 0x38
Characteristic value/descriptor: 0a 39 00 13 00
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 07 Oktober 2019, 21:08:51
Hi Leon, klär mich mal etwas auf.
Irgendwie verändert sich die Ausgabe beim Terminal nicht, jedoch sind die Werte auf dem Display andere wie beim letzten Mal.
18,9Grad
63,3% Luftfeuchtigkeit


root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read -a 0x36
Characteristic value/descriptor: 08 37 00 10 00
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read -a 0x38
Characteristic value/descriptor: 0a 39 00 13 00
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 07 Oktober 2019, 21:17:32
Aktuell suche ich im Netz nach Infos und Teste was ich finden kann. Aber irgendwie passt nichts.

Suche: Xiaomi Cleargrass gatttool
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 07 Oktober 2019, 21:19:51
Für heute mache ich erstmal Feierabend.


Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 08 Oktober 2019, 12:23:10
Moin Leon,

um ein bisschen mehr Verständnis für die Materie zu bekommen, google ich auch etwas.
Kurz zusammengefasst, mit 0x36, 0x32, 0x38 usw. werden einzelne Bereiche aus dem Gerät ausgelesen.
Der Wert wird als HEX Wert ausgelesen, richtig?
Dieser müsste dann noch nach ASCII übersetzt werden und sollte dann, irgendeine Zahl / Wert / Zeichen enthalten, der optimalerweise irgendwie im Gerät vorhanden/sichtbar wäre/ist.
Habe ich das soweit richtig verstanden?

Folgende Werte konnte ich identifizieren:
0x0022 = 51 69 6e 67 70 69 6e 67 20 54 65 63 68 6e 6f 6c 6f 67 79 20 28 42 65 69 6a 69 6e 67 29 20 43 6f 2e 2c 20 4c 74 64 2e
Herstellername = Qingping Technology (Beijing) Co., Ltd.

0x0024 = 43 47 47 31
Produkt ID = CGG1

0x0026 = 46 41 34 43 31 30 33 34 32 44 35 38
Keine Ahnung, was das sein soll?

0x0003 = 43 6c 65 61 72 47 72 61 73 73 20 54 65 6d 70 20 26 20 52 48
Name = ClearGrass Temp & RH

0x002a = 31 2e 31 2e 32 5f 30 30 32 30
Firmwareversion = 1.1.2_0020


Gruß
Mathze
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 08 Oktober 2019, 13:47:43
Zitat von: t1me2die am 08 Oktober 2019, 12:23:10
Moin Leon,

um ein bisschen mehr Verständnis für die Materie zu bekommen, google ich auch etwas.
Kurz zusammengefasst, mit 0x36, 0x32, 0x38 usw. werden einzelne Bereiche aus dem Gerät ausgelesen.
Der Wert wird als HEX Wert ausgelesen, richtig?
Dieser müsste dann noch nach ASCII übersetzt werden und sollte dann, irgendeine Zahl / Wert / Zeichen enthalten, der optimalerweise irgendwie im Gerät vorhanden/sichtbar wäre/ist.
Habe ich das soweit richtig verstanden?

Folgende Werte konnte ich identifizieren:
0x0022 = 51 69 6e 67 70 69 6e 67 20 54 65 63 68 6e 6f 6c 6f 67 79 20 28 42 65 69 6a 69 6e 67 29 20 43 6f 2e 2c 20 4c 74 64 2e
Herstellername = Qingping Technology (Beijing) Co., Ltd.

0x0024 = 43 47 47 31
Produkt ID = CGG1

0x0026 = 46 41 34 43 31 30 33 34 32 44 35 38
Keine Ahnung, was das sein soll?

0x0003 = 43 6c 65 61 72 47 72 61 73 73 20 54 65 6d 70 20 26 20 52 48
Name = ClearGrass Temp & RH

0x002a = 31 2e 31 2e 32 5f 30 30 32 30
Firmwareversion = 1.1.2_0020


Gruß
Mathze

Genau so ist es. Und eigentlich sollte Temperatur und Luftfeuchte in getrennten Charactaristics liegen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 08 Oktober 2019, 14:08:34
Ich habe auch gelesen, dass man in manchen Fällen ein Write auf einen Bereich machen muss, damit das gute Gerät einen Wert ausspuckt?
Ist das reines ausprobieren und raten oder wie geht man da am besten vor?
Die ein oder anderen "Strings" habe ich ja schon gefunden, die interessanten Informationen wie Temperatur und Luftfeuchtigkeit nicht...

Gruß
Mathze
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 08 Oktober 2019, 14:23:06
So, von 1-40 habe ich nun alle durch, leider ohne große neue Erkenntnisse.
Wie suche ich nun weiter?


root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0001
Characteristic value/descriptor: 00 18
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0002
Characteristic value/descriptor: 0a 03 00 00 2a
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0003
Characteristic value/descriptor: 43 6c 65 61 72 47 72 61 73 73 20 54 65 6d 70 20 26 20 52 48
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0004
Characteristic value/descriptor: 02 05 00 01 2a
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0005
Characteristic value/descriptor: 00 00
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0006
Characteristic value/descriptor: 02 07 00 04 2a
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0007
Characteristic value/descriptor: 10 00 3c 00 00 00 90 01
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0008
Characteristic value/descriptor: 02 09 00 a6 2a
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0009
Characteristic value/descriptor: 01
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0010
Characteristic value/descriptor:
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0011
Characteristic value/descriptor: 00 00
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0012
Characteristic value/descriptor: 4d 46 50 44 53 46 42 55 46 45 4a 55 00 00 21 22
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0013
Characteristic value/descriptor: 0c 14 00 01 00
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0014
Characteristic value/descriptor: 01
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0015
Characteristic value/descriptor: 10 16 00 02 00
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0016
Characteristic value/descriptor: 05
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0017
Characteristic value/descriptor: 00 00
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0018
Characteristic value/descriptor: 0c 19 00 03 00
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0019
Characteristic value/descriptor: fe
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0020
Characteristic value/descriptor: 0a 18
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0021
Characteristic value/descriptor: 02 22 00 29 2a
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0022
Characteristic value/descriptor: 51 69 6e 67 70 69 6e 67 20 54 65 63 68 6e 6f 6c 6f 67 79 20 28 42 65 69 6a 69 6e 67 29 20 43 6f 2e 2c 20 4c 74 64 2e
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0023
Characteristic value/descriptor: 02 24 00 24 2a
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0024
Characteristic value/descriptor: 43 47 47 31
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0025
Characteristic value/descriptor: 02 26 00 25 2a
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0026
Characteristic value/descriptor: 46 41 34 43 31 30 33 34 32 44 35 38
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0027
Characteristic value/descriptor: 02 28 00 27 2a
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0028
Characteristic value/descriptor: 30 30 30 31
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0029
Characteristic value/descriptor: 02 2a 00 26 2a
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0030
Characteristic value/descriptor: 47 03
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0031
Characteristic value/descriptor: 02 32 00 04 00
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0032
Characteristic value/descriptor: 0a 58 c4 7c d3 b7 2a 2b f1 13
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0033
Characteristic value/descriptor: 18 34 00 05 00
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0034
Characteristic value/descriptor read failed: Attribute can't be read
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0035
Characteristic value/descriptor: 00 00
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0036
Characteristic value/descriptor: 08 37 00 10 00
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0037
Characteristic value/descriptor read failed: Attribute can't be read
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0038
Characteristic value/descriptor: 0a 39 00 13 00
root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0039
Characteristic value/descriptor: 3b 14 99 26 cf db 34 2a f3 53 45 3b 41 6f a3 9f 29 09 70 38


Gruß
Mathze
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 08 Oktober 2019, 14:52:04
Im Grunde kann man nur schauen wie die anderen es im Netz gemacht haben. Gerade was die erhaltenden HEX Werte und deren umwandeln an geht.
Leider komme ich aktuell nicht zu viel.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 09 Oktober 2019, 13:24:15
Ich habe nun noch etwas herumgespielt, aber so richtig schlau werde ich daraus noch nicht.

Zuerst einmal habe ich mich ins gatttool verbunden mit:
gatttool -I

Danach mit dem Device verbunden und die characteristics abgefragt.
Ich habe dann alle handle's einmal gelesen und hinzugefügt.

[58:2D:34:10:4C:FA][LE]> characteristics
handle: 0x0002, char properties: 0x0a, char value handle: 0x0003, uuid: 00002a00-0000-1000-8000-00805f9b34fb
Hex: 43 6c 65 61 72 47 72 61 73 73 20 54 65 6d 70 20 26 20 52 48
ASCII: ClearGrass Temp & RH

handle: 0x0004, char properties: 0x02, char value handle: 0x0005, uuid: 00002a01-0000-1000-8000-00805f9b34fb
Hex: 00 00
ASCII:

handle: 0x0006, char properties: 0x02, char value handle: 0x0007, uuid: 00002a04-0000-1000-8000-00805f9b34fb
HEX: 10 00 3c 00 00 00 90 01
ASCII: Nicht leserlich?!

handle: 0x0008, char properties: 0x02, char value handle: 0x0009, uuid: 00002aa6-0000-1000-8000-00805f9b34fb
HEX: 01
ASCII: Nicht leserlich?!

handle: 0x000b, char properties: 0x20, char value handle: 0x000c, uuid: 00002a05-0000-1000-8000-00805f9b34fb
can't be read

handle: 0x000f, char properties: 0x18, char value handle: 0x0010, uuid: 8ec90003-f315-4f60-9fb8-838830daea50
blank

handle: 0x0013, char properties: 0x0c, char value handle: 0x0014, uuid: 00000001-0000-1000-8000-00805f9b34fb
HEX: 01
ASCII: Nicht leserlich?!

handle: 0x0015, char properties: 0x10, char value handle: 0x0016, uuid: 00000002-0000-1000-8000-00805f9b34fb
HEX: 05
ASCII: Nicht leserlich?!

handle: 0x0018, char properties: 0x0c, char value handle: 0x0019, uuid: 00000003-0000-1000-8000-00805f9b34fb
HEX: fe
ASCII: Nicht leserlich?!

handle: 0x001a, char properties: 0x10, char value handle: 0x001b, uuid: 00000004-0000-1000-8000-00805f9b34fb
HEX: fe
ASCII: Nicht leserlich?!

handle: 0x001d, char properties: 0x10, char value handle: 0x001e, uuid: 00000100-0000-1000-8000-00805f9b34fb
HEX: 05
ASCII: Nicht leserlich?!

handle: 0x0021, char properties: 0x02, char value handle: 0x0022, uuid: 00002a29-0000-1000-8000-00805f9b34fb
HEX: 51 69 6e 67 70 69 6e 67 20 54 65 63 68 6e 6f 6c 6f 67 79 20 28 42 65 69 6a 69 6e 67 29 20 43 6f 2e 2c 20 4c 74 64 2e
ASCII: Qingping Technology (Beijing) Co., Ltd.

handle: 0x0023, char properties: 0x02, char value handle: 0x0024, uuid: 00002a24-0000-1000-8000-00805f9b34fb
HEX: 43 47 47 31
ASCII: CGG1

handle: 0x0025, char properties: 0x02, char value handle: 0x0026, uuid: 00002a25-0000-1000-8000-00805f9b34fb
HEX: 46 41 34 43 31 30 33 34 32 44 35 38
ASCII: FA4C10342D58

handle: 0x0027, char properties: 0x02, char value handle: 0x0028, uuid: 00002a27-0000-1000-8000-00805f9b34fb
HEX: 30 30 30 31
ASCII: 0001

handle: 0x0029, char properties: 0x02, char value handle: 0x002a, uuid: 00002a26-0000-1000-8000-00805f9b34fb
HEX: 31 2e 31 2e 32 5f 30 30 32 30
ASCII: 1.1.2_0020

handle: 0x002c, char properties: 0x18, char value handle: 0x002d, uuid: 00000001-0000-1000-8000-00805f9b34fb
cant be read

handle: 0x002f, char properties: 0x02, char value handle: 0x0030, uuid: 00000002-0000-1000-8000-00805f9b34fb
HEX: 47 03
ASCII: Nicht leserlich?!

handle: 0x0031, char properties: 0x02, char value handle: 0x0032, uuid: 00000004-0000-1000-8000-00805f9b34fb
HEX: 0a 58 c4 7c d3 b7 2a 2b f1 13
ASCII: Nicht leserlich?

handle: 0x0033, char properties: 0x18, char value handle: 0x0034, uuid: 00000005-0000-1000-8000-00805f9b34fb
cant be read

handle: 0x0036, char properties: 0x08, char value handle: 0x0037, uuid: 00000010-0000-1000-8000-00805f9b34fb
cant be read

handle: 0x0038, char properties: 0x0a, char value handle: 0x0039, uuid: 00000013-0000-1000-8000-00805f9b34fb
HEX: 3b 14 99 26 cf db 34 2a f3 53 45 3b 41 6f a3 9f 29 09 70 38
ASCII: Nicht leserlich?!

handle: 0x003a, char properties: 0x02, char value handle: 0x003b, uuid: 00000014-0000-1000-8000-00805f9b34fb
HEX: 51 04 bf 7e 7d 10 be 4d 71 7b 8f 2f
ASCII: Nicht leserlich?!


Einige handles konnte ich gar nicht lesen, obwohl sie mir als characteristics angezeigt wurden, verstehe ich nicht.
Manche ASCII Übersetzungen sind für mich nur Hieroglyphen, ggf. versteckt sich hier eine andere Übersetzung? Vielleicht muss ich den HEX Wert anders übersetzen? Tipps?

Die ganzen handle's bin ich nun gefühlt mehrfach durchgegangen, jedoch ohne ein Anzeichen einer Temperatur / Luftfeuchtigkeit.

[58:2D:34:10:4C:FA][LE]> char-desc
handle: 0x0001, uuid: 00002800-0000-1000-8000-00805f9b34fb
handle: 0x0002, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0003, uuid: 00002a00-0000-1000-8000-00805f9b34fb
handle: 0x0004, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0005, uuid: 00002a01-0000-1000-8000-00805f9b34fb
handle: 0x0006, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0007, uuid: 00002a04-0000-1000-8000-00805f9b34fb
handle: 0x0008, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0009, uuid: 00002aa6-0000-1000-8000-00805f9b34fb
handle: 0x000a, uuid: 00002800-0000-1000-8000-00805f9b34fb
handle: 0x000b, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x000c, uuid: 00002a05-0000-1000-8000-00805f9b34fb
handle: 0x000d, uuid: 00002902-0000-1000-8000-00805f9b34fb
handle: 0x000e, uuid: 00002800-0000-1000-8000-00805f9b34fb
handle: 0x000f, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0010, uuid: 8ec90003-f315-4f60-9fb8-838830daea50
handle: 0x0011, uuid: 00002902-0000-1000-8000-00805f9b34fb
handle: 0x0012, uuid: 00002800-0000-1000-8000-00805f9b34fb
handle: 0x0013, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0014, uuid: 00000001-0000-1000-8000-00805f9b34fb
handle: 0x0015, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0016, uuid: 00000002-0000-1000-8000-00805f9b34fb
handle: 0x0017, uuid: 00002902-0000-1000-8000-00805f9b34fb
handle: 0x0018, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0019, uuid: 00000003-0000-1000-8000-00805f9b34fb
handle: 0x001a, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x001b, uuid: 00000004-0000-1000-8000-00805f9b34fb
handle: 0x001c, uuid: 00002902-0000-1000-8000-00805f9b34fb
handle: 0x001d, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x001e, uuid: 00000100-0000-1000-8000-00805f9b34fb
handle: 0x001f, uuid: 00002902-0000-1000-8000-00805f9b34fb
handle: 0x0020, uuid: 00002800-0000-1000-8000-00805f9b34fb
handle: 0x0021, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0022, uuid: 00002a29-0000-1000-8000-00805f9b34fb
handle: 0x0023, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0024, uuid: 00002a24-0000-1000-8000-00805f9b34fb
handle: 0x0025, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0026, uuid: 00002a25-0000-1000-8000-00805f9b34fb
handle: 0x0027, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0028, uuid: 00002a27-0000-1000-8000-00805f9b34fb
handle: 0x0029, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x002a, uuid: 00002a26-0000-1000-8000-00805f9b34fb
handle: 0x002b, uuid: 00002800-0000-1000-8000-00805f9b34fb
handle: 0x002c, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x002d, uuid: 00000001-0000-1000-8000-00805f9b34fb
handle: 0x002e, uuid: 00002902-0000-1000-8000-00805f9b34fb
handle: 0x002f, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0030, uuid: 00000002-0000-1000-8000-00805f9b34fb
handle: 0x0031, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0032, uuid: 00000004-0000-1000-8000-00805f9b34fb
handle: 0x0033, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0034, uuid: 00000005-0000-1000-8000-00805f9b34fb
handle: 0x0035, uuid: 00002902-0000-1000-8000-00805f9b34fb
handle: 0x0036, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0037, uuid: 00000010-0000-1000-8000-00805f9b34fb
handle: 0x0038, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0039, uuid: 00000013-0000-1000-8000-00805f9b34fb
handle: 0x003a, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x003b, uuid: 00000014-0000-1000-8000-00805f9b34fb


Das war es erstmal von meiner Seite, schwierig da durchzusteigen  ;D

Gruß
Mathze
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 09 Oktober 2019, 15:18:04
Temperatur und Humidity sind Hex Zahlen aber gerade bei Temperatur kommt es drauf an. Kann sein das 3-4 vor 1-2 kommen muss und dann / 100 oder 10
Das muss man versuchen im Netz raus zu bekommen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 09 Oktober 2019, 16:14:07
Es soll wohl für HA schon einen Support geben, dazu versuche ich den github Code zu verstehen:
https://github.com/1technophile/OpenMQTTGateway/blob/development/main/ZgatewayBT.ino (https://github.com/1technophile/OpenMQTTGateway/blob/development/main/ZgatewayBT.ino)

Dort ist ein Beispiel vorhanden für den Cleargrass

//example "servicedata":"5030470340743e10342d58041002d6000a100164"

Leider ist der Aufbau hier nicht ganz erklärt.

In einem anderen github:
https://github.com/alexvenom/XiaomiCleargrassInkDislpay/blob/master/XiaomiClearGrassInk.js (https://github.com/alexvenom/XiaomiCleargrassInkDislpay/blob/master/XiaomiClearGrassInk.js)
gibt es auch ein Beispiel inkl. Erläuterung:

/* All the information is in this Property called "FDCD" on the advertising data.
           The HEX string is as follows:
           "0807453810342d580104f500da02020145" (quotes included)
           To which:
           0807 or 0801: Ignore, but useful to identify relevant data
           453810342d58: MAC address, INVERTED (58:2d:34:10:38:45)
           0104f500da02: Data for Temperature and Humidity, broken as follows
             - 01: Indicates the Temperature and Humidity events
             - 04: Event data length (4, 2 bytes for Temperature, 2 bytes for Humidity)
             - f500: Temperature data inverted (00f5), which translates to 245, equivalent to 24.5C
             - da02: Humitity data inverted (02da), which translates to 730, equivalent to 73.0%
           020145: Data for Battery, bronek as follows
             - 02: Indicates the Battery events
             - 01: Event data length (1 byte)
             - 45: Battery data, which translates to 69, equivalent to 69%
        */


Diese beiden Beispiele ähneln sich in gewisserweise, denn in beiden Beispielen sind auf jeden Fall die MAC Adresse enthalten.
Solch einen langen String erhalte ich aber in keinem handle.
Ausschlaggebend ist wohl der Teil, der direkt hinter der MAC kommt.

Die MAC finde ich:

handle: 0x0025, char properties: 0x02, char value handle: 0x0026, uuid: 00002a25-0000-1000-8000-00805f9b34fb
HEX: 46 41 34 43 31 30 33 34 32 44 35 38
ASCII: FA4C10342D58

Hierbei ist die MAC auch inverted.

Soviel zu meinem aktuellen Wissenstand  :)

Gruß
Mathze
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 10 Oktober 2019, 07:26:18
Moin Leon,

ich habe soeben meine alten notierten Werte mit den neuen abgerufenen Werten verglichen.
Nur bei ganz wenigen handle's ist mir eine Veränderung aufgefallen.
Hier habe ich mir die HEX Werte genauer angeschaut.


root@raspberrypi:~# gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x1e
Altes Ergebnis: Characteristic value/descriptor: 05
Neues Ergebnis: Characteristic value/descriptor: 05 08 b0 00 38 02


Bedeutung HEX -> Decimal

b0 = 176 / 10 = 17,6Grad Temperatur
38 = 56 = 56% Luftfeuchtigkeit


Die angezeigte Temperatur passt ziemlich gut mit diesen Werten, jedoch bin ich erstmal vorsichtig mit meiner These.
Ich werde diesen handle nun genauer beobachten und Position des Sensors verändern, sobald ich dazu in der Lage bin  :)

Des Weiteren hatte sich der handle 0x0016 verändert:

root@raspberrypi:~#  gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x0016
Characteristic value/descriptor: 05
Veränderung: 05 0a 2b 2a 9e 5d


Aus diesen Werten kann ich aber keinerlei Rückschlüße ziehen.

Gruß
Mathze
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 10 Oktober 2019, 07:56:01
Super. Vielen Dank das Du Dich da so ein bringst.
Ich werde sehen das ich die Tage da mal eine Version für Dich fertig mache.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 10 Oktober 2019, 13:06:00
Zitat von: CoolTux am 10 Oktober 2019, 07:56:01
Super. Vielen Dank das Du Dich da so ein bringst.
Ich werde sehen das ich die Tage da mal eine Version für Dich fertig mache.

Moin Leon,

ich denke mein handle für die Luftfeuchtigkeit ist noch nicht korrekt, da muss ich weiter die Daten analysieren.
Der battery-handle ist mit ziemlicher Sicherheit auch nicht korrekt, jedoch wollte ich mich an deiner Quelle erstmal orientieren!

Folgende handle's sind korrekt:
* devicename
* firmware
* macInverted
* manufactor
* productID

Folgende handle's sind evtl. richtig:
* temperature

Folgende handle's sind höhstwahrscheinlich falsch:
* humidty
* batteryPercent (bzw. daraus ermittelst du ja batteryState)

Ich habe mir die Version 2.4.7 genommen und diese überarbeitet.
Ich habe versucht jeden Code von mir mit
#t1me2die
zu markieren bzw. deinen Code unangetastet zu lassen bzw. ihn einfach auskommentiert.
Im Anhang findest du den vorrübergehenden Code.
Außerdem habe ich paar Screenshots hinzugefügt.

Sobald ich die handle's noch weitere analysiert habe, muss ich die jeweiligen handle's + sub's nur noch anpassen, dass sollte nicht so schwierig sein.

Gruß
Mathze

PS.: Ich bin noch in der Perl-Lernphase  ;)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 10 Oktober 2019, 20:34:17
Moin Leon,

ich brauch mal deinen Rat.
Als ich eben nach Hause kam, wollte ich direkt die Werte vergleichen.
Der handle 0x1e spuckte nun aber einen ganz anderen Wert aus, ich war total verwirrt.


gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x1e
Characteristic value/desriptor: 05


Nachdem ich die Mijia App auf meinem iPhone geöffnet habe, lieferte derselbe handle folgendes Ergebnis:

gatttool -b 58:2D:34:10:4C:FA --char-read --handle=0x1e
Characteristic value/desriptor: 05 08 b4 00 5e 02


Daraus konnte ich tatsächlich die korrekte Temperatur ermitteln.
Nun aber meine Frage, warum liefert mir der handle unterschiedliche Ergebnisse?
Bzw. erst nach einem Connect mit der App waren die Werte korrekt.
Hast du evtl. einen Tipp für mich?

Die Luftfeuchtigkeit ist leider verkehrt, diese muss ich weiter suchen  :)

Gruß
Mathze
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 10 Oktober 2019, 20:38:42
Wenn ich raten müsste würde ich sagen das man erst ein write eines bestimmten Wertes machen muss um dann beim read korrekte Daten zu bekommen. So ist es bei den Flowersense ja auch und ich habe auch einige Hinweise dazu im Netz gefunden gehabt.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 10 Oktober 2019, 22:00:51
Moin Leon, so etwas habe ich schon fast vermutet  :-\
Das muss ich dann weiter beobachten und testen.

Temperatur und Luftfeuchtigkeit habe ich nun aber augenscheinlich raus.
Bin schon etwas stolz auf mich  8)

Morgen mache ich weiter!

Gruß
Mathze
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 10 Oktober 2019, 22:09:11
Kannst Du auch sein. Ich schaue auch hin und wieder ob ich noch was finde. Aber Du bekommst die Werte nur wenn Du Dich vorher mit der App verbunden hast?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 10 Oktober 2019, 22:21:22
Nein, als ich heute Vormittag / Mittag getestet habe bzw. deinen Code angepasst habe, habe / musste ich mich nicht mit der App verbinden. Erst als ich heute Abend Heim kam, war das Ergebnis vom handle ein anderer als heute Vormittag / Mittag.
Nachdem ich die App geöffnet hatte, war der handle, wie ich ihn heute Vormittag / Mittag kannte.
Ich warte nun ab, bis der handle wieder unbrauchbar wird und dann schaue ich wie ich ihn wieder ,,leserlich" bekomme, ohne die App zu öffnen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 11 Oktober 2019, 09:43:53
Moin Leon,
bisher läuft die clearGrassSens Routine gut.
Die Ermittlung von Temperatur und Luftfeuchtigkeit passt.

Bisher passt der handle auch. Ich habe mich seit gestern Abend nicht mit der App / Sensor verbunden, die Werte / handle ist weiterhin wie gewünscht vorhanden ohne das ich ein write o.ä. machen musste.
Ich werde das nun weiter beobachten, evtl. kann man dann etwas ableiten.

Bzgl. des battery-Readings habe ich leider noch keine Idee.
Im Display werden 4 von 5 Balken angezeigt, aber was heißt das?
Irgendwas zwischen 60-80%? In der App habe ich leider keine Information gefunden, wieviel % die Batterie noch hat.
Hier heißt es abwarten, bis sich der Wert mal verändert bzw. ein weiterer Balken weggeht.
Der battery-Wert ist in meinen Augen auch nicht so wichtig, wobei es schön wäre, wenn dieser auch korrekt wäre.

Ich habe hier noch ein weiteres Xiaomi e-Ink Display liegen.
Modell: LYWSD02
Technologie: BTLE

Ich werde mal schauen, ob ich dort auch Informationen herausgekitzelt bekomme.
Sozusagen Zeit vertreiben, bis sich der Batteriestand verändert.
Alternativ könnte ich mal eine frische / nagelneue Batterie einsetzen, dann sollte ich irgendwo in den handles einen Hex Wert von 64 finden, was decimal dann 100, sprich 100% bedeuten würde  :)

Das war es erst einmal von meiner Seite, danke für's Zuhören!  :)

Gruß
Mathze

PS.: Vielleicht gibt es ja hier den Ein oder Anderen, der auch einen clearGrassSensor hat, welchen er gerne mal "auslesen" würde?!
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 11 Oktober 2019, 09:49:55
Das klingt doch alles super. Ich werde hoffentlich das ganze die Tage in Code gießen können und dann werden wir ja sehen wie sauber es läuft.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 11 Oktober 2019, 10:16:39
Ich habe mal eben etwas genauer hin geschaut. Das mit dem Write ist Blödsinn. Wir machen ja schon ein write wie bei den thermoHygroSens und bekomme dann als Antwort darauf ein Ergebnis String
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 11 Oktober 2019, 10:21:27
Ah jetzt verstehe ich. Du machst doch nur ein read hast es aber im Hash als wdata unter gebracht.  ;D
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 11 Oktober 2019, 11:10:33
Ja, ich mache nur ein read!
Ich hatte es so verstanden, dass bei den anderen Sensoren erst ein write gemacht werden muss, um gewisse Informationen zu erhalten.
Dieser write müsste ja aber nur einmal gemacht werden und nicht jedes Mal, daher dachte ich, dass dieser write notwendig ist um das Gerät "aufzuwecken".
So war meine Annahme!

Wie gesagt, Perl-Anfänger, falls ich also irgendwo bösen Mist verzapft habe und gegen jegliche Logik programmiert habe, müsstest du mir das sagen, weil ich es Stand-Heute einfach nicht besser kann / weiß  ::)

AHHH!
wdata = write.data
rdata = read.data...
OKAY!... In so einem Fall hätte ich mir einen Kommentar gewünscht  ;D

Gut, mit diesem Wissenstand habe ich nun das Modul noch einmal angepasst.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 11 Oktober 2019, 11:40:05
Beim FlowerSens muss erst ein write gemacht werden damit Daten beim read kommen. Beim anderen wird gleich ein write gemacht weil das write als Antwort die entsprechenden Daten uns gibt.

Ich habe mal versucht ClearGrass ein zu binden. Hier mein erster Entwurf, magst Du bitte einmal testen.
https://github.com/fhem/XiaomiBTLESens


Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 11 Oktober 2019, 12:02:29
Zitat von: CoolTux am 11 Oktober 2019, 11:40:05
Beim FlowerSens muss erst ein write gemacht werden damit Daten beim read kommen. Beim anderen wird gleich ein write gemacht weil das write als Antwort die entsprechenden Daten uns gibt.

Ich habe mal versucht ClearGrass ein zu binden. Hier mein erster Entwurf, magst Du bitte einmal testen.
https://github.com/fhem/XiaomiBTLESens


Grüße

Bitte Statement 1115 durch folgendes ersetzen:

$readings{'humidity'}  = hex(substr($notification,11,1) .substr($notification,8,2))/10;


Gruß
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 11 Oktober 2019, 12:04:40
Habe ich, kannst Du noch mal testen bitte.

Und zeig dann mal bitte ein list vom Device.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 11 Oktober 2019, 12:08:45
Zitat von: CoolTux am 11 Oktober 2019, 12:04:40
Habe ich, kannst Du noch mal testen bitte.

Und zeig dann mal bitte ein list vom Device.

Ich bekomme beim Reload einen Fehler?!

"GP_Export" is not exported by the GPUtils module
Can't continue after import errors at ./FHEM/74_XiaomiBTLESens.pm line 42.
BEGIN failed--compilation aborted at ./FHEM/74_XiaomiBTLESens.pm line 42.


Der handle für den Batteriestand ist auch zu 100% nicht richtig, aber wie gesagt, da analysiere ich weiter!
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 11 Oktober 2019, 12:14:42
Kann es sein das Dein FHEM nicht ganz aktuell ist. Also so locker 6 Monate alt?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 11 Oktober 2019, 12:19:14
Nah!
Wie kommst du auf die Idee?  :o
Schon verstanden, habe das GPUtils geupdatet.
Reload hat geklappt.

Kann es sein, dass bei Statement 1166 was fehlt?


    readingsBulkUpdateIfChanged($hash, "state",($readings->{'lastGattError'} ? 'error' : 'active' ) )if ( AttrVal( $name, 'model', 'none' ) eq 'flowerSens' );
    readingsBulkUpdateIfChanged( $hash, "state",
        ( $readings->{'lastGattError'} ? 'error' : 'active' ) )
      if ( AttrVal( $name, 'model', 'none' ) eq 'flowerSens' );
    readingsBulkUpdateIfChanged(
        $hash, "state",
        (
            $readings->{'lastGattError'}
            ? 'error'
            : 'T: '
              . ReadingsVal( $name, 'temperature', 0 ) . ' H: '
              . ReadingsVal( $name, 'humidity',    0 )
        )
    ) if (( AttrVal( $name, 'model', 'none' ) eq 'thermoHygroSens' ) or ( AttrVal( $name, 'model', 'none' ) eq 'clearGrassSens'));


Hier ein List

Internals:
   BTMAC      58:2D:34:10:4C:FA
   DEF        58:2D:34:10:4C:FA
   FUUID      5d8cd259-f33f-5bc8-f8d0-febfa4c6b28c768c
   INTERVAL   300
   NAME       wz_Xiaomi_Sensor_unten
   NOTIFYDEV  global,wz_Xiaomi_Sensor_unten
   NR         26
   NTFY_ORDER 50-wz_Xiaomi_Sensor_unten
   STATE      read sensor data
   TYPE       XiaomiBTLESens
   VERSION    v2.7.54
   loglevel   4
   READINGS:
     2019-10-11 12:14:10   batteryPercent  254
     2019-10-11 12:14:10   batteryState    ok
     2019-10-11 09:28:56   devicename      ClearGrass Temp & RH
     2019-10-11 09:28:46   firmware        1.1.2_0020
     2019-10-11 12:14:56   humidity        60.5
     2019-10-11 09:28:36   lastGattError   No route to host (113)
     2019-10-10 12:37:51   macInverted     FA:4C:10:34:2D:58
     2019-10-10 12:38:03   manufactor      Qingping Technology (Beijing) Co., Ltd.
     2019-10-10 12:58:41   productID       CGG1
     2019-10-11 12:14:53   state           read sensor data
     2019-10-11 12:14:56   temperature     17.7
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1570788850.5141
     updateTimestampCallBattery 2019-10-11 12:14:10
Attributes:
   model      clearGrassSens
   room       XiaomiBTLESens
   verbose    0
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 11 Oktober 2019, 12:27:33
Habe ich angepasst.

Kannst Du bitte das neue Modul einspielen, dann ein Reload machen und das Device löschen um es dann neu wieder an zu legen.
Und wenn dann Daten gekommen sind bitte wieder ein list vom Device.


Danke Dir im übrigen für die tolle Arbeit.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 11 Oktober 2019, 12:28:37
bei der Batterie schein aber noch was zu klemmen, da habe ich bestimmt einen falschen handle erwischt.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 11 Oktober 2019, 12:31:43
Zitat von: CoolTux am 11 Oktober 2019, 12:28:37
bei der Batterie schein aber noch was zu klemmen, da habe ich bestimmt einen falschen handle erwischt.

Ganz sicher  :)
Wie gesagt, ich suche noch den richtigen handle!

List

Internals:
   BTMAC      58:2D:34:10:4C:FA
   CFGFN     
   DEF        58:2D:34:10:4C:FA
   FUUID      5da05990-f33f-5bc8-ef85-3ac9f283a69f804c
   INTERVAL   300
   NAME       wz_Xiaomi_Sensor_unten
   NOTIFYDEV  global,wz_Xiaomi_Sensor_unten
   NR         140
   NTFY_ORDER 50-wz_Xiaomi_Sensor_unten
   STATE      T: 17.7 H: 60.5
   TYPE       XiaomiBTLESens
   VERSION    v2.7.54
   loglevel   4
   READINGS:
     2019-10-11 12:30:48   batteryPercent  254
     2019-10-11 12:30:48   batteryState    ok
     2019-10-11 12:29:48   firmware        1.1.2_0020
     2019-10-11 12:30:48   humidity        60.5
     2019-10-11 12:30:48   state           T: 17.7 H: 60.5
     2019-10-11 12:30:48   temperature     17.7
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1570789848.21398
     updateTimestampCallBattery 2019-10-11 12:30:48
Attributes:
   model      clearGrassSens
   room       XiaomiBTLESens
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 11 Oktober 2019, 12:38:49
Ok ich habe mal Deinen Handle genommen. Bitte teste noch mal, musst aber vorher ein resetBatteryTimestamp machen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 11 Oktober 2019, 12:55:21
Zitat von: CoolTux am 11 Oktober 2019, 12:38:49
Ok ich habe mal Deinen Handle genommen. Bitte teste noch mal, musst aber vorher ein resetBatteryTimestamp machen.

Da hast du aber ein altes handle von mir erwischt.
Zur Zeit probiere ich 0x3b aus.

Meine aktuelle Sub für die Batterie:

sub ClearGrassSensHandle0x3b($$) {
    ### Clear Grass Sens - Battery Data
    my ( $hash, $notification ) = @_;

    my $name = $hash->{NAME};
    my %readings;

    Log3 $name, 4, "XiaomiBTLESens ($name) - Clear Grass Sens Handle0x3b";

    chomp($notification);
    $notification =~ s/\s+//g;

    ### neue Vereinheitlichung für Batteriereadings Forum #800017
    $readings{'batteryPercent'} = hex(substr( $notification, 14, 2 ) );
    $readings{'batteryState'}   = ( hex(substr( $notification, 14, 2 )) > 15 ? "ok" : "low" );

    $hash->{helper}{CallBattery} = 1;
    CallBattery_Timestamp($hash);
    return \%readings;
}

Ob der Wert stimmt, ist mehr als fraglich!


List

Internals:
   BTMAC      58:2D:34:10:4C:FA
   CFGFN     
   DEF        58:2D:34:10:4C:FA
   FUUID      5da05990-f33f-5bc8-ef85-3ac9f283a69f804c
   INTERVAL   300
   NAME       wz_Xiaomi_Sensor_unten
   NOTIFYDEV  global,wz_Xiaomi_Sensor_unten
   NR         140
   NTFY_ORDER 50-wz_Xiaomi_Sensor_unten
   STATE      T: 17.7 H: 60.5
   TYPE       XiaomiBTLESens
   VERSION    v2.7.54
   loglevel   4
   READINGS:
     2019-10-11 12:53:22   batteryPercent  77
     2019-10-11 12:53:22   batteryState    ok
     2019-10-11 12:29:48   firmware        1.1.2_0020
     2019-10-11 12:53:22   humidity        60.5
     2019-10-11 12:51:04   lastGattError   No route to host (113)
     2019-10-11 12:53:22   state           T: 17.7 H: 60.5
     2019-10-11 12:53:22   temperature     17.7
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1570791202.1444
     updateTimestampCallBattery 2019-10-11 12:53:22
Attributes:
   model      clearGrassSens
   room       XiaomiBTLESens
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 11 Oktober 2019, 12:58:29
Irgendwie ist das komisch da alle mir bekannten Batteriehandle eigentlich immer nur ein HEX Wert wieder geben.
Und im normal Fall halten sich die Hersteller da sogar an die Vorgabe also mit immer den selben Characteristic. Ich schaue mal.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 11 Oktober 2019, 13:01:52
Wie gesagt, ich konnte bisher noch nicht eindeutig das battery handle identifizieren, liegt aber auch daran, dass ich nicht den genauen %-Stand ablesen kann!

Hier sind meine ganzen handle's + uuid und den jeweiligen HEX-Werten.
Dort wo ein lesbarer Text steht, habe ich den HEX-Wert in ASCII direkt übersetzt, sodass ich dieses handle für mich persönlich abgehakt habe!


handle: 0x0001, uuid: 00002800-0000-1000-8000-00805f9b34fb 00 18
handle: 0x0002, uuid: 00002803-0000-1000-8000-00805f9b34fb 0a 03 00 2a
handle: 0x0003, uuid: 00002a00-0000-1000-8000-00805f9b34fb ClearGrass Temp & RH
handle: 0x0004, uuid: 00002803-0000-1000-8000-00805f9b34fb 02 05 00 01 2a
handle: 0x0005, uuid: 00002a01-0000-1000-8000-00805f9b34fb 00 00
handle: 0x0006, uuid: 00002803-0000-1000-8000-00805f9b34fb 02 07 00 04 2a
handle: 0x0007, uuid: 00002a04-0000-1000-8000-00805f9b34fb 10 00 3c 00 00 00 90 01
handle: 0x0008, uuid: 00002803-0000-1000-8000-00805f9b34fb 02 09 00 a6 2a
handle: 0x0009, uuid: 00002aa6-0000-1000-8000-00805f9b34fb 01
handle: 0x000a, uuid: 00002800-0000-1000-8000-00805f9b34fb 01 18
handle: 0x000b, uuid: 00002803-0000-1000-8000-00805f9b34fb 20 0c 00 05 2a
handle: 0x000c, uuid: 00002a05-0000-1000-8000-00805f9b34fb cant read
handle: 0x000d, uuid: 00002902-0000-1000-8000-00805f9b34fb 00 00
handle: 0x000e, uuid: 00002800-0000-1000-8000-00805f9b34fb 59 fe
handle: 0x000f, uuid: 00002803-0000-1000-8000-00805f9b34fb 18 10 00 50 ea da 30 88 83 b8 9f 60 4f 15 f3 03 00 c9 8e
handle: 0x0010, uuid: 8ec90003-f315-4f60-9fb8-838830daea50 blank
handle: 0x0011, uuid: 00002902-0000-1000-8000-00805f9b34fb 00 00
handle: 0x0012, uuid: 00002800-0000-1000-8000-00805f9b34fb 4d 46 50 44 53 46 42 55 46 45 4a 55 00 00 21 22
handle: 0x0013, uuid: 00002803-0000-1000-8000-00805f9b34fb 0c 14 00 01 00
handle: 0x0014, uuid: 00000001-0000-1000-8000-00805f9b34fb 01 0a
handle: 0x0015, uuid: 00002803-0000-1000-8000-00805f9b34fb 10 16 00 02 00
handle: 0x0016, uuid: 00000002-0000-1000-8000-00805f9b34fb 05 0a 2b 2a 9e 5d
handle: 0x0017, uuid: 00002902-0000-1000-8000-00805f9b34fb 00 00
handle: 0x0018, uuid: 00002803-0000-1000-8000-00805f9b34fb 0c 19 00 03 00
handle: 0x0019, uuid: 00000003-0000-1000-8000-00805f9b34fb fe
handle: 0x001a, uuid: 00002803-0000-1000-8000-00805f9b34fb 10 1b 00 04 00
handle: 0x001b, uuid: 00000004-0000-1000-8000-00805f9b34fb fe
handle: 0x001c, uuid: 00002902-0000-1000-8000-00805f9b34fb 00 00
handle: 0x001d, uuid: 00002803-0000-1000-8000-00805f9b34fb 10 1e 00 00 01
handle: 0x001e, uuid: 00000100-0000-1000-8000-00805f9b34fb 05 08 b0 00 38 02
05 08 b1 00 43 02
05 08 b2 00 5a 02
05 08 b1 00 5d 02
handle: 0x001f, uuid: 00002902-0000-1000-8000-00805f9b34fb 00 00
handle: 0x0020, uuid: 00002800-0000-1000-8000-00805f9b34fb 0a 18
handle: 0x0021, uuid: 00002803-0000-1000-8000-00805f9b34fb 02 22 00 29 2a
handle: 0x0022, uuid: 00002a29-0000-1000-8000-00805f9b34fb Qingping Technology (Beijing) Co., Ltd.
handle: 0x0023, uuid: 00002803-0000-1000-8000-00805f9b34fb 02 24 00 24 2a
handle: 0x0024, uuid: 00002a24-0000-1000-8000-00805f9b34fb CGG1
handle: 0x0025, uuid: 00002803-0000-1000-8000-00805f9b34fb 02 26 00 25 2a
handle: 0x0026, uuid: 00002a25-0000-1000-8000-00805f9b34fb FA4C10342D58 (MAC)
handle: 0x0027, uuid: 00002803-0000-1000-8000-00805f9b34fb 02 28 00 27 2a
handle: 0x0028, uuid: 00002a27-0000-1000-8000-00805f9b34fb 30 30 30 31 -> Revision 0001
handle: 0x0029, uuid: 00002803-0000-1000-8000-00805f9b34fb 02 2a 00 26 2a
handle: 0x002a, uuid: 00002a26-0000-1000-8000-00805f9b34fb Firmware
handle: 0x002b, uuid: 00002800-0000-1000-8000-00805f9b34fb 95 fe
handle: 0x002c, uuid: 00002803-0000-1000-8000-00805f9b34fb 18 2d 00 01 00
handle: 0x002d, uuid: 00000001-0000-1000-8000-00805f9b34fb cant read
handle: 0x002e, uuid: 00002902-0000-1000-8000-00805f9b34fb 00 00
handle: 0x002f, uuid: 00002803-0000-1000-8000-00805f9b34fb 02 30 00 02 00
handle: 0x0030, uuid: 00000002-0000-1000-8000-00805f9b34fb 47 03
handle: 0x0031, uuid: 00002803-0000-1000-8000-00805f9b34fb 02 32 00 04 00
handle: 0x0032, uuid: 00000004-0000-1000-8000-00805f9b34fb 0a 58 c4 7c d3 b7 2a 2b f1 13
handle: 0x0033, uuid: 00002803-0000-1000-8000-00805f9b34fb 18 34 00 05 00
handle: 0x0034, uuid: 00000005-0000-1000-8000-00805f9b34fb cant read
handle: 0x0035, uuid: 00002902-0000-1000-8000-00805f9b34fb 00 00
-handle: 0x0036, uuid: 00002803-0000-1000-8000-00805f9b34fb 08 37 00 10 00
handle: 0x0037, uuid: 00000010-0000-1000-8000-00805f9b34fb cant read
-handle: 0x0038, uuid: 00002803-0000-1000-8000-00805f9b34fb 0a 39 00 13 00
-handle: 0x0039, uuid: 00000013-0000-1000-8000-00805f9b34fb 3b 14 99 26 cf db 34 2a f3 53 45 3b 41 6f a3 9f 29 09 70 38
-handle: 0x003a, uuid: 00002803-0000-1000-8000-00805f9b34fb 02 3b 00 14 00
handle: 0x003b, uuid: 00000014-0000-1000-8000-00805f9b34fb 51 04 bf 7e 7d 10 be 4d 71 7b 8f 2f
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 11 Oktober 2019, 13:09:30
Vielleicht hilft das hier mehr

http://nilhcem.com/iot/reverse-engineering-simple-bluetooth-devices
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 11 Oktober 2019, 13:15:50
Ich habe leider keinerlei Zugriff auf ein Android Telefon...
Für iOS gibt es soetwas offiziell nicht, nur in Verbindung eines Jailbreakes.
Ich habe zwar einen, konnte mich mit dem Thema tcpdump und wireshark noch nicht auseinandersetzen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 11 Oktober 2019, 13:32:50
Dann setze ich erstmal Deine Lösung für Batterie um.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 11 Oktober 2019, 13:35:25
Ich melde mich, sobald ich neue Erkenntnisse habe  :)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 11 Oktober 2019, 13:57:00
Ich habe nun die vorerst letzte Version ins Git geladen. Kannst Du die bitte nehmen und testen? Geht ja auch um Stabilität.


Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 11 Oktober 2019, 22:39:04
Habe ich mal installiert.
Ich werde nun weiter die Werte beobachten  :)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 12 Oktober 2019, 07:53:05
Moin Leon,

irgendwas passt noch nicht so ganz.
Als ich gestern Abend die Werte vergleichen wollte, viel mir auf, dass diese nicht passten, ich hatte gestern jedoch noch keine Zeit dem ganzen auf die Spur zu gehen.

Ein get sensorData brachte falsche Ergebnisse bzw. laut Log wurde mit einem falschen handle ein read gemacht.

Logfile:

2019.10.12 00:18:46 4: XiaomiBTLESens (wz_Xiaomi_Sensor_unten) - Run CreateParamGatttool with mod: read
2019.10.12 00:18:46 5: XiaomiBTLESens (wz_Xiaomi_Sensor_unten) - Read XiaomiBTLESens_ExecGatttool_Run wz_Xiaomi_Sensor_unten|58:2D:34:10:4C:FA|read|0x3a
2019.10.12 00:18:46 5: XiaomiBTLESens (wz_Xiaomi_Sensor_unten) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 58:2D:34:10:4C:FA --char-read -a 0x3a 2>&1 /dev/null and loop 0
2019.10.12 00:18:56 5: XiaomiBTLESens (wz_Xiaomi_Sensor_unten) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,02 3b 00 14 00

2019.10.12 00:18:56 4: XiaomiBTLESens (wz_Xiaomi_Sensor_unten) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,02 3b 00 14 00

2019.10.12 00:18:56 5: XiaomiBTLESens (wz_Xiaomi_Sensor_unten) - ExecGatttool_Done: gatttool return string: wz_Xiaomi_Sensor_unten|58:2D:34:10:4C:FA|ok|read|0x3a|{"gtResult":"02 3b 00 14 00 "}
2019.10.12 00:18:56 4: XiaomiBTLESens (wz_Xiaomi_Sensor_unten) - ProcessingNotification
2019.10.12 00:18:56 4: XiaomiBTLESens (wz_Xiaomi_Sensor_unten) - WriteReadings: Readings were written


Anstatt mit dem handle 0x1e wurde der read mit 0x3a gemacht, was ja nicht korrekt ist.
Ich hatte kurz meine "alte" Version verwendet, da waren die Werte sofort wieder korrekt.
Ich gucke mir heute / Morgen mal deine endgültige Version an und schaue, wo es hapert.

Gruß
Mathze
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 12 Oktober 2019, 08:05:53
Habe soeben noch einmal die RAW Datei mir vom GitHub geholt.
Evtl. ist mir gestern beim kopieren ein Fehler entstanden, ich werde es weiter beobachten!

Aktueller Logauszug, Werte passen!

2019.10.12 08:04:32 4: XiaomiBTLESens (wz_Xiaomi_Sensor_unten) - Run CreateParamGatttool with mod: read
2019.10.12 08:04:32 5: XiaomiBTLESens (wz_Xiaomi_Sensor_unten) - Read XiaomiBTLESens_ExecGatttool_Run wz_Xiaomi_Sensor_unten|58:2D:34:10:4C:FA|read|0x1e
2019.10.12 08:04:32 5: XiaomiBTLESens (wz_Xiaomi_Sensor_unten) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 58:2D:34:10:4C:FA --char-read -a 0x1e 2>&1 /dev/null and loop 0
2019.10.12 08:04:39 5: XiaomiBTLESens (wz_Xiaomi_Sensor_unten) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,05 08 b2 00 88 02

2019.10.12 08:04:39 4: XiaomiBTLESens (wz_Xiaomi_Sensor_unten) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,05 08 b2 00 88 02

2019.10.12 08:04:39 5: XiaomiBTLESens (wz_Xiaomi_Sensor_unten) - ExecGatttool_Done: gatttool return string: wz_Xiaomi_Sensor_unten|58:2D:34:10:4C:FA|ok|read|0x1e|{"gtResult":"05 08 b2 00 88 02 "}
2019.10.12 08:04:39 4: XiaomiBTLESens (wz_Xiaomi_Sensor_unten) - ProcessingNotification
2019.10.12 08:04:39 4: XiaomiBTLESens (wz_Xiaomi_Sensor_unten) - ProcessingNotification: handle 0x1e
2019.10.12 08:04:39 4: XiaomiBTLESens (wz_Xiaomi_Sensor_unten) - Clear Grass Sens Handle0x1e
2019.10.12 08:04:39 4: XiaomiBTLESens (wz_Xiaomi_Sensor_unten) - WriteReadings: Readings were written


Ich habe das Device noch einmal gelöscht und neu angelegt, wieder liest er mit einem falschen handle:

2019.10.12 08:08:10 3: XiaomiBTLESens (wz_Xiaomi_Sensor_unten) - defined with BTMAC 58:2D:34:10:4C:FA
2019.10.12 08:09:37 4: XiaomiBTLESens (wz_Xiaomi_Sensor_unten) - Run CreateParamGatttool with mod: read
2019.10.12 08:09:37 5: XiaomiBTLESens (wz_Xiaomi_Sensor_unten) - Read XiaomiBTLESens_ExecGatttool_Run wz_Xiaomi_Sensor_unten|58:2D:34:10:4C:FA|read|0x3a
2019.10.12 08:09:37 5: XiaomiBTLESens (wz_Xiaomi_Sensor_unten) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 58:2D:34:10:4C:FA --char-read -a 0x3a 2>&1 /dev/null and loop 0
2019.10.12 08:09:39 5: XiaomiBTLESens (wz_Xiaomi_Sensor_unten) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,02 3b 00 14 00

2019.10.12 08:09:39 4: XiaomiBTLESens (wz_Xiaomi_Sensor_unten) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,02 3b 00 14 00

2019.10.12 08:09:39 5: XiaomiBTLESens (wz_Xiaomi_Sensor_unten) - ExecGatttool_Done: gatttool return string: wz_Xiaomi_Sensor_unten|58:2D:34:10:4C:FA|ok|read|0x3a|{"gtResult":"02 3b 00 14 00 "}
2019.10.12 08:09:39 4: XiaomiBTLESens (wz_Xiaomi_Sensor_unten) - ProcessingNotification
2019.10.12 08:09:39 4: XiaomiBTLESens (wz_Xiaomi_Sensor_unten) - WriteReadings: Readings were written
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 12 Oktober 2019, 08:40:55
0x3a ist das Batterie Handle. War wohl noch falsch, ich sehe in Deinen alten Posts ein 0x3b wäre das richtiger?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 12 Oktober 2019, 08:43:59
Vergiss es, ich hatte vergessen es im Hash an zu passen. Überall sonst hatte ich es schon gemacht.

Habe ich korrigiert. Bitte noch mal neu von Github holen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 12 Oktober 2019, 13:44:28
Aktuell schaut es gut aus, ich beobachte es weiter!

List vom Device

Internals:
   BTMAC      58:2D:34:10:4C:FA
   CFGFN     
   DEF        58:2D:34:10:4C:FA
   FUUID      5da1bc59-f33f-5bc8-2ca8-407cc6b85fdec1b0
   INTERVAL   300
   NAME       wz_Xiaomi_Sensor_unten
   NOTIFYDEV  global,wz_Xiaomi_Sensor_unten
   NR         3725
   NTFY_ORDER 50-wz_Xiaomi_Sensor_unten
   STATE      T: 18.3 H: 68.2
   TYPE       XiaomiBTLESens
   VERSION    v2.7.60
   loglevel   4
   READINGS:
     2019-10-12 13:43:43   batteryPercent  77
     2019-10-12 13:43:43   batteryState    ok
     2019-10-12 13:43:31   firmware        1.1.2_0020
     2019-10-12 13:43:43   humidity        68.2
     2019-10-12 13:43:43   state           T: 18.3 H: 68.2
     2019-10-12 13:43:43   temperature     18.3
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1570880623.27938
     updateTimestampCallBattery 2019-10-12 13:43:43
Attributes:
   model      clearGrassSens
   room       XiaomiBTLESens
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 12 Oktober 2019, 14:08:02
Wäre ja super wenn das passt.
Muss gestehen Dank Dir ist das doch Recht schnell lauffähig geworden. Danke für Deine tolle Arbeit.


Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 12 Oktober 2019, 20:41:52
Gar kein Problem, es lag ja auch in meinem Interesse.

Zu dem Thema Battery konnte ich folgendes finden:
https://github.com/hannseman/homebridge-mi-hygrothermograph/issues/65 (https://github.com/hannseman/homebridge-mi-hygrothermograph/issues/65)

Angeblich wird die Kapazität nicht in den BT handles übermittelt, dass würde erklären, warum ich auch keinen %-Wert in der App finde.
Ich wollte eben eine neue Batterie einsetzen, aber eine CR2430 habe ich hier nicht liegen.
Habe nur CR2032 liegen... Wieder so ein Spezialfall.

Was mir aufgefallen ist, nachdem ich die Batterie einmal draußen hatte und neu eingesetzt habe, waren die handle's zuerst für die Katz!
Nach dem ich die App geöffnet habe, waren die handles alles wieder korrekt.

Ich werde das trotzdem weiterhin beobachten, habe mir ja alle handle's notiert und kann bei Veränderungen die HEX Werte analysieren.
Ich melde mich, falls mir was auffällt.

Gestern habe ich angefangen den Xiaomi e-Ink LYWSD02MMC zu analysieren. Dummerweise hat das Teil handles von 0x01 - 0x70... Haufenweise handle's, wo sich irgendwo die Werte wohl drin verstecken. Wahrscheinlich ist auch irgendwo die Uhrzeit versteckt, mal schauen was ich finden kann...

Gruß
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 14 Oktober 2019, 14:37:39
Moin Leon,

vielleicht hast du paar hilfreiche Tipps für mich.
Am WE habe ich mich ausgiebig mit dem Xiaomi "LYWSD02" beschäftigt.
Zuerst habe ich erstmal alle handle's aufgelistet und mir die HEX Werte übersetzen lassen.
Nach ASCII kam dabei nicht viel brauchbares raus, dass war ich vom ClearGrass ja schon gewohnt.
Aus diesem Grund habe ich direkt die decimal-Werte betrachtet, ohne die passende Werte zu finden.

Nach ein wenig googeln habe ich festgestellt, dass es schon Lösungen für Home Assistant / OpenMQTT geben soll.
Ich habe mir mal den Code von OpenMQTT angeschaut unter: https://github.com/1technophile/OpenMQTTGateway/blob/development/main/ZgatewayBT.ino (https://github.com/1technophile/OpenMQTTGateway/blob/development/main/ZgatewayBT.ino)

Dort konnte ich das o.g. Modell auch finden, kleiner Codeausschnitt:

                  pos = strpos(service_data,"205b04");
                  if (pos != -1){
                    trc(F("LYWSD02 data reading"));
                    //example "servicedata":"70205b04b96ab883c8593f09041002e000"
                    #ifdef ZmqttDiscovery
                      if(!isDiscovered(mac)) LYWSD02Discovery(mac);
                    #endif
                    process_sensors(pos - 24,service_data,mac);
                  }


In diesem example wird mit einer "servicedata" gearbeitet, sowas war mir neu.
Ich habe nämlich vergebens nach handle's gesucht...
Diese "servicedata" erinnerte mich aber an das Beispiel vom ClearGrass, wo es auch eine gute Dokumentation / Erläuterung gab (https://github.com/alexvenom/XiaomiCleargrassInkDislpay/blob/master/XiaomiClearGrassInk.js (https://github.com/alexvenom/XiaomiCleargrassInkDislpay/blob/master/XiaomiClearGrassInk.js))
Ich habe also versucht hier irgendwelche Ähnlichkeiten zu erkennen.

Da ich aber nicht wirklich weiter kam, habe ich mich mit "bluetoothctl" befasst und folgendes "erreicht"...

[bluetooth]# info E7:2E:00:E2:74:D6
Device E7:2E:00:E2:74:D6
        Name: LYWSD02
        Alias: LYWSD02
        Paired: no
        Trusted: yes
        Blocked: no
        Connected: no
        LegacyPairing: no
        UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
        UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
        UUID: Device Information        (0000180a-0000-1000-8000-00805f9b34fb)
        UUID: Xiaomi Inc.               (0000fe95-0000-1000-8000-00805f9b34fb)
        UUID: Dialog Semiconductor GmbH (0000fef5-0000-1000-8000-00805f9b34fb)
        UUID: Vendor specific           (2b43ccc0-2506-415c-a16c-e4cc5f52ef78)
        UUID: Vendor specific           (aaaaaaa0-aaaa-aaaa-aaaa-aaaaaaaaaaaa)
        UUID: Vendor specific           (ebe0ccb0-7a0a-4b0c-8a1a-6ff2997da3a6)
        UUID: Vendor specific           (fafafa00-fafa-fafa-fafa-fafafafafafa)
        ServiceData Key: 0000fe95-0000-1000-8000-00805f9b34fb
        ServiceData Value: 0x70
        ServiceData Value: 0x20
        ServiceData Value: 0x5b
        ServiceData Value: 0x04
        ServiceData Value: 0x5d
        ServiceData Value: 0xd6
        ServiceData Value: 0x74
        ServiceData Value: 0xe2
        ServiceData Value: 0x00
        ServiceData Value: 0x2e
        ServiceData Value: 0xe7
        ServiceData Value: 0x09
        ServiceData Value: 0x06
        ServiceData Value: 0x10
        ServiceData Value: 0x02
        ServiceData Value: 0xee
        ServiceData Value: 0x02


Nun habe ich begonnen die ServiceData Value zu analysieren, ich dachte mir, dass sich hier die Werte verstecken müsste, leider wurde ich auch hier nicht fündig.
Als ich mir die Werte näher angeschaut habe, viel mir auf, dass es sich hier um den servicedata String handeln könnte.
Es kam also folgendes raus:

70205b045dd674e2002ee709061002ee02


In diesem String fand ich dann auch eine direkte Ähnlichkeit zu dem o.g. Quellcode:
pos = strpos(service_data,"205b04");

Ich schaute mir also weiter den String an und unterteilte ihn für mich wie folgt:

70 205b04 5d d674e2002ee7 09061002ee02
205b04 = indikator für das Modell
d674e2002ee7 = reverse MAC -> E7:2E:00:E2:74:D6
70 = ???
5d = ???
09061002ee02 = ???


Mit den restlichen Werten wusste ich nicht, was ich anfangen sollte.

Ich habe mir nun OpenMQTT weitere angeschaut.
Ein Teil der servicedata wird zuerst an eine Routine "process_sensors" gegeben, kurz danach wird die servicedate an "value_from_service_data" weitergegeben.
Wenn ich es richtig verstehe werden hier irgendwelche HEX Werte umgedreht.


double value_from_service_data(char * service_data, int offset, int data_length){
  char rev_data[data_length+1];
  char data[data_length+1];
  memcpy( rev_data, &service_data[offset], data_length );
  rev_data[data_length] = '\0';
 
  // reverse data order
  revert_hex_data(rev_data, data, data_length+1);
  double value = strtol(data, NULL, 16);
  if (value > 65000 && data_length <= 4) value = value - 65535;
  trc(value);
  return value;
}


Kurz danach wird mithilfe von value irgendein hum/temp Wert ermittelt.

  // Mi flora provides tem(perature), (earth) moi(sture), fer(tility) and lux (illuminance)
  // Mi Jia provides tem(perature), batt(erry) and hum(idity)
  // following the value of digit 47 we determine the type of data we get from the sensor
  switch (rest_data[47 + offset]) {
    case '9' :
          BLEdata.set("fer", (double)value);
    break;
    case '4' :
          BLEdata.set("tem", (double)value/10);
    break;
    case '6' :
          BLEdata.set("hum", (double)value/10);
    break;
    case '7' :
          BLEdata.set("lux", (double)value);
     break;
    case '8' :
          BLEdata.set("moi", (double)value);
     break;
     
    case 'a' :
          BLEdata.set("batt", (double)value);
     break;

     case 'd' :
          // humidity
          value = value_from_service_data(rest_data, 52 + offset, 4);
          BLEdata.set("tem", (double)value/10);
          // temperature
          value = value_from_service_data(rest_data, 56 + offset, 4);
          BLEdata.set("hum", (double)value/10);
     break;


Und nun brauche ich einen Ratschlag / Tipp von Dir, was ich als nächstes machen soll  ::)

Gruß
Mathze
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 15 Oktober 2019, 18:34:21
So Leon, ich bin soweit...

Schlechte Nachricht, via gatttool kam ich diesmal nicht so recht an die Daten, dafür aber mit "bluetoothctl"
Das Modell "LYWSD02" speichert seine Werte für Temperatur und Luftfeuchtigkeit in einer Servicedata.

Wie erhalte ich die Servicedata?

root@raspberrypi:~# bluetoothctl
[bluetooth]# info E7:2E:00:E2:74:D6
Device E7:2E:00:E2:74:D6
Name: LYWSD02
Alias: LYWSD02
Paired: no
Trusted: yes
Blocked: no
Connected: no
LegacyPairing: no
UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
UUID: Device Information        (0000180a-0000-1000-8000-00805f9b34fb)
UUID: Xiaomi Inc.               (0000fe95-0000-1000-8000-00805f9b34fb)
UUID: Dialog Semiconductor GmbH (0000fef5-0000-1000-8000-00805f9b34fb)
UUID: Vendor specific           (2b43ccc0-2506-415c-a16c-e4cc5f52ef78)
UUID: Vendor specific           (aaaaaaa0-aaaa-aaaa-aaaa-aaaaaaaaaaaa)
UUID: Vendor specific           (ebe0ccb0-7a0a-4b0c-8a1a-6ff2997da3a6)
UUID: Vendor specific           (fafafa00-fafa-fafa-fafa-fafafafafafa)
ServiceData Key: 0000fe95-0000-1000-8000-00805f9b34fb
ServiceData Value: 0x70
ServiceData Value: 0x20
ServiceData Value: 0x5b
ServiceData Value: 0x04
ServiceData Value: 0x88
ServiceData Value: 0xd6
ServiceData Value: 0x74
ServiceData Value: 0xe2
ServiceData Value: 0x00
ServiceData Value: 0x2e
ServiceData Value: 0xe7
ServiceData Value: 0x09
ServiceData Value: 0x06
ServiceData Value: 0x10
ServiceData Value: 0x02
ServiceData Value: 0xa8
ServiceData Value: 0x02
[bluetooth]#


Hier siehst du ganz viele ServiceData Value, zum besseren Verständnis:

70 205b04 88 d674e2002ee7 0906 1002 a802

205b04 = signalisiert uns, dass es sich um das Modell LYWSD02 handelt
d674e2002ee7 = MAC umgedreht
0906 = die "6" bedeutet, dass sich in dieser ServiceData die Luftfeuchtigkeit befindet
A802 = 2A8 = 68% Luftfeuchtigkeit


So, jetzt benötigen wir noch die Temperatur, diese befindet sich auch in einer ServiceData.

[bluetooth]# info E7:2E:00:E2:74:D6
Device E7:2E:00:E2:74:D6
Name: LYWSD02
Alias: LYWSD02
Paired: no
Trusted: yes
Blocked: no
Connected: no
LegacyPairing: no
UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
UUID: Device Information        (0000180a-0000-1000-8000-00805f9b34fb)
UUID: Xiaomi Inc.               (0000fe95-0000-1000-8000-00805f9b34fb)
UUID: Dialog Semiconductor GmbH (0000fef5-0000-1000-8000-00805f9b34fb)
UUID: Vendor specific           (2b43ccc0-2506-415c-a16c-e4cc5f52ef78)
UUID: Vendor specific           (aaaaaaa0-aaaa-aaaa-aaaa-aaaaaaaaaaaa)
UUID: Vendor specific           (ebe0ccb0-7a0a-4b0c-8a1a-6ff2997da3a6)
UUID: Vendor specific           (fafafa00-fafa-fafa-fafa-fafafafafafa)
ServiceData Key: 0000fe95-0000-1000-8000-00805f9b34fb
ServiceData Value: 0x70
ServiceData Value: 0x20
ServiceData Value: 0x5b
ServiceData Value: 0x04
ServiceData Value: 0x03
ServiceData Value: 0xd6
ServiceData Value: 0x74
ServiceData Value: 0xe2
ServiceData Value: 0x00
ServiceData Value: 0x2e
ServiceData Value: 0xe7
ServiceData Value: 0x09
ServiceData Value: 0x04
ServiceData Value: 0x10
ServiceData Value: 0x02
ServiceData Value: 0xd4
ServiceData Value: 0x00


Hier siehst du ganz viele ServiceData Value, zum besseren Verständnis:

70 205b04 03 d674e2002ee7 0904 1002 d400

205b04 = signalisiert uns, dass es sich um das Modell LYWSD02 handelt
d674e2002ee7 = MAC umgedreht
0904 = die "4" bedeutet, dass sich in dieser ServiceData die Temperatur befindet
d4 =  212 = 21.2°C


Um diese Werte zu erhalten, muss man innerhalb von "bluetoothctl" den Befehl
scan on
starten. Nach kurzer Zeit 1-2Sekunden trudeln dann die aktuellen info's von sämtlichen Devices auf.
Mit einem
scan off
hält man den Vorgang an und schaut sich danach die Werte von dem gewünschten Device via
info MAC
in meinem Beispiel: info E7:2E:00:E2:74:D6

an. Nun bastelt man sich die ServiceData zusammen und schaut auf folgende Stellen:

#my $serviceData = '70205b0488d674e2002ee709061002a802';   #Luftfeuchtigkeit
my $serviceData = '70205b0403d674e2002ee709041002d400';    #Temperatur

# pruefe, ob es sich bei dem Modell um einen LYWSD02 handel
if (substr($serviceData,2,6) eq '205b04')
{   # pruefe, welcher Wert sich in der ServiceData befindet
    # 4 = Temperatur
    # 6 = Luftfeuchtigkeit
    if (substr($serviceData, 25, 1) eq '4')
    {   my $temperatur = substr($serviceData,30,2);
        print hex($temperatur)/10;
    }
    elsif (substr($serviceData, 25, 1) eq '6')
    {   my $humidity = substr($serviceData,32,2) .substr($serviceData,30,2);
        print hex($humidity)/10;
    }
}


Mit folgendem handle bekommst du die Firmware:

root@raspberrypi:~# gatttool -b E7:2E:00:E2:74:D6 --char-read -a 0x14
Characteristic value/descriptor: 31 2e 31 2e 32 5f 30 30 34 32
Übersetzt nach ASCII: 1.1.2_0042


Mit folgendem handle bekommst du den Hersteller:

root@raspberrypi:~# gatttool -b E7:2E:00:E2:74:D6 --char-read -a 0x0c
Characteristic value/descriptor: 6d 69 61 6f 6d 69 61 6f 63 65 2e 63 6f 6d
Übersetzt nach ASCII: miaomiaoce.com


Mit folgendem handle bekommst du das Modell:

root@raspberrypi:~# gatttool -b E7:2E:00:E2:74:D6 --char-read -a 0x0e
Characteristic value/descriptor: 4c 59 57 53 44 30 32
Übersetzt nach ASCII: LYWSD02


Mit folgendem handle bekommst du die Uhrzeit + Datum:

root@raspberrypi:~# gatttool -b E7:2E:00:E2:74:D6 --char-read -a 0x3e
Characteristic value/descriptor: db f6 a5 5d 02

Inverted: 5da5f6db
Ergebnis: 15.10.2019 18.42.3

Quellcode zum umwandeln des inverted Hex-Wertes

my $string = '5da5f6db';
my $time = hex($string);

my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime( $time );
$mon  += 1;
$year += 1900;

printf "%s.%s.%s %s.%s.%s\n", $mday, $mon, $year, $hour, $min, $sec;


So, nun die Frage, möchtest du das in deinem Modul hinzu programmieren oder soll ich versuchen daraus ein eigenes Modul zu gießen?
Der Ablauf bzgl. "bluetoothctl" ist ja schon ein anderer, wie du ihn z.Z. machst.

Gruß
Mathze
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 15 Oktober 2019, 18:49:46
Zitat von: t1me2die am 15 Oktober 2019, 18:34:21
So Leon, ich bin soweit...

Schlechte Nachricht, via gatttool kam ich diesmal nicht so recht an die Daten, dafür aber mit "bluetoothctl"
Das Modell "LYWSD02" speichert seine Werte für Temperatur und Luftfeuchtigkeit in einer Servicedata.

Wie erhalte ich die Servicedata?

root@raspberrypi:~# bluetoothctl
[bluetooth]# info E7:2E:00:E2:74:D6
Device E7:2E:00:E2:74:D6
Name: LYWSD02
Alias: LYWSD02
Paired: no
Trusted: yes
Blocked: no
Connected: no
LegacyPairing: no
UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
UUID: Device Information        (0000180a-0000-1000-8000-00805f9b34fb)
UUID: Xiaomi Inc.               (0000fe95-0000-1000-8000-00805f9b34fb)
UUID: Dialog Semiconductor GmbH (0000fef5-0000-1000-8000-00805f9b34fb)
UUID: Vendor specific           (2b43ccc0-2506-415c-a16c-e4cc5f52ef78)
UUID: Vendor specific           (aaaaaaa0-aaaa-aaaa-aaaa-aaaaaaaaaaaa)
UUID: Vendor specific           (ebe0ccb0-7a0a-4b0c-8a1a-6ff2997da3a6)
UUID: Vendor specific           (fafafa00-fafa-fafa-fafa-fafafafafafa)
ServiceData Key: 0000fe95-0000-1000-8000-00805f9b34fb
ServiceData Value: 0x70
ServiceData Value: 0x20
ServiceData Value: 0x5b
ServiceData Value: 0x04
ServiceData Value: 0x88
ServiceData Value: 0xd6
ServiceData Value: 0x74
ServiceData Value: 0xe2
ServiceData Value: 0x00
ServiceData Value: 0x2e
ServiceData Value: 0xe7
ServiceData Value: 0x09
ServiceData Value: 0x06
ServiceData Value: 0x10
ServiceData Value: 0x02
ServiceData Value: 0xa8
ServiceData Value: 0x02
[bluetooth]#


Hier siehst du ganz viele ServiceData Value, zum besseren Verständnis:

70 205b04 88 d674e2002ee7 0906 1002 a802

205b04 = signalisiert uns, dass es sich um das Modell LYWSD02 handelt
d674e2002ee7 = MAC umgedreht
0906 = die "6" bedeutet, dass sich in dieser ServiceData die Luftfeuchtigkeit befindet
A802 = 2A8 = 68% Luftfeuchtigkeit


So, jetzt benötigen wir noch die Temperatur, diese befindet sich auch in einer ServiceData.

[bluetooth]# info E7:2E:00:E2:74:D6
Device E7:2E:00:E2:74:D6
Name: LYWSD02
Alias: LYWSD02
Paired: no
Trusted: yes
Blocked: no
Connected: no
LegacyPairing: no
UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
UUID: Device Information        (0000180a-0000-1000-8000-00805f9b34fb)
UUID: Xiaomi Inc.               (0000fe95-0000-1000-8000-00805f9b34fb)
UUID: Dialog Semiconductor GmbH (0000fef5-0000-1000-8000-00805f9b34fb)
UUID: Vendor specific           (2b43ccc0-2506-415c-a16c-e4cc5f52ef78)
UUID: Vendor specific           (aaaaaaa0-aaaa-aaaa-aaaa-aaaaaaaaaaaa)
UUID: Vendor specific           (ebe0ccb0-7a0a-4b0c-8a1a-6ff2997da3a6)
UUID: Vendor specific           (fafafa00-fafa-fafa-fafa-fafafafafafa)
ServiceData Key: 0000fe95-0000-1000-8000-00805f9b34fb
ServiceData Value: 0x70
ServiceData Value: 0x20
ServiceData Value: 0x5b
ServiceData Value: 0x04
ServiceData Value: 0x03
ServiceData Value: 0xd6
ServiceData Value: 0x74
ServiceData Value: 0xe2
ServiceData Value: 0x00
ServiceData Value: 0x2e
ServiceData Value: 0xe7
ServiceData Value: 0x09
ServiceData Value: 0x04
ServiceData Value: 0x10
ServiceData Value: 0x02
ServiceData Value: 0xd4
ServiceData Value: 0x00


Hier siehst du ganz viele ServiceData Value, zum besseren Verständnis:

70 205b04 03 d674e2002ee7 0904 1002 d400

205b04 = signalisiert uns, dass es sich um das Modell LYWSD02 handelt
d674e2002ee7 = MAC umgedreht
0904 = die "4" bedeutet, dass sich in dieser ServiceData die Temperatur befindet
d4 =  212 = 21.2°C


Um diese Werte zu erhalten, muss man innerhalb von "bluetoothctl" den Befehl
scan on
starten. Nach kurzer Zeit 1-2Sekunden trudeln dann die aktuellen info's von sämtlichen Devices auf.
Mit einem
scan off
hält man den Vorgang an und schaut sich danach die Werte von dem gewünschten Device via
info MAC
in meinem Beispiel: info E7:2E:00:E2:74:D6

an. Nun bastelt man sich die ServiceData zusammen und schaut auf folgende Stellen:

#my $serviceData = '70205b0488d674e2002ee709061002a802';   #Luftfeuchtigkeit
my $serviceData = '70205b0403d674e2002ee709041002d400';    #Temperatur

# pruefe, ob es sich bei dem Modell um einen LYWSD02 handel
if (substr($serviceData,2,6) eq '205b04')
{   # pruefe, welcher Wert sich in der ServiceData befindet
    # 4 = Temperatur
    # 6 = Luftfeuchtigkeit
    if (substr($serviceData, 25, 1) eq '4')
    {   my $temperatur = substr($serviceData,30,2);
        print hex($temperatur)/10;
    }
    elsif (substr($serviceData, 25, 1) eq '6')
    {   my $humidity = substr($serviceData,32,2) .substr($serviceData,30,2);
        print hex($humidity)/10;
    }
}


Mit folgendem handle bekommst du die Firmware:

root@raspberrypi:~# gatttool -b E7:2E:00:E2:74:D6 --char-read -a 0x14
Characteristic value/descriptor: 31 2e 31 2e 32 5f 30 30 34 32
Übersetzt nach ASCII: 1.1.2_0042


Mit folgendem handle bekommst du den Hersteller:

root@raspberrypi:~# gatttool -b E7:2E:00:E2:74:D6 --char-read -a 0x0c
Characteristic value/descriptor: 6d 69 61 6f 6d 69 61 6f 63 65 2e 63 6f 6d
Übersetzt nach ASCII: miaomiaoce.com


Mit folgendem handle bekommst du das Modell:

root@raspberrypi:~# gatttool -b E7:2E:00:E2:74:D6 --char-read -a 0x0e
Characteristic value/descriptor: 4c 59 57 53 44 30 32
Übersetzt nach ASCII: LYWSD02


Mit folgendem handle bekommst du die Uhrzeit + Datum:

root@raspberrypi:~# gatttool -b E7:2E:00:E2:74:D6 --char-read -a 0x3e
Characteristic value/descriptor: db f6 a5 5d 02

Inverted: 5da5f6db
Ergebnis: 15.10.2019 18.42.3

my $string = '5da5f6db';
my $time = hex($string);

my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) =
    localtime( $time );
$mon  += 1;
$year += 1900;

printf "%s.%s.%s %s.%s.%s\n", $mday, $mon, $year, $hour, $min, $sec;


So, nun die Frage, möchtest du das in deinem Modul hinzu programmieren oder soll ich versuchen daraus ein eigenes Modul zu gießen?
Der Ablauf bzgl. "bluetoothctl" ist ja schon ein anderer, wie du ihn z.Z. machst.

Gruß
Mathze

Hallo,

Und man bekommt die Daten ganz sicher nicht mit gatttool? Wenn es wirklich nur so geht wie Du schreibst kann ich es nicht einbauen ins Modul. Dann muss man was eigenes machen, wobei das wegen der interaktiven Interaktion schwer wird. Da wirst Du versuchen müssen mit dem neuen SubProcesses von Andre zu arbeiten. Habe ich aber noch keine Erfahrung mit gesammelt.


Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 15 Oktober 2019, 19:29:29
Ich konnte via gatttool diese serviceData nicht finden.
Ich bin mehrmals alle handle's durchgegangen, evtl. muss ich erst via write irgendein handle beschreiben, bevor er mir die Daten auf diesen Weg ausspuckt, jedoch finde ich nirgendwo diesbezüglich eine Anleitung.
Die Module, die es z.B. für ioBroker oder HA gibt, verwenden bluepy um die serviceData zu verarbeiten.

Wie ich bei dem Modul starte, weiß ich noch gar nicht.
Ich dachte, ich könnte via Terminal erstmal ein "scan on" ausführen, dieses automatisch fünf Sekunden später wieder stoppen und dann die serviceData (sprich "info MAC") mir irgendwo zwischenspeichern und diese dann auflösen.
Das würde ich dann in einer Schleife machen, solange ich zwei "serviceData" mit den benötigten Werte habe (bzw. die Schleife x-Mal durchlaufen...)

Was sagst du zu der Idee?
Im ersten Step natürlich nur für mich, um mich weitere mit der Materie zu beschäftigen.

Gruß
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 15 Oktober 2019, 19:59:04
Ich finde es toll das Du Dich dafür interessierst. Ich sage Dir erstmal weiter nichts dazu weil ich Dich erstens nicht verschrecken möchte und zweitens ich der Meinung bin alleine rausfinden ist meist besser.

Was Modulprogrammierung an geht
https://wiki.fhem.de/wiki/Kategorie:Development


Probiere es einfach aus. Du kannst auch erstmal nur den Code in eine 99_myUtils schreiben und schauen was passiert.
Wenn Du Fragen hast schreib mir einfach Mail.


Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 16 Oktober 2019, 16:14:06
Danke für deine Hilfe, ich werde darauf zurückkommen!
Gerade im Bezug auf die Modulprogrammierung stehe ich ganz am Anfang, mir fehlen halt sehr viele Basics...

Ich habe nun aber erstmal mit einem myUtils Programm angefangen, natürlich blocking  ;D
Aber das kommt alles mit der Zeit.

Aktuell bekomme ich mit Hilfe der myUtils schon eimal das Ergebnis in die Logdatei geschrieben.
Als Übergabe verwende ich die MAC Adresse.

{ myUtils_LYWSD02_main("E7:2E:00:E2:74:D6") }


Als Ergebnis bekomme ich, falls es klappt und kein Timeout in die Quere kommt:

2019.10.16 16:05:28 1: Temperatur      : 19.2 Grad
2019.10.16 16:06:02 1: Luftfeuchtigkeit: 74 %


Für's erste bin ich zufrieden...

Ich nutze:

use IPC::Open2;
use IO::Select;

um die Werte von dem Terminal mir in einen "buffer" zu schreiben.
In dem Buffer befindet sich eine Zeile, genauso wie man sie im Terminalfenster auch sieht.
Diesen Buffer pruefe ich dann gegen die übergebene MAC Adresse und hole mir die benötigten ServiceData Values.
Diese wandle ich dann nur noch um und schon kann ich das Ergebnis schreiben.

Gruß
Mathze
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 16 Oktober 2019, 16:18:16
Das klingt doch schon mal super. Jetzt nur noch BlockingCall anschauen und dann sollte es auch nonBlocking gehen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 16 Oktober 2019, 16:54:06
Hab mich eben mal direkt an deinem Code entlang gearbeitet.

BlockingCall konnte ich so auch sehr fix einbauen.
Hatte Anfangs Probleme ein Array zu übergeben, dass Problem konnte ich nun auch meistern...
Nun reicht es für heute auch erstmal, mein Kopf glüht...


2019.10.16 16:49:41 1: Start der Routine
2019.10.16 16:49:41 1: Mac -> E7:2E:00:E2:74:D6
2019.10.16 16:49:41 1: ARGV -> scan on scan off quit
2019.10.16 16:49:55 1: Temperatur      : 19.2 Grad
2019.10.16 16:49:58 1: Luftfeuchtigkeit: 74 %


PS.: gatttool fliegt auf die Nase, wenn ich mit "bluetoothctl" arbeite, was für ein Wunder  :P

PPS.:

2019.10.16 16:54:55 1: ERROR evaluating {FHEM::XiaomiBTLESens::ExecGatttool_Done('wz_Flower_Sensor_Schefflera|C4:7C:8D:6A:39:7E|ok|read|0x35|{"gtResult":"aa bb cc dd ee ff 99 88 77 66 00 00 00 00 00 00 "}')}: Can't use string ("1") as a HASH ref while "strict refs" in use at ./FHEM/74_XiaomiBTLESens.pm line 1163.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 16 Oktober 2019, 21:39:49
Ich konnte die Finger doch nicht still halten, die Readings wollte ich noch ins Device bekommen, nun reicht es aber für's erste  :)


Internals:
   BTMAC      E7:2E:00:E2:74:D6
   CFGFN     
   DEF        E7:2E:00:E2:74:D6
   FUUID      5da765ad-f33f-5bc8-54c2-a012f4788159ef04
   INTERVAL   300
   NAME       wz_Xiaomi_eInk
   NR         57
   NTFY_ORDER 50-wz_Xiaomi_eInk
   STATE      T: 19.3 H: 74
   TYPE       XiaomiEInk
   VERSION    v0.1.0
   loglevel   4
   READINGS:
     2019-10-16 21:37:19   humidity        74
     2019-10-16 21:37:19   state           T: 19.3 H: 74
     2019-10-16 21:37:19   temperature     19.3
Attributes:
   room       XiaomiEInk


Danke für deinen Code  :D
Sehr hilfreich!
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 17 Oktober 2019, 14:58:15
So ganz glücklich stimmt mich das leider noch nicht.
Zwar bekomme ich nun die Werte komfortable aus dem Scan, jedoch ist es viel mehr eine Glückssache, ob der scan das jeweilige Device gerade empfängt bzw. das Device aktuell sendet.

Viel zu oft endet die Routine mit einem Timeout, weil das Device im Scan einfach nicht gefunden wurde.

Aber hey, ich habe ganz viel über die einzelnen Module gelernt.
Wie man mit readingsSingleUpdate ein Reading schreibt (bisher kannte ich nur setreading  ;D), BlockingCall, BlockingKill, ...
Wie meine neue "Set" oder "Get" hinzufügt und bearbeitet, wie man ein Device wieder löscht usw.

Aktuell habe ich mir "bluepy" angeschaut, dieses wird in anderen Projekten verwendet, jedoch konnte ich bisher aus deren "Liste" meine Werte (18,8Grad und 73% Luftfeuchtigkeit) nicht finden.

root@raspberrypi:/usr/local/lib/python3.5/dist-packages/bluepy# python btle.py E7:2E:00:E2:74:D6
Connecting to: E7:2E:00:E2:74:D6, address type: public
Service <uuid=Generic Access handleStart=1 handleEnd=5> :
    Characteristic <Device Name>, hnd=0x2, supports READ
    -> 'LYWSD02'
    Characteristic <Appearance>, hnd=0x4, supports READ
    -> '\x00\x00'
Service <uuid=fef5 handleStart=25 handleEnd=44> :
    Characteristic <8082caa8-41a6-4021-91c6-56f9b954cc34>, hnd=0x1a, supports READ WRITE
    -> ''
    Characteristic <724249f0-5ec3-4b5f-8804-42345af08651>, hnd=0x1c, supports READ WRITE
    -> ''
    Characteristic <6c53db25-47a1-45fe-a022-7c92fb334fd4>, hnd=0x1e, supports READ
    -> ''
    Characteristic <9d84b9a3-000c-49d8-9183-855b673fda31>, hnd=0x20, supports READ WRITE
    -> ''
    Characteristic <457871e8-d516-4ca1-9116-57d0b17b9cb2>, hnd=0x22, supports READ WRITE NO RESPONSE WRITE
    -> ''
    Characteristic <5f78df94-798c-46f5-990a-b3eb6a065c88>, hnd=0x24, supports NOTIFY READ
    -> '\x00'
    Characteristic <64b4e8b5-0de5-401b-a21d-acc8db3b913a>, hnd=0x27, supports READ
    -> '\r'
    Characteristic <42c3dfdd-77be-4d9c-8454-8f875267fb3b>, hnd=0x29, supports READ
    -> '\xf4\x00'
    Characteristic <b7de1eea-823d-43bb-a3af-c4903dfce23c>, hnd=0x2b, supports READ
    -> '\x17\x00'
Service <uuid=fe95 handleStart=97 handleEnd=114> :
    Characteristic <0001>, hnd=0x62, supports NOTIFY WRITE
    Characteristic <0002>, hnd=0x65, supports READ
    -> '[\x04'
    Characteristic <0004>, hnd=0x67, supports READ
    -> '\xf7.\\R\xa6OFl\x1b/'
    Characteristic <0005>, hnd=0x69, supports NOTIFY WRITE
    Characteristic <0010>, hnd=0x6c, supports WRITE
    Characteristic <0013>, hnd=0x6e, supports READ WRITE
    -> '\xc6b\x01\x08\xba#Xm\x1ep\x1c\xe2)\xf8\xae\xc1\x90F\xe5\xc1'
    Characteristic <0014>, hnd=0x70, supports READ
    -> '\xeb\x1e\xe0\xbd\xe9\x96\x1eUW\xa6\x12\xc6'
Service <uuid=Generic Attribute handleStart=6 handleEnd=9> :
    Characteristic <Service Changed>, hnd=0x7, supports READ INDICATE
    -> '\x01\x00\xff\xff'
Service <uuid=ebe0ccb0-7a0a-4b0c-8a1a-6ff2997da3a6 handleStart=60 handleEnd=90> :
    Characteristic <ebe0ccb7-7a0a-4b0c-8a1a-6ff2997da3a6>, hnd=0x3d, supports READ WRITE NO RESPONSE WRITE
    -> '\xe1d\xa8]\x02'
    Characteristic <ebe0ccb9-7a0a-4b0c-8a1a-6ff2997da3a6>, hnd=0x3f, supports READ
    -> '\xf7\x01\x00\x00\xf8\x01\x00\x00'
    Characteristic <ebe0ccba-7a0a-4b0c-8a1a-6ff2997da3a6>, hnd=0x41, supports READ WRITE NO RESPONSE WRITE
    -> '\xb5\x01\x00\x00'
    Characteristic <ebe0ccbb-7a0a-4b0c-8a1a-6ff2997da3a6>, hnd=0x43, supports READ
    -> '\x00\x00\x00\x00\xa0\xdbS]\xf1\n;\xe6\n;\x00\x00'
    Characteristic <ebe0ccbc-7a0a-4b0c-8a1a-6ff2997da3a6>, hnd=0x45, supports NOTIFY READ
    -> ''
    Characteristic <ebe0ccbe-7a0a-4b0c-8a1a-6ff2997da3a6>, hnd=0x48, supports READ WRITE NO RESPONSE WRITE
    -> '\xff'
    Characteristic <ebe0ccc1-7a0a-4b0c-8a1a-6ff2997da3a6>, hnd=0x4a, supports NOTIFY READ
    -> ''
    Characteristic <ebe0ccc2-7a0a-4b0c-8a1a-6ff2997da3a6>, hnd=0x4d, supports READ WRITE NO RESPONSE WRITE
    -> '\x9b'
    Characteristic <ebe0ccc3-7a0a-4b0c-8a1a-6ff2997da3a6>, hnd=0x4f, supports READ WRITE NO RESPONSE WRITE
    -> '\x00\xff\x00\xff\x00\xff'
    Characteristic <ebe0ccc4-7a0a-4b0c-8a1a-6ff2997da3a6>, hnd=0x51, supports READ
    -> '%'
    Characteristic <ebe0ccc8-7a0a-4b0c-8a1a-6ff2997da3a6>, hnd=0x53, supports WRITE NO RESPONSE WRITE
    Characteristic <ebe0ccd2-7a0a-4b0c-8a1a-6ff2997da3a6>, hnd=0x55, supports READ WRITE NO RESPONSE WRITE
    -> '\n7198238426'
    Characteristic <ebe0ccd3-7a0a-4b0c-8a1a-6ff2997da3a6>, hnd=0x57, supports READ WRITE NO RESPONSE WRITE
    -> '\x00'
    Characteristic <ebe0ccd4-7a0a-4b0c-8a1a-6ff2997da3a6>, hnd=0x59, supports WRITE NO RESPONSE WRITE
Service <uuid=2b43ccc0-2506-415c-a16c-e4cc5f52ef78 handleStart=45 handleEnd=59> :
    Characteristic <2b43ccc1-2506-415c-a16c-e4cc5f52ef78>, hnd=0x2e, supports READ
    -> '\xfe\xfe\xfe\xfe\xfe\xfe'
    Characteristic <2b43ccc2-2506-415c-a16c-e4cc5f52ef78>, hnd=0x30, supports NOTIFY WRITE NO RESPONSE WRITE
    Characteristic <2b43ccc3-2506-415c-a16c-e4cc5f52ef78>, hnd=0x33, supports WRITE NO RESPONSE WRITE
    Characteristic <2b43ccc4-2506-415c-a16c-e4cc5f52ef78>, hnd=0x35, supports WRITE NO RESPONSE WRITE
    Characteristic <2b43ccc5-2506-415c-a16c-e4cc5f52ef78>, hnd=0x37, supports NOTIFY
    Characteristic <2b43ccc6-2506-415c-a16c-e4cc5f52ef78>, hnd=0x3a, supports WRITE NO RESPONSE WRITE
Service <uuid=Device Information handleStart=10 handleEnd=24> :
    Characteristic <Manufacturer Name String>, hnd=0xb, supports READ
    -> 'miaomiaoce.com'
    Characteristic <Model Number String>, hnd=0xd, supports READ
    -> 'LYWSD02'
    Characteristic <Serial Number String>, hnd=0xf, supports READ
    -> 'F200FFFF036430515D'
    Characteristic <Hardware Revision String>, hnd=0x11, supports READ
    -> 'F2_WF'
    Characteristic <Firmware Revision String>, hnd=0x13, supports READ
    -> '1.1.2_0042'
    Characteristic <Software Revision String>, hnd=0x15, supports READ
    -> '0042'
    Characteristic <System ID>, hnd=0x17, supports READ
    -> '\xd6t\xe2\x00.\xe7'
Service <uuid=fafafa00-fafa-fafa-fafa-fafafafafafa handleStart=94 handleEnd=96> :
    Characteristic <fafafa01-fafa-fafa-fafa-fafafafafafa>, hnd=0x5f, supports READ WRITE NO RESPONSE WRITE
    -> ''
Service <uuid=aaaaaaa0-aaaa-aaaa-aaaa-aaaaaaaaaaaa handleStart=91 handleEnd=93> :
    Characteristic <aaaaaaa1-aaaa-aaaa-aaaa-aaaaaaaaaaaa>, hnd=0x5c, supports READ WRITE NO RESPONSE WRITE
    -> ''



Falls du sie findest, lass es mich wissen, denn der Abruf via bluepy ist deutlich komfortable und auch viel performanter.

Gruß
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 17 Oktober 2019, 17:35:31
Hallo,

setreading ist ein FHEM Befehl und ruft auch nur die Perl Routine readingsSingleUpdate auf :-)
Du kannst Dir ja die fhem.pl an schauen. Da sind die Routinen alle drin.

bluepy ruft meines Wissens auch nur gatttool auf.


Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 18 Oktober 2019, 09:56:06
Moin,

wieder was dazu gelernt  :)
Also das "Modul" funktioniert soweit, mehr oder weniger  ;D
Wobei mir das auslesen der Werte über bluetoothctl wirklich gar nicht zusagt.
Die Uhrzeit kann ich "komfortable" per gatttool und einem handle auslesen.
Solange ich aber nicht weiß, ob ich noch auf einen anderen Weg an meine Werte komme, muss das so erstmal laufen.
Anfangs stand ich auch vor dem Problem, dass der User fhem keine Berechtigung hatte um "bluetoothctl" auszuführen...
Nun muss ich aber erstmal das Modul aufräumen. Viele Log-Meldungen habe ich mir gebastelt und an einigen Stellen weiß ich schon selber, dass das alles nicht ganz rund ist.
Ich bin aber immer etwas ungeduldig und möchte schnell irgendein Resultat sehen, dass verleitet leider zu "dummen" Quellcode... Muss man üben  :)
Ansonsten muss ich mal wirklich das DevelopmentModuleIntro loben, ziemlich tolle Funktionen, die man Standardmäßig nutzen kann!


Internals:
   BTMAC      E7:2E:00:E2:74:D6
   CFGFN     
   DEF        E7:2E:00:E2:74:D6
   FUUID      5da96bdb-f33f-5bc8-2f02-2c9317f0abd6372b
   INTERVAL   300
   NAME       wz_Xiaomi_eInk
   NOTIFYDEV  global,wz_Xiaomi_eInk
   NR         2055
   NTFY_ORDER 50-wz_Xiaomi_eInk
   STATE      T: 18.8 H: 74
   TYPE       XiaomiEInk
   VERSION    v0.0.2
   loglevel   4
   READINGS:
     2019-10-18 09:43:08   clock           18.10.2019-09.43.10
     2019-10-18 09:44:59   humidity        74
     2019-10-18 09:44:59   job             done
     2019-10-18 09:38:52   model           LYWSD02
     2019-10-18 09:44:59   state           T: 18.8 H: 74
     2019-10-18 09:40:05   temperature     18.8
   helper:
Attributes:
   room       XiaomiEInk


PS.: Falls jemand einen Xiaomi LYWSD02 (eInk Display mit Humidity + Temp + Clock) haben sollte und das Modul testen möchte, kann er sich gerne bei mir melden  :)

Gruß
Mathze
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 04 November 2019, 13:19:35
Mal eine kurze Rückmeldung meinerseits.
Etwas Zeit ist vergangen, der Xiaomi ClearGrass Sensor läuft gewohnt gut.
Temperatur und Luftfeuchtigkeit passen.
Für BatteryPercent lege ich meine Hand nicht ins Feuer (bei mir könnte es passen).

Ich denke du kannst es ins SVN einchecken, falls noch nicht geschehen (ich hab es ja nicht so mit regelmäßigen Updates  ;D )

Gruß
Mathze
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 04 November 2019, 13:48:37
Zitat von: t1me2die am 04 November 2019, 13:19:35
Mal eine kurze Rückmeldung meinerseits.
Etwas Zeit ist vergangen, der Xiaomi ClearGrass Sensor läuft gewohnt gut.
Temperatur und Luftfeuchtigkeit passen.
Für BatteryPercent lege ich meine Hand nicht ins Feuer (bei mir könnte es passen).

Ich denke du kannst es ins SVN einchecken, falls noch nicht geschehen (ich hab es ja nicht so mit regelmäßigen Updates  ;D )

Gruß
Mathze

Du machst mir ja Spaß  ;D
Erstmal ist es ein komplett neues/anderes Modul, dazu kommt das es DEIN Modul ist.
Vorgehensweise wäre also. Neuen Thread und da Dein Modul vorstellen, 2-3 Leute sollten es testen und entsprechendes Feedback geben und Du musst zu mindest eine englische Commandref erstellen.
Zum Abschluß schaut ein erfahrender Developer noch einmal über den Code.
Dann kannst Du einchecken.

Ich würde Dir empfehlen das Du erstmal Dein Modul in einem separaten Thread vor stellst. Kannst ja das Modul als Anhang anhängen oder ein Verweis auf eine entsprechende Seite (Github oder so) machen.
Gerne schaue ich dann schon mal über den Code.

Das alles sollte Dich aber bitte jetzt nicht von weiteren Schritten ab halten. Ich finde es bemerkenswert und sehr toll was Du hier in kurzer Zeit geschaffen hast.
Kannst ja in diesem Thread dann ein Link auf DEINEN eigenen neuen Thread setzen.


Grüße
Leon
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: t1me2die am 04 November 2019, 14:51:54
Moin Leon,

es geht gar nicht um das Xiaomi LYWSD02, sondern um den Xiaomi ClearGrass, den du ja in deinem Modul integriert hast.
Ich wollte Dir nur noch einmal ein Feedback geben, dass der ClearGrass mit deiner letzten Version aus dem Github (https://github.com/fhem/XiaomiBTLESens/blob/devel/74_XiaomiBTLESens.pm) gut läuft und die Daten (Temp + Hum) korrekt in FHEM dargestellt werden.

Gruß
Mathze
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 04 November 2019, 15:01:55
Zitat von: t1me2die am 04 November 2019, 14:51:54
Moin Leon,

es geht gar nicht um das Xiaomi LYWSD02, sondern um den Xiaomi ClearGrass, den du ja in deinem Modul integriert hast.
Ich wollte Dir nur noch einmal ein Feedback geben, dass der ClearGrass mit deiner letzten Version aus dem Github (https://github.com/fhem/XiaomiBTLESens/blob/devel/74_XiaomiBTLESens.pm) gut läuft und die Daten (Temp + Hum) korrekt in FHEM dargestellt werden.

Gruß
Mathze

Ups, Sorry mein Fehler. Alles klar. Ich danke Dir.


Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Holzlenkrad am 11 November 2019, 22:40:30
Ich habe weiterhin das Problem, dass nach einiger Nutzungsdauer (mal mehrere Wochen, jetzt nach nur 2 Tagen), die Kommunikation zwischen Thermometer und Modul nicht mehr funktioniert.

Fehlermeldung ist dann: no data response
Im Logfile steht sonst nichts. Das Thermometer und mein Raspberry Pi 3 sind im selben Raum.

Das Problem kann ich jedes Mal mit einem Neustart von Linux beheben.


Nun interessiert mich ja nun generell mal, wie ich das Problem beheben kann? Und falls es da keine einfach Lösung gibt, gibt es eine Möglichkeit die Bluetooth Schnittstelle (automatisiert, regelmäßig) neuzustarten, damit ich nicht jedes Mal den Raspberry Pi auf dem ja nun eine ganze Menge läuft rebooten muss?
Danke :) 
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Holzlenkrad am 12 November 2019, 00:15:28
Also ein sudo invoke-rc.d bluetooth restart fixt es vorübergehend schon mal.
Werde das mal als täglichen Chronjob einrichten?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: charlie71 am 21 Dezember 2019, 18:30:51
Liebe Xiaomi Flower Sensor Nutzer,

ich schlage für das Modul folgende 2 Patches vor:
1) Das Modul prüft mittels "ps ax" die laufenden Prozesse am ssh host. Das schlägt aber bei kleinen Linux Accesspoints fehl. (mein Router liefert bei "ps ax" nur die Fehlermeldung "ps: unrecognized option: a", wenn man den Prozessstatus nur mit "ps" abfragt klappt es auch auf kleinen Routern)
Hier schlage ich ein optionales Attribut vor das das "ps" command enthällt.
2) Wenn eines Sensorabfrage nicht klappt (schlechte Verbindung) kommt es immer wieder vor, dass im fhem log nicht zuordenbare Fehlermeldung vom Modul eingetragen werden zB "connect: Device or resource busy (16)"
(Ursache dafür ist dass beim qx der sdterr ausgewertet wird).
Hier fehlt es sauberes Fehlerhandling

ich habe für Beides einen Patch gebaut.
Bitte in die nächste Modulversion einbauen
lG
Charlie71
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 21 Dezember 2019, 19:14:04
Hallo Charlie,

Vielen Dank. Ich schaue es mir die Tage sehr gerne an.


Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Jamo am 22 Dezember 2019, 16:06:47
Hi Charlie, Cooltux,
ich habe den Patch mal eingespielt, aber ich bekomme im state meiner Blumen Sensoren nur noch ein error - weiss nicht was das ist, ich habs nicht debugged weil ich jetzt erstmal in Urlaub bin bis Januar. Aber die 'connect error' etc Fehlermeldungen sind in der Tat verschwunden.... :-)

Danke, frohe Weihnachten und ein schönes neues Jahr.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: charlie71 am 22 Dezember 2019, 20:08:33
Hallo Jamo,

vielen Dank für den Hinweis, ich habe tatsächlich einen kleinen Fehler eingebaut  :'(
Ich hab den Patch schon aktualisiert.

lg
Charlie71
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 22 Dezember 2019, 20:43:02
Hallo Charlie,

Sauberer Patch, vielen lieben Dank für die gute Arbeit. Ich teste das die Tage noch und würde mich dann noch mal melden.


Grüße
Marko
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Jamo am 22 Dezember 2019, 21:44:24
Gerade nochmal getestet und für gut befunden! Funktioniert jetzt. Danke !
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: KernSani am 31 Dezember 2019, 15:31:30
Habe den patch gerade auch mal eingespielt und ein erster Blick sagt: Funktioniert :-) Ich beobachte und berichte...
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 01 Januar 2020, 21:10:41
Es gibt morgen ein Update. Enthalten ist auch Charlie sein Patch.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Pati_Alpha am 03 Januar 2020, 11:54:28
Ich hatte auch grade wieder ein "The BlockingCall Process terminated unexpectedly. Timedout".
FHEM läuft bei mir in einer VM, Bluetooth wird auf einem RPi benutzt.

Das Update habe ich auch grade schon eingespielt, bekomme ich dann auch eine genauere Fehlermeldung hierzu?
Passiert mir auch nur selten, so alle 2 Wochen ca., dass dieser Fehler kommt.

Grüße und danke für das tolle Modul! :)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 03 Januar 2020, 12:32:01
Eine genauere Fehlermeldung gibt es nicht.

Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Pati_Alpha am 04 Januar 2020, 01:30:13
Wie kann ich denn dann herausfinden, woran diese Meldung liegt wenn sie das nächste mal auftritt?

Grüße! :)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 04 Januar 2020, 03:51:19
Die Fehlermeldung besagt daß der eigentliche gatttool Prozess nicht innerhalb des timeouts zum Abschluss gekommen ist.
Das kann diverse Gründe haben.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: KernSani am 04 Januar 2020, 10:29:57
Ich habe den Fehler regelmäßig (merfach täglich). Ich führe ihn datauf zurück, dass der Pi-zero über den ich den XIAOMI ansteuere an der Grenze der WLAN-Reichweite hängt und der Sensor auch nicht herade nah am Pi ist... Irgendwo verschluckt er sich dann manchmal auf der Strecke... Macht aber - zumindest bei mir - nix.


Kurz, weil mobil
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: D3ltorohd am 04 Januar 2020, 10:41:09
Wie gut läuft das ganze denn über BT ? Ich bin auf der suche nach einem Sensor, der mir Temp,Luftfeuchtigkeit und Helligkeit liefert. Das wäre bei dem Sensor ja der Fall, diesen würde ich gerne außerhalb des Hauses anbringen. Da ich bis jetzt aber noch keine BT Verbindung habe, weiß ich nicht wie gut da die Reichweite ist und wie stabil so eine Verbindung ?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: KernSani am 04 Januar 2020, 10:55:13
Ich steuere die Gartenbewässerun über die Dinger (d.h. Für mich sind eigentlich nur die Feuchtigkeitswerte relevant). Ein Pi Zero hängt in der Garage, von dort sind es grob geschätzt 6 - 7m zum Sensor. Da gibt es ab und zu Aussetzer, aber die Feuchtigkeit ändert sich ja nicht alle 10 Minuten... Ich habe noch weitere Sensoren, die näher liegen (insbesondere nicht das WLAN-Reichweiten-Problem haben), da gibt es nur sporadisch Fehler.


Kurz, weil mobil
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 04 Januar 2020, 11:14:45
Zitat von: KernSani am 04 Januar 2020, 10:55:13
Ich steuere die Gartenbewässerun über die Dinger (d.h. Für mich sind eigentlich nur die Feuchtigkeitswerte relevant). Ein Pi Zero hängt in der Garage, von dort sind es grob geschätzt 6 - 7m zum Sensor. Da gibt es ab und zu Aussetzer, aber die Feuchtigkeit ändert sich ja nicht alle 10 Minuten... Ich habe noch weitere Sensoren, die näher liegen (insbesondere nicht das WLAN-Reichweiten-Problem haben), da gibt es nur sporadisch Fehler.


Kurz, weil mobil

Ist bei mir ähnlich.

Also Sensoren auf dem Balkon und einen PI-ZeroW innen am Fenster irgendwo.
WLAN ist da bestimmt gut und Entfernung zu den Sensoren ist zwischen 2m und 6m.

Läuft für mich ausreichend gut, wie KernSani schon geschrieben hat: die Feuchtigkeit ändert sich ja nicht schlagartig und wenn mal ein Wert verloren geht ist das kein Ding...
(kommt/kam aber vor, dass hin und wieder einer der Sensoren nicht "liefert")

Gruß, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Pati_Alpha am 05 Januar 2020, 12:09:57
Zitat von: KernSani am 04 Januar 2020, 10:29:57
Ich habe den Fehler regelmäßig (merfach täglich). Ich führe ihn datauf zurück, dass der Pi-zero über den ich den XIAOMI ansteuere an der Grenze der WLAN-Reichweite hängt und der Sensor auch nicht herade nah am Pi ist... Irgendwo verschluckt er sich dann manchmal auf der Strecke... Macht aber - zumindest bei mir - nix.

Bei mir bleibt es dann leider in dem Zustand bis ich den Pi neustarte. Das ist schon sehr mühselig und uncool.
Ich muss das irgendwie weiter debuggen können.
Habt ihr da Tipps zu?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 05 Januar 2020, 12:48:33
gatttool von Hand in der Shell auf rufen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: mi.ke am 05 Januar 2020, 14:08:44
Zitat von: Pati_Alpha am 05 Januar 2020, 12:09:57
Habt ihr da Tipps zu?

Liegt definitiv an der Entfernung!
Habs so gelöst.

Den Code hab ich irgendwo abgeschrieben, die genaue Quelle weiss ich leider nicht mehr.
Daraus hab ich mir dann einen Taster gebastelt.


defmod GATKILL DOIF ([$SELF:"on"]) ("kill $(ps aux | grep gatttool | awk '{print $2}')") (set $SELF off)
attr GATKILL alias ( Bluetooth Reset )
attr GATKILL devStateIcon cmd_1_1:remotecontrol/black_btn_RAD .*:remotecontrol/black_btn_STOP
attr GATKILL do always
attr GATKILL group 1
attr GATKILL icon hue_room_garage
attr GATKILL room FlowerSens
attr GATKILL setList on off
attr GATKILL wait 0,3
attr GATKILL webCmd :



Die >= 25 Pflanzensensoren werden jeweils auf Funktion überwacht mit dem Modul "ReadingsSupervision".
Hiervon gibt es meines Wissens bereits eine neuere, überarbeitete Version mit anderem Namen.

define Supervision ReadingsSupervision

Dann für jeden Sensor die Intervalle und Readings als Attribut festlegen

attr MI_Pflanze_xxx Supervision 8000,9999,temperature,moisture,fertility

Hier werden also die Readings temperature,moisture,fertility geprüft, ob sie älter als 8000 Sekunden sind. wenn JA wird 9999 als Wert des Readings übergeben.

Wenn ich sehe, dass einer oder zwei nicht mehr empfangen werden, drück ich den Taster.
Wenn >= 5 Sensoren nicht mehr empfangen werden, startet der GATKILL automatisch.

Habe jetzt für's Backup der SD karte den Rechner nach 256 Tagen neugestartet.
Läuft also ganz gut, vielleicht hilft es jemand.

Cheers
mi.ke


Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Pati_Alpha am 06 Januar 2020, 15:23:52
Geil, das sieht ja mal cool aus! Grade die Sache mit dem ReadingsSupervision Modul. Ich glaube das übernehme ich.

Wunderlich ist bei mir nur: Der Sensor ist so.. 1,5m vom RPi entfernt auf der Fensterbank... :/
Aber dumme Frage dazu nochmal: Das gattool läuft auf dem Gerät mit Bluetooth (dem Raspberry), nicht auf dem Gerät auf dem FHEM läuft (die virtuelle Maschine), richtig?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 06 Januar 2020, 15:47:30
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. Ich glaube das übernehme ich.

Wunderlich ist bei mir nur: Der Sensor ist so.. 1,5m vom RPi entfernt auf der Fensterbank... :/
Aber dumme Frage dazu nochmal: Das gattool läuft auf dem Gerät mit Bluetooth (dem Raspberry), nicht auf dem Gerät auf dem FHEM läuft (die virtuelle Maschine), richtig?

richtig!
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag 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.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 06 Januar 2020, 21:22:29
Schaue ich mir an.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: mi.ke am 07 Januar 2020, 15:41:14
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 (https://forum.fhem.de/index.php/topic,49408.msg410767.html#msg410767)

Cheers
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 08 Januar 2020, 03:44:35
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.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: KyleK am 09 Januar 2020, 00:10:06
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?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag 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.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Pati_Alpha am 10 Januar 2020, 16:12:00
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)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 10 Januar 2020, 16:14:13
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.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Pati_Alpha am 11 Januar 2020, 10:57:18
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?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: mi.ke am 11 Januar 2020, 13:35:21
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.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Pati_Alpha am 14 Januar 2020, 10:49:19
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!
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Holger S am 03 Februar 2020, 21:30:36
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
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 04 Februar 2020, 05:32:28
Was genau ist es denn für ein Sensor? Hersteller, Modell. Kann man nur das Display ablesen oder ist er smart?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 04 Februar 2020, 16:47:58
OK Fragen haben erübrigt. Durch Zufall heute auf eBay gesehen und für 6 Euro mal einen gekauft
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Holger S am 04 Februar 2020, 18:22:39
Ist ein XIAOMI Mijia
LYWSD03MMC
Siehe Screenshot
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Mickey am 04 Februar 2020, 20:12:57
Servus,

Mathze,  t1me2die hat dafür vermutlich ein Modul geschrieben.
Bitte Frage ihn einmal.

Grüße, Michael
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: kroonen am 09 Februar 2020, 21:23:13
Hi,

I use a cleargrass sensor, but only gets values zero

Here the result and also a verbose 5 for the reading


hem> l Slaaptemp2
Internals:
   BTMAC      58:2D:34:10:C8:6B
   DEF        58:2D:34:10:C8:6B
   FUUID      5e406756-f33f-5f49-28fb-396f8b14e8329cb8
   FVERSION   74_XiaomiBTLESens.pm:v2.8.2-s20924/2020-01-10
   INTERVAL   120
   NAME       Slaaptemp2
   NOTIFYDEV  global,Slaaptemp2
   NR         94
   NTFY_ORDER 50-Slaaptemp2
   STATE      T: 0 H: 0
   TYPE       XiaomiBTLESens
   VERSION    v2.8.2
   loglevel   4
   READINGS:
     2020-02-09 21:11:08   firmware        1.1.2_0020
     2020-02-09 21:11:08   state           T: 0 H: 0
   helper:
     CallBattery 0
     CallSensDataCounter 0
Attributes:
   interval   120
   model      clearGrassSens
   room       XiaomiBTLESens


2020.02.09 21:17:16 5: XiaomiBTLESens (Slaaptemp2) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,86 77 f7 fb d1 5c e2 08 e6 c5 de bf

2020.02.09 21:17:16 4: XiaomiBTLESens (Slaaptemp2) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,86 77 f7 fb d1 5c e2 08 e6 c5 de bf

2020.02.09 21:17:16 5: Cmd: >{BlockingStart('4')}<
2020.02.09 21:17:16 5: Cmd: >{FHEM::XiaomiBTLESens::ExecGatttool_Done('Slaaptemp2|58:2D:34:10:C8:6B|ok|read|0x3b|{"gtResult":"86 77 f7 fb d1 5c e2 08 e6 c5 de bf "}')}<
2020.02.09 21:17:16 5: XiaomiBTLESens (Slaaptemp2) - ExecGatttool_Done: gatttool return string: Slaaptemp2|58:2D:34:10:C8:6B|ok|read|0x3b|{"gtResult":"86 77 f7 fb d1 5c e2 08 e6 c5 de bf "}
2020.02.09 21:17:16 4: XiaomiBTLESens (Slaaptemp2) - ProcessingNotification
2020.02.09 21:17:16 4: XiaomiBTLESens (Slaaptemp2) - ProcessingNotification: handle 0x3b
2020.02.09 21:17:16 4: XiaomiBTLESens (Slaaptemp2) - Clear Grass Sens Handle0x3b
2020.02.09 21:17:16 5: Starting notify loop for Slaaptemp2, 3 event(s), first is batteryState: low
2020.02.09 21:17:16 5: End notify loop for Slaaptemp2
2020.02.09 21:17:16 4: XiaomiBTLESens (Slaaptemp2) - WriteReadings: Readings were written
2020.02.09 21:17:16 4: XiaomiBTLESens (Slaaptemp2) - Run CreateParamGatttool with mod: read
2020.02.09 21:17:16 4: BlockingCall (FHEM::XiaomiBTLESens::ExecGatttool_Run): created child (19723), uses telnetPort to connect back
2020.02.09 21:17:16 5: Starting notify loop for Slaaptemp2, 1 event(s), first is read sensor data
2020.02.09 21:17:16 5: End notify loop for Slaaptemp2
2020.02.09 21:17:16 5: XiaomiBTLESens (Slaaptemp2) - Read XiaomiBTLESens_ExecGatttool_Run Slaaptemp2|58:2D:34:10:C8:6B|read|0x1e
2020.02.09 21:17:16 4: Connection accepted from telnetPort_127.0.0.1_33226
2020.02.09 21:17:16 5: Cmd: >{BlockingRegisterTelnet($cl,9)}<
2020.02.09 21:17:16 5: XiaomiBTLESens (Slaaptemp2) - ExecGatttool_Run: Execute Command ps ax | grep -E [g]atttool -i hci0 -b 58:2D:34:10:C8:6B
2020.02.09 21:17:16 5: XiaomiBTLESens (Slaaptemp2) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 58:2D:34:10:C8:6B --char-read -a 0x1e 2>&1 and loop 0
2020.02.09 21:17:17 5: XiaomiBTLESens (Slaaptemp2) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,ac

2020.02.09 21:17:17 4: XiaomiBTLESens (Slaaptemp2) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,ac

2020.02.09 21:17:17 5: Cmd: >{BlockingStart('9')}<
2020.02.09 21:17:17 5: Cmd: >{FHEM::XiaomiBTLESens::ExecGatttool_Done('Slaaptemp2|58:2D:34:10:C8:6B|ok|read|0x1e|{"gtResult":"ac "}')}<
2020.02.09 21:17:17 5: XiaomiBTLESens (Slaaptemp2) - ExecGatttool_Done: gatttool return string: Slaaptemp2|58:2D:34:10:C8:6B|ok|read|0x1e|{"gtResult":"ac "}
2020.02.09 21:17:17 4: XiaomiBTLESens (Slaaptemp2) - ProcessingNotification
2020.02.09 21:17:17 4: XiaomiBTLESens (Slaaptemp2) - ProcessingNotification: handle 0x1e
2020.02.09 21:17:17 4: XiaomiBTLESens (Slaaptemp2) - Clear Grass Sens Handle0x1e
2020.02.09 21:17:17 1: PERL WARNING: substr outside of string at ./FHEM/74_XiaomiBTLESens.pm line 1140.
2020.02.09 21:17:17 3: eval: {FHEM::XiaomiBTLESens::ExecGatttool_Done('Slaaptemp2|58:2D:34:10:C8:6B|ok|read|0x1e|{"gtResult":"ac "}')}
2020.02.09 21:17:17 1: PERL WARNING: Use of uninitialized value in hex at ./FHEM/74_XiaomiBTLESens.pm line 1140.
2020.02.09 21:17:17 3: eval: {FHEM::XiaomiBTLESens::ExecGatttool_Done('Slaaptemp2|58:2D:34:10:C8:6B|ok|read|0x1e|{"gtResult":"ac "}')}
2020.02.09 21:17:17 1: PERL WARNING: substr outside of string at ./FHEM/74_XiaomiBTLESens.pm line 1141.
2020.02.09 21:17:17 3: eval: {FHEM::XiaomiBTLESens::ExecGatttool_Done('Slaaptemp2|58:2D:34:10:C8:6B|ok|read|0x1e|{"gtResult":"ac "}')}
2020.02.09 21:17:17 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/74_XiaomiBTLESens.pm line 1141.
2020.02.09 21:17:17 3: eval: {FHEM::XiaomiBTLESens::ExecGatttool_Done('Slaaptemp2|58:2D:34:10:C8:6B|ok|read|0x1e|{"gtResult":"ac "}')}
2020.02.09 21:17:17 5: Starting notify loop for Slaaptemp2, 3 event(s), first is temperature: 0
2020.02.09 21:17:17 5: End notify loop for Slaaptemp2
2020.02.09 21:17:17 4: XiaomiBTLESens (Slaaptemp2) - WriteReadings: Readings were written
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: kroonen am 17 Februar 2020, 21:50:27
nobody any idea what went wrong?
Titel: XIAOMI Mijia LYWSD03MMC
Beitrag von: Holger S am 29 Februar 2020, 15:02:02
Hallo CoolTux

hast du schon was erreichen können bezüglich des Sensors

XIAOMI Mijia
LYWSD03MMC

Hast ihn ja bei Ebay bestellt..

Vielen Dank
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 29 Februar 2020, 15:47:05
Hallo Holger,

Das Teil kam vor 2 Wochen an, leider hatte ich noch keine Zeit weiter gefunden.


Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Holzlenkrad am 10 März 2020, 05:04:44
Zitat von: Pati_Alpha am 14 Januar 2020, 10:49:19
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!

Kannst du mal genau beschreiben, wie du das gemacht hast? Hab bis jetzt 1x Tag einen Cronjob, aber dann kann es trotzdem sein, dass der Sensor keine Daten mehr liefert.

Ich habe das Problem ähnlich zu deinem übrigens hier schon vor ein paar Monaten beschrieben, aber gab leider keine Reaktion.
Übrigens: Mein Raspberry Pi 3 läuft noch unter Stretch!!
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: IcedEarth am 01 April 2020, 19:28:11
Hallo zusammen,

ich habe ebenfalls das Problem, dass der SEnsor einfach zuufällig irgendwann auf "Device or resource busy (16)" springt. Wenn ich dann händisch per ssh "sudo hciconfig hci0 down" und
"sudo hciconfig hci0 up" ausführe geht es wieder, bis der Fehler erneut auftritt. Gibt es dafür ebenfalls eine komfortable Lösung?

Viele Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 01 April 2020, 20:00:14
Zitat von: IcedEarth am 01 April 2020, 19:28:11
Hallo zusammen,

ich habe ebenfalls das Problem, dass der SEnsor einfach zuufällig irgendwann auf "Device or resource busy (16)" springt. Wenn ich dann händisch per ssh "sudo hciconfig hci0 down" und
"sudo hciconfig hci0 up" ausführe geht es wieder, bis der Fehler erneut auftritt. Gibt es dafür ebenfalls eine komfortable Lösung?

Viele Grüße

Ein Notify welches auf diese Fehlermeldung triggert.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: IcedEarth am 02 April 2020, 08:22:06
Zitat von: CoolTux am 01 April 2020, 20:00:14
Ein Notify welches auf diese Fehlermeldung triggert.

Wie soll denn fhem den sudo befehl für das device ausführen? Da musst Du mir nochmal einen Denkanstoß liefern ;-)

Viele Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 02 April 2020, 08:52:52
Zitat von: IcedEarth am 02 April 2020, 08:22:06
Wie soll denn fhem den sudo befehl für das device ausführen? Da musst Du mir nochmal einen Denkanstoß liefern ;-)

Viele Grüße

"ssh User@RemoteRechner \"sudo hciconfig hci0 down\""

"ssh User@RemoteRechner \"sudo hciconfig hci0 up\""

Beachte die "doppelten und maskierten" Anführungszeichen!

EDIT: die "maskierten" gingen wohl auch indwem man "einfache Hichkommas" nimmt...

Die Doppelten Anführungszeichen am Anfang/Ende sind damit fhem einen "Systemaufruf" non-blocking ausführt...
...die maskierten "innerhalb" sind für den eigentlichen "ssh-Zugriff"...

EDIT: http://heinz-otto.blogspot.com/2018/02/in-fhem-externe-programme-aufrufen.html

Voraussetzung (sollte aber ja sein, wenn das Modul bereits remote kann): fhem muss sich auf dem RemoteRechner OHNE Passwortabfrage einloggen können (sollte aber ja auch schon sein!?) und der User@RemoteRechner muss "sudo" ebenfalls dürfen und das OHNE Passwort (müsste aber ja auch, wenn das Modul bereits remote zugreift)...

EDIT: http://heinz-otto.blogspot.com/2017/01/per-ssh-remote-befehle-direkt-ausfuhren.html

Gruß, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: IcedEarth am 02 April 2020, 21:33:07
Hallo Joachim,

danke für die Erklärung. Ich hatte zwischenzeitlich das folgende probiert:
- .sh erstellt mit den beiden Befehlen.
- dem User fhem die Ausführung des scriptes als root in der sudoers genehmigt
- script im notify aufgerufen:
FC_1:lastGattError:.*|FC_2:lastGattError:.*
set Telegrambot msg Einer oder beide FC Sensoren nicht erreichbar. (comment ausführen!),
{"sudo /home/pi/XiaomiBluetoothBug.sh"}

Hab aber noch nicht getestet, ob das überhaupt funktioniert. Keine Zeit mehr gehabt ;-)
Kann man ein notify händisch triggern?

Viele Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 02 April 2020, 21:46:07
Ja, mit trigger...

Du kannst statt dem "Oder" (verm.) auch FC_.*:lastGattError.* schreiben

Bzw. auch (FC_1|FC_2):lastGattError.*

Du kannst auch einfach den EventMonitor das Erzeugen des Notify überlassen...

Ich denke aber, dass der Ausführungsteil so nicht gehen wird bzw. verstehe ich nicht so ganz was du da "willst"...

fhem muss nicht sudo sein, um das tun zu können (das Script muss nur richtig liegen und die Rechte passen)...
...und bzw. wichtig ist, dass fhem sich remote einloggen kann ohne Passwort...

sudo ist erst auf der remote Seite nötig...
...und da ist es ja "der User dort"...
...also der, der sich dort per ssh einlogged...

Gruß, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: IcedEarth am 03 April 2020, 09:18:20
Hallo Joachim,

sorry für die Verwirrung. FHEM läuft bei mir auf dem Raspberry, dessen Bluetooth ich auch nutze. daher ist ein remote ssh gar nicht notwendig (oder?)

Viele Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 03 April 2020, 09:22:59
Zitat von: IcedEarth am 03 April 2020, 09:18:20
Hallo Joachim,

sorry für die Verwirrung. FHEM läuft bei mir auf dem Raspberry, dessen Bluetooth ich auch nutze. daher ist ein remote ssh gar nicht notwendig (oder?)

Viele Grüße

Das ändert das natürlich...
...klar, dann kein Remote-Login...

Sorry! ;)

War nur wegen dem hier (etwas "unklar" formuliert ;)  ):

Zitat
Wenn ich dann händisch per ssh "sudo hciconfig hci0 down" und
"sudo hciconfig hci0 up" ausführe

Ah: du loggst dich per ssh auf dem PI ein und dann führst du dort das sudo Kommando aus... ;)

Gruß, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: trabatz am 04 April 2020, 13:38:34
Zitat von: kroonen am 09 Februar 2020, 21:23:13
Hi,

I use a cleargrass sensor, but only gets values zero

Here the result and also a verbose 5 for the reading


hem> l Slaaptemp2
Internals:
   BTMAC      58:2D:34:10:C8:6B
   DEF        58:2D:34:10:C8:6B
   FUUID      5e406756-f33f-5f49-28fb-396f8b14e8329cb8
   FVERSION   74_XiaomiBTLESens.pm:v2.8.2-s20924/2020-01-10
   INTERVAL   120
   NAME       Slaaptemp2
   NOTIFYDEV  global,Slaaptemp2
   NR         94
   NTFY_ORDER 50-Slaaptemp2
   STATE      T: 0 H: 0
   TYPE       XiaomiBTLESens
   VERSION    v2.8.2
   loglevel   4
   READINGS:
     2020-02-09 21:11:08   firmware        1.1.2_0020
     2020-02-09 21:11:08   state           T: 0 H: 0
   helper:
     CallBattery 0
     CallSensDataCounter 0
Attributes:
   interval   120
   model      clearGrassSens
   room       XiaomiBTLESens


2020.02.09 21:17:16 5: XiaomiBTLESens (Slaaptemp2) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,86 77 f7 fb d1 5c e2 08 e6 c5 de bf

2020.02.09 21:17:16 4: XiaomiBTLESens (Slaaptemp2) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,86 77 f7 fb d1 5c e2 08 e6 c5 de bf

2020.02.09 21:17:16 5: Cmd: >{BlockingStart('4')}<
2020.02.09 21:17:16 5: Cmd: >{FHEM::XiaomiBTLESens::ExecGatttool_Done('Slaaptemp2|58:2D:34:10:C8:6B|ok|read|0x3b|{"gtResult":"86 77 f7 fb d1 5c e2 08 e6 c5 de bf "}')}<
2020.02.09 21:17:16 5: XiaomiBTLESens (Slaaptemp2) - ExecGatttool_Done: gatttool return string: Slaaptemp2|58:2D:34:10:C8:6B|ok|read|0x3b|{"gtResult":"86 77 f7 fb d1 5c e2 08 e6 c5 de bf "}
2020.02.09 21:17:16 4: XiaomiBTLESens (Slaaptemp2) - ProcessingNotification
2020.02.09 21:17:16 4: XiaomiBTLESens (Slaaptemp2) - ProcessingNotification: handle 0x3b
2020.02.09 21:17:16 4: XiaomiBTLESens (Slaaptemp2) - Clear Grass Sens Handle0x3b
2020.02.09 21:17:16 5: Starting notify loop for Slaaptemp2, 3 event(s), first is batteryState: low
2020.02.09 21:17:16 5: End notify loop for Slaaptemp2
2020.02.09 21:17:16 4: XiaomiBTLESens (Slaaptemp2) - WriteReadings: Readings were written
2020.02.09 21:17:16 4: XiaomiBTLESens (Slaaptemp2) - Run CreateParamGatttool with mod: read
2020.02.09 21:17:16 4: BlockingCall (FHEM::XiaomiBTLESens::ExecGatttool_Run): created child (19723), uses telnetPort to connect back
2020.02.09 21:17:16 5: Starting notify loop for Slaaptemp2, 1 event(s), first is read sensor data
2020.02.09 21:17:16 5: End notify loop for Slaaptemp2
2020.02.09 21:17:16 5: XiaomiBTLESens (Slaaptemp2) - Read XiaomiBTLESens_ExecGatttool_Run Slaaptemp2|58:2D:34:10:C8:6B|read|0x1e
2020.02.09 21:17:16 4: Connection accepted from telnetPort_127.0.0.1_33226
2020.02.09 21:17:16 5: Cmd: >{BlockingRegisterTelnet($cl,9)}<
2020.02.09 21:17:16 5: XiaomiBTLESens (Slaaptemp2) - ExecGatttool_Run: Execute Command ps ax | grep -E [g]atttool -i hci0 -b 58:2D:34:10:C8:6B
2020.02.09 21:17:16 5: XiaomiBTLESens (Slaaptemp2) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 58:2D:34:10:C8:6B --char-read -a 0x1e 2>&1 and loop 0
2020.02.09 21:17:17 5: XiaomiBTLESens (Slaaptemp2) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,ac

2020.02.09 21:17:17 4: XiaomiBTLESens (Slaaptemp2) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,ac

2020.02.09 21:17:17 5: Cmd: >{BlockingStart('9')}<
2020.02.09 21:17:17 5: Cmd: >{FHEM::XiaomiBTLESens::ExecGatttool_Done('Slaaptemp2|58:2D:34:10:C8:6B|ok|read|0x1e|{"gtResult":"ac "}')}<
2020.02.09 21:17:17 5: XiaomiBTLESens (Slaaptemp2) - ExecGatttool_Done: gatttool return string: Slaaptemp2|58:2D:34:10:C8:6B|ok|read|0x1e|{"gtResult":"ac "}
2020.02.09 21:17:17 4: XiaomiBTLESens (Slaaptemp2) - ProcessingNotification
2020.02.09 21:17:17 4: XiaomiBTLESens (Slaaptemp2) - ProcessingNotification: handle 0x1e
2020.02.09 21:17:17 4: XiaomiBTLESens (Slaaptemp2) - Clear Grass Sens Handle0x1e
2020.02.09 21:17:17 1: PERL WARNING: substr outside of string at ./FHEM/74_XiaomiBTLESens.pm line 1140.
2020.02.09 21:17:17 3: eval: {FHEM::XiaomiBTLESens::ExecGatttool_Done('Slaaptemp2|58:2D:34:10:C8:6B|ok|read|0x1e|{"gtResult":"ac "}')}
2020.02.09 21:17:17 1: PERL WARNING: Use of uninitialized value in hex at ./FHEM/74_XiaomiBTLESens.pm line 1140.
2020.02.09 21:17:17 3: eval: {FHEM::XiaomiBTLESens::ExecGatttool_Done('Slaaptemp2|58:2D:34:10:C8:6B|ok|read|0x1e|{"gtResult":"ac "}')}
2020.02.09 21:17:17 1: PERL WARNING: substr outside of string at ./FHEM/74_XiaomiBTLESens.pm line 1141.
2020.02.09 21:17:17 3: eval: {FHEM::XiaomiBTLESens::ExecGatttool_Done('Slaaptemp2|58:2D:34:10:C8:6B|ok|read|0x1e|{"gtResult":"ac "}')}
2020.02.09 21:17:17 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/74_XiaomiBTLESens.pm line 1141.
2020.02.09 21:17:17 3: eval: {FHEM::XiaomiBTLESens::ExecGatttool_Done('Slaaptemp2|58:2D:34:10:C8:6B|ok|read|0x1e|{"gtResult":"ac "}')}
2020.02.09 21:17:17 5: Starting notify loop for Slaaptemp2, 3 event(s), first is temperature: 0
2020.02.09 21:17:17 5: End notify loop for Slaaptemp2
2020.02.09 21:17:17 4: XiaomiBTLESens (Slaaptemp2) - WriteReadings: Readings were written


Hallo

Ich habe das gleiche problemwie mein Vorredner mit meinem Cleargrass Sensor. Kriege leider nur Nullen.
Hier mal verbose 5

2020.04.04 13:25:13 4: XiaomiBTLESens (StuffTemHum) - Run CreateParamGatttool with mod: read
2020.04.04 13:25:13 5: XiaomiBTLESens (StuffTemHum) - Read XiaomiBTLESens_ExecGatttool_Run StuffTemHum|58:2D:34:10:45:30|read|0x1e
2020.04.04 13:25:13 4: XiaomiBTLESens (StuffTemHum) - stateRequestTimer: Call Request Timer
2020.04.04 13:25:13 5: XiaomiBTLESens (StuffTemHum) - ExecGatttool_Run: Execute Command ps ax | grep -E [g]atttool -i hci0 -b 58:2D:34:10:45:30
2020.04.04 13:25:13 5: XiaomiBTLESens (StuffTemHum) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 58:2D:34:10:45:30 --char-read -a 0x1e 2>&1 and loop 0
2020.04.04 13:25:20 5: XiaomiBTLESens (StuffTemHum) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,3d

2020.04.04 13:25:20 4: XiaomiBTLESens (StuffTemHum) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,3d

2020.04.04 13:25:20 5: XiaomiBTLESens (StuffTemHum) - ExecGatttool_Done: gatttool return string: StuffTemHum|58:2D:34:10:45:30|ok|read|0x1e|{"gtResult":"3d "}
2020.04.04 13:25:20 4: XiaomiBTLESens (StuffTemHum) - ProcessingNotification
2020.04.04 13:25:20 4: XiaomiBTLESens (StuffTemHum) - ProcessingNotification: handle 0x1e
2020.04.04 13:25:20 4: XiaomiBTLESens (StuffTemHum) - Clear Grass Sens Handle0x1e
2020.04.04 13:25:20 1: dewpoint_notify: humidity device StuffTemHum (humidity) invalid: 0
2020.04.04 13:25:20 4: XiaomiBTLESens (StuffTemHum) - WriteReadings: Readings were written


Und das list
Internals:
   BTMAC      58:2D:34:10:45:30
   DEF        58:2D:34:10:45:30
   FUUID      5d7a6444-f33f-6911-e514-9a8c304b409d2083
   FVERSION   74_XiaomiBTLESens.pm:v2.8.2-s20924/2020-01-10
   INTERVAL   300
   NAME       StuffTemHum
   NOTIFYDEV  global,StuffTemHum
   NR         296
   NTFY_ORDER 50-StuffTemHum
   STATE      T: 0 H: 0
   TYPE       XiaomiBTLESens
   VERSION    v2.8.2
   loglevel   4
   READINGS:
     2020-04-03 21:55:30   batteryPercent  128
     2020-04-03 21:55:30   batteryState    ok
     2019-09-12 17:29:51   firmware        CGG1
     2020-04-04 13:33:26   humidity        0
     2020-04-03 15:26:54   lastGattError   The BlockingCall Process terminated unexpectedly. Timedout
     2020-04-04 13:33:26   state           T: 0 H: 0
     2020-04-04 13:33:26   temperature     0
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1585943730.71768
     updateTimestampCallBattery 2020-04-03 21:55:30
Attributes:
   model      clearGrassSens
   room       XiaomiBTLESens
   verbose    5


Meine 3 alten Sensoren laufen ohne probleme

Danke schonmal
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 04 April 2020, 13:39:40
Das Gerät wird aktuell leider nicht unterstützt.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: trabatz am 04 April 2020, 14:02:45
Ach so.
Dachte es würde mittlerweile gehen. Mann kann es ja auch als Model auswählen. Ausserdem dachte ich t1me2die (ab #795) hätte es hingekriegt. Hab die Beiträge auch überflogen aber leider ist das ein bisschen zu kompliziert für mich.
Danke trotzdem
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 04 April 2020, 14:43:15
Zitat von: trabatz am 04 April 2020, 14:02:45
Ach so.
Dachte es würde mittlerweile gehen. Mann kann es ja auch als Model auswählen. Ausserdem dachte ich t1me2die (ab #795) hätte es hingekriegt. Hab die Beiträge auch überflogen aber leider ist das ein bisschen zu kompliziert für mich.
Danke trotzdem

Gerade mal gelesen. Sollte in der Tat gehen. Gib mal bitte ein list vom Device.
Möglich das Du wieder ein neueres Modell hast.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: trabatz am 04 April 2020, 16:23:03
List ist in meinem ersten Beitrag mit dabei
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Holzlenkrad am 09 April 2020, 07:27:05
Äh, ich habe heute das erste Mal den Sensor aus dem Bad wo er eigentlich hängt mit zum PC genommen und mal die Werte vom Display und den in FHEM angezeigten verglichen.

Und was soll ich sagen? Die sind unterschiedlich :D
Zwar nur um 1-2 Grad bzw. Prozent bei der rH aber immerhin. Liefern die Daten, die per BTLE kommen eine Checksumme mit?
Auf der anderen Seite ist der Unterschied zu gering, als dass die Daten wirklich fehlerhaft übertragen worden sein könnten.

Hat jemand schon ähnliche Beobachtungen gemacht?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: vuffiraa am 10 April 2020, 13:54:30
Zitat von: Holzlenkrad am 09 April 2020, 07:27:05
Äh, ich habe heute das erste Mal den Sensor aus dem Bad wo er eigentlich hängt mit zum PC genommen und mal die Werte vom Display und den in FHEM angezeigten verglichen.

Und was soll ich sagen? Die sind unterschiedlich :D
Zwar nur um 1-2 Grad bzw. Prozent bei der rH aber immerhin. Liefern die Daten, die per BTLE kommen eine Checksumme mit?
Auf der anderen Seite ist der Unterschied zu gering, als dass die Daten wirklich fehlerhaft übertragen worden sein könnten.

Hat jemand schon ähnliche Beobachtungen gemacht?

Deine Beobachtung kann ich bestätigen. Ist bei mir auch so. Die Unterschiede sind aber so gering, dass ich mir da keine Gedanken mache.

Es könnte vielleicht eine Art Glättung der Werte in der Anzeige sein, damit dort Sprünge durch Messungenauigkeiten nicht so groß auffallen. Nur so als Erklärungsversuch  ;)

Frohe Ostern!
VuffiRaa
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 10 April 2020, 14:07:46
Evtl. sind ja auch (bzw. bestimmt) die "Intervalle" der jeweiligen "Abfrage" anders.

Also der Wert im Display hat mal vor x Minuten gestimmt (als halt dafür "abgefragt" bzw. die Anzeige aktualisiert wurde) und dann wird halt irgendwann anders per BT abfegragt...

Habe sowas auch bei meinem CO2 Messer.
Der hat eine Anzeige und ich frage per USB ab...

Stimmt auch nur so in etwa.

Bzw. wenn ich bei einem "Display-Umschlag" eine USB-Abfrage "erzwinge", stimmt es überein...

Auch nur eine (weitere) Vermutung ;)

Gruß, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Holzlenkrad am 12 April 2020, 08:23:48
Zitat von: vuffiraa am 10 April 2020, 13:54:30
Es könnte vielleicht eine Art Glättung der Werte in der Anzeige sein, damit dort Sprünge durch Messungenauigkeiten nicht so groß auffallen. Nur so als Erklärungsversuch  ;)

Daran habe ich auch schon gedacht. Aber in meinen Augen dürften dann eher die Daten, die per Bluetooth kommen geglättet sein, so verrückt wie die Anzeige im LCD herum springt. Dass sich die Anzeige so nervös alle 500ms aktualisiert habe ich bei noch keinem anderen Gerät erlebt...

Aber es ist ja oft so, dass man absolut nicht nachvollziehen kann, was im Kopf einiger Software-Entwickler so vor sich geht :D
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: bartman121 am 14 April 2020, 18:11:29
Hallo,

ich frage etwa 10 Sensoren mit dem Modul ab und erhalte sporadisch diese Meldung im Log


Timeout for FHEM::XiaomiBTLESens::ExecGatttool_Run reached, terminated process 3786


Mir ist schon klar was diese Meldung bedeutet, der Empfang mancher Sensoren klappt manchmal einfach nicht.

Gibt es eine Möglichkeit diese Meldung "auszublenden"?

Ich habe es schon im Device selbst mit "verbose 0" versucht, leider erfolglos. Verbose 0 im global-Device möchte ich jedoch nicht machen.

Grüße

Andreas
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: baum am 21 April 2020, 19:33:27
Zitat von: CoolTux am 29 Februar 2020, 15:47:05
Das Teil kam vor 2 Wochen an, leider hatte ich noch keine Zeit weiter gefunden.

Hier hat jemand demonstriert, wie die Werte mit dem gatttool ausgelesen werden können:
http://www.d0wn.com/using-bash-and-gatttool-to-get-readings-from-xiaomi-mijia-lywsd03mmc-temperature-humidity-sensor/
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 21 April 2020, 19:43:21
Zitat von: baum am 21 April 2020, 19:33:27
Hier hat jemand demonstriert, wie die Werte mit dem gatttool ausgelesen werden können:
http://www.d0wn.com/using-bash-and-gatttool-to-get-readings-from-xiaomi-mijia-lywsd03mmc-temperature-humidity-sensor/

Perfekt. Ich denke damit kann ich was anfangen. Ich setze mich am WE da mal ran.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: jwk am 22 April 2020, 18:04:28
Zitat von: t1me2die am 18 Oktober 2019, 09:56:06
Moin,

wieder was dazu gelernt  :)
Also das "Modul" funktioniert soweit, mehr oder weniger  ;D
Wobei mir das auslesen der Werte über bluetoothctl wirklich gar nicht zusagt.
Die Uhrzeit kann ich "komfortable" per gatttool und einem handle auslesen.
Solange ich aber nicht weiß, ob ich noch auf einen anderen Weg an meine Werte komme, muss das so erstmal laufen.
Anfangs stand ich auch vor dem Problem, dass der User fhem keine Berechtigung hatte um "bluetoothctl" auszuführen...
Nun muss ich aber erstmal das Modul aufräumen. Viele Log-Meldungen habe ich mir gebastelt und an einigen Stellen weiß ich schon selber, dass das alles nicht ganz rund ist.
Ich bin aber immer etwas ungeduldig und möchte schnell irgendein Resultat sehen, dass verleitet leider zu "dummen" Quellcode... Muss man üben  :)
Ansonsten muss ich mal wirklich das DevelopmentModuleIntro loben, ziemlich tolle Funktionen, die man Standardmäßig nutzen kann!


Internals:
   BTMAC      E7:2E:00:E2:74:D6
   CFGFN     
   DEF        E7:2E:00:E2:74:D6
   FUUID      5da96bdb-f33f-5bc8-2f02-2c9317f0abd6372b
   INTERVAL   300
   NAME       wz_Xiaomi_eInk
   NOTIFYDEV  global,wz_Xiaomi_eInk
   NR         2055
   NTFY_ORDER 50-wz_Xiaomi_eInk
   STATE      T: 18.8 H: 74
   TYPE       XiaomiEInk
   VERSION    v0.0.2
   loglevel   4
   READINGS:
     2019-10-18 09:43:08   clock           18.10.2019-09.43.10
     2019-10-18 09:44:59   humidity        74
     2019-10-18 09:44:59   job             done
     2019-10-18 09:38:52   model           LYWSD02
     2019-10-18 09:44:59   state           T: 18.8 H: 74
     2019-10-18 09:40:05   temperature     18.8
   helper:
Attributes:
   room       XiaomiEInk


PS.: Falls jemand einen Xiaomi LYWSD02 (eInk Display mit Humidity + Temp + Clock) haben sollte und das Modul testen möchte, kann er sich gerne bei mir melden  :)

Gruß
Mathze
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: jwk am 22 April 2020, 18:08:04
Ich wäre an deiner Entwicklung interessiert, da ich heute ein LYWSD02MMC erhalten habe.
Gruß jwk
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: HoTi am 23 April 2020, 09:40:08
Hallo zusammen,

bei mir haben 4 Sensoren wunderbar Funktioniert, nun bekomme ich aber Fehler. Woran könnte das liegen?


2020.04.23 09:33:05 4: XiaomiBTLESens (SEN_li_Gewaechshaus) - Run CreateParamGatttool with mod: read
2020.04.23 09:33:05 5: XiaomiBTLESens (SEN_li_Gewaechshaus) - Read XiaomiBTLESens_ExecGatttool_Run SEN_li_Gewaechshaus|C4:7C:8D:66:A6:6E|read|0x38
2020.04.23 09:33:05 5: XiaomiBTLESens (SEN_li_Gewaechshaus) - ExecGatttool_Run: Execute Command ps ax | grep -E [g]atttool -i hci0 -b C4:7C:8D:66:A6:6E
2020.04.23 09:33:05 5: XiaomiBTLESens (SEN_li_Gewaechshaus) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:A6:6E --char-read -a 0x38 2>&1 and loop 0
2020.04.23 09:33:11 5: XiaomiBTLESens (SEN_li_Gewaechshaus) - ExecGatttool_Run: gatttool loop result connect error,Function not implemented (38)

2020.04.23 09:33:11 5: XiaomiBTLESens (SEN_li_Gewaechshaus) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:A6:6E --char-read -a 0x38 2>&1 and loop 1
2020.04.23 09:33:18 5: XiaomiBTLESens (SEN_li_Gewaechshaus) - ExecGatttool_Run: gatttool loop result connect error,Function not implemented (38)

2020.04.23 09:33:18 5: XiaomiBTLESens (SEN_li_Gewaechshaus) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:A6:6E --char-read -a 0x38 2>&1 and loop 2
2020.04.23 09:33:20 5: XiaomiBTLESens (SEN_li_Gewaechshaus) - ExecGatttool_Run: gatttool loop result connect error,Function not implemented (38)

2020.04.23 09:33:20 5: XiaomiBTLESens (SEN_li_Gewaechshaus) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:A6:6E --char-read -a 0x38 2>&1 and loop 3
2020.04.23 09:33:22 5: XiaomiBTLESens (SEN_li_Gewaechshaus) - ExecGatttool_Run: gatttool loop result connect error,Function not implemented (38)

2020.04.23 09:33:22 5: XiaomiBTLESens (SEN_li_Gewaechshaus) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b C4:7C:8D:66:A6:6E --char-read -a 0x38 2>&1 and loop 4
2020.04.23 09:33:25 5: XiaomiBTLESens (SEN_li_Gewaechshaus) - ExecGatttool_Run: gatttool loop result connect error,Function not implemented (38)

2020.04.23 09:33:25 3: XiaomiBTLESens (SEN_li_Gewaechshaus) - ExecGatttool_Run: errorcode: "1", ErrorString: "connect error: Function not implemented (38)
"
2020.04.23 09:33:25 4: XiaomiBTLESens (SEN_li_Gewaechshaus) - ExecGatttool_Run: gatttool result connect error,Function not implemented (38)

2020.04.23 09:33:25 5: XiaomiBTLESens (SEN_li_Gewaechshaus) - ExecGatttool_Done: gatttool return string: SEN_li_Gewaechshaus|C4:7C:8D:66:A6:6E|error|read|0x38|{"gtResult":"Function not implemented (38)"}
2020.04.23 09:33:25 4: XiaomiBTLESens (SEN_li_Gewaechshaus) - ProcessingErrors
2020.04.23 09:33:25 4: XiaomiBTLESens (SEN_li_Gewaechshaus) - WriteReadings: Readings were written

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 23 April 2020, 10:24:03
Wie alt ist die Batterie?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: HoTi am 23 April 2020, 10:39:09
Die Sensoren sind gerade 1 Woche alt! Und bei einem musste ich Batterie gleich am Anfang tauschen! Also die sollten klein Problem haben.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 23 April 2020, 10:52:18
Ich habe diese (glaube ich, könnte in alten Logs schauen, habe meinen "Garten" grad noch nicht "aktiv" ;)  ) und auch andere Meldungen 103, 101 u.ä. wenn der Empfang mal schlecht ist...

Meist aber nur zwischendrin mal der eine oder andere Sensor, von daher habe ich das (bislang) immer "ignoriert"...
...schön wäre es, wenn man diese Meldung mit verbose abstellen könnte (aber wie geschrieben: nicht wirklich schlimm [bei mir])...

Wie sieht es denn mit der "Infrastruktur" aus!?

Wieviele Sensoren!?

Wie angebunden, also über einen PI mit dessen "integriertem" BT!?

Wie weit weg!?

Gruß, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: HoTi am 23 April 2020, 11:42:03
Also beim Scan findet er alle: bricht dann aber ab.


pi@garten:~ $ sudo hcitool lescan
LE Scan ...
F8:04:xx:xx:xx:xx (unknown)
42:8B:(unknown)
79:89: (unknown)
47:5B: (unknown)
80:EA: (unknown)
64:7C: (unknown)
6E:5D: (unknown)
F9:F9: (unknown)
CC:6E: (unknown)
C4:7C: (unknown)
C4:7C: (unknown)
C4:7C: (unknown)
Disable scan failed: Input/output error
pi@garten:~ $


ich habe am Wochenende eine externe Antenne angelötet. Das hat bis Dienstag Abend wunderbar geklappt! Das war nötig weil einer von 4 nicht erreichbar war, mit der Antenne war alles schön.

Viele Grüße
Tim

Edit:

4 Sensoren zwischen 1m und 4m weit weg! im Gewächshaus. Pi3 in Gartenhaus. Dazwischen Holz und Plexiglas.
98% SOC bei allen
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 23 April 2020, 12:22:39
Bei mir ist es ein PI Zero (ohne irgendwas zusätzliche Antenne etc.) Abstand zu 10 Sensoren auch so zwischen 1,5 und 4-5m...

Und wie geschrieben habe ich solche Meldungen auch ab und an...
...aber eben immer wieder mal ein anderer Sensor und vielleicht so bei jedem 10ten Zugriff oder so...

War letztes Jahr (und das Jahr davor), da weiß ich das nicht mehr so genau, kann auch weniger gewesen sein.

Aber da sich die Feuchtigkeit ja nicht schlagartig ändert war es mir egal.

Abfrage: Standardintervall Modul...

Gruß, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: HoTi am 23 April 2020, 12:52:38
bei mir ist das durchgehend!

Es geht leider nix mehr. Mit dem Handy geht alles :-(
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 23 April 2020, 13:29:35
Zitat von: HoTi am 23 April 2020, 12:52:38
bei mir ist das durchgehend!

Es geht leider nix mehr. Mit dem Handy geht alles :-(

Ok, dann ist es (verm.) was anderes...
...bzw.: ich verwende mit dem Handy gar nix! (Wozu auch!?)

Nutzt du das Handy zeitgleich!?

Das wird (verm.) nicht gehen...

Gruß, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 10 Mai 2020, 15:10:58
Zitat von: CoolTux am 21 April 2020, 19:43:21
Perfekt. Ich denke damit kann ich was anfangen. Ich setze mich am WE da mal ran.

Holger S hat sich die Mühe gemacht und mir einen Patch für das Device gegeben.
Da ich aktuell noch nicht weiß wie viel ich sagen darf, nenne ich ihn erstmal nur User.

Das Ergebnis kann hier im Devel Branch getestet werden
https://git-tuxnet.ddns.net/FHEM/mod-XiaomiBTLESens


Grüße

Und dickes fettes Lob und Dank an den User!!!
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 11 Mai 2020, 10:59:41
Wie schaut es aus? Konnte schon jemand mit dem neuen Sensor was testen?


Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Mr-Bean am 11 Mai 2020, 14:08:35
Super das er die Zeit gefunden hat. Das aktualisierte Modul habe ich eingebunden.

Zwei Sensoren sind bei mir aktiv. Eins zeigt die Temperatur und Feuchtigkeit an. Das andere nix.

Dieses steht in den Readings
lastGattError
The BlockingCall Process terminated unexpectedly. Timedout
2020-05-11 14:05:50

Zusätzlich wird das Logfile mit folgendem vollgeschrieben
2020.05.11 14:05:50 3: XiaomiBTLESens (temp1) - ExecGatttool_Run: another gatttool process is running. waiting...

Kann erst heute Abend weiter testen...
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Headhunter667 am 11 Mai 2020, 20:10:16
Hallo,

danke für das Update!

Hier sind auch zwei LYWSD03MMC im Einsatz.
Häufig, wenn ich erst das Eine, dann das Andere Thermometer abfrage kommt ein "error" zurück.
In Summe liefern aber beide Sensoren Werte für Temperatur und Feuchtigkeit.

Im Logfile finde ich das aber leider nicht - ich lese mich mal dazu ein. Ist das erste Mal, dass ich ein Modul selbst eingespielt habe.
Wenn ich das richtig verstanden habe, senden die Thermometer nach dem Trigger einfach zyklisch ihre Messwerte, oder? Kann es daran liegen, dass die Werte ab und zu nicht kommen?
Außerdem scheint die Reichweite der Dinger - naja - begrenzt zu sein...

Grüße und nochmal danke für die Arbeit
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 11 Mai 2020, 20:15:16
Zitat von: Headhunter667 am 11 Mai 2020, 20:10:16
Hallo,

danke für das Update!

Hier sind auch zwei LYWSD03MMC im Einsatz.
Häufig, wenn ich erst das Eine, dann das Andere Thermometer abfrage kommt ein "error" zurück.
In Summe liefern aber beide Sensoren Werte für Temperatur und Feuchtigkeit.

Im Logfile finde ich das aber leider nicht - ich lese mich mal dazu ein. Ist das erste Mal, dass ich ein Modul selbst eingespielt habe.
Wenn ich das richtig verstanden habe, senden die Thermometer nach dem Trigger einfach zyklisch ihre Messwerte, oder? Kann es daran liegen, dass die Werte ab und zu nicht kommen?
Außerdem scheint die Reichweite der Dinger - naja - begrenzt zu sein...

Grüße und nochmal danke für die Arbeit

Nein die senden nicht, sondern das Modul ruft zyklisch die Daten des Sensors ab.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Mr-Bean am 11 Mai 2020, 20:31:39
Vorhin habe ich den zweiten wieder entfernt, da die Log-Datei vollgeschrieben wurde.

Mit einem Modul erscheint öfters eine Fehlermmeldung die nach einer Zeit wieder verschwindet. Danach wird Temp. und Feucht. aktualisiert.

Das steht in der Log:
2020.05.11 14:45:07 3: XiaomiBTLESens (temp2) - ExecGatttool_Run: errorcode: "1", ErrorString: "connect error: Transport endpoint is not connected (107)
"
2020.05.11 16:39:16 3: XiaomiBTLESens (temp2) - ExecGatttool_Run: errorcode: "1", ErrorString: "connect: Device or resource busy (16)
"
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 11 Mai 2020, 20:34:35
Also voll schreiben ist ja relativ, er macht das ganze ja nur alle INTERVALL.
Aber ja, die Teile sind bisschen Kacke. Ich habe bei mir auch Aussetzer. Aber da kann ich leider nichts machen. Kann auch am gatttool liegen. Schwer zu sagen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Headhunter667 am 11 Mai 2020, 21:13:11
Nicht dass das für mich wichtig wäre, aber ist mir beim "spielen" aufgefallen: Der devicename scheint sich nicht schreiben zu lassen:

2020.05.11 21:10:46 4: XiaomiBTLESens (BTtemp2) - Run CreateParamGatttool with mod: write
2020.05.11 21:10:46 5: XiaomiBTLESens (BTtemp2) - Write XiaomiBTLESens_ExecGatttool_Run BTtemp2|A4:C1:38:B2:63:80|write|0x3|425454454d5032
2020.05.11 21:10:46 5: XiaomiBTLESens (BTtemp2) - ExecGatttool_Run: Execute Command ps ax | grep -E [g]atttool -i hci0 -b A4:C1:38:B2:63:80
2020.05.11 21:10:46 5: XiaomiBTLESens (BTtemp2) - ExecGatttool_Run: call gatttool with command: timeout 10 gatttool -i hci0 -b A4:C1:38:B2:63:80 --char-write-req -a 0x3 -n 425454454d5032 --listen 2>&1 and loop 0
2020.05.11 21:10:56 5: XiaomiBTLESens (BTtemp2) - ExecGatttool_Run: gatttool loop result Characteristic Write Request failed,Attribute can't be written
Notification handle = 0x0036 value,2e 09 2a 44 0c

2020.05.11 21:10:56 4: XiaomiBTLESens (BTtemp2) - ExecGatttool_Run: gatttool result Characteristic Write Request failed,Attribute can't be written
Notification handle = 0x0036 value,2e 09 2a 44 0c

2020.05.11 21:10:56 5: XiaomiBTLESens (BTtemp2) - ExecGatttool_Done: gatttool return string: BTtemp2|A4:C1:38:B2:63:80|error|write|0x3|{"gtResult":"Attribute can't be written"}
2020.05.11 21:10:56 4: XiaomiBTLESens (BTtemp2) - ProcessingErrors
2020.05.11 21:10:56 4: XiaomiBTLESens (BTtemp2) - WriteReadings: Readings were written

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Holger S am 11 Mai 2020, 21:24:50
Also ich habe keine Logeinträge. Set devicename funktioniert noch nicht. Habe die Adresse nicht herausgefunden.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Headhunter667 am 12 Mai 2020, 00:10:51
"connect error: Transport endpoint is not connected (107)" kommt bei mir sporadisch wenn ich das Thermometer zu weit weg vom Raspi platziere - direkt daneben praktisch nicht. Das meinte ich mit begrenzter Reichweite: 3m und eine Betonwand gehen, 6m nicht zuverlässig.

Gehe jetzt ins Bett und habe zwei Logfiles voller Temperaturwerte - danke nochmal.
Morgen mache ich Temperaturkurven draus  8)
Gute Nacht!
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Kunibernd am 29 Mai 2020, 10:26:42
Guten Morgen,

bei mir lief das Modul ca. einen halben Tag, so wie es sollte. Doch nun bekomme ich einen "Error" zurück. Da ich dies auch ähnlich bei meinem Bewässerungscomputer GFPROBT beobachte, bin ich mir nicht sicher, ob es am FHEM oder dem Bluetooth meines Raspi 3+ liegt. Ich ein Wiedereinsteiger in FHEM und leider konnte ich nichts weiter in anderen Foren dazu finden. Ich würde mich freuen, wenn mir die Experten etwas auf die Sprünge helfen könnten.
Hier ist der Log:
2020.05.29 09:15:52 4: XiaomiBTLESens (Gartensensor) - Run CreateParamGatttool with mod: read
2020.05.29 09:15:52 4: BlockingCall (FHEM::XiaomiBTLESens::ExecGatttool_Run): created child (18247), uses telnetForBlockingFn_1590696078 to connect back
2020.05.29 09:15:52 5: Starting notify loop for Gartensensor, 1 event(s), first is read sensor data
2020.05.29 09:15:52 5: End notify loop for Gartensensor
2020.05.29 09:15:52 5: XiaomiBTLESens (Gartensensor) - Read XiaomiBTLESens_ExecGatttool_Run Gartensensor|80:EA:CA:89:48:DF|read|0x38
2020.05.29 09:15:52 4: XiaomiBTLESens (Gartensensor) - stateRequestTimer: Call Request Timer
2020.05.29 09:15:52 4: Connection accepted from telnetForBlockingFn_1590696078_127.0.0.1_44994
2020.05.29 09:15:52 5: Cmd: >{BlockingRegisterTelnet($cl,2262)}<
2020.05.29 09:15:52 5: XiaomiBTLESens (Gartensensor) - ExecGatttool_Run: Execute Command ps ax | grep -E [g]atttool -i hci0 -b 80:EA:CA:89:48:DF
2020.05.29 09:15:52 5: XiaomiBTLESens (Gartensensor) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 80:EA:CA:89:48:DF --char-read -a 0x38 2>&1 and loop 0
2020.05.29 09:15:52 5: XiaomiBTLESens (Gartensensor) - ExecGatttool_Run: gatttool loop result connect error,Device or resource busy (16)

2020.05.29 09:15:52 5: XiaomiBTLESens (Gartensensor) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 80:EA:CA:89:48:DF --char-read -a 0x38 2>&1 and loop 1
2020.05.29 09:15:52 5: XiaomiBTLESens (Gartensensor) - ExecGatttool_Run: gatttool loop result connect error,Device or resource busy (16)

2020.05.29 09:15:52 5: XiaomiBTLESens (Gartensensor) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 80:EA:CA:89:48:DF --char-read -a 0x38 2>&1 and loop 2
2020.05.29 09:15:52 5: XiaomiBTLESens (Gartensensor) - ExecGatttool_Run: gatttool loop result connect error,Device or resource busy (16)

2020.05.29 09:15:52 5: XiaomiBTLESens (Gartensensor) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 80:EA:CA:89:48:DF --char-read -a 0x38 2>&1 and loop 3
2020.05.29 09:15:52 5: XiaomiBTLESens (Gartensensor) - ExecGatttool_Run: gatttool loop result connect error,Device or resource busy (16)

2020.05.29 09:15:52 5: XiaomiBTLESens (Gartensensor) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 80:EA:CA:89:48:DF --char-read -a 0x38 2>&1 and loop 4
2020.05.29 09:15:53 5: XiaomiBTLESens (Gartensensor) - ExecGatttool_Run: gatttool loop result connect error,Device or resource busy (16)

2020.05.29 09:15:53 3: XiaomiBTLESens (Gartensensor) - ExecGatttool_Run: errorcode: "1", ErrorString: "connect error: Device or resource busy (16)
"
2020.05.29 09:15:53 4: XiaomiBTLESens (Gartensensor) - ExecGatttool_Run: gatttool result connect error,Device or resource busy (16)

2020.05.29 09:15:53 5: Cmd: >{BlockingStart('2262')}<
2020.05.29 09:15:53 5: Cmd: >{FHEM::XiaomiBTLESens::ExecGatttool_Done('Gartensensor|80:EA:CA:89:48:DF|error|read|0x38|{"gtResult":"Device or resource busy (16)"}')}<
2020.05.29 09:15:53 5: XiaomiBTLESens (Gartensensor) - ExecGatttool_Done: gatttool return string: Gartensensor|80:EA:CA:89:48:DF|error|read|0x38|{"gtResult":"Device or resource busy (16)"}
2020.05.29 09:15:53 4: XiaomiBTLESens (Gartensensor) - ProcessingErrors
2020.05.29 09:15:53 5: Starting notify loop for Gartensensor, 2 event(s), first is lastGattError: Device or resource busy (16)
2020.05.29 09:15:53 5: End notify loop for Gartensensor
2020.05.29 09:15:53 4: XiaomiBTLESens (Gartensensor) - WriteReadings: Readings were written


Lässt sich daraus eine mögliche Ursache ableiten?

Danke für die Unterstützung

Heiko
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 29 Mai 2020, 10:45:00
Ressource or Device Busy,

Dazu findet man im Internet ein paar Tips. Unter anderem das man den BT Stack neu startet.

sudo hciconfig hci0 reset
sudo invoke-rc.d bluetooth restart
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Kunibernd am 29 Mai 2020, 13:52:00
Vielen Dank - das hat temporär funktioniert. Und ja, ich musser vor dem Foren-Eintrag noch besser recherchieren  ;)
Da sich der Stack scheinbar immer wieder mal aufhängt, werde ich mal nach einer Möglichkeit suchen, dies automatisch zu erkennen und diesen dann automatisch zu resetten.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 29 Mai 2020, 14:06:49
Zitat von: Kunibernd am 29 Mai 2020, 13:52:00
Vielen Dank - das hat temporär funktioniert. Und ja, ich musser vor dem Foren-Eintrag noch besser recherchieren  ;)
Da sich der Stack scheinbar immer wieder mal aufhängt, werde ich mal nach einer Möglichkeit suchen, dies automatisch zu erkennen und diesen dann automatisch zu resetten.

Oder einfach für 5 Euro einen USB BT Stick holen  ;D
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Headhunter667 am 01 Juni 2020, 19:29:24
An dem Punkt stehe ich auch gerade.
Ohne das jetzt zur Kaufberatung ausarten zu lassen: Welcher BT-Stick funktioniert bei Euch?
Da gibt es ja doch ein paar...  ;)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: tomcat.x am 09 Juni 2020, 18:08:46
Frage zu Batterielaufzeit und -status bei Flower Care Sensoren ...

Vor zwei Wochen habe ich mich endlich mal daran gemacht, die Sensoren über einen Raspi Zero W anzubinden. Weiß gar nicht, warum ich das so lange vor mir hergeschoben habe, ging dann doch relativ einfach und schnell.

Jetzt habe ich das Problem, dass ich ständig Batteriewarnungen bekomme (ist bei mir automatisch bei allen Geräten mit Reading batteryState so). Prozentwerte lagen unter 10, die entnommene und geprüfte Batterie hatte aber 80, war auch noch nicht sehr lange drin. Nach dem Wiedereinlegen wurde dann beim nächsten Update über 40 angezeigt, danach aber wieder unter 10. Das hat natürlich nichts mit dem Modul zu tun, aber in fhem muss ich im Gegensatz zur Android App natürlich irgendwie damit umgehen. Außerdem stand hier im Forum schon mal, dass der Dünger-Wert unzuverlässig ist, bei der Helligkeit konnte ich das selbst feststellen (bei uns ist es demnach nachts manchmal heller als tagsüber).  Die Feuchtigkeit wäre mir das wichtigste, aber Frage ist halt, ob dieser Wert als einziger zuverlässig ist.

Dazu 2 Fragen:
- Habt ihr dieses Problem auch? Wie geht Ihr damit um? Ich könnte den Batteriestatus einfach ignorieren und die Sensoren Beispielsweise mit readingsWatcher überwachen. Optimal ist das aber halt nicht, besonders weil man dann erst bei komplett leerer Batterie etwas davon mitbekommt.
- Und wie oft fragt Ihr die Sensoren ab bzw. welche Erfahrungen habt Ihr in diesem Zusammenhang mit der Laufzeit der Batterien gemacht?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 09 Juni 2020, 20:26:22
Kann ich so nicht bestätigen. Batterien müssen aber gut sein, sonst brechen die zusammen. Nährstoffwerte sind fürn A. aber gut braucht kein Mensch. Helligkeit passt einigermaßen nur da der Sensor eh unter Blättern ist.... In der Nacht heller, neeee nur wenn der Mond drauf scheint. Der Rest passt bei mir. Einzig, dass die Bodenfeuchtigkeit bei 40% auf 20% springt finde ich nicht so toll. Nach einem Batteriewechsel geht es eine Zeit lang und dann wieder nicht.

Also das gelbe vom Ei sind die Dinger nicht aber im Prinzip machen sie was sie sollen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: tomcat.x am 10 Juni 2020, 13:07:38
@ext23:

Danke für die Antwort. Meine Batterien sind von Varta, bei anderen Geräten habe ich kein Problem damit. Ich bekomme jetzt noch weitere Sensoren und vergleiche dann mal. Ja, die Helligkeit macht wegen der Verdeckung durch die Blätter keinen Sinn, wie Du schon schreibst. Dünger (Leitfähigkeit) verändert sich mit der Feuchtigkeit beim Gießen, was ja richtig ist, aber eine Auswertung der Werte schon mal prinzipbedingt erschwert, selbst wenn sie korrekt wären. Die Sprünge bei der Feuchtigkeit habe ich auch, allerdings von ca. 50 auf 30. Nach oben beim Gießen sind die ja klar, aber nach unten schon komisch. Da hätte ich eher einen kontinuierliche Verlauf erwartet.

Hast Du das "interval" vergrößert oder fragst Du wirklich ganz häufig ab?

Edit:
Die Theorie "Dünger (Leitfähigkeit) verändert sich mit der Feuchtigkeit" stimmt auch nur beim Gießen. Bei den Sprüngen nach unten bei der Feuchtigkeit, ändert sich da nichts.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 10 Juni 2020, 19:02:51
Bei mir sieht das so aus:

https://forum.fhem.de/index.php/topic,82572.msg949434.html#msg949434

Und abfragen tu ich glaube alle 15 min.

/Daniel
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 10 Juni 2020, 19:27:10
Also ich hab meine ja schon eine Weile...

Und (noch) keinen FW-Update gemacht.
Habe irgendwas 2.6.2 bzw. 2.7.0

Ich kann weder Sprünge feststellen noch bei den Batteriewerten klagen.

Sprünge habe ich aber evtl. verm. wegen meinem "kontinuierlichen" Bewässerungssystem.
Es ist "physiklaisch", fhem und die Sensoren nehme ich nur: weil's geht ;)
(und wegen Neugierde ;)  )

Ich nutze Blumat, das sind Tonkegel, die bei Trockenheit bzw. wenn sie trocken(er) werden per "Unterdruck" ein "Ventil" öffnen und dann eben Wasser "fließen" (eher tröpfeln) lassen, bis eben wieder feucht genug...

Wie feucht feucht genug ist kann man über eine "Einstellschraube" einstellen...
...Wasser kommt aus einem Tank auf dem Balkon, dessen Wasserstand "überwacht" wird und eine Nachricht schickt, wenn es Zeit wird nachzufüllen (150L ca. 2-3x pro Jahr [Sommer] füllen)...

Die Helligkeitswerte vom ext23 Plot kommen mir etwas (sehr) niedrig vor.
Sonnenlicht etc. ist norm. schon sehr hell ;)

Habe das System nun schon ca. 4 Jahre und die Sensoren jetzt das dritte Jahr...
...dieses Jahr (dank Corona) nocht nicht im Einsatz, bin ja da und kann gießen :)

Anbei Plots vom letzten Jahr...

EDIT: Abfrageintervall ist "Modul-Standard"...

Gruß, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 10 Juni 2020, 20:00:15
Das sind Zimmerpflanzen bei mir, Sonne ist da nicht ;-)

/Daniel
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 10 Juni 2020, 20:30:18
Zitat von: ext23 am 10 Juni 2020, 20:00:15
Das sind Zimmerpflanzen bei mir, Sonne ist da nicht ;-)

/Daniel

Ah, Höhlenbewohner  ;D ;)

Gruß, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ext23 am 10 Juni 2020, 21:12:30
So zu sagen ja, Kellerkind ^^
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Teamdrachen am 19 Juni 2020, 19:49:52
Inzwischen gibt es ja eine neue Version der Temp/feuchte Sensoren.

Leider wollen die bei mir nicht. 
setstate Schlafz_Sensor write sensor data
setstate Schlafz_Sensor 2020-06-19 19:45:33 batteryPercent 5.6809773020555e+35
setstate Schlafz_Sensor 2020-06-19 19:45:33 batteryState ok
setstate Schlafz_Sensor 2020-06-19 19:40:51 firmware Time
setstate Schlafz_Sensor 2020-06-19 19:48:36 lastGattError Attribute can't be written
setstate Schlafz_Sensor 2020-06-19 19:48:36 state write sensor data

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: bicmac am 20 Juni 2020, 18:38:31
hi,
ich habe mir auch einen neuen Sensor gekauft. Am Anfang gibg der auch ohne Probleme an meinem PI im Garten nur jetzt liefert er nur noch

Function not implemented (38)

Auch nach reboot des servers oder reset des BT Stack. Hab langsam keine Idee mehr. Am Anfang ging er ja für ca einen Tag.



2020.06.20 18:29:37 5: XiaomiBTLESens (feuchtesensor_rasen_vorn) - Read XiaomiBTLESens_ExecGatttool_Run feuchtesensor_rasen_vorn|80:EA:CA:89:69:F1|read|0x38
2020.06.20 18:29:37 5: XiaomiBTLESens (feuchtesensor_rasen_vorn) - ExecGatttool_Run: Execute Command ps ax | grep -E [g]atttool -i hci0 -b 80:EA:CA:89:69:F1
2020.06.20 18:29:37 5: XiaomiBTLESens (feuchtesensor_rasen_vorn) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 80:EA:CA:89:69:F1 --char-read -a 0x38 2>&1 and loop 0
2020.06.20 18:29:38 5: XiaomiBTLESens (feuchtesensor_rasen_vorn) - ExecGatttool_Run: gatttool loop result connect error,Function not implemented (38)

2020.06.20 18:29:38 5: XiaomiBTLESens (feuchtesensor_rasen_vorn) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 80:EA:CA:89:69:F1 --char-read -a 0x38 2>&1 and loop 1
2020.06.20 18:29:44 5: XiaomiBTLESens (feuchtesensor_rasen_vorn) - ExecGatttool_Run: gatttool loop result connect error,Function not implemented (38)

2020.06.20 18:29:44 5: XiaomiBTLESens (feuchtesensor_rasen_vorn) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 80:EA:CA:89:69:F1 --char-read -a 0x38 2>&1 and loop 2
2020.06.20 18:29:48 5: XiaomiBTLESens (feuchtesensor_rasen_vorn) - ExecGatttool_Run: gatttool loop result connect error,Function not implemented (38)

2020.06.20 18:29:48 5: XiaomiBTLESens (feuchtesensor_rasen_vorn) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 80:EA:CA:89:69:F1 --char-read -a 0x38 2>&1 and loop 3
2020.06.20 18:29:52 5: XiaomiBTLESens (feuchtesensor_rasen_vorn) - ExecGatttool_Run: gatttool loop result connect error,Function not implemented (38)

2020.06.20 18:29:52 5: XiaomiBTLESens (feuchtesensor_rasen_vorn) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 80:EA:CA:89:69:F1 --char-read -a 0x38 2>&1 and loop 4
2020.06.20 18:29:57 5: XiaomiBTLESens (feuchtesensor_rasen_vorn) - ExecGatttool_Run: gatttool loop result connect error,Function not implemented (38)

2020.06.20 18:29:57 3: XiaomiBTLESens (feuchtesensor_rasen_vorn) - ExecGatttool_Run: errorcode: "1", ErrorString: "connect error: Function not implemented (38)
"
2020.06.20 18:29:57 4: XiaomiBTLESens (feuchtesensor_rasen_vorn) - ExecGatttool_Run: gatttool result connect error,Function not implemented (38)

2020.06.20 18:29:58 5: XiaomiBTLESens (feuchtesensor_rasen_vorn) - ExecGatttool_Done: gatttool return string: feuchtesensor_rasen_vorn|80:EA:CA:89:69:F1|error|read|0x38|{"gtResult":"Function not implemented (38)"}
2020.06.20 18:29:58 4: XiaomiBTLESens (feuchtesensor_rasen_vorn) - ProcessingErrors
2020.06.20 18:29:58 4: XiaomiBTLESens (feuchtesensor_rasen_vorn) - WriteReadings: Readings were written
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Rosti am 12 Juli 2020, 16:40:48
Hi,

Habe jetzt die beiden LYWSD02 und  LYWSD03 versucht einzubinden.

beim LYWSD02 scheiterts komplett, LYWSD03 holt die Daten mit dem ClearGrass Modul, scheint aber falsch zu parsen, liefert: T: 0 H: 337.1


2020.07.12 16:36:38 4: XiaomiBTLESens (Temp1) - Run CreateParamGatttool with mod: read
2020.07.12 16:36:38 5: XiaomiBTLESens (Temp1) - Read XiaomiBTLESens_ExecGatttool_Run Temp1|A4:C1:38:EC:6E:AF|read|0x1e
2020.07.12 16:36:38 4: XiaomiBTLESens (Temp1) - stateRequestTimer: Call Request Timer
2020.07.12 16:36:38 5: XiaomiBTLESens (Temp1) - ExecGatttool_Run: Execute Command ps ax | grep -E [g]atttool -i hci0 -b A4:C1:38:EC:6E:AF
2020.07.12 16:36:38 5: XiaomiBTLESens (Temp1) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b A4:C1:38:EC:6E:AF --char-read -a 0x1e 2>&1 and loop 0
2020.07.12 16:36:44 5: XiaomiBTLESens (Temp1) - ExecGatttool_Run: gatttool loop result connect error,Transport endpoint is not connected (107)

2020.07.12 16:36:44 5: XiaomiBTLESens (Temp1) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b A4:C1:38:EC:6E:AF --char-read -a 0x1e 2>&1 and loop 1
2020.07.12 16:36:49 5: XiaomiBTLESens (Temp1) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,06 1f 00 12 2b 0d 0c 0b 0a 09 08 07 06 05 04 03 02 01 00

2020.07.12 16:36:49 4: XiaomiBTLESens (Temp1) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,06 1f 00 12 2b 0d 0c 0b 0a 09 08 07 06 05 04 03 02 01 00

2020.07.12 16:36:49 5: XiaomiBTLESens (Temp1) - ExecGatttool_Done: gatttool return string: Temp1|A4:C1:38:EC:6E:AF|ok|read|0x1e|{"gtResult":"06 1f 00 12 2b 0d 0c 0b 0a 09 08 07 06 05 04 03 02 01 00 "}
2020.07.12 16:36:49 4: XiaomiBTLESens (Temp1) - ProcessingNotification
2020.07.12 16:36:49 4: XiaomiBTLESens (Temp1) - ProcessingNotification: handle 0x1e
2020.07.12 16:36:49 4: XiaomiBTLESens (Temp1) - Clear Grass Sens Handle0x1e
2020.07.12 16:36:49 4: XiaomiBTLESens (Temp1) - WriteReadings: Readings were written


Bin zum testen und debuggen bereit.

Ist ein Linux Server mit m2 wifi/Bluetooth Karte
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 12 Juli 2020, 17:46:31
Ich werde die nächsten Monate dafür keine Zeit haben. Sorry. Da muss die Community versuchen zu unterstützen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: hackslash am 16 Juli 2020, 21:33:39
Kann es sein das über FHEM Update eine alte Version ausgeliefert wird? Ich hatte bei Model keine Auswahl für die neuen Mijia LYWSD03MMC. Die Version im Git bringt das aber mit
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 17 Juli 2020, 12:32:22
Möglich. Kümmere ich mich Anfang nächsten Monats drum.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Teamdrachen am 20 Juli 2020, 19:23:57
Zitat von: hackslash am 16 Juli 2020, 21:33:39
Kann es sein das über FHEM Update eine alte Version ausgeliefert wird? Ich hatte bei Model keine Auswahl für die neuen Mijia LYWSD03MMC. Die Version im Git bringt das aber mit

You made my day  ;D

Mit der Github Version lüppen jetzt auch meine LYWSD03
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: revres am 24 Juli 2020, 08:37:39
Ich habe leider das gleiche Problem mit den LYWSD03 - nur weiß ich leider nicht, wie ich einfach die Gitversion benutzen kann. :(
Ist es vll möglich die offizielle version zu updaten?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: myrave am 26 Juli 2020, 10:34:47
Im offiziellen ist V2.8.2 eingecheckt, aber in seinem Git liegt V3.0.0:
https://git.cooltux.net/FHEM/mod-XiaomiBTLESens/src/branch/devel/74_XiaomiBTLESens.pm

Ich habe die Version manuell bei mir eingecheckt und die LYWSD03MMC werden nun erkannt.
Falls jemand die neue Version ins FHEM Release einchecken kann, wäre allen damit geholfen.

Danach noch folgendes Attribut setzen, damit es nicht beim Update überschrieben wird:
attr global exclude_from_update 74_XiaomiBTLESens.pm

Edit: Update der Messdaten passiert jetzt alle 10 Minuten, lässt sich das irgendwie konfigurieren?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 26 Juli 2020, 18:14:42
Ich habe die aktuelle Version 3.0 ins SVN eingecheckt
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: revres am 27 Juli 2020, 07:07:11
Also mir wird leider kein Update für das Modul mit Update Check angezeigt und ich habe noch die Version 2.8.2 - habe auch schon an paar reboots hinter mir. :(
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Jamo am 27 Juli 2020, 07:38:04
Ab 7:45 am nächsten Tag. Ab jetzt noch 7 min warten...
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: revres am 27 Juli 2020, 11:01:36
Gut, man lernt eben nie aus - Jetzt geht es  :-X - Vielen Dank
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: revres am 05 August 2020, 15:38:23
Ich habe regelmäßig den folgenden Fehler mit den 3 LYWSD03 die ich benutzte:
2020.08.04 20:14:07 3: XiaomiBTLESens (Thermostat_Bad) - ExecGatttool_Run: errorcode: "1", ErrorString: "connect: Device or resource busy (16)

Fehler ist nur behoben wenn ich den raspberry neustarte.
Ich nutze den eingebauten BT chip - entfernung ist sehr unterschiedlich, aber das problem taucht unabhängig von der Entfernung auf.
Gibt es dazu vll eine softwareseitige Lösung, die ich nicht finden konnte? Oder sollte meinen extra BT stick nutzen?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: myrave am 12 August 2020, 08:54:00
Ich habe den Fehler seit gestern ebenfalls - auf einem der Devices sehr regelmäßig.
Es scheint, als ob es eine Obergrenze für die Anzahl der BT Devices hier zu geben?
Mit 4 x mijiaLYWSD03MMC lief es problemlos, seit dem 5. gibt es diesen Fehler.

Hat jemand Erfahrung, wie viele Hygrometer man hier problemlos anschließen kann?
Ich hatte eigentlich den Ausbau bis auf 8 Stück geplant, dann kam die Fehlermeldung.

Abgesehen von dem tauchen noch regelmäßig andere Fehler im lastGattError auf,
vielleicht ist es eine andere Einstellung, die mit dem internen BT zusammenhängt?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Jamo am 12 August 2020, 09:01:21
Ich habe 13 Flower sense am laufen. Ohne Probleme.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: myrave am 12 August 2020, 09:48:03
Zitat von: Jamo am 12 August 2020, 09:01:21
Ich habe 13 Flower sense am laufen. Ohne Probleme.

Sehr gut, so hatte ich es eigentlich erwartet, dann besteht auf jeden Fall Hoffnung.

Ich habe es auf RPI 4 aufgesetzt mit dem integrierten BT.

Welchen RPI hast du und mit dem integrierten BT Modul oder einem BT USB Stick?
Vielleicht kann es sonst an der Software, also Bluez Version liegen? Welche hast du?

Eventuell reicht hier ja eine Änderung an der Stelle, dass es dann funktioniert.
Ich hatte am Anfang beim Aufsetzen mit Bluez und Gattool einige Probleme,
würde daher nicht ausschließen, dass andere SW / Version daran Schuld ist.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: mi.ke am 12 August 2020, 18:36:57
Zitat von: mi.ke am 13 Januar 2019, 18:36:08
Ich tippe auch auf Reichweitenproblemen und/oder zu kurze Abfrage-Intervalle

Bei Reichweitenproblemen zusätzlichen RPiZ über SSH verwenden !

Hier laufen z.Z. (Winter)  17 Stk.
Im Sommer sind es dann wieder ca. 30.
Bluetooth ist auf diesem RPi auch noch mit Anwesenheitskennung und Batterieüberwachung beschäftigt.
Allerdings auf einem anderen hcidevice.

Bei mehrere Sensoren muss/darf der interval nicht zu kurz sein, sonst versuchen doch mehrere Devices/Sensoren gleichzeitig Daten zu bekommen. Cooltux hatte seinerzeit schon eine zufällige Verzögerungszeit eingebaut, die das kompensiert.
Aber mal ehrlich. Pflanzen sind nicht wirklich "plötzlich" trocken und müssen nicht alle 10 Minuten abgefragt werden. 8)

Das einzige "Problem" ist, dass nach dem fhem-Start alle Devices zur gleichen Zeit starten wollen.
Hier hab ich mir ein Script geschrieben, dass nach starten des Hostes alle Devices deaktiviert und dann im Zeitversatz von einigen Minuten nacheinander aktiviert. Das funktioniert dann sehr gut.

Da die Sensoren aber mehr können als "Erde Trocken||Nass" setze ich sie auch z.B. zur Beschattung ein.
Diese haben eine dann einen kürzeren Interval und dafür auch eine höhere Prio beim automatisierten Startvorgang.

Cheers
mi.ke

Oben die Info könnte helfen.

Desweiteren:
Ich nutz einen externen BT-USB Stick, da der RPi auf dem die Pflanzen angefragt werden, noch ein älteres Modell ist.
Zur Abfrage per SSH ist es ein zusätzlicher RPi ZW platziert. Auch hier gehe ich auf externen BT-USB Stick, weil der interne zu wenig Reichweite hatte.

Nutzt Du bzw. Dein RPi den integrierten BT noch für andere Abfragen z.B. presence. Das funktioniert nämlich nicht.
Steck doch einfach mal den 2.ten dazu,
Du kannst mit mit
attr <device> hciDevice hci0 (oder hci1)
die BTs zuordnen und so vielleicht Unterschiede erkennen.

cheers
mi.ke
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Jamo am 12 August 2020, 18:53:12
Ich habe 3 externe BT Sticks, mit dem internene BT funktioniert das nicht.

1 x für LEpresenced
1 x für Presenced
1 x für was anderes.

Falls Du lepresenced und presenced gleichzeitig verwendest, kann das evtl auch daran liegen.
Du kannst mal mit "sudo service presenced status" und "sudo service lepresenced status" checken, welches hci interface verwendet wird.
Da die sich in die quere kommen, lepresenced aber immer hci1 will, habe ich im /usr/bin/presenced in der Zeile $return = qx(hcitool -i hci2 name $address 2>/dev/null); den hci auf hci2 gestellt (bei 3 externen BT Sticks). Normalerweise steht in der Zeile auch hci1. Kannst Du mit "grep hci /usr/bin/presenced" checken.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: revres am 13 August 2020, 16:42:32
Zitat von: myrave am 12 August 2020, 09:48:03
Sehr gut, so hatte ich es eigentlich erwartet, dann besteht auf jeden Fall Hoffnung.

Ich habe es auf RPI 4 aufgesetzt mit dem integrierten BT.

Welchen RPI hast du und mit dem integrierten BT Modul oder einem BT USB Stick?
Vielleicht kann es sonst an der Software, also Bluez Version liegen? Welche hast du?

Eventuell reicht hier ja eine Änderung an der Stelle, dass es dann funktioniert.
Ich hatte am Anfang beim Aufsetzen mit Bluez und Gattool einige Probleme,
würde daher nicht ausschließen, dass andere SW / Version daran Schuld ist.

Ich habe mittlerweile ein Firmware update gemacht. Seit dem scheint es über das interne modul stabil zu laufen (über 24h.). Mal schauen ob das so bleibt. Ansonsten versuche ich auch mal einen externen stick.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: fireball am 14 August 2020, 18:21:02
Hi,

gibts einen Unterschied zwischen dem Thermometer 2...

https://de.aliexpress.com/item/4001095735569.html?src=google&albch=shopping&acnt=494-037-6276&isdl=y&slnk=&plac=&mtctp=&albbt=Gploogle_7_shopping&aff_atform=google&aff_short_key=UneMJZVf&&albagn=888888&albcp=1705854617&albag=67310370915&trgt=539263010115&crea=de4001095735569&netw=u&device=c&albpg=539263010115&albpd=de4001095735569&gclid=Cj0KCQjw7Nj5BRCZARIsABwxDKKc_MFySZaWLvYl6u1TwyrWYtkDUexOLHzWi3Cr2JQL7vo33vwXYj4aArJqEALw_wcB&gclsrc=aw.ds (https://de.aliexpress.com/item/4001095735569.html?src=google&albch=shopping&acnt=494-037-6276&isdl=y&slnk=&plac=&mtctp=&albbt=Gploogle_7_shopping&aff_atform=google&aff_short_key=UneMJZVf&&albagn=888888&albcp=1705854617&albag=67310370915&trgt=539263010115&crea=de4001095735569&netw=u&device=c&albpg=539263010115&albpd=de4001095735569&gclid=Cj0KCQjw7Nj5BRCZARIsABwxDKKc_MFySZaWLvYl6u1TwyrWYtkDUexOLHzWi3Cr2JQL7vo33vwXYj4aArJqEALw_wcB&gclsrc=aw.ds)

und dem Thermometer "1?"

https://de.aliexpress.com/item/32977891855.html?spm=a2g0o.detail.1000060.3.4f8dabff7hICGE&gps-id=pcDetailBottomMoreThisSeller&scm=1007.13339.169870.0&scm_id=1007.13339.169870.0&scm-url=1007.13339.169870.0&pvid=c4a6cf93-6002-48dc-9caa-0612229d6fc5&_t=gps-id:pcDetailBottomMoreThisSeller,scm-url:1007.13339.169870.0,pvid:c4a6cf93-6002-48dc-9caa-0612229d6fc5,tpp_buckets:668%230%23131923%230_668%23808%234093%2320_668%23888%233325%2318_668%232846%238108%23160_668%232717%237561%23341_668%231000022185%231000066058%230_668%233468%2315607%2338 (https://de.aliexpress.com/item/32977891855.html?spm=a2g0o.detail.1000060.3.4f8dabff7hICGE&gps-id=pcDetailBottomMoreThisSeller&scm=1007.13339.169870.0&scm_id=1007.13339.169870.0&scm-url=1007.13339.169870.0&pvid=c4a6cf93-6002-48dc-9caa-0612229d6fc5&_t=gps-id:pcDetailBottomMoreThisSeller,scm-url:1007.13339.169870.0,pvid:c4a6cf93-6002-48dc-9caa-0612229d6fc5,tpp_buckets:668%230%23131923%230_668%23808%234093%2320_668%23888%233325%2318_668%232846%238108%23160_668%232717%237561%23341_668%231000022185%231000066058%230_668%233468%2315607%2338)

Funktionieren beide mit dem Modul?
und können die sich auch miteinander verbinden und bis zum Raspberry eine Art Netz aufbauen?!

VG+Danke
René
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: revres am 17 August 2020, 13:10:37
Zitat von: revres am 13 August 2020, 16:42:32
Ich habe mittlerweile ein Firmware update gemacht. Seit dem scheint es über das interne modul stabil zu laufen (über 24h.). Mal schauen ob das so bleibt. Ansonsten versuche ich auch mal einen externen stick.

Leider ist das Problem nicht behoben - auch nicht mit einem externen Dongle... Vll liegt es ja an der neuen Generation?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Headhunter667 am 19 August 2020, 10:01:31
Gleiches Verhalten bei mir: Fhem läuft auf einem Raspi3+ egal ob internes Bluetooth oder externer Stick, WLAN habe ich auch schon ausgeschaltet (per config.txt). Die  bei mir derzeit 2 LYWSD03MMC liefern immer nach spätestens 48h, meist viel früher (ein paar Stunden) einen Fehler zurück. Meistens Device or resource busy (16)
Ab und zu Transport endpoint is not connected (107) Letzteres schiebe ich auf Empfangsprobleme, weil sich das meistens von selbst wieder gibt.
Ich denke nicht, dass ich noch einen konzeptionellen Fehler habe, da "verklemmt" einfach immer mal wieder etwas.
Abhilfe schafft immer, sich auf dem Raspi per SSH einzuloggen und diese beiden Befehle ein zu geben:sudo invoke-rc.d bluetooth restart
sudo hciconfig hci0 reset

Wenn ich Zeit habe suche ich mal nach einem weg, auf das Device or resource busy (16) zu triggern und dann ein Shellscript mit den beiden reset-Befehlen auszuführen. Kann eigentlich nicht schwierig sein, schüttele ich nur nicht aus dem Handgelenk.
Vielleicht liest ja jemand mit, dem das leicht fällt und er teilt seine Weisheit mit uns  ;)
Das ist natürlich keine Lösung, sondern ein Workaround. Für mich würde das aber wohl reichen, weil ich eigentlich nur die Temperatur aufzeichnen will.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Holger S am 19 August 2020, 20:02:20
Ich habe es so gelöst

define Restart_Bluetooth notify TempLuft.*:lastGattError:.Device.or.resource.busy.\(16\) {qx(sudo /usr/sbin/service bluetooth restart)}
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Headhunter667 am 21 August 2020, 09:48:27
Danke für das notify - das hatte ich gesucht. Ich breche mir mit den ganzen Punkten,Sternen und Slashes immer Einen ab. Da kostet mich jede Zeile Stunden. ;)

Leider bringt es bei mir nichts den service neu zu starten. Der bringt aber auch einen Fehler wenn ich den Status abfrage. Wahrscheinlich habe ich zu viel herumgespielt. Aber deswegen setzte ich den FHEM jetzt nicht auf ein sauberes und frisch installiertes raspberry OS.   ;D
Ich werde mal damit experimentieren statt den service neu zu starten ein Script mit meinen beiden Befehlen zu starten - das müsste doch auch gehen.
Wenn's funktioniert poste ich es hier.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Pati_Alpha am 23 August 2020, 23:06:07
Hey, ich habe jetzt schon zum 3. mal festgestellt, dass das XiaomiBTLESens-Modul mein komplettes FHEM lahmgelegt hat!
Diesmal war die Logmeldung die folgende:
2020.08.23 22:25:54 1: Timeout for FHEM::XiaomiBTLESens::ExecGatttool_Run reached, terminated process 755
Connection to 10.0.0.211 closed by remote host.

(10.0.0.211 ist mein RasPi)
Daraufhin ist FHEM komplett nicht mehr ansprechbar. Laut htop hat der FHEM-Rechner aber auch keine Last in der Zeit. Der Raspberry ist auch ansprechbar. Starte ich den Raspberry dann neu, ist FHEM nach ca. 5 Sekunden wieder normal am Start.

Was kann es damit auf sich haben?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Pati_Alpha am 31 August 2020, 11:18:27
Gibts hier noch Support zu oder bleibt das wie es ist? :)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 31 August 2020, 11:45:39
Zitat von: Pati_Alpha am 23 August 2020, 23:06:07
Hey, ich habe jetzt schon zum 3. mal festgestellt, dass das XiaomiBTLESens-Modul mein komplettes FHEM lahmgelegt hat!
Diesmal war die Logmeldung die folgende:
2020.08.23 22:25:54 1: Timeout for FHEM::XiaomiBTLESens::ExecGatttool_Run reached, terminated process 755
Connection to 10.0.0.211 closed by remote host.

(10.0.0.211 ist mein RasPi)
Daraufhin ist FHEM komplett nicht mehr ansprechbar. Laut htop hat der FHEM-Rechner aber auch keine Last in der Zeit. Der Raspberry ist auch ansprechbar. Starte ich den Raspberry dann neu, ist FHEM nach ca. 5 Sekunden wieder normal am Start.

Was kann es damit auf sich haben?

Ohne genauere Logausgaben kann man dazu schwer was sagen.
Da die Abfrage der Sensoren nonBlocking passiert sollte FHEM nicht blockiert werden.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: tomcat.x am 29 September 2020, 16:29:14
Nachdem ich mit dem Modul einige Pflanzensensoren angebunden hatte und mal wieder einen Temperatursensor brauchte, ist mir eingefallen, dass es da ja auch welche gibt, die mit dem Modul funktionieren. Leider war mir nicht ganz klar, welche das genau sind. Ganz am Anfang im Thema steht was von "runden", die funktionieren und von "eckigen", die das nicht tun. Mehr habe ich auf die Schnelle nicht gefunden.

Da es einen eckigen Sensor für die Hälfte gab und das noch zu einem sehr niedrigen Preis (7,90 bei ebay), habe ich gestern einfach mal einen bestellt. Der wird als "Second Generation" beworben. Eine AAA Batterie (bei den runden) wäre mir lieber gewesen, die CR2032 (in den eckigen) soll aber genauso lang halten und ich wollte auch keine "alten" kaufen.

Jetzt, nachdem der Sensor geliefert wurde, habe ich beim Auslesen der MAC gesehen, dass es ein Modell "LYWSD03MMC" ist und das findet man in den Geräten vom Typ XiaomiBTLESens im Attribut "model" wieder. Aber auch wenn ich damit im Forum suche, finde ich zumindest einen Hinweis unter "FHEM Code changes". Trotzdem wollte ich in einem Beitrag in diesem Thema noch mal darauf hinweisen, dass die Dinger mit dem Modul funktionieren, falls mal jemand anders nach "eckig" sucht, weil er die genaue Modellbezeichnung nicht kennt ;-)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Invers am 30 September 2020, 18:28:39
Ich hatte die runde Version des BT Thermometers. Die Reichweite ist aber grottig. Wie ist denn die Reichweite bei den neuen LYWSD03MMC ?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: tomcat.x am 30 September 2020, 19:16:16
Die Reichweite ist zumindest besser als die von einem HMS100TF. Das habe ich vorher dafür genutzt, hatte aber immer Aussetzer. Es ist eine Hausaußenwand und die Wand der Garage dazwischen, Entfernung ungefähr 15m. Wobei beide Wände schräg zur direkten Verbindungslinie stehen. Es gibt auch Fenster, allerdings nicht auf direktem Weg. Aber keine Ahnung, wie sich die Funkwellen verbreiten.

Wenn ich die zusätzlich bestellten bekomme, teste ich mal innerhalb des Hauses. Von den HMS100 habe ich aber ein paar im Haus verteilt und der in der Garage hatte den schlechtesten RSSI-Wert. Wobei das durch die andere Frequenz natürlich nichts aussagt.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Invers am 30 September 2020, 23:39:36
Danke für die Info. Meine reichten teilweise nur 10 Meter. Ein Th. brachte sogar nach 2 Meter schon Fehler. Ich werfe nun alle weg.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: tomcat.x am 01 Oktober 2020, 10:14:08
Ein Hinweis noch zu meiner Konfiguration: Ich nutze nicht das Bluetooth-Modul auf den Pi 3B sondern einen abgesetzten Zero W. Da stört kein Gehäuse, Kühlkörper, Kabel o. ä.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Invers am 01 Oktober 2020, 12:25:21
Danke für die Info.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Deco am 02 Oktober 2020, 11:18:26
Hallo, zunächst einmal Danke für das Modul, es bietet eine gute und günstige Lösung der Temperatur/Luftfeuchtigkeitüberwachung  :)
Zumal die Geräte schön klein und kompakt sind.

Nun zu meinem Anliegen :D
Grundsätzlich funktioniert alles reibungslos (bis auf einige Empfangsprobleme, die auf das interne BT-Modul des RPi 3 zurückzuführen sind, BT-Stick ist schon unterwegs  :D ), aber die Thematik, dass mein FHEM immer wieder nahezu blockiert wird habe ich ebenfalls.

Zitat von: CoolTux am 31 August 2020, 11:45:39
Ohne genauere Logausgaben kann man dazu schwer was sagen.
Da die Abfrage der Sensoren nonBlocking passiert sollte FHEM nicht blockiert werden.

Da der Fehler am Ende derselbe ist, reiche ich es mal hier nach. Was der Auslöser ist, keine Ahnung, möglicherweise auch das interne BT-Modul. Was mein Problem ist, dass er mir das Log damit voll haut, nähmlich ca. alle 20 min, da das mein Update-Intervall ist.
Ich habe für Fehler der Hygro's eigentlich ein eigenes Log, aber diesen Fehler bekomme ich nicht via regexp in dieses hinein (meine Vermutung ist, da er vom Modul selbst kommt und nicht von einem Gerät?).
Falls hier bzgl. Log jemand eine Idee hat, gerne raus damit. Habe schon viel versucht, klappt aber nur eins, siehe Kommentar:

(XiaomiBTLE).*:(ExecGatttool).*
Hygro_Wohnzimmer:lastGattError:.* //funktioniert für "normale" Fehler des Geräts, z.B. "Transport endpoint is not connected (107)" oder "no data response"
XiaomiBTLE.*:(ExecGatttool).*
XiaomiBTLE.*:ExecGatttool.*
XiaomiBTLESens:.*




Nun zum versprochenen Log-Ausschnitt, hier nur von einem Intervall, kommt wie gesagt bei jedem Intervall.
Einzige Hilfe FHEM neu starten (vermutlich reicht es auch das BT-Modul neu starten, habe ich noch nicht versucht, da ich den Fehler brauchte um zu versuchen das Log anzupassen).


2020.10.02 10:41:10 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:11 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:12 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:13 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:14 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:15 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:16 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:17 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:18 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:19 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:20 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:21 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:23 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:24 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:25 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:26 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:27 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:28 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:29 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:30 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:31 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:32 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:33 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:34 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:35 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:36 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:37 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:38 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:40 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:41 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:42 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:43 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:44 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:45 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:46 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:47 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:48 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:49 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:50 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:51 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:52 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:53 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:54 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:55 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:57 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:58 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:41:59 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:00 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:01 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:02 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:03 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:04 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:05 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:06 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:07 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:08 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:09 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:10 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:11 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:13 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:14 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:15 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:16 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:17 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:18 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:19 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:20 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:21 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:22 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:23 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:24 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:25 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:26 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:27 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:28 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:29 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:31 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:32 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:33 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:34 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:35 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:36 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:37 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:38 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:39 3: XiaomiBTLESens (Hygro_Wohnzimmer) - ExecGatttool_Run: another gatttool process is running. waiting...
2020.10.02 10:42:40 1: Timeout for FHEM::XiaomiBTLESens::ExecGatttool_Run reached, terminated process 19914




Gruß Deco


EDIT: Zur Info, der Fehler trat auf, war nach einem restart weg und trat dann nach ca. 2 Wochen erneut auf (interessanter Weise beide Male bei unterschiedlichen Geräten des Moduls).

EDIT 2: Nach nur wenigen Tagen gleiches Problem (diesmal wieder ein anderer Sensor). Allerdings habe ich mittlerweile einen BT-Stick im Einsatz. Scheint also nicht am internen BT-Modul zu liegen. Es half auch kein restart des BT-Service. Ich musste das ganze fhem stoppen und wieder starten. Scheint also eher, als läge es am Modul.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: kroonen am 28 Oktober 2020, 07:55:42
Hi,

I'm trying to get the Xiaomi CCG1 to work with FHEM, but I get values for temp and humidity 0.

The temp should be 12.9 and humidity should be 80.6%



l Schuurtemp
Internals:
   BTMAC      58:2D:34:10:C8:6B
   DEF        58:2D:34:10:C8:6B
   FUUID      5f8b4583-f33f-c802-1596-13eb0ea5d655ee50
   FVERSION   74_XiaomiBTLESens.pm:v3.0.0-s22474/2020-07-26
   INTERVAL   300
   NAME       Schuurtemp
   NOTIFYDEV  global,Schuurtemp
   NR         20
   NTFY_ORDER 50-Schuurtemp
   STATE      T: 0 H: 0
   TYPE       XiaomiBTLESens
   VERSION    v3.0.0
   loglevel   4
   READINGS:
     2020-10-28 06:49:24   batteryPercent  116
     2020-10-28 06:49:24   batteryState    ok
     2020-10-17 20:27:46   firmware        1.1.2_0020
     2020-10-28 06:49:24   humidity        0
     2020-10-18 13:21:46   lastGattError   The BlockingCall Process terminated unexpectedly. Timedout
     2020-10-28 06:49:24   state           T: 0 H: 0
     2020-10-28 06:49:24   temperature     0
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1603867764.15303
     updateTimestampCallBattery 2020-10-28 06:49:24
Attributes:
   model      clearGrassSens
   room       XiaomiBTLESens
   verbose    5





and the logging verbose 5



2020.10.28 06:49:18 5: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Run: Execute Command ps ax | grep -E [g]atttool -i hci0 -b 58:2D:34:10:C8:6B
2020.10.28 06:49:18 5: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 58:2D:34:10:C8:6B --char-read -a 0x3b 2>&1 and loop 0
2020.10.28 06:49:24 5: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,5d f7 0e 85 34 ab 77 74 99 3b 89 95

2020.10.28 06:49:24 4: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,5d f7 0e 85 34 ab 77 74 99 3b 89 95

2020.10.28 06:49:24 5: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Done: gatttool return string: Schuurtemp|58:2D:34:10:C8:6B|ok|read|0x3b|{"gtResult":"5d f7 0e 85 34 ab 77 74 99 3b 89 95 "}
2020.10.28 06:49:24 4: XiaomiBTLESens (Schuurtemp) - ProcessingNotification
2020.10.28 06:49:24 4: XiaomiBTLESens (Schuurtemp) - ProcessingNotification: handle 0x3b
2020.10.28 06:49:24 4: XiaomiBTLESens (Schuurtemp) - Clear Grass Sens Handle0x3b
2020.10.28 06:49:24 4: XiaomiBTLESens (Schuurtemp) - WriteReadings: Readings were written
2020.10.28 06:49:24 4: XiaomiBTLESens (Schuurtemp) - Run CreateParamGatttool with mod: read
2020.10.28 06:49:24 5: XiaomiBTLESens (Schuurtemp) - Read XiaomiBTLESens_ExecGatttool_Run Schuurtemp|58:2D:34:10:C8:6B|read|0x1e
2020.10.28 06:49:24 5: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Run: Execute Command ps ax | grep -E [g]atttool -i hci0 -b 58:2D:34:10:C8:6B
2020.10.28 06:49:24 5: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 58:2D:34:10:C8:6B --char-read -a 0x1e 2>&1 and loop 0
2020.10.28 06:49:24 5: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,05

2020.10.28 06:49:24 4: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,05

2020.10.28 06:49:24 5: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Done: gatttool return string: Schuurtemp|58:2D:34:10:C8:6B|ok|read|0x1e|{"gtResult":"05 "}
2020.10.28 06:49:24 4: XiaomiBTLESens (Schuurtemp) - ProcessingNotification
2020.10.28 06:49:24 4: XiaomiBTLESens (Schuurtemp) - ProcessingNotification: handle 0x1e
2020.10.28 06:49:24 4: XiaomiBTLESens (Schuurtemp) - Clear Grass Sens Handle0x1e
2020.10.28 06:49:24 1: PERL WARNING: substr outside of string at ./FHEM/74_XiaomiBTLESens.pm line 1321.
2020.10.28 06:49:24 3: eval: {FHEM::XiaomiBTLESens::ExecGatttool_Done('Schuurtemp|58:2D:34:10:C8:6B|ok|read|0x1e|{"gtResult":"05 "}')}
2020.10.28 06:49:24 1: PERL WARNING: Use of uninitialized value in hex at ./FHEM/74_XiaomiBTLESens.pm line 1321.
2020.10.28 06:49:24 3: eval: {FHEM::XiaomiBTLESens::ExecGatttool_Done('Schuurtemp|58:2D:34:10:C8:6B|ok|read|0x1e|{"gtResult":"05 "}')}
2020.10.28 06:49:24 1: PERL WARNING: substr outside of string at ./FHEM/74_XiaomiBTLESens.pm line 1322.
2020.10.28 06:49:24 3: eval: {FHEM::XiaomiBTLESens::ExecGatttool_Done('Schuurtemp|58:2D:34:10:C8:6B|ok|read|0x1e|{"gtResult":"05 "}')}
2020.10.28 06:49:24 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/74_XiaomiBTLESens.pm line 1322.
2020.10.28 06:49:24 3: eval: {FHEM::XiaomiBTLESens::ExecGatttool_Done('Schuurtemp|58:2D:34:10:C8:6B|ok|read|0x1e|{"gtResult":"05 "}')}
2020.10.28 06:49:24 4: XiaomiBTLESens (Schuurtemp) - WriteReadings: Readings were written

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 28 Oktober 2020, 08:20:33
Zitat von: kroonen am 28 Oktober 2020, 07:55:42
Hi,

I'm trying to get the Xiaomi CCG1 to work with FHEM, but I get values for temp and humidity 0.

The temp should be 12.9 and humidity should be 80.6%



l Schuurtemp
Internals:
   BTMAC      58:2D:34:10:C8:6B
   DEF        58:2D:34:10:C8:6B
   FUUID      5f8b4583-f33f-c802-1596-13eb0ea5d655ee50
   FVERSION   74_XiaomiBTLESens.pm:v3.0.0-s22474/2020-07-26
   INTERVAL   300
   NAME       Schuurtemp
   NOTIFYDEV  global,Schuurtemp
   NR         20
   NTFY_ORDER 50-Schuurtemp
   STATE      T: 0 H: 0
   TYPE       XiaomiBTLESens
   VERSION    v3.0.0
   loglevel   4
   READINGS:
     2020-10-28 06:49:24   batteryPercent  116
     2020-10-28 06:49:24   batteryState    ok
     2020-10-17 20:27:46   firmware        1.1.2_0020
     2020-10-28 06:49:24   humidity        0
     2020-10-18 13:21:46   lastGattError   The BlockingCall Process terminated unexpectedly. Timedout
     2020-10-28 06:49:24   state           T: 0 H: 0
     2020-10-28 06:49:24   temperature     0
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1603867764.15303
     updateTimestampCallBattery 2020-10-28 06:49:24
Attributes:
   model      clearGrassSens
   room       XiaomiBTLESens
   verbose    5





and the logging verbose 5



2020.10.28 06:49:18 5: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Run: Execute Command ps ax | grep -E [g]atttool -i hci0 -b 58:2D:34:10:C8:6B
2020.10.28 06:49:18 5: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 58:2D:34:10:C8:6B --char-read -a 0x3b 2>&1 and loop 0
2020.10.28 06:49:24 5: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,5d f7 0e 85 34 ab 77 74 99 3b 89 95

2020.10.28 06:49:24 4: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,5d f7 0e 85 34 ab 77 74 99 3b 89 95

2020.10.28 06:49:24 5: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Done: gatttool return string: Schuurtemp|58:2D:34:10:C8:6B|ok|read|0x3b|{"gtResult":"5d f7 0e 85 34 ab 77 74 99 3b 89 95 "}
2020.10.28 06:49:24 4: XiaomiBTLESens (Schuurtemp) - ProcessingNotification
2020.10.28 06:49:24 4: XiaomiBTLESens (Schuurtemp) - ProcessingNotification: handle 0x3b
2020.10.28 06:49:24 4: XiaomiBTLESens (Schuurtemp) - Clear Grass Sens Handle0x3b
2020.10.28 06:49:24 4: XiaomiBTLESens (Schuurtemp) - WriteReadings: Readings were written
2020.10.28 06:49:24 4: XiaomiBTLESens (Schuurtemp) - Run CreateParamGatttool with mod: read
2020.10.28 06:49:24 5: XiaomiBTLESens (Schuurtemp) - Read XiaomiBTLESens_ExecGatttool_Run Schuurtemp|58:2D:34:10:C8:6B|read|0x1e
2020.10.28 06:49:24 5: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Run: Execute Command ps ax | grep -E [g]atttool -i hci0 -b 58:2D:34:10:C8:6B
2020.10.28 06:49:24 5: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Run: call gatttool with command: gatttool -i hci0 -b 58:2D:34:10:C8:6B --char-read -a 0x1e 2>&1 and loop 0
2020.10.28 06:49:24 5: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Run: gatttool loop result Characteristic value/descriptor,05

2020.10.28 06:49:24 4: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,05

2020.10.28 06:49:24 5: XiaomiBTLESens (Schuurtemp) - ExecGatttool_Done: gatttool return string: Schuurtemp|58:2D:34:10:C8:6B|ok|read|0x1e|{"gtResult":"05 "}
2020.10.28 06:49:24 4: XiaomiBTLESens (Schuurtemp) - ProcessingNotification
2020.10.28 06:49:24 4: XiaomiBTLESens (Schuurtemp) - ProcessingNotification: handle 0x1e
2020.10.28 06:49:24 4: XiaomiBTLESens (Schuurtemp) - Clear Grass Sens Handle0x1e
2020.10.28 06:49:24 1: PERL WARNING: substr outside of string at ./FHEM/74_XiaomiBTLESens.pm line 1321.
2020.10.28 06:49:24 3: eval: {FHEM::XiaomiBTLESens::ExecGatttool_Done('Schuurtemp|58:2D:34:10:C8:6B|ok|read|0x1e|{"gtResult":"05 "}')}
2020.10.28 06:49:24 1: PERL WARNING: Use of uninitialized value in hex at ./FHEM/74_XiaomiBTLESens.pm line 1321.
2020.10.28 06:49:24 3: eval: {FHEM::XiaomiBTLESens::ExecGatttool_Done('Schuurtemp|58:2D:34:10:C8:6B|ok|read|0x1e|{"gtResult":"05 "}')}
2020.10.28 06:49:24 1: PERL WARNING: substr outside of string at ./FHEM/74_XiaomiBTLESens.pm line 1322.
2020.10.28 06:49:24 3: eval: {FHEM::XiaomiBTLESens::ExecGatttool_Done('Schuurtemp|58:2D:34:10:C8:6B|ok|read|0x1e|{"gtResult":"05 "}')}
2020.10.28 06:49:24 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/74_XiaomiBTLESens.pm line 1322.
2020.10.28 06:49:24 3: eval: {FHEM::XiaomiBTLESens::ExecGatttool_Done('Schuurtemp|58:2D:34:10:C8:6B|ok|read|0x1e|{"gtResult":"05 "}')}
2020.10.28 06:49:24 4: XiaomiBTLESens (Schuurtemp) - WriteReadings: Readings were written



The device does not seem to be supported
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: kroonen am 07 November 2020, 19:36:58
How can we make it supported, it is an ccg1 cleargrass.

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Deco am 03 Dezember 2020, 17:00:24
Hallo,

nun sind draußen wieder negative Temperaturen in unseren Breitengraden und mir fiel gestern auf, dass meinem Sensor wohl heiß wird  ;D
Spaß bei Seite, die Temperaturen im negativen Bereich wird wohl nicht korrekt ausgewertet. Ich hatte relativ weit vorne hier im Thread bereits davon gelesen, dass dieses Problem behoben sein sollte, allerdings ist es das in der aktuellen Version scheinbar nicht?!

Anbei ein Screenshot dazu.


Gruß Deco
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Holger S am 03 Dezember 2020, 19:12:30
Bei welchem Model
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Deco am 03 Dezember 2020, 21:10:33
Zitat von: Holger S am 03 Dezember 2020, 19:12:30
Bei welchem Model

Hallo, die zweite Gen, also die eckigen.

Edit: Genauer LYWSD03MMC
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 04 Dezember 2020, 14:42:02
Zitat von: Deco am 03 Dezember 2020, 21:10:33
Hallo, die zweite Gen, also die eckigen.

Edit: Genauer LYWSD03MMC

Ich schaue mal ob ich das gefixt bekomme
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Deco am 04 Dezember 2020, 15:40:42
Danke! Ich bin gespannt :)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: jasonx20ac am 08 Dezember 2020, 15:36:59
Hey ich hab da ein problem.
Gatool ist instaliert und kann auch die sensoren finden jedoch bekomme ich immer als Lastgaterror

2020.12.08 14:27:20 4: XiaomiBTLESens (Wohnzimmer.temp) - ExecGatttool_Run: gatttool result Characteristic value/descriptor,31 2e 30 2e 30 5f 30 31 30 39 00

2020.12.08 14:28:34 4: XiaomiBTLESens (Wohnzimmer.temp) - WriteReadings: Readings were written
2020.12.08 14:28:34 4: XiaomiBTLESens (Wohnzimmer.temp) - ExecGatttool_Aborted:The BlockingCall Process terminated unexpectedly. Timedout


was mache ich falsch?
Sind die LYWSD03MMC Sensoren (eckig)
Geräte sind auf Firmware 0109
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 08 Dezember 2020, 19:34:51
Wie weit ist der Sensor entfernt?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: jasonx20ac am 10 Dezember 2020, 15:56:57
Zitat von: CoolTux am 08 Dezember 2020, 19:34:51
Wie weit ist der Sensor entfernt?

Sind Max 2m. Hab es mit internen und externen Bluetooth Versucht. Werde jetzt aber erstmal am Wochenende FHEM neu aufsetzen gibt da eh ein paar Sachen die mir nicht gefallen. Evtl hilft das auch schon. Danke dir
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: perezdel am 16 Dezember 2020, 16:40:13
Hi zusammen, habe mir zum BlackFriday zwei Qingping Clearglass Alarm Clock (CGD1) geschossen. Sehen ziemlich schick aus, senden per BLE und lassen sich an das Xiaomi Ökosystem anbinden. Fände es natürlich mega, diese auch in FHEM einzubinden, dann könnte ich mir zumindest im Schlafzimmer einen Temperatur-Sensor sparen. Hab ihn versucht als Clearlglass device einzubinden, aber die Werte passen nicht mit denen auf der Anzeige. Irgend jemand einen Tipp?

READINGS:
     2020-12-16 16:09:34   batteryPercent  399616
     2020-12-16 16:09:34   batteryState    ok
     2020-12-16 16:12:26   firmware       
     2020-12-16 16:35:36   humidity        394.5
     2020-12-16 16:10:56   lastGattError   Attribute can't be written
     2020-12-16 16:35:36   state           T: 11.4 H: 394.5
     2020-12-16 16:35:36   temperature     11.4
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Jamo am 28 Dezember 2020, 13:52:12
Hallo Cooltux,
obwohl event-on-change-reading nur auf "moisture" (und battery..) gesetzt ist, werden trotzdem immer folgende events gefeuert.
Ich habe 13 Blumensensoren, und es werden jedes interval 13*3=39 für mich unnötige Events generiert. Wie kann ich das abstellen?
Ich versuche gerade im Zuge der Optimierung des Systems die Anzahl der Events zu reduzieren, und ich denke das sollte im Modul geändert werden

Events:2020-12-28 13:42:50 XiaomiBTLESens Blume10 minMoisture ok
2020-12-28 13:42:50 XiaomiBTLESens Blume10 maxMoisture ok
2020-12-28 13:42:50 XiaomiBTLESens Blume10 minTemp ok


List einer BlumeInternals:
   BTMAC      C4:7C:8D:65:EA:0B
   DEF        C4:7C:8D:65:EA:0B
   FUUID      5c42ee45-f33f-97bf-55a4-bd59c7cd8d4bed81
   FVERSION   74_XiaomiBTLESens.pm:v3.0.0-s22474/2020-07-26
   INTERVAL   14400
   NAME       Blume10
   NOTIFYDEV  global,Blume10
   NR         2757
   NTFY_ORDER 50-Blume10
   STATE      M[20]: 23  &nbsp B(99) &nbsp &nbsp T: 19.0°C &nbsp Lx: 248 &nbsp Ft: 65 &nbsp <style="text-align:right">12-28</style>
   TYPE       XiaomiBTLESens
   VERSION    v3.0.0
   loglevel   4
   READINGS:
     2020-08-21 15:32:45   BatterieWechsel 01.09.2020 (8 Monate, last 01.12.2019  10.04.2019)
     2020-12-28 01:35:59   OldMoist        23
     2020-12-28 09:42:10   batteryPercent  99
     2020-12-28 09:42:10   batteryState    ok
     2020-12-28 13:42:50   fertility       65
     2020-12-28 09:42:10   firmware        3.1.9
     2020-12-22 07:37:46   lastGattError   Function not implemented (38)
     2020-12-28 13:42:50   lux             248
     2020-12-28 13:42:50   moisture        23
     2020-12-28 13:42:50   state           active
     2020-12-28 13:42:50   temperature     19
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1609144930.06366
     updateTimestampCallBattery 2020-12-28 09:42:10
Attributes:
   alias      Elefantenfuss
   devStateStyle style="text-align:left"
   event-on-change-reading moisture,batteryState,batteryPercent
   group      BLUMEN
   hciDevice  hci1
   interval   14400
   maxMoisture 50
   minMoisture 20
   minTemp    15
   model      flowerSens
   room       Favourites,AllRooms->Wohnung
   sortby     04
   sshHost    pizero
   stateFormat {MyFlowerCheck($name)}
   verbose    0
   webCmd     upd
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 28 Dezember 2020, 13:55:32
Zitat von: Jamo am 28 Dezember 2020, 13:52:12
Hallo Cooltux,
obwohl event-on-change-reading nur auf "moisture" (und battery..) gesetzt ist, werden trotzdem immer folgende events gefeuert.
Ich habe 13 Blumensensoren, und es werden jedes interval 13*3=39 für mich unnötige Events generiert. Wie kann ich das abstellen?
Ich versuche gerade im Zuge der Optimierung des Systems die Anzahl der Events zu reduzieren, und ich denke das sollte im Modul geändert werden

Events:2020-12-28 13:42:50 XiaomiBTLESens Blume10 minMoisture ok
2020-12-28 13:42:50 XiaomiBTLESens Blume10 maxMoisture ok
2020-12-28 13:42:50 XiaomiBTLESens Blume10 minTemp ok


List einer BlumeInternals:
   BTMAC      C4:7C:8D:65:EA:0B
   DEF        C4:7C:8D:65:EA:0B
   FUUID      5c42ee45-f33f-97bf-55a4-bd59c7cd8d4bed81
   FVERSION   74_XiaomiBTLESens.pm:v3.0.0-s22474/2020-07-26
   INTERVAL   14400
   NAME       Blume10
   NOTIFYDEV  global,Blume10
   NR         2757
   NTFY_ORDER 50-Blume10
   STATE      M[20]: 23  &nbsp B(99) &nbsp &nbsp T: 19.0°C &nbsp Lx: 248 &nbsp Ft: 65 &nbsp <style="text-align:right">12-28</style>
   TYPE       XiaomiBTLESens
   VERSION    v3.0.0
   loglevel   4
   READINGS:
     2020-08-21 15:32:45   BatterieWechsel 01.09.2020 (8 Monate, last 01.12.2019  10.04.2019)
     2020-12-28 01:35:59   OldMoist        23
     2020-12-28 09:42:10   batteryPercent  99
     2020-12-28 09:42:10   batteryState    ok
     2020-12-28 13:42:50   fertility       65
     2020-12-28 09:42:10   firmware        3.1.9
     2020-12-22 07:37:46   lastGattError   Function not implemented (38)
     2020-12-28 13:42:50   lux             248
     2020-12-28 13:42:50   moisture        23
     2020-12-28 13:42:50   state           active
     2020-12-28 13:42:50   temperature     19
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1609144930.06366
     updateTimestampCallBattery 2020-12-28 09:42:10
Attributes:
   alias      Elefantenfuss
   devStateStyle style="text-align:left"
   event-on-change-reading moisture,batteryState,batteryPercent
   group      BLUMEN
   hciDevice  hci1
   interval   14400
   maxMoisture 50
   minMoisture 20
   minTemp    15
   model      flowerSens
   room       Favourites,AllRooms->Wohnung
   sortby     04
   sshHost    pizero
   stateFormat {MyFlowerCheck($name)}
   verbose    0
   webCmd     upd


Hallo,
Die Events kann man nicht abstellen.

Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Jamo am 28 Dezember 2020, 14:01:58
Hallo Cooltux,
ja, das habe ich mir schon gedacht, aber die Frage war ob Du als Modulautor das ändern kannst/willst.
Es gibt gerade eine Diskussion dazu, und es wurde angeregt, evtl auch den Modulautor anzusprechen.
https://forum.fhem.de/index.php/topic,117075.msg1114327.html#msg1114327

Geruhsame Tage!
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 28 Dezember 2020, 15:31:27
Zitat von: Jamo am 28 Dezember 2020, 14:01:58
Hallo Cooltux,
ja, das habe ich mir schon gedacht, aber die Frage war ob Du als Modulautor das ändern kannst/willst.
Es gibt gerade eine Diskussion dazu, und es wurde angeregt, evtl auch den Modulautor anzusprechen.
https://forum.fhem.de/index.php/topic,117075.msg1114327.html#msg1114327

Geruhsame Tage!

Ich stimme der Aussage in dem Threads voll und ganz zu. Im Fall dieses Modules ist es aber gewollt und kann auch nicht geändert werden. Grund ist das kein Reading das Event aus löst sondern die Event Funktion direkt aufgerufen wird.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: kurt6908 am 30 Dezember 2020, 20:35:14
Hallo,

ich habe das gleiche Temperatur-Problem. Bei Temperaturen < 0 Grad, zeigt das Model mijiaLYWSD03MMC über 650 Grad an:

Zitat von: CoolTux am 04 Dezember 2020, 14:42:02
Ich schaue mal ob ich das gefixt bekomme

Gibts dazu schon ein Update?

Viele Grüße

Kurt

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 31 Dezember 2020, 10:18:56
Zitat von: kurt6908 am 30 Dezember 2020, 20:35:14
Hallo,

ich habe das gleiche Temperatur-Problem. Bei Temperaturen < 0 Grad, zeigt das Model mijiaLYWSD03MMC über 650 Grad an:

Gibts dazu schon ein Update?

Viele Grüße

Kurt

Aktuell noch nicht.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ToKa am 01 Januar 2021, 14:49:37
Hallo zusammen,

Beta-User hat mich auf dieses Modul im Hinblick auf die Xiaomi BT Thermometer aufmerksam gemacht.

Ich habe mich durch die einzelnen Beiträge gekämpft und das klingt ja sehr vielversprechend. Ihr setzt die Thermometer also auch Outdoor ein. Sind die dafür geeignet und der falsche Wert ist nur ein Modulproblem?

Habe gerade 4 Stück für 18 Euro aus China über Real gesehen. Ist das empfehlenswert oder lieber Finger weg von solchen Angeboten?

Viele Grüße und allen ein gutes neues Jahr
Torsten

Edit: Habe jetzt welche bestellt. Noch eine Frage zur Anbindung: Verträgt sich das 74_XiaomiBTLESens Modul mit dem Presence Modul bzw. lepresenced, das ja auch die BTLE (hcitool) Technik nutzt?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: kurt6908 am 02 Januar 2021, 15:54:29
Zitat von: ToKa am 01 Januar 2021, 14:49:37
... Ihr setzt die Thermometer also auch Outdoor ein. Sind die dafür geeignet und der falsche Wert ist nur ein Modulproblem? ...
... Verträgt sich das 74_XiaomiBTLESens Modul mit dem Presence Modul bzw. lepresenced, das ja auch die BTLE (hcitool) Technik nutzt?

Hallo Thorsten,

ich habe zwei der Thermometer im Einsatz, jedoch nicht outdoor. Eines ist in der Garage und eines im unbeheizten Wochenendhaus (beide Orte verbunden über LTE-VPN). Ich glaube nicht, dass die Geräte für outdoor geeignet sind, schauen nicht danach aus. Da das Display jedoch den korrekten negativen Wert anzeigt (zumindest in der Garage, die schnell erreichbar ist ;=) muss es ein Modulproblem sein. Aber da ist CoolTux ja dran.

In der Garage habe ich parallel einen Gigaset Gtag im Einsatz, der über BTLE funkt und im Auto liegt. Das Thermomether und der GTag liefern beide parallel Werte. Machmal muss ich über das hcitool dien Bluetooth-Stack stoppen und neu starten, aber das liegt wohl eher an der Raspi-Hardware und nicht an anden beiden Bluetooth-Geräten.

Viele Grüße

Kurt
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ToKa am 02 Januar 2021, 16:55:41
Hallo Kurt,

danke für Deinen Erfahrungsbericht. Dann steht einem Test bei mir ja nichts mehr im Wege.

Viele Grüße
Torsten
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ToKa am 04 Januar 2021, 20:27:48
Hallo zusammen,

die LYWSD03MMC sind eingetroffen und ich habe einen in Betrieb genommen. Die Einbindung mit dem Modul hat schnell und gut geklappt.

Das Setzen des devicename hat leider nicht funktioniert und ich erhalte im Reading lastGattError die Nachricht "Attribute can't be written". Weiterhin bringt lepresenced bei der Abfrage der Sensordaten (zyklisch nach Intervall oder bei get sensorData) die nachfoldenden Meldungen im Systemlog:

Jan  4 20:23:45 starhome lepresenced[16291]: [tid:2] main::bluetooth_dump_thread: Received '< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2', telling hcidump and hcitool to restart...
Jan  4 20:23:45 starhome lepresenced[16291]: [tid:2] main::bluetooth_dump_thread: restarting hcidump...
Jan  4 20:23:57 starhome lepresenced[16291]: [tid:1] main::bluetooth_scan_thread: restarting hcitool...
Jan  4 20:23:59 starhome lepresenced[16291]: [tid:2] main::bluetooth_dump_thread: Received '< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2', telling hcidump and hcitool to restart...
Jan  4 20:23:59 starhome lepresenced[16291]: [tid:2] main::bluetooth_dump_thread: restarting hcidump...
Jan  4 20:23:59 starhome lepresenced[16291]: [tid:1] main::bluetooth_scan_thread: restarting hcitool...
Jan  4 20:24:01 starhome lepresenced[16291]: [tid:2] main::bluetooth_dump_thread: Received '< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2', telling hcidump and hcitool to restart...
Jan  4 20:24:01 starhome lepresenced[16291]: [tid:2] main::bluetooth_dump_thread: restarting hcidump...
Jan  4 20:24:01 starhome lepresenced[16291]: [tid:1] main::bluetooth_scan_thread: restarting hcitool...
Jan  4 20:24:07 starhome lepresenced[16291]: [tid:2] main::bluetooth_dump_thread: Received '< HCI Command: Disconnect (0x01|0x0006) plen 3', telling hcidump and hcitool to restart...
Jan  4 20:24:07 starhome lepresenced[16291]: [tid:2] main::bluetooth_dump_thread: restarting hcidump...
Jan  4 20:24:07 starhome lepresenced[16291]: [tid:1] main::bluetooth_scan_thread: restarting hcitool...
Jan  4 20:24:08 starhome lepresenced[16291]: [tid:1] main::bluetooth_scan_thread: Received 'Set scan parameters failed: Input/output error', resetting...
Jan  4 20:24:08 starhome lepresenced[16291]: [tid:1] main::bluetooth_scan_thread: hcitool exited, retrying...


Meine G-Tags, die über lepresenced laufen gehen kurz auf disconnect und dann wieder auf present. 

Läßt sich daran etwas machen oder muss ich auf einen zweiten bluetooth dongle ausweichen?

Viele Grüße
Torsten
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 05 Januar 2021, 07:05:41
Zitat von: Deco am 03 Dezember 2020, 17:00:24
Hallo,

nun sind draußen wieder negative Temperaturen in unseren Breitengraden und mir fiel gestern auf, dass meinem Sensor wohl heiß wird  ;D
Spaß bei Seite, die Temperaturen im negativen Bereich wird wohl nicht korrekt ausgewertet. Ich hatte relativ weit vorne hier im Thread bereits davon gelesen, dass dieses Problem behoben sein sollte, allerdings ist es das in der aktuellen Version scheinbar nicht?!

Anbei ein Screenshot dazu.


Gruß Deco

Kannst Du bitte einmal verbose auf 5 stellen und mir dann das Log zukommen lassen. Danke
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 05 Januar 2021, 07:07:52
Zitat von: ToKa am 04 Januar 2021, 20:27:48
Hallo zusammen,

die LYWSD03MMC sind eingetroffen und ich habe einen in Betrieb genommen. Die Einbindung mit dem Modul hat schnell und gut geklappt.

Das Setzen des devicename hat leider nicht funktioniert und ich erhalte im Reading lastGattError die Nachricht "Attribute can't be written". Weiterhin bringt lepresenced bei der Abfrage der Sensordaten (zyklisch nach Intervall oder bei get sensorData) die nachfoldenden Meldungen im Systemlog:

Jan  4 20:23:45 starhome lepresenced[16291]: [tid:2] main::bluetooth_dump_thread: Received '< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2', telling hcidump and hcitool to restart...
Jan  4 20:23:45 starhome lepresenced[16291]: [tid:2] main::bluetooth_dump_thread: restarting hcidump...
Jan  4 20:23:57 starhome lepresenced[16291]: [tid:1] main::bluetooth_scan_thread: restarting hcitool...
Jan  4 20:23:59 starhome lepresenced[16291]: [tid:2] main::bluetooth_dump_thread: Received '< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2', telling hcidump and hcitool to restart...
Jan  4 20:23:59 starhome lepresenced[16291]: [tid:2] main::bluetooth_dump_thread: restarting hcidump...
Jan  4 20:23:59 starhome lepresenced[16291]: [tid:1] main::bluetooth_scan_thread: restarting hcitool...
Jan  4 20:24:01 starhome lepresenced[16291]: [tid:2] main::bluetooth_dump_thread: Received '< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2', telling hcidump and hcitool to restart...
Jan  4 20:24:01 starhome lepresenced[16291]: [tid:2] main::bluetooth_dump_thread: restarting hcidump...
Jan  4 20:24:01 starhome lepresenced[16291]: [tid:1] main::bluetooth_scan_thread: restarting hcitool...
Jan  4 20:24:07 starhome lepresenced[16291]: [tid:2] main::bluetooth_dump_thread: Received '< HCI Command: Disconnect (0x01|0x0006) plen 3', telling hcidump and hcitool to restart...
Jan  4 20:24:07 starhome lepresenced[16291]: [tid:2] main::bluetooth_dump_thread: restarting hcidump...
Jan  4 20:24:07 starhome lepresenced[16291]: [tid:1] main::bluetooth_scan_thread: restarting hcitool...
Jan  4 20:24:08 starhome lepresenced[16291]: [tid:1] main::bluetooth_scan_thread: Received 'Set scan parameters failed: Input/output error', resetting...
Jan  4 20:24:08 starhome lepresenced[16291]: [tid:1] main::bluetooth_scan_thread: hcitool exited, retrying...


Meine G-Tags, die über lepresenced laufen gehen kurz auf disconnect und dann wieder auf present. 

Läßt sich daran etwas machen oder muss ich auf einen zweiten bluetooth dongle ausweichen?

Viele Grüße
Torsten

Hallo Torsten,

Du wirst wohl beide an getrennten BT Empfängern betreiben müssen. Das Problem hatte ich auch.

Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ToKa am 05 Januar 2021, 07:40:33
Hallo Cooltux,

gibt es eine Empfehlung, welche Empfänger im Zusammenhang mit dem Xiaomi Sensoren am besten geeignet sind?

Viele Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 05 Januar 2021, 07:46:22
Zitat von: ToKa am 05 Januar 2021, 07:40:33
Hallo Cooltux,

gibt es eine Empfehlung, welche Empfänger im Zusammenhang mit dem Xiaomi Sensoren am besten geeignet sind?

Viele Grüße

Nein, zu mindestens nicht von mir. Aber alles was aktuelles BT unterstützt und wo ne gute Reichweite drauf steht sollte gehen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ToKa am 05 Januar 2021, 20:38:28
Hallo Cooltux,

Bluetooth 4.0 sollte doch ausreichen oder?

Beta-User hat mir in einem anderen Thread diesen Hinweis gegeben:
Zitat
Würde empfehlen, mal einen von den eckigen mit alternativer firmware zu betanken - geht OTA, wenn man ein Handy+Browser, der Zugriff auf die BT-Schnittstelle hat (bei mir funktionierte es mit Chrome + https://atc1441.github.io/TelinkFlasher.html; über den link kommt man auch an die firmware). Kann sein, dass CoolTux dann ein Log braucht, um den "neuen" Sensor dann auch einzubinden, aber mit der firmware sind die Dinger wenigstens eindeutig benannt (Teile der BT-MAC werden im Namen verwurstelt) und es entfällt die Anmelde-/Ausleseprozedur, was sich auch positiv auf die Batterielebensdauer auswirken sollte...

Bevor ich das aber ausprobiere, wollte ich Dich fragen, ob Dein Modul dann noch funktioniert bzw. ein Log genügt, um die andere firmware zu unterstützen.

Viele Grüße
Torsten
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 06 Januar 2021, 05:03:42
Zitat von: ToKa am 05 Januar 2021, 20:38:28
Hallo Cooltux,

Bluetooth 4.0 sollte doch ausreichen oder?

Beta-User hat mir in einem anderen Thread diesen Hinweis gegeben:
Bevor ich das aber ausprobiere, wollte ich Dich fragen, ob Dein Modul dann noch funktioniert bzw. ein Log genügt, um die andere firmware zu unterstützen.

Viele Grüße
Torsten

Das kann ich Dir nicht sagen. Ich kenne weder die Sensoren noch die Firmware. Ich habe lediglich die Pflanzensensoren.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ToKa am 06 Januar 2021, 10:14:32
OK, das war mir nicht bewusst. Vielleicht liest ja sonst jemand mit...
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: tomcat.x am 06 Januar 2021, 17:34:03
Bei den "eckigen" Sensoren geht es um die LYWSD03MMC oder?

Die funktionieren ja mit dem Modul, nur der Name lässt sich nicht setzen und anscheinend (bei mir hängt keiner richtig draußen, nur einer in der Garage) gibt es noch ein Problem mit negativen Temperaturen.

Empfänger ist bei mir der integrierte Adapter eines Raspberry Pi Zero W, der näher an den Sensoren ist als mein Raspi mit fhem drauf. Das funktioniert ganz gut, außer dass ich den Bluetooth Adapter regelmäßig wegen Fehler "Device or resource busy (16)" neu starten muss ("sudo hciconfig hci0 reset"). Das versuche ich gerade zu automatisieren. Fehler, die ich zuerst auf Empfangsprobleme am Rand der Reichweite geschoben hatte, ließen sich bisher immer damit beseitigen. Ein weiterer Zero an anderer Stelle wäre bei unter 20 Euro (plus meist vorhandenem Netzteil) auch keine so große Investition. Wenn man noch warten kann, dürfte der Preis auch wieder fallen.

Die alternative Firmware hatte ich mal getestet, konnte dann aber mit dem fhem Modul keine Verbindung mehr herstellen und hatte im Zusammenspiel mit dem Modul auch keine theoretischen Vorteile gesehen.

Generell hatte ich mir in dem Zusammenhang aber die Frage gestellt, warum das Modul die Daten aktiv pollt, statt einfach auf die Advertisments zu lauschen. Das kostet zusätzliche Energie, hat aber sicher einen Grund.

Über die Feiertage habe ich zur Anwesenheitserkennung (und später vielleicht mehr) "ein paar" ESP32 in der Wohnung verteilt. Die bekommen die Advertisments auch mit und melden sie per MQTT an fhem. Aber da müsste man dann die Daten selbst extrahieren. Bei den ESP32 gibt es aktuell 3 für den Preis eines Zero.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Beta-User am 06 Januar 2021, 17:50:08
...eigentlich wollte ich hier nicht direkt auch noch was schreiben, ist hier eigentlich nicht meine Baustelle...

Also: die LYWSD03MMC geben ihre Daten mit der Original-firmware nur preis, wenn man sich darauf einloggt. Das sperrt aber offenkundig die Schnittstelle für die Zeit, womit praktisch alle Lösungen ein Problem haben (das Modul hier kann (derzeit) nur einen gleichzeitig und  OpenMQTTGateway auf ESP32 kommt damit uU. auch aus dem Tritt, wobei das auch andere Gründe haben kann).
Diese Art des Auslesens mit login ist für beide Seiten deutlich Energie-intensiver, langfristig spart das also mind. Batterie (wobei die echt auch so ok sind, was das Thema angeht)...

Die alternative firmware ändert das Verhalten, es wird einfach offen versendet, was gemessen wird, ähnlich dem, wie es die älteren "runden" machen.

Vermutlich wäre es überhaupt kein Ding, diese alternative firmware in das Modul zu integrieren, ich nehme an, CoolTux müsste halt wissen, was die so versenden...

Die Daten muss man via MQTT schon "extrahieren", aber eigentlich ist das kein Hexenwerk, und im OpenMQTTGateway-attrTemplate-Set ist auch ein template für die Dinger enthalten. Das fragt dann die BT-Adresse ab; die muss man halt wissen (auch dafür gibt es Hilfsmittel). Ich hatte erst die Original-firmware im Einsatz, und musste nach dem Umflashen NICHTS ändern, die BT-Adresse ändert sich dadurch nicht, nur der Name (den man aber auch afaik mit der neuen firmware nicht ändern kann, der aber dann individuell ist, weil er Teile der BT-Adresse enthält).
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ToKa am 06 Januar 2021, 17:53:45
Hallo Tomcat,

danke für die Informationen und ja es handelt sich um die LYWSD03MMC.

Ich werde es jetzt mal mit einem USB Bluetooth Empfänger probieren und damit vom lepresenced, was ich mit G-Tags für die Anwesenheitserkennung nutze, trennen. Das onboard Bluetooth der Raspis ist nicht besonders stabil. Ich muss auch für die G-Tags ab und an einen "Reset" machen.

Das flashen mit der alternativen Firmware spare ich mir dann, wenn damit keine Verbindung mehr zum Modul möglich ist. Deine Frage zum Advertisment ist hinsichtlich Batterie sehr spannend und vielleicht kann CoolTux uns da ja eine Antwort geben.

Hast Du denn mehrere im Einsatz, nachdem Beta-User schreibt, es funktioniert nur mit einem?

Viele Grüße
Torsten 
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: tomcat.x am 07 Januar 2021, 17:07:52
Hallo Torsten,

ich habe aktuell 3 im Einsatz. Die müssen ja nicht gleichzeitig abgefragt werden. Bei Thermometern ist das ok, bei Beacon zur Anwesenheitserkennung wäre es wirklich ein Problem.

Viele Grüße
Thomas

[Edit]
Mir ist gerade noch aufgefallen, dass ich die Aktualisierungsintervalle so eingestellt habe, dass die sich möglichst nicht "treffen".
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ToKa am 08 Januar 2021, 14:26:13
Hallo Tomcat,

habe jetzt zwei eingebunden und auch mit unterschiedlichen Intervallen, wobei ich den Eindruck habe, dass das mit den Intervallen nicht wirklich greift. Es kommt trotzdem zu "Aussetzern" z.B. wird einer seit 3 Stunden nicht aktualisiert und es kommt die Fehlermeldung:

Device or resource busy (16)

@CoolTux: Ist es grundsätzlich ein Problem mit mehreren Sensoren? Kannst Du da etwas machen anhand der Fehlermeldung oder benötigst Du ein Log dazu?

Viele Grüße
Torsten
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 08 Januar 2021, 16:51:48
Zitat von: ToKa am 08 Januar 2021, 14:26:13
Hallo Tomcat,

habe jetzt zwei eingebunden und auch mit unterschiedlichen Intervallen, wobei ich den Eindruck habe, dass das mit den Intervallen nicht wirklich greift. Es kommt trotzdem zu "Aussetzern" z.B. wird einer seit 3 Stunden nicht aktualisiert und es kommt die Fehlermeldung:

Device or resource busy (16)

@CoolTux: Ist es grundsätzlich ein Problem mit mehreren Sensoren? Kannst Du da etwas machen anhand der Fehlermeldung oder benötigst Du ein Log dazu?

Viele Grüße
Torsten

Mehrere Devices sind kein Problem, aber wenn mehrere Programme auf den Bluetoothstack zugreifen kann es zu Problemen kommen. Zum Beispiel Das Modul hier und lpresented
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ToKa am 08 Januar 2021, 16:57:50
Hallo CoolTux,

habe ja einen zweiten Bluetooth Empfänger (hci1) gekauft und über den laufen nur die Xiaomi Sensoren. Die G-Tags mit leprecenced über hci0.

Im Syslog finden sich auch keine Auffälligkeiten und die Intervalle für die beiden Sensoren sind entzerrt. Macht es Sinn verbose auf einen bestimmten Wert einzustellen und mitzuloggen?

VG
Torsten

Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 08 Januar 2021, 19:26:15
Zitat von: ToKa am 08 Januar 2021, 16:57:50
Hallo CoolTux,

habe ja einen zweiten Bluetooth Empfänger (hci1) gekauft und über den laufen nur die Xiaomi Sensoren. Die G-Tags mit leprecenced über hci0.

Im Syslog finden sich auch keine Auffälligkeiten und die Intervalle für die beiden Sensoren sind entzerrt. Macht es Sinn verbose auf einen bestimmten Wert einzustellen und mitzuloggen?

VG
Torsten

Bekommst Du gar keine Daten? Zeig mal bitte ein list von einem Device
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ToKa am 08 Januar 2021, 19:54:43
Hallo CoolTux,

doch Werte kommen, aber eben zwischendurch auch mal mit längeren Unterbrechungen und Fehlern unter lastGattError.

Internals:
   BTMAC      A4:C1:38:56:4D:A1
   DEF        A4:C1:38:56:4D:A1
   FUUID      5ff36603-f33f-2e5f-f813-bd879db8acd53cbb
   FVERSION   74_XiaomiBTLESens.pm:v3.0.0-s22474/2020-07-26
   INTERVAL   855
   NAME       E1_wz_THHY_Wand
   NOTIFYDEV  global,E1_wz_THHY_Wand
   NR         340
   NTFY_ORDER 50-E1_wz_THHY_Wand
   STATE      Temperatur: 21.09 °C </br>
Feuchtigkeit: 55 % </br>
Stand: 2021-01-08 19:23:00
   TYPE       XiaomiBTLESens
   VERSION    v3.0.0
   loglevel   4
   Helper:
     DBLOG:
       humidity:
         logdb:
           TIME       1610130180.90625
           VALUE      55
       temperature:
         logdb:
           TIME       1610130180.90625
           VALUE      21.09
   READINGS:
     2021-01-08 08:52:12   batteryPercent  63
     2021-01-08 08:52:12   batteryState    ok
     2021-01-07 17:46:24   devicename      LYWSD03MMC
     2021-01-04 20:05:22   firmware        1.0.0_0106
     2021-01-08 19:23:00   humidity        55
     2021-01-08 19:41:04   lastActivity    2021-01-08 19:23:00
     2021-01-08 19:41:04   lastGattError   no data response
     2021-01-08 19:41:04   state           error
     2021-01-08 19:23:00   temperature     21.09
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 1610092332.59243
     updateTimestampCallBattery 2021-01-08 08:52:12
Attributes:
   DbLogInclude batteryPercent,batteryState,humidity,temperature
   alias      Thermometer Wohnzimmer
   event-min-interval humidity:1800,temperature:1800
   event-on-change-reading humidity,temperature,batteryPercent,batteryState,batteryState
   group      Heizungssteuerung
   hciDevice  hci1
   interval   855
   model      mijiaLYWSD03MMC
   room       XiaomiBTLESens
   sortby     1
   stateFormat Temperatur: temperature °C </br>
Feuchtigkeit: humidity % </br>
Stand: lastActivity
   userReadings lastActivity {ReadingsTimestamp ($name,"temperature","--")}
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 09 Januar 2021, 09:26:33
Da wurde mir nur einfallen das Intervall niedriger zu setzen. Sagen wir so 300 zum Beispiel und dann mal schauen wie oft es zu Problemen kommt.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ToKa am 09 Januar 2021, 10:45:31
Kann ich machen.
Komischerweise ist seit gestern Abend 21 Uhr nur bei einem ein Ausfall festszustellen, beim anderen kommen munter die Werte rein.

Vielleicht binde ich den einfach noch einmal neu ein.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: tomcat.x am 09 Januar 2021, 13:49:49
Bei mir stehen die Intervalle übrigens alle über 300 (zwischen 350 und 400). Gestern hätte ich fast schon geantwortet, dass es damit und einem täglichen Restart des Adapters ohne Probleme funktioniert. Jetzt hatte ich aber gerade wieder bei 2 den "Device or resource busy (16)" Fehler.

Da ich auf einem meiner ESP32 mittlerweile OpenMQTTGateway installiert habe und es da sowohl für die LYWSD03MMC als auch meine Pflanzensensoren fertige Templates zur Auswertung gibt, werde ich wohl eher den Weg weiterverfolgen. Nur mit der Verbindung zu dem am weitesten entfernten LYWSD03MMC (Garage) habe ich noch Probleme. Da ist der Raspi Zero wohl besser. Aber am Montag kommen 3 weitere (andere) ESP32, die besser empfangen sollen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ToKa am 10 Januar 2021, 16:30:39
Hallo zusammen,

mit den wesentlich kürzeren Intervallen, fällt es natürlich nicht so sehr auf, dass einzelne Übertragungen nicht klappen. Um die Temperatur einfach zu messen und darzustellen, reicht das aus. Für eine Steuerung mit den Werten wäre mir das zu instabil.

Ich wollte jetzt nicht unbedingt noch eine "weitere" Technik wie den ESP32 und SW openMQTTGateway zum Einsatz bringen, aber welche Hardware nutzt Du denn tomcat?

Viele Grüße
Torsten
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: tomcat.x am 10 Januar 2021, 17:13:31
Die "ESP32 D1 Mini NodeMCU" von  AZDelivery. Es gab einen Artikel in der c't, der mich überhaupt erst dazu gebracht hat, mich mit ESP32 und MQTT zu beschäftigen. Da waren die "größeren" von AZDelivery als Beispiel verlinkt. Rein für Bluetooth (bereits eingebaut) fand ich aber die D1 Mini praktischer. Das Beispiel aus der c't hatte ich dann so in 2-3 Stunden am laufen (ESP32 geflasht und MQTT2_SERVER in fhem installiert). Bei der weiteren Beschäftigung mit MQTT im fhem Wiki bin ich dann auf das OpenMQTTGateway gestoßen.

Zum Thema hier (damit es nicht ganz OT ist): Auch größere Intervalle könnten zum Ziel führen, da es hier dann potentiell weniger Überschneidungen gibt (bei alle 5 Minuten hätte selbst bei 5 Sensoren jeder 1 Minute Zeit zur Abfrage). Gut, bei einer zufälligen Überschneidung dauert es dann aber wiederum 10 Minuten, bis man wieder einen Wert bekommt.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ToKa am 11 Januar 2021, 19:30:48
Hallo zusammen,

logge jetzt die Gatt Fehler mit und musste heute Nachmittag den Bluetooth Empfänger resetten, weil bei einem Sensor gar nichts mehr ging.

Bei meiner weiteren Suche im Internet bin ich auf folgenden Link gestoßen:
https://github.com/JsBergbau/MiTemperature2/
(https://github.com/JsBergbau/MiTemperature2/)

Ein Python-Script um die Sensoren mit Standard firmware oder custom firmware auszulesen. Werde ich mir mal anschauen und ausprobieren. Mann kann wohl die Daten dann auch per mqtt und anderen Techniken weiter senden.

@Timcat: Danke für die Infos zu ESP32.

Viele Grüße
Torsten
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Holzlenkrad am 08 Februar 2021, 02:01:19
Moin CoolTux,

magst du vielleicht für die Werte, die aus dem Sensor ausgelesen werden (Temperatur usw) jeweils ein Attribut zur Kalibrierung hinzufügen? Mein Thermometer zeigt leider chronisch eine zu hohe Luftfeuchtigkeit an und ich würde einfach direkt -4.0 abziehen wollen. Dann wäre das Reading direkt schon verändert und ich muss nicht jedes Mal, wenn der Wert in der UI angezeigt  oder in die InfluxDB geschrieben werden soll daran denken die Werte anzupassen.

Danke :)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 08 Februar 2021, 06:13:04
Zitat von: Holzlenkrad am 08 Februar 2021, 02:01:19
Moin CoolTux,

magst du vielleicht für die Werte, die aus dem Sensor ausgelesen werden (Temperatur usw) jeweils ein Attribut zur Kalibrierung hinzufügen? Mein Thermometer zeigt leider chronisch eine zu hohe Luftfeuchtigkeit an und ich würde einfach direkt -4.0 abziehen wollen. Dann wäre das Reading direkt schon verändert und ich muss nicht jedes Mal, wenn der Wert in der UI angezeigt  oder in die InfluxDB geschrieben werden soll daran denken die Werte anzupassen.

Danke :)

Kann ich mir bei Gelegenheit gerne anschauen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Koersten am 04 März 2021, 14:53:06
Hallo zusammen,

leider habe ich heute ein routinemäßiges upgrade meines Pi 3 durchgeführt und danach hat das Modul nur noch folgende Fehler geworfen:

2021.03.04 14:36:18 3: XiaomiBTLESens (wz_pflanze6) - ExecGatttool_Run: errorcode: "1", ErrorString: "connect: Connection refused (111)
"
2021.03.04 14:36:18 3: XiaomiBTLESens (wz_pflanze7) - ExecGatttool_Run: errorcode: "1", ErrorString: "connect: Connection refused (111)
"
2021.03.04 14:36:18 3: XiaomiBTLESens (wz_pflanze5) - ExecGatttool_Run: errorcode: "1", ErrorString: "connect: Connection refused (111)
"
2021.03.04 14:36:18 3: XiaomiBTLESens (wz_pflanze2) - ExecGatttool_Run: errorcode: "1", ErrorString: "connect: Connection refused (111)
"
2021.03.04 14:36:18 3: XiaomiBTLESens (wz_pflanze3) - ExecGatttool_Run: errorcode: "1", ErrorString: "connect: Connection refused (111)
"
2021.03.04 14:36:18 3: XiaomiBTLESens (wz_pflanze4) - ExecGatttool_Run: errorcode: "1", ErrorString: "connect: Connection refused (111)


Das hcitool scannt aber sauber auf dem Pi. Das habe ich schon überprüft. Da ich kein Entwickler bin, kann ich leider nicht mehr dazu sagen im Moment.
Gerne helfe ich aber bei der Fehlersuche, wenn man mir sagt, was ich tun soll.
Danke schonmal!
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Jamo am 04 März 2021, 14:58:12
Hallo Koersten,
Ich hatte mal die gleiche Fehlermeldung. Du kannst mal versuchen dein hci interface (bei mir hci1) neu zu starten, mit
- sudo hciconfig hci1 down
- sudo hciconfig hci1 up
Danach sollte es wieder funktionieren
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Koersten am 04 März 2021, 15:02:52
Zitat von: Jamo am 04 März 2021, 14:58:12
Hallo Koersten,
Ich hatte mal die gleiche Fehlermeldung. Du kannst mal versuchen dein hci interface (bei mir hci1) neu zu starten, mit
- sudo hciconfig hci1 down
- sudo hciconfig hci1 up
Danach sollte es wieder funktionieren
Danke für den Tipp!
Habe ich gerade ausprobiert. Bei mir hieß es hci0, aber das ist ja nicht relevant.
Auch den ganzen Pi hatte ich schonmal rebootet.

Das hat leider keine Änderung gebracht.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Koersten am 25 März 2021, 20:48:23
Seit zwei Tagen ist wieder alles ok und alle Sensoren laufen wieder. Ich hatte ein Update von Fhem und eines für den Pi gemacht.
Keine Ahnung was sich geändert hat, aber alles geht wieder auf magische Weise.

Auch gut.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Jamo am 25 März 2021, 21:15:11
Hallo Koersten,
ich hatte jetzt auch wieder öfter Schwierigkeiten, ich weiss mein Tip mit hci0/1 up/down hat Dir nicht geholfen,
das funktioniert bei mir auch nicht immer. Ich habe jetzt aber nochmal viel gegoogled, was funktioniert ist sudo btmgmt le on && sudo service bluetooth restart & (hci0 ist default da kann man das -i hci0 weglassen) oder eben für hci1 sudo btmgmt -i hci1 le on && sudo service bluetooth restart &
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Koersten am 26 März 2021, 08:42:28
Zitat von: Jamo am 25 März 2021, 21:15:11
Hallo Koersten,
ich hatte jetzt auch wieder öfter Schwierigkeiten, ich weiss mein Tip mit hci0/1 up/down hat Dir nicht geholfen,
das funktioniert bei mir auch nicht immer. Ich habe jetzt aber nochmal viel gegoogled, was funktioniert is sudo btmgmt le on && sudo service bluetooth restart & (hci0 ist default da kann man das -i hci0 weglassen) oder eben sudo btmgmt -i hci1 le on && sudo service bluetooth restart &

Hey Jamo,
danke das werde ich das nächste mal auf jeden Fall mal versuchen.
Das ist schon komisch das Bluetooth auf dem Pi so zickig ist. Ich weiß das eigentliche Fhem Modul hat damit nichts zu tun.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: knxler am 22 Mai 2021, 16:28:05
Hallo,
ich versuche gerade meinen ersten "flowerSens" in Betrieb zu nehmen. Unter linux wird er Sensor auf dem PI gefunden. Wenn ich dann in Fehm "get firmware" abrufe bekomme ich die Fehlermeldung No route to host(113) geliefert. Hat einer einen Tip für mich an was das liegt?
Ich benutze einen PI4.
Hier mein list zu dem Device.

ZitatInternals:
   BTMAC      80:EA:CA:89:41:A6
   DEF        80:EA:CA:89:41:A6
   FUUID      60a90a77-f33f-5ea6-39e1-2794c8c40575fc67
   FVERSION   74_XiaomiBTLESens.pm:v3.0.0-s22474/2020-07-26
   INTERVAL   7200
   NAME       wz_pflanze1
   NOTIFYDEV  global,wz_pflanze1
   NR         867
   NTFY_ORDER 50-wz_pflanze1
   STATE      error
   TYPE       XiaomiBTLESens
   VERSION    v3.0.0
   loglevel   4
   READINGS:
     2021-05-22 16:16:37   lastGattError   No route to host (113)
     2021-05-22 16:16:37   state           error
   helper:
     CallBattery 0
     CallSensDataCounter 0
     updateTimeCallBattery 0
Attributes:
   alias      Erster Sensor
   interval   7200
   model      flowerSens
   room       XiaomiBTLESens

Gruß Martin
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 22 Mai 2021, 17:33:15
Ein klassischer Fehler ist das der Sensor noch mit einem anderen Gerät gepaired ist. Hast Du den Sensor noch am Handy oder so gekoppelt?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: knxler am 22 Mai 2021, 17:49:55
Hallo,
die Idee hatte ich auch schon und habe Bluetooh am Handy abgeschaltet.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: mi.ke am 22 Mai 2021, 20:24:54
Zitat von: knxler am 22 Mai 2021, 16:28:05
Unter linux wird er Sensor auf dem PI gefunden. Wenn ich dann in Fehm "get firmware" abrufe bekomme ich die Fehlermeldung No route to host(113) geliefert. Hat einer einen Tip für mich an was das liegt?
Nutzt den internen BT Chip oder hast Du noch einen zusätzliche BT Dongle eingesteckt?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: knxler am 22 Mai 2021, 20:53:38
Ich nutze den BT-Chip auf dem PI
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: knxler am 23 Mai 2021, 22:39:10
Hat keiner eine Idee zu meinem Problem?
mit dem gatttool erhalte ich folgendes Ergebnis
Zitatsudo gatttool -b  80:EA:CA:89:41:A6 -I
[80:EA:CA:89:41:A6][LE]> connect
Attempting to connect to 80:EA:CA:89:41:A6
Connection successful
Notification handle = 0x0021 value: 00
Notification handle = 0x0021 value: 00
Notification handle = 0x0021 value: 00
[80:EA:CA:89:41:A6][LE]>
(gatttool:3934): GLib-WARNING **: 22:32:14.523: Invalid file descriptor.
und in meiner Logdatei von Fehm seht folgendes
Zitat2021.05.23 00:00:17.251 4: XiaomiBTLESens (wz_pflanze1) - Run CreateParamGatttool with mod: read
2021.05.23 00:00:17.381 4: XiaomiBTLESens (wz_pflanze1) - stateRequestTimer: Call Request Timer
2021.05.23 00:00:18.276 3: XiaomiBTLESens (wz_pflanze1) - ExecGatttool_Run: errorcode: "1", ErrorString: "connect: No route to host (113)
"
2021.05.23 00:00:18.277 4: XiaomiBTLESens (wz_pflanze1) - ExecGatttool_Run: gatttool result connect,No route to host (113)

2021.05.23 00:00:18.290 4: XiaomiBTLESens (wz_pflanze1) - ProcessingErrors
2021.05.23 00:00:18.305 4: XiaomiBTLESens (wz_pflanze1) - WriteReadings: Readings were written
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: knxler am 24 Mai 2021, 19:55:29
Noch eine Info,
meine Sensoren sind von PEARL. Sehen genau wie im WIKI aus. Dei Sensoren melden sich:
Zitathcitool lescan
LE Scan ...
80:EA:CA:89:41:E0 Flower care
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: knxler am 26 Mai 2021, 09:20:00
Problem gelöst! Ich habe mehrere PIs am laufen und habe den falschen Pi genommen der im Keller ist und die BT-Sticks nicht finden kann.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Holzlenkrad am 25 Juni 2021, 05:31:56
Zitat von: CoolTux am 08 Februar 2021, 06:13:04
Kann ich mir bei Gelegenheit gerne anschauen.

Hey,
hattest du schon mal Gelegenheit dir das anzugucken? Sollte ja nicht so umfangreich sein. :)

Sonst würde ich mir selbst mal angucken, wie die Scripte für FHEM aufgebaut sind.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 25 Juni 2021, 05:59:01
Zitat von: Holzlenkrad am 25 Juni 2021, 05:31:56
Hey,
hattest du schon mal Gelegenheit dir das anzugucken? Sollte ja nicht so umfangreich sein. :)

Sonst würde ich mir selbst mal angucken, wie die Scripte für FHEM aufgebaut sind.

Leider nein. Du kannst aber ein userreadings anlegen und das dann loggen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Alex2021 am 22 Juli 2021, 13:18:33
Hallo zusammen,

nach mehrmaligen Versuchen komme ich leider nicht weiter und habe mich entschlossen, hier eure Hilfe aufzusuchen.

Mein Ziel: Die Xiaomi Thermometer LYWSD03MMC in fhem einzubinden.

Meine bisherigen Versuche sind jedoch gescheitert. Sowohl das Thermometer mit Custom Firmware (GitHub: /atc1441/ATC_MiThermometer) als auch "out of the box" einzubinden funktionierte bisher nicht. In fhem habe ich ein entsprechendes Device definiert und die BT-MAC Adresse angegeben (nach Anleitung aus dem Wiki XiaomiBTLESens). Es werden jedoch keine Daten empfangen.

Was mich dabei weiter verwirrt:
1) mit dem Homebridge Plugin homebridge-mi-hygrothermograph funktioniert das auslesen einwandfrei (die Einbindung in fhem habe ich sowohl mit den gleichen Devices, die bereits ich bereits in Homebridge nutze, probiert als auch mit Devices, die ich nicht in Homebridge eingebunden hatte. Ich habe mehrere hier rumliegen.)
2) im Homebridge Plugin kann ich einen Token zur Entschlüsselung der Daten angeben, sofern die originale Firmware genutzt wird. In fhem habe ich diese Möglichkeit noch nicht gefunden. Das verunsichert mich, weil ich mich frage, wie fhem dann die Daten lesen kann.

Ich würde mich freuen, wenn ihr ein paar Ideen oder konkrete Hilfe für mich habt.

Viele Grüße
Alex
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Breaker am 07 August 2021, 19:07:52
Hallo,

Ist es möglich noch den RoPot von HHCC im Modul zu ergänzen?
Dieser funktioniert mit derselben App (FlowerCare) nach dem registrieren in fhem kommen leider Mondwerte. Es werden auch nur Humidity, Fertility und Akku gesendet.
Wie kann ich dabei unterstützen?

Viele Grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: marboj am 24 August 2021, 07:03:54
Zitat von: Pati_Alpha am 14 Januar 2020, 10:49:19
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!

Hallo Pati_alpha,

wie genau sieht der DOIF aus, da ich das gleiche Problem habe?

VG
Marco
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: persching am 03 Oktober 2021, 12:55:12
Ich habe (versehentlich) 2 Xiaomi MCCGQ02HL Fensterkontakte mit BT LE bestellt (wollte eigentlich die mit Zigbee). Die Retoure ist hier nicht so besonders wirtschaftlich und ich dachte, vielleicht kann ich sie ja in dem Raum nutzen wo mein FHEM Rechner steht.
Leider musste ich feststellen, dass dieses Modul diesen Sensor nicht kennt. Wie kann man den einbinden? bzw. kann ich hier unterstützen, damit dieses Modul zukünftig in FHEM funktioniert?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 03 Oktober 2021, 15:03:46
Zitat von: persching am 03 Oktober 2021, 12:55:12
Ich habe (versehentlich) 2 Xiaomi MCCGQ02HL Fensterkontakte mit BT LE bestellt (wollte eigentlich die mit Zigbee). Die Retoure ist hier nicht so besonders wirtschaftlich und ich dachte, vielleicht kann ich sie ja in dem Raum nutzen wo mein FHEM Rechner steht.
Leider musste ich feststellen, dass dieses Modul diesen Sensor nicht kennt. Wie kann man den einbinden? bzw. kann ich hier unterstützen, damit dieses Modul zukünftig in FHEM funktioniert?

Hier geht es ausschließlich um Temperatur/Pflanzensensoren. Tut mir Leid.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: persching am 03 Oktober 2021, 17:01:01
Ist es denn eine große Anpassung hier einen weiteren Sensor dazu zu nehmen? Ich meine die Basis ist ja immer BTLE. Ich würde auch den Sensor zur Implementierung spendieren! ;) 
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 03 Oktober 2021, 18:32:36
Zitat von: persching am 03 Oktober 2021, 17:01:01
Ist es denn eine große Anpassung hier einen weiteren Sensor dazu zu nehmen? Ich meine die Basis ist ja immer BTLE. Ich würde auch den Sensor zur Implementierung spendieren! ;)

Wäre sicherlich keine sooo große Anpassung. Wer möchte kann das gerne machen. Ich arbeite die Änderungen auch gerne ein. Ich selbst habe aber keine Zeit für die Anpassungen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: moppy am 17 Dezember 2021, 09:34:33
Hi! Habe mir einen HHCC Flower Care Max gekauft, quasi ein etwas größerer Flowercare mit Akku den man dann auch über USB aufladen kann. In der App funktioniert der Sensor wie schon vorher die kleineren FlowerCare Sensoren. In Fhem kann die Firmware und Battery ausgelesen werden, jedoch übertragt es keine weiteren Werte.

lastGattError
Function not implemented (38)

Wäre es möglich, den Sensor gangbar zu machen? Kann gerne weitere Details dazu liefern.

lg Emanuel
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 17 Dezember 2021, 10:52:11
Zitat von: moppy am 17 Dezember 2021, 09:34:33
Hi! Habe mir einen HHCC Flower Care Max gekauft, quasi ein etwas größerer Flowercare mit Akku den man dann auch über USB aufladen kann. In der App funktioniert der Sensor wie schon vorher die kleineren FlowerCare Sensoren. In Fhem kann die Firmware und Battery ausgelesen werden, jedoch übertragt es keine weiteren Werte.

lastGattError
Function not implemented (38)

Wäre es möglich, den Sensor gangbar zu machen? Kann gerne weitere Details dazu liefern.

lg Emanuel

Leider sehe ich da aktuell aus zeitlicher Sicht wenig Hoffnung. Tut mir Leid.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: kurt6908 am 15 Januar 2022, 16:38:55
Hallo CoolTux,

das Modul liefert beim Model "mijiaLYWSD03MMC" falsche negative Werte.

Hier müsste die Zeile 1239

$readings{'temperature'} = hex( "0x" . $splitVal[1] . $splitVal[0] ) / 100;

geändert werden in


$readings{'temperature'} = hex( "0x" . $splitVal[1] . $splitVal[0] );
if ($readings{'temperature'} > 20000){
$readings{'temperature'}=(-65536 + $readings{'temperature'});
}
$readings{'temperature'}=$readings{'temperature'}/100;


Dann werden auch korrekte negative Themperaturwerte geliefert.

Kannst Du dass bitte checken und einchecken.

Danke.

Gruß

Kurt
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 15 Januar 2022, 20:47:44
Traut sich jemand zu das mal zu testen

https://git.cooltux.net/FHEM/mod-XiaomiBTLESens/raw/branch/devel/74_XiaomiBTLESens.pm

Ich habe einiges geändert. Bitte beim testen das Logfile im Auge behalten.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: kurt6908 am 15 Januar 2022, 20:55:18
Hallo CoolTux,

vielen Dank. Ich habs mal eingespielt, jetzt muss die Temperatur nur noch unter 0 Grand sinken ...

Ich berichte ...

Gruß

Kurt
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 15 Januar 2022, 20:57:37
Erstmal schauen ob es überhaupt noch weiter sauber läuft und dann mal schauen was die Temp sagt.

Kannst Du das Teil zur Not in den Kühlschrank packen?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: kurt6908 am 16 Januar 2022, 17:34:51
Hallo CoolTux,

also das Modul läuft bis jetzt fehlerfrei, keine Log-Einträge.

Aber ob die negative Themperatur richtig dargestellt wird, kann ich noch nicht sagen. Mein Xiaomi-Thermostat ist in einer ca. 150km entfernten FHEM-Instanz. (P.S. Mein Kühlschrank hat +7 Grad, da könnte ich es auch nicht testen ;=)

Ich muss also warten, bis mal negative Therperaturen da sind, aktuell hat es +1,6 Grad. Sorry.

Gruß

Kurt
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: marboj am 20 Januar 2022, 11:12:21
Hallo zusammen,

habe seit einem Jahr 10 dieser Thermometer mijiaLYWSD03MMC im Einsatz. Grundsätzlich funktionieren sie.

Folgende Probleme habe ich allerdings:

- batteryPercent steht immer auf 63, egal wie neu die Batterie ist.
- Hin und wieder muss das BT neu gestartet werden, damit die Verbindung wieder funktioniert
- die im Thread schon angesprochenen Reichweitenprobleme

Habe im Thread noch keine finale Lösung für das Verbindungsproblem gefunden. Das Batterieproblem habe ich gar nicht gefunden.

Jemand eine Idee?

exemplarisch mal ein Device:

attr AZ.Thermo userattr K2.Thermo K2.Thermo_map room_map structexclude
attr AZ.Thermo alias Arbeitszimmer Thermo-/Hygrometer
attr AZ.Thermo appOptions { "template": "thermometer" }
attr AZ.Thermo group Sensoren
attr AZ.Thermo hciDevice hci0
attr AZ.Thermo icon temperature_humidity
attr AZ.Thermo interval 7200
attr AZ.Thermo model mijiaLYWSD03MMC
attr AZ.Thermo room 12_Arbeitszimmer,XiaomiBTLESens
attr AZ.Thermo userReadings temp {sprintf("%.1f °C",ReadingsNum($name,"temperature",0))}

setstate AZ.Thermo T: 22.94 H: 53 D: 12.8
setstate AZ.Thermo 2022-01-20 10:10:26 batteryPercent 63
setstate AZ.Thermo 2022-01-20 10:10:26 batteryState ok
setstate AZ.Thermo 2022-01-20 10:10:37 dewpoint 12.8
setstate AZ.Thermo 2021-03-17 14:19:30 firmware 1.0.0_0109


Vielen Dank
Gruß
Marco
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Beta-User am 20 Januar 2022, 11:38:23
Hmm, leider finde ich die Fundstelle grade nicht, meine aber, dass das mit den falschen Batterie-Werten ein allg. Problem bei denen (mit der original-firmware) sei.

Das mit dem Hängenbleiben dürfte mit dem Erfordernis des Einloggens zu tun haben:
Zitat von: Beta-User am 06 Januar 2021, 17:50:08
Also: die LYWSD03MMC geben ihre Daten mit der Original-firmware nur preis, wenn man sich darauf einloggt. Das sperrt aber offenkundig die Schnittstelle für die Zeit, womit praktisch alle Lösungen ein Problem haben (das Modul hier kann (derzeit) nur einen gleichzeitig und  OpenMQTTGateway auf ESP32 kommt damit uU. auch aus dem Tritt, wobei das auch andere Gründe haben kann).
Prinzipiell glaube ich, dass es für diese Sensoren besser ist, die umzuflashen (https://github.com/pvvx/ATC_MiThermometer), leider kann das Modul hier das (noch) nicht, es müßte jemand den Code erweitern...
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: marboj am 20 Januar 2022, 14:49:40
Zitat von: CoolTux am 15 Januar 2022, 20:47:44
Traut sich jemand zu das mal zu testen

https://git.cooltux.net/FHEM/mod-XiaomiBTLESens/raw/branch/devel/74_XiaomiBTLESens.pm

Ich habe einiges geändert. Bitte beim testen das Logfile im Auge behalten.

Hab es mal in das Gefrierfach gelegt. Sieht gut aus...

setstate KUE.Thermo 2022-01-20 14:48:14 state T: -4.48 H: 69
setstate KUE.Thermo 2022-01-20 14:48:14 temp -4.5 °C
setstate KUE.Thermo 2022-01-20 14:48:14 temperature -4.48
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 20 Januar 2022, 16:46:21
Ich habe die neue Version eingecheckt.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: marboj am 20 Januar 2022, 17:05:47
Zitat von: CoolTux am 20 Januar 2022, 16:46:21
Ich habe die neue Version eingecheckt.

Muss ich die manuell eingespielte Version jetzt löschen? Oder wird das künftig trotzdem aktualisiert?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 20 Januar 2022, 19:03:54
Zitat von: marboj am 20 Januar 2022, 17:05:47
Muss ich die manuell eingespielte Version jetzt löschen? Oder wird das künftig trotzdem aktualisiert?

Du musst nur den zusätzlichen Update Repo Link löschen. Das reicht schon.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Nighthawk am 20 Januar 2022, 19:28:53
Hallo Cooltux,

wäre es möglich auch die Xiaomi (Honeywell) Rauchmelder mit BTLE mit in das Modul einzubinden?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 20 Januar 2022, 20:56:36
Leider habe ich aktuell da keine Zeit.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: marboj am 21 Januar 2022, 07:21:04
Zitat von: Beta-User am 20 Januar 2022, 11:38:23
Hmm, leider finde ich die Fundstelle grade nicht, meine aber, dass das mit den falschen Batterie-Werten ein allg. Problem bei denen (mit der original-firmware) sei.

Das mit dem Hängenbleiben dürfte mit dem Erfordernis des Einloggens zu tun haben:Prinzipiell glaube ich, dass es für diese Sensoren besser ist, die umzuflashen (https://github.com/pvvx/ATC_MiThermometer), leider kann das Modul hier das (noch) nicht, es müßte jemand den Code erweitern...

@cooltux

Gibt es denn für die Batterieproblematik eine Lösung?

Gruß
Marco
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 21 Januar 2022, 07:34:06
Nein. Das Modul liest direkt den Sensor aus und schreibt was dieser übertragt. Wenn die Daten nicht valide aus dem Sensor kommen kann ich da leider nichts machen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: marboj am 21 Januar 2022, 07:48:45
Zitat von: CoolTux am 21 Januar 2022, 07:34:06
Nein. Das Modul liest direkt den Sensor aus und schreibt was dieser übertragt. Wenn die Daten nicht valide aus dem Sensor kommen kann ich da leider nichts machen.

und die Integration der alternativen Firmware?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 21 Januar 2022, 08:48:54
Habe ich leider aktuell keine Zeit für.

Ich nehme aber natürlich sehr gerne Patches an.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: kurt6908 am 14 Februar 2022, 18:48:31
Hallo,

Zitat von: marboj am 20 Januar 2022, 14:49:40
Hab es mal in das Gefrierfach gelegt. Sieht gut aus...

setstate KUE.Thermo 2022-01-20 14:48:14 state T: -4.48 H: 69
setstate KUE.Thermo 2022-01-20 14:48:14 temp -4.5 °C
setstate KUE.Thermo 2022-01-20 14:48:14 temperature -4.48


ich kann nun auch aus dem Reallife bestätigen, dass negative Werte angezeigt werden. Läuft also bestens.

Vielen Dank für die Änderung.

Kurt
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ares am 26 Februar 2022, 12:45:34
Ist geplant, eine Unterstützung für die Xiaomi Mi Scale umzusetzen?
https://github.com/lolouk44/xiaomi_mi_scale

Viele Grüße
Manfred
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 26 Februar 2022, 12:48:09
Zitat von: ares am 26 Februar 2022, 12:45:34
Ist geplant, eine Unterstützung für die Xiaomi Mi Scale umzusetzen?
https://github.com/lolouk44/xiaomi_mi_scale

Viele Grüße
Manfred

Nein. Aber es gibt eine Alternative für FHEM, fhempy mit dem lowenergy Bluetooth
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Beta-User am 26 Februar 2022, 13:16:52
OpenMQTTGateway (ESP32) kann die u.a. auch...
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: ares am 27 Februar 2022, 09:18:39
Zitat von: CoolTux am 26 Februar 2022, 12:48:09
Nein. Aber es gibt eine Alternative für FHEM, fhempy mit dem lowenergy Bluetooth
Da die Daten bereits mit dem Modul und falscher Device bereits im Event monitor von fhem ankommen, hatte ich gehofft, die Messdaten (nur Gewicht) ohne weitere Verarbeitung oder eigenes Modul einfach integrieren zu können.
Vielen Dank aber für den Tipp mit fhempy... irgendwie wurde mir das Modul bei meinen bisherigen Suchanfragen nie angezeigt.

Zitat von: Beta-User am 26 Februar 2022, 13:16:52
OpenMQTTGateway (ESP32) kann die u.a. auch...
Meine Waage ist nicht mehr in Empfangsreichweite meines Raspberry im Keller mit der fhem-Installation. Ich hatte daher einen Raspberry Pi Zero 2 W geplant, der auch einen noch nicht vorhandenen FlowerSens überwachen sollte.
Mit dem ESP32 hatte ich mich bisher noch nicht befasst, da ich nicht löten kann und das auch nicht mehr lernen werde. Kann ich beim ESP32 auch einfach etwas inklusive Netzteil und ohne Löten zusammenbauen das nicht nach einer Bastellösung aussieht?
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 27 Februar 2022, 09:22:43
[OT] es gibt ESP fix und fertig inkl. USB-Anschluss für Spannung und flashen. Und sogar mit POE, wer lieber LAN als WLAN will...
Stichwort: NodeMCU...
Z.B.: https://www.ebay.de/itm/Espressif-ESP32-WLAN-Dev-Kit-Board-Development-Bluetooth-Wifi-v1-WROOM32-NodeMCU-/255283221996?mkcid=16&mkevt=1&_trksid=p2349624.m46890.l49286&mkrid=707-127634-2357-0
[/OT]

Gruß, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Beta-User am 27 Februar 2022, 09:54:29
Zitat von: ares am 27 Februar 2022, 09:18:39
Ich hatte daher einen Raspberry Pi Zero 2 W geplant, der auch einen noch nicht vorhandenen FlowerSens überwachen sollte.
Mit dem ESP32 hatte ich mich bisher noch nicht befasst, da ich nicht löten kann und das auch nicht mehr lernen werde. Kann ich beim ESP32 auch einfach etwas inklusive Netzteil und ohne Löten zusammenbauen das nicht nach einer Bastellösung aussieht?
Der Aufwand mit einem ESP32 dürfte geringer sein wie mit dem Zero W - die "dev-boards"  haben in der Regel einen Micro-USB-Anschluss, über den sie auch geflasht werden. Meine beiden sitzen je in einem alten FritzBox-Gehäuse - zusammen mit anderem "Bastelgruscht".
OMG kann jedenfalls u.a. auch die "Flower".

Man kann BT-LE übrigens auch mit Tasmota-ESP32 empfangen; vermutlich ginge das auch damit, ist nur noch nicht groß getestet, was die Auswertung der Daten in FHEM angeht (die JSON sind gefühlt etwas "komisch"). Will sagen: Dann geht ggf. auch ein irgendwo verbauter "normaler WLAN-Aktor" als IO-Gerät... (es gibt in der english-corner einen, der seine ewuiva-Thermostate so steuert!).
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: huri-kane am 16 Mai 2022, 16:28:15
Hallo in die Runde,

weiß nicht, ob der Thread hier der richtige Anlaufpunkt für Patches ist. Falls nicht, bitte nicht steinigen  ::)

TL;DR: Das Auslesen der Helligkeit am FlowerCare Sensor ("flowerSens") berücksichtigt zu nur zwei Bytes für einen Wertebereich von 0 - 140.000lux und führt daher bei starker Helligkeit zu einem falschen Ergebnis.

Ich betreibe bei mir den FlowerCare Sensor seit einigen Jahren zur Ermittlung der Außenhelligkeit und habe bisher nie hinterfragt, warum bei strahlendem Sonnenschein am Vormittag im Helligkeitsverlauf immer ein krasser Sprung nach unten zu verzeichnen war. Bin nun mehr oder weniger durch Zufall dazu gekommen, mir auch mal die dazugehörigen Android App zu installieren. Die dort aufgeführten Sensorwerte berichteten u.a. eine Helligkeit von um die 100.000lux (blauer Himmel, Sonne satt). Im FHEM wurde aber irgendwas um 36.000 gemeldet.
Daraufhin habe ich mal die Verbosity im FHEM-Device erhöht um einen schnellen Blick auf die Rohdaten des BLE-Datentransfers vom gattool haben zu können. Nach anschließendem kurzen Blick in den Perl-Code war zumindest schnell klar, welche Bytes im Datenstrom die Helligkeit repräsentieren (Bereich um Zeile 1084 in 74_XiaomiBTLESens.pm / Funktion FlowerSensHandle0x35()). Da fiel mir auf, dass lediglich zwei Bytes dafür aus dem Byte-Array genommen werden ($sensorData[4] und $sensorData[3]) - was nicht so recht zu einer Helligkeit von ~100.000lux passt die der Sensor laut Android App ja offenbar überträgt.
Da $sensorData[5] jedoch nirgendwo genutzt wird, es einen geringen Wert (0x01) hatte und die Daten offenbar als big endian übertragen werden, habe ich es einfach als zusätzliches Byte voran gefügt - und dann kam "plötzlich" auch ein entsprechender Helligkeitswert raus der auch zu dem Wert aus der App passte.
Einen entsprechenden Patch habe ich mal angefügt falls Interesse besteht, das mit aufzunehmen :) Auch wenn das jetzt nur Trial&Error war scheint es mir dennoch plausibel....

Beste Grüße
André
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: hummeruli am 03 Juni 2022, 15:40:37
Hi André,

super Patch!

Hatte mich auch schon gewundert dass die Werte so niedrig waren. Dachte aber "typisch China". Auch vermutete ich, dass die Pflanze zu wenig Licht vorbei an den Sensor lässt.

(Bei 8 Stück)!  8)

Danke und schöne Pfingsten.

Gruß

Uli 
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: RudiRoechel am 26 Juli 2022, 16:30:53
Hallo allerseits,

ich habe ein kleines Problem beim Logging von meinem Flower Sensor.  Weil der Sensor nicht in der direkten Nähe zum Raspi steht, bekomme ich spätestens wenn Abends die Rolladen runter gehen (ich benutze den Sensor draußen) keine Werte mehr, sondern immer die bekannten Fehler Meldungen im state (unreachable, error, usw.)
Die habe ich dann natürlich auf im Log und das wollte ich vermeiden.
Ein event on change reading funktioniert natürlich nicht, da ja bei jedem Verbindungsversuch wieder die Meldungen (read data from sensor usw.) kommen.
Also dacht ich ich bin ganz schlau, und baue mir ein Userreading, das OK anzeigt, wenn im state steht active und ein ERROR, wenn da was anderes steht. Da kann ich dann schlön mit event on change reading arbeiten.

Nun folgt mein Problem. Im Logfile werden aber immernoch alle sate Änderungen eingetragen. Kann man das irgendwie abstellen?
Ich dachte da muss do irgendwo ein "Schalter" sein nach dem Motto: "Logge alles außer state"
Aber mir fehlt da irgendwo die Idee.


Vielen Dank schon mal für eure Bemühungen.
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: mi.ke am 26 Juli 2022, 23:51:26
Zitat von: RudiRoechel am 26 Juli 2022, 16:30:53
Ich dachte da muss do irgendwo ein "Schalter" sein nach dem Motto: "Logge alles außer state"

Falscher Ansatz!

Die Lösung ist "Logge nur das was geloggt werden soll"
z. B. moisture,temperature,fertility,lux

define FileLog_Pflanze_01 FileLog ./log/Pflanze_01-%Y-%U.log Pflanze_01:(moisture|temperature|fertility|lux).*

Beispiele findest Du in der commandref
Dann mit STRG + F
filelog

cheers
mi.ke
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: RudiRoechel am 13 August 2022, 22:13:00
Entschuldige, wenn ich erst jetzt antworte, aber ich war im Urlaub.
Vielen Dank mi.ke! Das hatte ich so schön befürchtet.
Wäre halt schön gewesen wenn bei einem neuen userereading dieses automatisch mit geloggt würde. Aber mann soll sich bei dem was man tut immer auch Gedanken um die "Wechselwirkungen" machen.

Wie gesagt kann ich eben nicht alles loggen da bei state immer auch Meldungen kommen, wenn die Bluetooth Verbindung auf- und abgebaut wird.

Trotzdem Danke für den Hinweis.

Gruß,

RR
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 13 August 2022, 22:26:32
Wenn du alles loggen willst (bist du sicher?) oder zumindest neue Readings aber state nicht, dann könnte folgendes gehen:

attr FileLog addStateEvent, dann steht auch 'state' im Event und dann nur dieses (oder weitere) mittels ignoreRegexp "rauswerfen"...

Aber normalerweise dämmt man Events auf das notwendige ein (event-on-change-reading etc.) und loggt nur was man braucht (wie bereits geschrieben).
Ja, dann muss man halt mal schnell die Log-RegEx anpassen, wenn dann doch mal ein neues Reading dazukommt aber wie oft kommt das vor?
Normalerweise wird das FileLog einmal eingerichtet und dann läuft es...

Gruß, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Tobseb am 16 August 2022, 20:08:48
Hallo zusammen, ich versuche momentan einen Xiaomi Temperatur/Humidity Sensor in FHEM zu integrieren. Leider wird mir ein Error bzgl. Batterie-Status geworfen. Ich bekomme es bisher leider noch nicht hin Sensordaten ausgelesen zu bekommen.


2022.08.16 19:54:18 3: eval: {FHEM::XiaomiBTLESens::ExecGatttool_Done('TempHumXiaomiBLE|A4:C1:38:C2:CC:B9|ok|read|0x18|{"gtResult":"6d 69 61 6f 6d 69 61 6f 63 65 2e 63 6f 6d 00 "}')}
2022.08.16 19:54:18 1: PERL WARNING: Hexadecimal number > 0xffffffff non-portable at ./FHEM/74_XiaomiBTLESens.pm line 1115.
2022.08.16 19:54:18 3: eval: {FHEM::XiaomiBTLESens::ExecGatttool_Done('TempHumXiaomiBLE|A4:C1:38:C2:CC:B9|ok|read|0x18|{"gtResult":"6d 69 61 6f 6d 69 61 6f 63 65 2e 63 6f 6d 00 "}')}
2022.08.16 19:54:18 1: PERL WARNING: Integer overflow in hexadecimal number at ./FHEM/74_XiaomiBTLESens.pm line 1116.
2022.08.16 19:54:18 3: eval: {FHEM::XiaomiBTLESens::ExecGatttool_Done('TempHumXiaomiBLE|A4:C1:38:C2:CC:B9|ok|read|0x18|{"gtResult":"6d 69 61 6f 6d 69 61 6f 63 65 2e 63 6f 6d 00 "}')}
2022.08.16 19:54:18 1: PERL WARNING: Hexadecimal number > 0xffffffff non-portable at ./FHEM/74_XiaomiBTLESens.pm line 1116.
2022.08.16 19:54:18 3: eval: {FHEM::XiaomiBTLESens::ExecGatttool_Done('TempHumXiaomiBLE|A4:C1:38:C2:CC:B9|ok|read|0x18|{"gtResult":"6d 69 61 6f 6d 69 61 6f 63 65 2e 63 6f 6d 00 "}')}


Ich habe schon geschaut ob ich am Code etwas zur möglichen Fehlerbehebung finden kann, aber ich verstehe davon nichts:
https://github.com/mhop/fhem-mirror/blob/master/fhem/FHEM/74_XiaomiBTLESens.pm#L1115

Das Gerät ist neu, testweise hab ich es kurz mit meinem Handy gekoppelt um an die MAC zu kommen - danach wieder entkoppelt. Hat in der App schon sinnvolle Werte angezeigt. Raspberry steht in der direkten Nähe, via commandline kann ich mich erfolgreich verbinden.

Irgendwelche Anhaltspunkte was ich weiter probieren kann sind sehr gerne gesehen.  :'(
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 17 August 2022, 10:44:49
Zitat von: Tobseb am 16 August 2022, 20:08:48
Hallo zusammen, ich versuche momentan einen Xiaomi Temperatur/Humidity Sensor in FHEM zu integrieren. Leider wird mir ein Error bzgl. Batterie-Status geworfen. Ich bekomme es bisher leider noch nicht hin Sensordaten ausgelesen zu bekommen.


2022.08.16 19:54:18 3: eval: {FHEM::XiaomiBTLESens::ExecGatttool_Done('TempHumXiaomiBLE|A4:C1:38:C2:CC:B9|ok|read|0x18|{"gtResult":"6d 69 61 6f 6d 69 61 6f 63 65 2e 63 6f 6d 00 "}')}
2022.08.16 19:54:18 1: PERL WARNING: Hexadecimal number > 0xffffffff non-portable at ./FHEM/74_XiaomiBTLESens.pm line 1115.
2022.08.16 19:54:18 3: eval: {FHEM::XiaomiBTLESens::ExecGatttool_Done('TempHumXiaomiBLE|A4:C1:38:C2:CC:B9|ok|read|0x18|{"gtResult":"6d 69 61 6f 6d 69 61 6f 63 65 2e 63 6f 6d 00 "}')}
2022.08.16 19:54:18 1: PERL WARNING: Integer overflow in hexadecimal number at ./FHEM/74_XiaomiBTLESens.pm line 1116.
2022.08.16 19:54:18 3: eval: {FHEM::XiaomiBTLESens::ExecGatttool_Done('TempHumXiaomiBLE|A4:C1:38:C2:CC:B9|ok|read|0x18|{"gtResult":"6d 69 61 6f 6d 69 61 6f 63 65 2e 63 6f 6d 00 "}')}
2022.08.16 19:54:18 1: PERL WARNING: Hexadecimal number > 0xffffffff non-portable at ./FHEM/74_XiaomiBTLESens.pm line 1116.
2022.08.16 19:54:18 3: eval: {FHEM::XiaomiBTLESens::ExecGatttool_Done('TempHumXiaomiBLE|A4:C1:38:C2:CC:B9|ok|read|0x18|{"gtResult":"6d 69 61 6f 6d 69 61 6f 63 65 2e 63 6f 6d 00 "}')}


Ich habe schon geschaut ob ich am Code etwas zur möglichen Fehlerbehebung finden kann, aber ich verstehe davon nichts:
https://github.com/mhop/fhem-mirror/blob/master/fhem/FHEM/74_XiaomiBTLESens.pm#L1115

Das Gerät ist neu, testweise hab ich es kurz mit meinem Handy gekoppelt um an die MAC zu kommen - danach wieder entkoppelt. Hat in der App schon sinnvolle Werte angezeigt. Raspberry steht in der direkten Nähe, via commandline kann ich mich erfolgreich verbinden.

Irgendwelche Anhaltspunkte was ich weiter probieren kann sind sehr gerne gesehen.  :'(

Hast Du den korrekten Typ des Devices als Attribut stehen? Gib bitte einmal ein list vom Device
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Tobseb am 18 August 2022, 21:51:50
Natürlich war das der Fehler, vielen Dank, hab die korrekte Auswahl übersehen, weil ich dachte "temperature + humidity" => passt!

Mit der Auswahl "mijiaLYWSD03MMC" passt alles. :)
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Holger S am 11 Oktober 2022, 01:17:44
Zitat von: marboj am 20 Januar 2022, 11:12:21
Hallo zusammen,

habe seit einem Jahr 10 dieser Thermometer mijiaLYWSD03MMC im Einsatz. Grundsätzlich funktionieren sie.

Folgende Probleme habe ich allerdings:

- batteryPercent steht immer auf 63, egal wie neu die Batterie ist.
- Hin und wieder muss das BT neu gestartet werden, damit die Verbindung wieder funktioniert
- die im Thread schon angesprochenen Reichweitenprobleme

Habe im Thread noch keine finale Lösung für das Verbindungsproblem gefunden. Das Batterieproblem habe ich gar nicht gefunden.

Jemand eine Idee?

exemplarisch mal ein Device:

attr AZ.Thermo userattr K2.Thermo K2.Thermo_map room_map structexclude
attr AZ.Thermo alias Arbeitszimmer Thermo-/Hygrometer
attr AZ.Thermo appOptions { "template": "thermometer" }
attr AZ.Thermo group Sensoren
attr AZ.Thermo hciDevice hci0
attr AZ.Thermo icon temperature_humidity
attr AZ.Thermo interval 7200
attr AZ.Thermo model mijiaLYWSD03MMC
attr AZ.Thermo room 12_Arbeitszimmer,XiaomiBTLESens
attr AZ.Thermo userReadings temp {sprintf("%.1f °C",ReadingsNum($name,"temperature",0))}

setstate AZ.Thermo T: 22.94 H: 53 D: 12.8
setstate AZ.Thermo 2022-01-20 10:10:26 batteryPercent 63
setstate AZ.Thermo 2022-01-20 10:10:26 batteryState ok
setstate AZ.Thermo 2022-01-20 10:10:37 dewpoint 12.8
setstate AZ.Thermo 2021-03-17 14:19:30 firmware 1.0.0_0109


Vielen Dank
Gruß
Marco

Hallo,
ich glaube der gibt nur die Spannung der Batterie aus. Habe jedenfalls damals nichts gefunden.

habe die Zeile mit "voltage" in die sub routine eingearbeitet:

sub mijiaLYWSD03MMC_Handle0x38 {
    ### mijiaLYWSD03MMC - Read Sensor Data
    my ( $hash, $notification ) = @_;

    my $name = $hash->{NAME};
    my %readings;

    Log3( $name, 4, "XiaomiBTLESens ($name) - mijiaLYWSD03MMC Handle0x38" );

    return stateRequest($hash)
      unless ( $notification =~ /^([0-9a-f]{2}(\s?))*$/x );

    my @splitVal = split /\s/x, $notification;

    $notification =~ s/\s+//xg;

    $readings{'temperature'} =
      hex( "0x" . $splitVal[1] . $splitVal[0] ) > 20000
      ? ( -65536 + hex( "0x" . $splitVal[1] . $splitVal[0] ) ) / 100
      : hex( "0x" . $splitVal[1] . $splitVal[0] ) / 100;

    $readings{'humidity'} = hex( "0x" . $splitVal[2] );
    $readings{'voltage'}  = hex( "0x" . $splitVal[4] . $splitVal[3] ) / 1000;

    $hash->{helper}{CallBattery} = 0;

    return \%readings;
}


Daraus kann man sich dann was mit Low Battery oder Percent was bauen...
Bei mir funktioniert es. Bitte testen, dann kann es übernommen werden?!

grüße
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: marboj am 11 Oktober 2022, 08:12:38
Wo genau muss ich da wie einbauen zum testen?

Gruß
Marco
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: MadMax-FHEM am 11 Oktober 2022, 08:35:22
Zitat von: marboj am 11 Oktober 2022, 08:12:38
Wo genau muss ich da wie einbauen zum testen?

Gruß
Marco

So ich das lese geht es um diese Zeile:

$readings{'voltage'}  = hex( "0x" . $splitVal[4] . $splitVal[3] ) / 1000;

unterhalb von dieser Zeile:

$readings{'humidity'} = hex( "0x" . $splitVal[2] );


In der 74_XiaomiBTLESens.pm Datei (/opt/fhem/FHEM) in der sub mijiaLYWSD03MMC_Handle0x38.

Wenn du das änderst, nicht vergessen:

attr global exclude_from_update 74_XiaomiBTLESens.pm

...sonst wird das beim nächsten fhem-Update wieder überschrieben.

Und wenn es nicht funktionieren sollte, dann kommst du so (fhem update) auch wieder zurück auf Original (dann nat. ohne exclude_from_update), falls du sie dir nicht anderweitig "aufgehoben" hast.
(oder löschst die Zeile einfach wieder ;)  )

Wenn es ins Modul übernommen wurde, dann nat. das exclude_from_update  wieder entfernen... 8)

Gruß, Joachim
Titel: Antw:[74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: DasQ am 24 November 2022, 16:31:15
Zitat von: Beta-User am 27 Februar 2022, 09:54:29
Man kann BT-LE übrigens auch mit Tasmota-ESP32 empfangen; vermutlich ginge das auch damit, ist nur noch nicht groß getestet, was die Auswertung der Daten in FHEM angeht (die JSON sind gefühlt etwas "komisch"). Will sagen: Dann geht ggf. auch ein irgendwo verbauter "normaler WLAN-Aktor" als IO-Gerät... (es gibt in der english-corner einen, der seine ewuiva-Thermostate so steuert!).

genau da bin ich gerade dran und tasmota macht das erstaunlich gut. mit hilfe deines templates hab ich jede menge fast identische readings.

jetzt würd ich die gern zerpflügen, wenn du da mal bitte ein blick drauf wirfst?
meine frage bei den anfängern (https://forum.fhem.de/index.php/topic,130506.msg1247546.html#msg1247546)
Titel: Aw: [74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: bartman121 am 12 Juni 2023, 08:30:37
Okay, dann grabe ich mal eine Leiche wieder aus ...

Ich habe gestern abend mal einen RaspiZero der nur als Host für XiaomiBTLSens.pm arbeitet auf debian bookworm geupdated. Das Update ging problemlos. Heute morgen stellte ich dann fest, dass viele meiner Pflanzensensoren nicht mehr funktionieren (einige schon).

Ich habe mal auf verbose 5 gestellt und folgendes Log erhalten:
2023.06.12 08:21:39 4: XiaomiBTLESens (Pfl_Elefantenfuss) - WriteReadings: Readings were written
2023.06.12 08:21:39 4: XiaomiBTLESens (Pfl_Elefantenfuss) - ProcessingErrors
2023.06.12 08:21:39 5: XiaomiBTLESens (Pfl_Elefantenfuss) - ExecGatttool_Done: gatttool return string: Pfl_Elefantenfuss|C4:7C:8D:6C:D7:21|error|read|0x38|{"gtResult":"Function not implemented (38)"}

2023.06.12 08:21:39 4: XiaomiBTLESens (Pfl_Elefantenfuss) - ExecGatttool_Run: gatttool result connect to C4:7C:8D:6C:D7:21,Function not implemented (38)
"
2023.06.12 08:21:39 3: XiaomiBTLESens (Pfl_Elefantenfuss) - ExecGatttool_Run: errorcode: "1", ErrorString: "connect to C4:7C:8D:6C:D7:21: Function not implemented (38)

2023.06.12 08:21:39 5: XiaomiBTLESens (Pfl_Elefantenfuss) - ExecGatttool_Run: gatttool loop result connect to C4:7C:8D:6C:D7:21,Function not implemented (38)
2023.06.12 08:21:36 5: XiaomiBTLESens (Pfl_Elefantenfuss) - ExecGatttool_Run: call gatttool with command: ssh zerow 'gatttool -i hci0 -b C4:7C:8D:6C:D7:21 --char-read -a 0x38 2>&1' and loop 4

2023.06.12 08:21:36 5: XiaomiBTLESens (Pfl_Elefantenfuss) - ExecGatttool_Run: gatttool loop result connect to C4:7C:8D:6C:D7:21,Function not implemented (38)
2023.06.12 08:21:32 5: XiaomiBTLESens (Pfl_Elefantenfuss) - ExecGatttool_Run: call gatttool with command: ssh zerow 'gatttool -i hci0 -b C4:7C:8D:6C:D7:21 --char-read -a 0x38 2>&1' and loop 3

2023.06.12 08:21:32 5: XiaomiBTLESens (Pfl_Elefantenfuss) - ExecGatttool_Run: gatttool loop result connect to C4:7C:8D:6C:D7:21,Function not implemented (38)
2023.06.12 08:21:29 5: XiaomiBTLESens (Pfl_Elefantenfuss) - ExecGatttool_Run: call gatttool with command: ssh zerow 'gatttool -i hci0 -b C4:7C:8D:6C:D7:21 --char-read -a 0x38 2>&1' and loop 2

2023.06.12 08:21:29 5: XiaomiBTLESens (Pfl_Elefantenfuss) - ExecGatttool_Run: gatttool loop result connect to C4:7C:8D:6C:D7:21,Function not implemented (38)
2023.06.12 08:21:24 5: XiaomiBTLESens (Pfl_Elefantenfuss) - ExecGatttool_Run: call gatttool with command: ssh zerow 'gatttool -i hci0 -b C4:7C:8D:6C:D7:21 --char-read -a 0x38 2>&1' and loop 1

2023.06.12 08:21:24 5: XiaomiBTLESens (Pfl_Elefantenfuss) - ExecGatttool_Run: gatttool loop result connect to C4:7C:8D:6C:D7:21,Function not implemented (38)
2023.06.12 08:21:19 5: XiaomiBTLESens (Pfl_Elefantenfuss) - ExecGatttool_Run: call gatttool with command: ssh zerow 'gatttool -i hci0 -b C4:7C:8D:6C:D7:21 --char-read -a 0x38 2>&1' and loop 0
2023.06.12 08:21:18 5: XiaomiBTLESens (Pfl_Elefantenfuss) - ExecGatttool_Run: Execute Command ps ax | grep -E [g]atttool -i hci0 -b C4:7C:8D:6C:D7:21
2023.06.12 08:21:15 5: XiaomiBTLESens (Pfl_Elefantenfuss) - Read XiaomiBTLESens_ExecGatttool_Run Pfl_Elefantenfuss|C4:7C:8D:6C:D7:21|read|0x38
2023.06.12 08:21:15 4: XiaomiBTLESens (Pfl_Elefantenfuss) - Run CreateParamGatttool with mod: read

uname -a ergibt folgendes:
Linux zerow 6.1.21+ #1642 Mon Apr  3 17:19:14 BST 2023 armv6l GNU/Linux

cat /etc/debian_version
12.0

Die Version von Gatttool kann ich leider nicht herausfinden, hcitool wäre v5.66

Hat Jemand einen Tipp?

Viele Grüße

Andreas
Titel: Aw: [74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Tobias am 23 Juni 2023, 13:41:57
ich habe dasselbe Problem.
Ein alter Raspi läuft noch super, daher kann ich vergleichen

hcitool beide Version 5.5
BTESens Modul beide v. 3.0.0.
beide Raspian: Linux raspberrypi 5.10.103+ #1529 Tue Mar 8 12:19:18 GMT 2022 armv6l GNU/Linux

Ich weiss nicht wo es Unterschiede gibt und warum es beim einen Funktioniert und beim anderen nicht
Titel: Aw: [74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 23 Juni 2023, 14:49:16
Bei Euch ist aber das gattool noch installiert?
Titel: Aw: [74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Tobias am 23 Juni 2023, 15:55:16
ja ist,
kann ich irgendetwas und irgendwie auf commandline ebene testen?

root@raspberrypi:/home/pi# gatttool
Usage:
  gatttool [OPTION?]

Help Options:
  -h, --help                                Show help options
  --help-all                                Show all help options
  --help-gatt                               Show all GATT commands
  --help-params                             Show all Primary Services/Characteristics arguments
  --help-char-read-write                    Show all Characteristics Value/Descriptor Read/Write arguments

Application Options:
  -i, --adapter=hciX                        Specify local adapter interface
  -b, --device=MAC                          Specify remote Bluetooth address
  -t, --addr-type=[public | random]         Set LE address type. Default: public
  -m, --mtu=MTU                             Specify the MTU size
  -p, --psm=PSM                             Specify the PSM for GATT/ATT over BR/EDR
  -l, --sec-level=[low | medium | high]     Set security level. Default: low
  -I, --interactive                         Use interactive mode

mein Device:
Internals:
   BTMAC      80:EA:CA:89:62:4E
   DEF        80:EA:CA:89:62:4E
   FUUID      64958e77-f33f-49b7-a719-70ae7cc2624a7716
   FVERSION   74_XiaomiBTLESens.pm:v3.0.0-s22474/2020-07-26
   INTERVAL   300
   NAME       BF_Tomaten1
   NOTIFYDEV  global,BF_Tomaten1
   NR         16
   NTFY_ORDER 50-BF_Tomaten1
   STATE      moisture% (Bat: batteryPercent%)
   TYPE       XiaomiBTLESens
   VERSION    v3.0.0
   loglevel   4
   READINGS:
     2023-06-23 15:51:36   lastGattError   Function not implemented (38)
     2023-06-23 15:51:36   state           error
   helper:
     CallBattery 0
     CallSensDataCounter 0
Attributes:
   model      flowerSens
   mqttAlias  batteryPercent=batteryLevel
   mqttPublish *:topic={"TulpeMD/Garden/SoilMoisture/$device/$name"}
   room       XiaomiBTLESens
   stateFormat moisture% (Bat: batteryPercent%)
Titel: Aw: [74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 23 Juni 2023, 16:02:38
Ich fürchte leider nein. Ich wüsste da auch aktuell nichts. Ich schaue mal ob ich hier bei mir dazu komme das zu testen.
Titel: Aw: [74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Tobias am 23 Juni 2023, 16:23:17
ich habe mal weiter geforscht mit 2 anderen Sensoren.
Wie es ausschaut wirft der eine immer den 38er Fehler, zu den anderen kann connected werden

root@raspberrypi:/home/pi# gatttool -b 80:EA:CA:89:62:4E  -I
[80:EA:CA:89:62:4E][LE]> connect
Attempting to connect to 80:EA:CA:89:62:4E
Error: connect error: Function not implemented (38)
[80:EA:CA:89:62:4E][LE]> connect
Attempting to connect to 80:EA:CA:89:62:4E
Error: connect error: Function not implemented (38)
[80:EA:CA:89:62:4E][LE]> connect
Attempting to connect to 80:EA:CA:89:62:4E
Error: connect error: Function not implemented (38)
[80:EA:CA:89:62:4E][LE]> connect
Attempting to connect to 80:EA:CA:89:62:4E
Error: connect error: Function not implemented (38)
[80:EA:CA:89:62:4E][LE]> connect
Attempting to connect to 80:EA:CA:89:62:4E
Error: connect error: Function not implemented (38)
[80:EA:CA:89:62:4E][LE]> connect
Attempting to connect to 80:EA:CA:89:62:4E
Error: connect error: Function not implemented (38)
[80:EA:CA:89:62:4E][LE]> connect
Attempting to connect to 80:EA:CA:89:62:4E
Error: connect error: Function not implemented (38)
[80:EA:CA:89:62:4E][LE]> exit

root@raspberrypi:/home/pi# gatttool -b 80:EA:CA:89:61:5E  -I
[80:EA:CA:89:61:5E][LE]> connect
Attempting to connect to 80:EA:CA:89:61:5E
Connection successful
Notification handle = 0x0021 value: 00
Notification handle = 0x0021 value: 00
Notification handle = 0x0021 value: 00
[80:EA:CA:89:61:5E][LE]>
(gatttool:618): GLib-WARNING **: 16:13:37.758: Invalid file descriptor.
[80:EA:CA:89:61:5E][LE]> exit

root@raspberrypi:/home/pi# gatttool -b 80:EA:CA:89:67:1C  -I
[80:EA:CA:89:67:1C][LE]> connect
Attempting to connect to 80:EA:CA:89:67:1C
Connection successful
Notification handle = 0x0021 value: 00
Notification handle = 0x0021 value: 00
[80:EA:CA:89:67:1C][LE]>
(gatttool:624): GLib-WARNING **: 16:14:42.341: Invalid file descriptor.
[80:EA:CA:89:67:1C][LE]> exit

root@raspberrypi:/home/pi# gatttool -b 80:EA:CA:89:62:4E  -I
[80:EA:CA:89:62:4E][LE]> connect
Attempting to connect to 80:EA:CA:89:62:4E
Error: connect error: Function not implemented (38)
[80:EA:CA:89:62:4E][LE]> connect
Attempting to connect to 80:EA:CA:89:62:4E
Error: connect error: Function not implemented (38)
[80:EA:CA:89:62:4E][LE]> connect
Attempting to connect to 80:EA:CA:89:62:4E
Error: connect error: Function not implemented (38)
[80:EA:CA:89:62:4E][LE]> exit
root@raspberrypi:/home/pi#

Trage ich die beiden funktionierenden als fhem Instanzen ein, funktioniert sofort der Datenempfang.
Scheint also am Device zu liegen? Die Firmware des funktionierenden Devices ist 3.2.1, bzw des anderen 2.7.0

Also ist das fehlerhafte Device einfach nur defekt???
Titel: Aw: [74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: CoolTux am 23 Juni 2023, 16:37:44
Zitat von: Tobias am 23 Juni 2023, 16:23:17Also ist das fehlerhafte Device einfach nur defekt???

Würde ich tatsächlich so unterstreichen.
Titel: Aw: [74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: bartman121 am 23 Juni 2023, 16:55:50
ich möchte das nicht unterstreichen, bei mir trat das Problem erst nach dem Update auf Bookworm auf, weiterhin betraf das FAST ALLE (6 von 8) Sensoren. Weil hier ewig keine Antwort kam habe ich auch zu OpenMQTT-Gateway gewchselt, dort wird der Sensor nicht aktiv abgefragt, aber der Sensor sendet ich glaube alle 300Sekunden einen seiner Werte, dieser wird von OpenMQTT-Gateway erfasst und korrekt zugeordnet.

Für mich ist OpenMQTT-Gateway derzeit die bessere Lösung, zumal ich hier strategisch mehrere kostengünstige Empfänger platzieren kann.

Ich könnte den betreffenden Raspi-Zero sicher nochmal in Betrieb nehmen und auch SSH-Zugriff darauf gewähren, wenn das Cooltux bei der Fehlersuche helfen könnte.

Ansonsten bin ich bei diesem Modul eigentlich erstmal raus.

Grüße

Andreas
Titel: Aw: [74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: Tobias am 23 Juni 2023, 17:00:37
Ich hatte auch mal OpenMQTTGateway getestet, aber die Bluetooth Reichweite der ESP32 waren echt grottig. Gerade 1-3m Distanz waren drin. Der Raspi Zero W deckt einen echten 10m Radius ab.

Worauf läuft bei dir das Gateway, hast du spezielle ESP32?

Funktioniert auch mittlerweile die Übermittlung des Batteriezustandes in Prozent?
Titel: Aw: [74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: bartman121 am 23 Juni 2023, 17:08:32
jo, die Reichweite ist grottig, aber auch der Zero hat in meiner Altbauwohnung (90qm) auch mehr schlecht als recht alle Sensoren geschafft, teilweise kam es zu mehreren Stunden ohne Daten (das ist aber hier erträglich).

Ich habe jetzt einfach drei billige ESP32 in den Räumen "versteckt" und dadurch keine Probleme mehr.

Bei mir melden die Geräte auch den Batteriezustand in %
Titel: Aw: [74_XiaomiBTLESens.pm] Xiaomi Bluetooth Sensoren FlowerSens/Thermometer
Beitrag von: KyleK am 19 Juli 2023, 21:59:00
Was spricht gegen die Nutzung von TheengsGateway (https://gateway.theengs.io/) auf einem Raspberry Pi?
Nutzt dieselbe MQTT-Syntax wie OpenMQTTGateway, und sollte somit relativ leicht einzubinden sein.