!!!ABGELÖST!!! [74_XiaomiFlowerSens.pm] Xiaomi Flower Monitor

Begonnen von CoolTux, 17 November 2016, 13:25:06

Vorheriges Thema - Nächstes Thema

ToM_ToM

Hey Patrik, das heißt, ich brauche einen neuen Bluetooth-Adapter?
Hardware: BananaPi, Busmaster CUL, SanDisk 16GB Ultra SD, 16 GB USB-Stick | Software: Armbian, FHEM 5.8

patrikg

Ja, ich habe den Asus USB-BT400
Liegt bei Amazon und der Bay bei ca. 15,-
FHEM on Raspberry 3, Raspbian, HMLAN, HM-CC-RT-DN, Philips HUE, Energenie SISPMS USB, Homebridge, Xiaomi Flower Mate, Osram Lightify

Stoanze01

Zitat von: ToM_ToM am 11 März 2017, 21:06:06
Die Flower Care App funktioniert leider auch nicht. Dort muss man sich registrieren, bekommt aber keine Email zugesandt, in der der Bestätigungslink ist. Auch im Spam und Junk E-Mail keine Spur von der Bestätigungsmail.
Brauche ich die App überhaupt?

Du darfst für deinen Mi-Account keine .de Email angeben, versuche mal eine .com Email Adresse, sollte funktionieren!

Bei mir funktioniert leider keines der beiden Apps (Flower Care, MiHome), der Sensor wird zwar erkannt und ich kann diesen auch umbenennen jedoch bekomme ich beim verbinden immer die Meldung
"device is not available in your country"
Auf GooglePlay beim Flower Care App habe ich dann gleiche Kommentare gefunden welche von den Entwicklern der App mit
ZitatBeijing HHCC Plant Technology Co., Ltd 9 mars 2017
Dear user, Thank you for choosing our smart monitor. We have two versions, one is for domestic market and the other is for international market. It seems that you got the domestic version. Please contact the seller and ask for international version of smart monitor. Should you have any further question, please feel free to contact us:kefu@hhcc.io
beantwortet wurden.

Bin aber leider noch nicht dazu gekommen den Sensor mit meinem RaspberryPi3-FhemServer zu testen und zu prüfen ob dieser funktioniert und ich ihn ohne App nutzen kann.

retikulum

#468
Zitat von: Stoanze01 am 12 März 2017, 21:29:45
"device is not available in your country"

Moin. Bei Ali-Express auf der Produktseite gibt es folgende Anleitung hierzu:
- Android auf englisch stellen (Einstellungen -> Sprache und Eingabe -> Sprache).
- Die MiHome App installieren und als Standort "China" auswählen
Ist halt ein Workaround... läuft aber.

Andere Frage:
Hat schon jemand gute Erfahrungen mit dem Sensor gemacht? Ich habe mal ein paar Beobachtungen gemacht:

- Die Feuchtigkeit geht seit 3 Tagen nicht runter und steht bei ca. 55% +/-. Sie geht eher sogar etwas hoch, wenn die Temperatur hoch geht.
- Die "Fertility" hat sich schlagartig geändert, als ich den Sensor 2-3 Zentimeter versetzt in die Erde gesteckt habe. Von knapp 1200 mS auf 230 mS,
  was sich jetzt wieder auf 670 hochgearbeitet hat. Und ich habe weder Wasser noch Dünger hinzugefügt in den letzten Tagen. Nur das Licht hat sich geändert (Sonne, Lampe,...)
- Die Abfrage funktioniert nur alle halbe Stunde, wenn überhaupt. Ansonsten immer "unreachable".

Wird per Raspi Zero W abgefragt. 2-3 Meter auseinander.
Kann man sich auf die Sensoren verlassen? Wie und wo genau und wie tief sollte man diese einstecken, sodass auch die interessanten Werte gemessen werden?

mumpitzstuff

Meiner Erfahrung nach sind die Dinger eher Schätzeisen, was z.B. daran liegt, dass dein Boden nicht homogen ist. Hier ist mal ein Stein, dort ein Hohlraum und hier ein Stück Holz oder eine Wurzel. Das soll bedeuten, dass du meistens andere Werte bekommst, wenn du den Sensor versetzt. In meinen Augen kann man deshalb die ganzen Datenbanken mit festen Werten vergessen. Man müsste den halben Topf mit Sensoren zupflastern und dann den Mittelwert der Sensoren verwenden...
Ich bin dazu übergegangen den Sensor an einer Stelle zu belassen die gefühlt plausible Werte liefert und mir dann die Werte als Graph darzustellen und über 2-3 Wochen zu beobachten. Anhand dieser Werte habe ich mir dann separat für jeden Topf ein minimum Level für die Feuchtigkeit gesetzt. Die Dünger Werte fand ich persönlich etwas zu sehr black magic mäßig und hatte für mich wenig mit der Realität zu tun. Deshalb habe ich mir hier nichts definiert, könnte man aber genauso machen.

mumpitzstuff

Ich habe eben für die Sensoren ein readingsGroup für die Gießanzeige eingerichtet. Vielleicht kanns ja noch jemand gebrauchen:


  • zuerst ein Userreading für jede Pflanze einrichten (45 ist in diesem Beispiel das unterste Level): attr <device> userReadings stateSoilMoisture {ReadingsVal("PFLANZE_BODEN","moisture",100)<45?"low":"ok"}
  • dann eine readingsGroup einrichten: define <name der gruppe> readingsGroup .*:stateSoilMoisture
  • in dieser neu angelegten readingsGroup dieses valueFormat einrichten: attr <name der gruppe> valueFormat {return "0" if( $VALUE eq "low" );;;; return "100" if( $VALUE eq "ok" );;;; return "0"}
  • nun noch ein icon definieren mit: attr <name der gruppe> valueIcon {'stateSoilMoisture.0' => 'sani_irrigation@red','stateSoilMoisture.100' => 'sani_irrigation@green'}

Bei der Anzahl der Semikolons in den letzten beiden Befehlen bin ich mir unsicher. Ich habe diese über die Oberfläche in den Dialogen eingerichtet, dort musste man jeweils nur ;; anstatt ;;;; angeben.

monosurr0und

Danke für das Modul...ist ja schon fast unverschämt einfach damit.

Heute drei dieser Sensoren bekommen und alle, trotz zum teil unterschiedlicher Firmware, sofort erkannt und liefern brav alle 300Sekunden Werte. :)



ToM_ToM

Hey, mein Bluetooth Stick kam heute endlich. :)
Nun funktioniert auch der Befehl und der Flower Monitor wurde als "Flower mate" gefunden.

Nur Fhem kann irgendwie nicht darauf zugreifen.

2017.03.15 18:26:57 4: Sub XiaomiFlowerSens_Run (Pflanze_01) - start blocking call
2017.03.15 18:26:57 4: Sub XiaomiFlowerSens_BlockingRun (Pflanze_01) - Running nonBlocking
2017.03.15 18:26:57 5: Sub XiaomiFlowerSens_stateRequestTimer (Pflanze_01) - Request Timer wird aufgerufen
2017.03.15 18:26:57 5: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - WFR: 1
2017.03.15 18:26:57 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - call gatttool charWrite loop 1
2017.03.15 18:26:57 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - charWrite wresp: connect: No route to host (113)

2017.03.15 18:26:57 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - call gatttool charWrite loop 2
2017.03.15 18:26:57 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - charWrite wresp: connect: No route to host (113)

2017.03.15 18:26:57 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - call gatttool charWrite loop 3
2017.03.15 18:26:57 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - charWrite wresp: connect: No route to host (113)

2017.03.15 18:26:57 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - call gatttool charWrite loop 4
2017.03.15 18:26:57 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - charWrite wresp: connect: No route to host (113)

2017.03.15 18:26:57 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - call gatttool charWrite loop 5
2017.03.15 18:26:57 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - charWrite wresp: connect: No route to host (113)

2017.03.15 18:26:57 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - call gatttool charWrite loop 6
2017.03.15 18:26:57 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - charWrite wresp: connect: No route to host (113)

2017.03.15 18:26:57 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - call gatttool charWrite loop 7
2017.03.15 18:26:57 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - charWrite wresp: connect: No route to host (113)

2017.03.15 18:26:58 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - call gatttool charWrite loop 8
2017.03.15 18:26:58 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - charWrite wresp: connect: No route to host (113)

2017.03.15 18:26:58 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - call gatttool charWrite loop 9
2017.03.15 18:26:58 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - charWrite wresp: connect: No route to host (113)

2017.03.15 18:26:58 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - call gatttool charWrite loop 10
2017.03.15 18:26:58 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - charWrite wresp: connect: No route to host (113)

2017.03.15 18:26:58 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - run gatttool
2017.03.15 18:26:58 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - call gatttool charRead loop 1
2017.03.15 18:26:58 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - call gatttool charRead loop 2
2017.03.15 18:26:58 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - call gatttool charRead loop 3
2017.03.15 18:26:58 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - call gatttool charRead loop 4
2017.03.15 18:26:58 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - call gatttool charRead loop 5
2017.03.15 18:26:58 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - call gatttool charRead loop 6
2017.03.15 18:26:58 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - call gatttool charRead loop 7
2017.03.15 18:26:58 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - call gatttool charRead loop 8
2017.03.15 18:26:58 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - call gatttool charRead loop 9
2017.03.15 18:26:58 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - call gatttool charRead loop 10
2017.03.15 18:26:58 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - processing gatttool response. sensData[0]: connect
2017.03.15 18:26:58 4: Sub XiaomiFlowerSens_callGatttool (Pflanze_01) - processing gatttool response. sensData: No route to host (113)

2017.03.15 18:26:58 4: Sub XiaomiFlowerSens_BlockingRun (Pflanze_01) - Processing response data: No route to host (113)


Jemand eine Idee?
Hardware: BananaPi, Busmaster CUL, SanDisk 16GB Ultra SD, 16 GB USB-Stick | Software: Armbian, FHEM 5.8

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

ToM_ToM

ZitatAttribut hci?

attr Pflanze_01 hciDevice hci0

Das ist auch mein Bluetoothdongle


hci0:   Type: BR/EDR  Bus: USB
        BD Address: 5C:F3:70:7C:4E:69  ACL MTU: 1021:8  SCO MTU: 64:1
        Features page 0: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
                <3-slot packets> <5-slot packets> <encryption> <slot offset>
                <timing accuracy> <role switch> <sniff mode> <RSSI>
                <channel quality> <SCO link> <HV2 packets> <HV3 packets>
                <u-law log> <A-law log> <CVSD> <paging scheme> <power control>
                <transparent SCO> <broadcast encrypt> <EDR ACL 2 Mbps>
                <EDR ACL 3 Mbps> <enhanced iscan> <interlaced iscan>
                <interlaced pscan> <inquiry with RSSI> <extended SCO>
                <EV4 packets> <EV5 packets> <AFH cap. slave>
                <AFH class. slave> <LE support> <3-slot EDR ACL>
                <5-slot EDR ACL> <sniff subrating> <pause encryption>
                <AFH cap. master> <AFH class. master> <EDR eSCO 2 Mbps>
                <EDR eSCO 3 Mbps> <3-slot EDR eSCO> <extended inquiry>
                <LE and BR/EDR> <simple pairing> <encapsulated PDU>
                <err. data report> <non-flush flag> <LSTO> <inquiry TX power>
                <EPC> <extended features>
        Features page 1: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Hardware: BananaPi, Busmaster CUL, SanDisk 16GB Ultra SD, 16 GB USB-Stick | Software: Armbian, FHEM 5.8

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

ToM_ToM

Nein, ich habe nie eine Verbindung mit einer App hergestellt.
Ich hatte lediglich den Sensor mal mit meinem Handy gekoppelt, aber dort auch wieder rausgeschmissen. Am Sender selbst kann ich ja nichts zurücksetzen... oder?
Kenne das von Kopfhörern dass man die durch Tastenkombinationen zurücksetzen kann.
Hardware: BananaPi, Busmaster CUL, SanDisk 16GB Ultra SD, 16 GB USB-Stick | Software: Armbian, FHEM 5.8

CoolTux

Zitat von: ToM_ToM am 15 März 2017, 19:24:28
Nein, ich habe nie eine Verbindung mit einer App hergestellt.
Ich hatte lediglich den Sensor mal mit meinem Handy gekoppelt, aber dort auch wieder rausgeschmissen. Am Sender selbst kann ich ja nichts zurücksetzen... oder?
Kenne das von Kopfhörern dass man die durch Tastenkombinationen zurücksetzen kann.

Kannst ja mal Batterie raus nehmen und bisschen warten.
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

ToM_ToM

Hm... ich hatte die ja seit 2 Tagen jetzt draußen.

Muss ich noch irgendwo in Jessie was koppeln (Flower Mate an den Pi) oder reicht tatsächlich der FHEM Code aus?

define Pflanze_01 XiaomiFlowerSens C4:7E:9D:61:D2:4G
attr Pflanze_01 hciDevice hci0


Hardware: BananaPi, Busmaster CUL, SanDisk 16GB Ultra SD, 16 GB USB-Stick | Software: Armbian, FHEM 5.8

CoolTux

Code reicht aus. gatttool hast Du ja.
Und das hier
C4:7E:9D:61:D2:4G
ist tatsächlich Dein Flower Sensor?
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