Anyone used a plant sensor other than Xaiomi?

You can only connect one device by Bluetooth so the link you’ve post will only work with one vegtrug hence trying to find another solution

Is the fact that it can only connect to one device specific to the vegtrug? I’m using two other BLE thermometers with the mitemp_bt component and they work great.

@mattvolp
I currently use https://github.com/custom-components/sensor.mitemp_bt and I have not noticed any limitations with that one. I have 40 plant sensors in total, both Mi Flora and VegTrug branded.

Actually both of those sensors come with the VegTrug brand. The small one is 100% identical to the Mi Flora as far as I can tell, even the ios Flower Care app does not distinguish between them. Curiously the Flower Care app also work with the Garden sensor and uses the correct thumbnail icon, although it is still just called “Flower Care”.
The VegTrug branded “Mi Flora” sensor they call “VegTrug Grow Care Home”, and the big one is “VegTrug Grow Care Garden”. They also have their own VegTrug ios app which is almost identical to the Flower Care app. Any sensor you add to one app will show up in the other app. I also discovered that two additional companies sell/sold the small sensors and also have their own ios apps. Same app/sensor, different brands.

I like the idea of the Garden sensor and I might buy more myself, although the price is pretty steep, if you can even find them anywhere. And even though they work or should work with very minor updates with any repo that works with the Mi Flora sensors, they do not behave exactly like them. There are a few … dissapointments IMO: https://github.com/open-homeautomation/miflora/issues/138#issuecomment-583677622

2 Likes

Oh ok that’s good then! Why was I trying to get it to work through mqtt then and not just ble al the while!?

All very useful info, thanks.

Also, you have a lot of plants!

1 Like

Got myself some time to do this tomorrow.

I have only used areduino and an esp once. I am assuming i follow these steps:

https://docs.openmqttgateway.com/upload/arduino-ide.html

But not really sure what settings I need to change after this? It talks about pin outs etc which is way beyond me currently.

You are going to upload on an ESP32 or another board?

Yep esp32’s

I assume I don’t need to worry about all the pages of how to breadboard an esp to something else etc?

Not with ESP32 if you need only to get bluetooth data

ok, so I have downloaded openmqttgateway, opened the main.ino file.
I have also downloaded [esp32dev-ble-libraries.zip] and added the zip file to my libraries folder in Arduino.

The only change I have made to the main.ino file is to take // off the line that says #define Zgateway BT

I have then done verifty and I get a message saying Wifimanager.h no such file or directory
If I go to sketch - include library - add .zip library and browse to esp32dev-ble it gives an error saying:

specified folder/zip file does not contain a valid library

So I am now stuck. It will be something I am not doing, but as said, very new to this so not sure what.

OK think I am through that issue, the zipped library was renaming itself when extracting on mac.

Next issue is I get to DynamicJsonBuffer jsonBuffer;

And get the error “is a class from ArduinoJson 5.”
So I went back and installed 5 instead of 6.

The next issue I got was class BLEAdvertisedDevice has no member named ‘getServiceDataCount’

Sorry, I know this is painful, but I am trying to learn

I think this is something to do with the libraries. But I downloaded your esp32dev-ble-libraries.zip but when I now open Arduino it says the ESP32 BLE Arduino library cannot be used as it should not have spaces / max length 63 characters.

Should I need to rename this folder within esp32dev-ble-libraries?

Here is a short procedure,

If uploaded connect to the wifi AP of the board and set your credentials

Amazing! Thank you so much for the time you have taken to do this!

You will be please to know I have managed to get my ESP32 compiled and connected to my network using the network manager.

You will be sad to hear I now have more problems or at least questions.

I can see a device called espressif connected to my wifi now which is the ESP32
My MQTT server is mosquitto running on a synology NAS on my network so running commands or seeing that it is in my broker I am not sure how to do.

I tried setting HA to listen to home/OpenMQTTGateway but would have thought I needed to set the mac addresses of the vegtrug sensors somewhere?

Sorry for more questions but thanks for the amazing help so far.

Great!

You should download MQTT Explorer and connect to your broker with it, you will see published data and you will be able to publish also.

With autodiscovery you should not need to set the mac adress, if OMG is connected to the same borker as HA and autodiscovery activated in HA the sensors will appears automaticaly.

Been playing again today and using the output from arduino.

I have seen it say this:

BLEinterval btw scans
55555
Minrssi
-100
ZgatewayBT multicore ESP32 setup done 
MQTT_MAX_PACKET_SIZE
128
WRONG PUBSUBCLIENT LIBRARY USED PLEASE INSTALL THE ONE FROM RELEASE PAGE
BT Task running on core 0Setup OpenMQTTGateway end

MQTT connection...
Connected to broker
Subscription OK to the subjects
Uptime (s)
120
{"uptime":120,"freeMem":148180,"rssi":-79,"SSID":"Home-network","ip":"192.168.1.135","mac":"A4:CF:12:32:EE:98","modules":"BT"}Pub json into:
home/OpenMQTTGateway/SYStoMQTT
{"uptime":120,"freeMem":148180,"rssi":-79,"SSID":"Home-network","ip":"192.168.1.135","mac":"A4:CF:12:32:EE:98","modules":"BT"}

the bit about wrong pubsubclient used is worrying.

it does look to be finding some stuff:

Pub json discovery into:
home/home_presence/OpenMQTTGateway
{"id":"90:dd:5d:8d:d5:36","manufacturerdata":"L","rssi":-85,"txpower":12,"distance":15.12852}
Pub json into:
home/OpenMQTTGateway/BTtoMQTT/90DD5D8DD536
{"id":"90:dd:5d:8d:d5:36","manufacturerdata":"L","rssi":-85,"txpower":12,"distance":15.12852}
Creating BLE buffer
device detected
7B9B8AAE9611
BLErssi
-76
txPower
-59
BLE DISTANCE :
6.45
Pub json discovery into:
home/home_presence/OpenMQTTGateway
{"id":"7b:9b:8a:ae:96:11","manufacturerdata":"L","rssi":-76,"txpower":12,"distance":6.44788}
Pub json into:
home/OpenMQTTGateway/BTtoMQTT/7B9B8AAE9611
{"id":"7b:9b:8a:ae:96:11","manufacturerdata":"L","rssi":-76,"txpower":12,"distance":6.44788}
Creating BLE buffer
device detected
4A99F16022CC
BLErssi
-89
txPower
-59
BLE DISTANCE :
21.52
Pub json discovery into:
home/home_presence/OpenMQTTGateway
{"id":"4a:99:f1:60:22:cc","manufacturerdata":"L","rssi":-89,"distance":21.51847}
Pub json into:
home/OpenMQTTGateway/BTtoMQTT/4A99F16022CC
{"id":"4a:99:f1:60:22:cc","manufacturerdata":"L","rssi":-89,"distance":21.51847}
Scan end, deinit controller
BT Task running on core 0

Its just picked up a {“moi”:0} so that’s something.

I do not see more than that though using mitt.fx app to subscribe but will keep playing.

ok using MQTT explorer I saw this so will keep persevering. and fer has just come through too now.

next steps, work on getting it into HA. I am loving this! thank you so much for the help (so far!) this is a steep learning curve!!

Oh yes, you have to modify this value on the pubsubclient library from your arduno libraries folder, set 1024 instead of 128.

Handsome!
The miflora advertize one value at a time for info.

amazing! i now have data in HA for these! thank you so much!

I need to do some more testing, only other query now is I unplugged the esp32 from my mac so it lost power, when I plugged it back in autoconnect to my wifi failed and it showed wifi reason 8?

then it went through it all again and connected on its own. Anything I need to worry about or change?

Just one more question. Some fields seem to update quickly and some don’t. Is there any rules on what makes it update etc?

Ie my moi is showing updated 12 mins ago, fee 22 mins ago, tem 1 min ago and lux 15 mins ago. Does it only show an update if a number changes or something?