Page 9 of 17

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Posted: Thursday 16 March 2017 8:11
by blauwebuis
So why didn't you change the wiki after finding the mistake in it?

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Posted: Thursday 16 March 2017 8:13
by tontze
blauwebuis wrote:So why didn't you change the wiki after finding the mistake in it?
Oh, can i ? I didnt knew i can edit them :D

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Posted: Thursday 16 March 2017 8:22
by blauwebuis
Yes you can :-) Feel free to change things when you find a mistake.

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Posted: Thursday 16 March 2017 20:33
by krizzz
Guys, help me out.

I tested the setup on my "test"-Pi and it worked. It seemed that on my Domoticz Pi i already installed a previous version of Bluez (5.32). I noticed this before walking through the wiki and i though I removed everything that came with installing Bluez version 5.32.

Now, I did the wiki and I seem to be stuck. When executing the domoticz.py script

Code: Select all

sudo python3 domoticz.py
I receive an error

Code: Select all

/bin/sh: 1: /usr/bin/gatttool: not found
so it seems that the gattool is not correctly installed. I googled and found the gattool is installed by installing pygatt which was mentioned in the wiki. So I try to install pygatt again and I receive the following

Code: Select all

Requirement already satisfied (use --upgrade to upgrade): pygatt in /usr/local/lib/python3.4/dist-packages
Requirement already satisfied (use --upgrade to upgrade): pyserial in /usr/local/lib/python3.4/dist-packages (from pygatt)
Requirement already satisfied (use --upgrade to upgrade): enum34 in /usr/local/lib/python3.4/dist-packages (from pygatt)
Cleaning up...
Ok, so maybe it is partially installed or I removed only half earlier. I will try and upgrade

Code: Select all

sudo pip3 install pygatt --upgrade
Requirement already up-to-date: pygatt in /usr/local/lib/python3.4/dist-packages
Requirement already up-to-date: pyserial in /usr/local/lib/python3.4/dist-packages (from pygatt)
Requirement already up-to-date: enum34 in /usr/local/lib/python3.4/dist-packages (from pygatt)
Cleaning up...
Ok, now I am stuck. Anybody?

*Edit*

I tried again, and now with

Code: Select all

sudo apt-get purge bluez
to remove the bluez stack and succeeded. Then did the whole wiki page again. Same error.

Code: Select all

/bin/sh: 1: gatttool: not found

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Posted: Friday 17 March 2017 14:14
by physiker123
tontze wrote:Actually, wiki´s crontab part doesnt correspond to instructions earlier. I had same mistake as user before ..

Code: Select all

And then add this line:
0 0,12 * * * python3 /pi/domoticz/scripts/python/miflora/domoticz.py
an extra /python/ in the path, and missing /home from the path start :)

-T
Actually, I reread the Script. It is written, That you should place the miflora folder in the domoticz python folder. So it was my mistake, I placed it in the domoticz scripts folder.

The wiki article Should be precise as it is now.

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Posted: Friday 17 March 2017 15:26
by tontze
Did you try installing latest bluez via sources(not apt-get).? At some versions of bluez gatttool isn't installed and it won't be installed via apt-get

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Posted: Friday 17 March 2017 16:31
by krizzz
tontze wrote:Did you try installing latest bluez via sources(not apt-get).? At some versions of bluez gatttool isn't installed and it won't be installed via apt-get
How do I do this via sources? Thanks!


Verzonden vanaf mijn iPhone met Tapatalk

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Posted: Friday 17 March 2017 16:46
by tontze
krizzz wrote:
tontze wrote:Did you try installing latest bluez via sources(not apt-get).? At some versions of bluez gatttool isn't installed and it won't be installed via apt-get
How do I do this via sources? Thanks!


Verzonden vanaf mijn iPhone met Tapatalk
It is in the wiki :

Code: Select all

 cd / 
 sudo mkdir bluez 
 cd bluez 
 sudo wget http://www.kernel.org/pub/linux/bluetooth/bluez-5.44.tar.xz
 sudo tar -xJf bluez-5.44.tar.xz 
 cd bluez-5.44 
 sudo ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-tools --disable-test --disable-systemd
 sudo make all 
 sudo apt-get install python-bluez python-requests
Also do (depending where your bins are);

Code: Select all

sudo cp attrib/gatttool /usr/local/bin/ [b]or[/b] sudo cp attrib/gatttool /usr/bin/
-T

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Posted: Saturday 18 March 2017 0:47
by krizzz
tontze wrote:
krizzz wrote:
tontze wrote:Did you try installing latest bluez via sources(not apt-get).? At some versions of bluez gatttool isn't installed and it won't be installed via apt-get
How do I do this via sources? Thanks!


Verzonden vanaf mijn iPhone met Tapatalk
It is in the wiki :

Code: Select all

 cd / 
 sudo mkdir bluez 
 cd bluez 
 sudo wget http://www.kernel.org/pub/linux/bluetooth/bluez-5.44.tar.xz
 sudo tar -xJf bluez-5.44.tar.xz 
 cd bluez-5.44 
 sudo ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-tools --disable-test --disable-systemd
 sudo make all 
 sudo apt-get install python-bluez python-requests
Also do (depending where your bins are);

Code: Select all

sudo cp attrib/gatttool /usr/local/bin/ [b]or[/b] sudo cp attrib/gatttool /usr/bin/
-T
Thanks for pointing me into the right direction. I spend my evening trying and compiling again and again the 5.44 Bluez install. And I keept getting the same message, that gattool was not find. And then I noticed 1 small line in the wiki

Code: Select all

Note: Bluez version 5.44 does not compile gatttool on a Raspberry Pi 3, however version 5.43 does work properly.
So I tried compiling Bluez 5.43, and works flawlessly :). So not only does the 5.44 Bluez not install gatttool on a Raspberry Pi3, also not on a Raspberry Pi2 and Pi1.

Now for the next step. How to find out when to water the plants and if the fertility is good :)

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Posted: Saturday 18 March 2017 11:41
by tontze

Thanks for pointing me into the right direction. I spend my evening trying and compiling again and again the 5.44 Bluez install. And I keept getting the same message, that gattool was not find. And then I noticed 1 small line in the wiki

Code: Select all

Note: Bluez version 5.44 does not compile gatttool on a Raspberry Pi 3, however version 5.43 does work properly.
So I tried compiling Bluez 5.43, and works flawlessly :). So not only does the 5.44 Bluez not install gatttool on a Raspberry Pi3, also not on a Raspberry Pi2 and Pi1.

Now for the next step. How to find out when to water the plants and if the fertility is good :)
Indeed, i missed that part as i had bluez allready installed :) Good that you got it working !

If you can pair your mi flora with phone(have not updated it to latest fw), you can allways add plant to it and check from there whats good moisture/fert for your plant :)

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Posted: Saturday 18 March 2017 15:35
by physiker123
Can anyone post perhaps the values for the different plants? I do not really want to change something now that everything works.

:)

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Posted: Saturday 18 March 2017 17:10
by tontze
physiker123 wrote:Can anyone post perhaps the values for the different plants? I do not really want to change something now that everything works.

:)
You can safely use phone app, just dont update when it asks you to :) Im using it this way. And have access to plant database.

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Posted: Saturday 18 March 2017 19:30
by pvm
physiker123 wrote:Can anyone post perhaps the values for the different plants? I do not really want to change something now that everything works.

:)
For all plants? ;)
I use 20% as moisture trigger. I defined thus by just feeling the soil at which I normally give water to the plant

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Posted: Sunday 19 March 2017 12:36
by tontze
pvm wrote:
physiker123 wrote:Can anyone post perhaps the values for the different plants? I do not really want to change something now that everything works.

:)
For all plants? ;)
I use 20% as moisture trigger. I defined thus by just feeling the soil at which I normally give water to the plant
In the android app it says about fertilizing :

Normally when fertility is under 500, you need to add fertility, so i quess they use that same threshold for every plant ?

And also about soil moisture, 20%

I quess those are good guidelines.

-T

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Posted: Sunday 19 March 2017 15:03
by physiker123
I looked at the app (Flower Care), but when it detects my sensors it wants to make the firmware update. I cannot delete the notification (Nexus 5x with Android 7.1), so I have to restart the app. Therefore, I only have seconds to look at the app :D

I looked at the FAQ, and it gave as well the values of 500 for the fertility, but 35 for the moisture. I had a look at two different plants, but the values where the same (I hope I looked right, see above).

I will just look, if 35 is too much, and then lower the value.

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Posted: Sunday 19 March 2017 15:12
by LouiS22
physiker123 wrote:I looked at the app (Flower Care), but when it detects my sensors it wants to make the firmware update. I cannot delete the notification (Nexus 5x with Android 7.1), so I have to restart the app. Therefore, I only have seconds to look at the app :D

I looked at the FAQ, and it gave as well the values of 500 for the fertility, but 35 for the moisture. I had a look at two different plants, but the values where the same (I hope I looked right, see above).

I will just look, if 35 is too much, and then lower the value.
The firmware update won't break anything IMHO.

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Posted: Sunday 19 March 2017 15:12
by LouiS22
physiker123 wrote:I looked at the app (Flower Care), but when it detects my sensors it wants to make the firmware update. I cannot delete the notification (Nexus 5x with Android 7.1), so I have to restart the app. Therefore, I only have seconds to look at the app :D

I looked at the FAQ, and it gave as well the values of 500 for the fertility, but 35 for the moisture. I had a look at two different plants, but the values where the same (I hope I looked right, see above).

I will just look, if 35 is too much, and then lower the value.
The firmware update won't break anything IMHO.

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Posted: Sunday 19 March 2017 17:11
by tontze
physiker123 wrote:I looked at the app (Flower Care), but when it detects my sensors it wants to make the firmware update. I cannot delete the notification (Nexus 5x with Android 7.1), so I have to restart the app. Therefore, I only have seconds to look at the app :D

I looked at the FAQ, and it gave as well the values of 500 for the fertility, but 35 for the moisture. I had a look at two different plants, but the values where the same (I hope I looked right, see above).

I will just look, if 35 is too much, and then lower the value.
You can close it via X on the right upper corner.

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Posted: Sunday 19 March 2017 17:13
by tontze
LouiS22 wrote:
physiker123 wrote:I looked at the app (Flower Care), but when it detects my sensors it wants to make the firmware update. I cannot delete the notification (Nexus 5x with Android 7.1), so I have to restart the app. Therefore, I only have seconds to look at the app :D

I looked at the FAQ, and it gave as well the values of 500 for the fertility, but 35 for the moisture. I had a look at two different plants, but the values where the same (I hope I looked right, see above).

I will just look, if 35 is too much, and then lower the value.
The firmware update won't break anything IMHO.
PPL say that they wont work with flower care app after upgrade, they added regions to it. In domotics it works even after update.

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Posted: Monday 20 March 2017 9:17
by LouiS22
tontze wrote:
LouiS22 wrote:
physiker123 wrote:I looked at the app (Flower Care), but when it detects my sensors it wants to make the firmware update. I cannot delete the notification (Nexus 5x with Android 7.1), so I have to restart the app. Therefore, I only have seconds to look at the app :D

I looked at the FAQ, and it gave as well the values of 500 for the fertility, but 35 for the moisture. I had a look at two different plants, but the values where the same (I hope I looked right, see above).

I will just look, if 35 is too much, and then lower the value.
The firmware update won't break anything IMHO.
PPL say that they wont work with flower care app after upgrade, they added regions to it. In domotics it works even after update.
I know, but you can solve this easily, I've even provided a how-to before ;)