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

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

Vorheriges Thema - Nächstes Thema

kroonen

thnx for the support, works fine right now no false readings anymore.


ck-jusuf

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

CoolTux

Ich werde versuchen die aktuelle Gitversion heute noch ins FHEM SVN zu laden.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

distel

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. :-)
NUC-I37100
Docker: eBus, fhem, ha-bridge, unifi
Hardware: Homematic, FS20, Somfy RTS, 1wire, FBAHA, enOcean

Abercrombie1892

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.

CoolTux

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

trinitywhm

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?

CoolTux

Das kann ich Dir leider nicht sagen. Wird dann wohl an BTLE und/oder gatttool an sich liegen.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

dan21

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?

distel

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?
NUC-I37100
Docker: eBus, fhem, ha-bridge, unifi
Hardware: Homematic, FS20, Somfy RTS, 1wire, FBAHA, enOcean

CoolTux

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

frank_41

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
Raspberry Pi 3
RFXCOM_RFXtrx433
V 1.62 nanoCUL433
Jeelink LaCrosse
Jeelink PCA301.CUL_HM,Conbee, deCONZ

CoolTux

Bei einem BlockingKill wird diese Meldung immer aus gegeben, egal welches Loglevel man an gibt.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

trinitywhm

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?

CoolTux

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