Xiaomi Mi Plants Monitor Flower

Can these be used outdoors? I haven’t found anywhere that says they can’t and the way they’re constructed seems like it’d keep water out.

Woho! Got it up and running together with my rPi3.

Sooo,what to do with the data now…does anyone know where to get the “limits” for the different plants? and how is fertility level calculated?

1 Like

I have my data in Grafana (via Influx DB). There I have a user that can view the data only and it accessible from the web. Pretty nice.

Values are something you might find by trial and error. Check the values before and after you water your plants… Or let grafana show you min/max over some period. Then adjust watering…

Mine is outdoors on my balcony.

I created an automation that plays a TTS alarm when the plants have ‘needs’.
I may in time change this to the alert component, but you get the idea.

  - alias: Text-to-speech reminder to water the plants

    trigger:
      - platform: time
        minutes: 15
        seconds: 00

    condition:
      - condition: state
        entity_id: sensor.someone_home
        state: 'yes'
      - condition: numeric_state
        entity_id: sensor.miflora1_moisture
        below: 15
      - condition: template
        value_template: "{{ states.sensor.time_of_day.state != 'unknown' }}"
      - condition: template
        value_template: "{{ states.sensor.time_of_day.state != 'night' }}"

    action:
      - service: media_player.turn_on
        entity_id: media_player.google_home
      - service: media_player.volume_set
        entity_id: media_player.google_home
        data:
          volume_level: 0.70
      - service: light.turn_on
        data:
          entity_id: group.all_livingroom_lights
          flash: short
      - service: tts.google_say
        entity_id: media_player.google_home
        data_template:
          message: "Measured moisture for planter outside is {{ states.sensor.miflora1_moisture.state }} percent.. Water plants."
1 Like

Hello to everyone,

I have 1 Miflora device, but also i have special network topology and i dunno if i can integrate in HA now a days.

I have 2 raspberry PI, 1 Raspberry 3 where is working now like a VPN server in the main network (192.168.1.0/24) and second raspberry pi b+, where is working HA. This last raspberry is in other network (192.168.0.0/24).

As first Raspberry pi has BLE in hardware, yesterday i linked with the miflora.

The question is It’s possible to pass data from Miflora connected on raspberry pi 3 to the raspberry pi with HA or maybe all must be in the same network?
In the case that this is possible, then i must use the the starndard configuration of Miflora in HA?

https://home-assistant.io/components/sensor.miflora/.

I have a project to put all in the same raspberry pi, but now i don’t have time till next month.

thanks

1 Like

Install HASS on the BLE rpi. Configure an MQTT broker on the rpi3. Configure MQTT Eventstream between the two rpi’s. https://home-assistant.io/components/mqtt_eventstream/

1 Like

Hi, has anyone used the new Plant Monitor integration? I am getting an error on setup (setup failed) with the following in my log:

2017-05-08 10:22:49 ERROR (MainThread) [homeassistant.config] Invalid config for [plant]: value must be at most 1 for dictionary value @ data[‘plant’][‘aglaonema’][‘min_temperature’]. Got 15
value must be at most 1 for dictionary value @ data[‘plant’][‘cycas_dining’][‘min_temperature’]. Got 15. (See /config/configuration.yaml, line 1017). Please check the docs at https://home-assistant.io/components/plant/

I used the values from the example. Is this possibly because the sensors take a while to get a reading?

Here is my config entry:

plant:
  aglaonema:
    sensors:
      moisture: sensor.aglaonema_moisture
      battery: sensor.aglaonema_battery
      temperature: sensor.aglaonema_temperature
      conductivity: sensor.aglaonema_conductivity
      brightness: sensor.aglaonema_light_intensity
    min_moisture: 20
    max_moisture: 60
    min_battery: 17
    min_conductivity: 500
    min_temperature: 15
1 Like

Just to add, if I # out temperature it works… and I don’t really use temperature so it’s ok from my side, but just in case anyone else comes across this, would be good to know where I was going wrong…

I just received a new order of plant sensors. Unfortunately, I realized that it is the chinese version. This version still works with HASS, but can not be added to the MI Home app, nor to the flower care app. It keeps saying, that this product is only for user at Mainland China. Even when the location of the iPhone is set to Hong Kong and the location of the MI Home app to Mainland China.

Has anyone managed to connect it to an iOS app? I just want to connect them to the app for updating the firmware to the latest version.

I have the exact issue with the plant component. min_temperature does not work. Not sure where to report this as a bug

I had the same issue but this was fixed after the upgrade to 0.44.1 (as explained in the release notes)

Release 0.44.1 - May 7

  • Fix opening add-ons in Hass.io store that are not installed (@balloob)
  • sensor.envirophat: add missing requirement (@imrehg - #7451) (sensor.envirophat docs)
  • Forecasts for weather underground (@pezinek - #7062) (sensor.wunderground docs)
  • Upgrade pymysensors to 0.10.0 (@MartinHjelmare - #7469)
  • Fix plant MIN_TEMPERATURE, MAX_TEMPERATURE validation (@frog32 - #7476) (plant docs)
  • Update to pyunifi 2.12 (@finish06 - #7468) (device_tracker.unifi docs)
  • MQTT Cover: Fixed status reporting for range with non-zero base (@cribbstechnologies)

Does anyone know how to find the right moisture percentage and conductivity for a specific plant? Was hoping to find it in the miflore app, but based on that I can only guesstimate the ideal values…

I have been trying to decipher the android app, but i haven’t found out how to make the query in English, and i don’t understand Chinese…

But this is what i have so far:
HTTP
Request:

POST /api/ HTTP/1.1
Host: api.huahuacaocao.net
Content-Type: application/json

{
  "service": "pkbes",
  "method": "GET",
  "path": "/v2/pkb/categoryspecies",
  "data": {
    "extra": {
      "version": "ASI_3014_3.0.0",
      "position": [0,0],
      "app_channel": "release",
      "country": "sweden",
      "lang": "en",
      "phone": "man_model_sdk_int"
    },
    "phyllotaxy": "",
    "shape": "",
    "apex": "",
    "margin": "",
    "category": "",
    "count": 2,
    "limit": 2,
    "model": ""
  }
}

Response:

{
  "status": 100,
  "data": {
    "url": "http://pkb.resource.huahuacaocao.net/",
    "species": [
      {
        "name": "阿月浑子",
        "count": 1,
        "display_name": "阿月浑子",
        "img_url": "http://pkbes.resource.huahuacaocao.net/6Zi/5pyI5rWR5a2QLmpwZw==?imageView2/1/w/%d/h/%d"
      },
      {
        "name": "矮丛小金雀",
        "count": 1,
        "display_name": "矮丛小金雀",
        "img_url": "http://pkbes.resource.huahuacaocao.net/55+u5Lib5bCP6YeR6ZuALmpwZw==?imageView2/1/w/%d/h/%d"
      }
    ],
    "sum": 2201
  }
}

You can use that query to search some how, i haven’t figured out yet what to put in the different fields.

Just for information, I have tried a couple of different USB Bluetooth LE devices in my server, and I can reach the closest plant but terrible range otherwise.
Strange thing is, when I try to fetch data using the app and my Samsung S7, it has great range and I can basically be in any room in my apartment.

So I setup a Raspberry Pi 3 with the built-in bluetooth and the RPI3 has the same great range as my phone and it is working excellent! :smiley:
(using the plantgateway, which collects the data and publish the data via MQTT)

yeah, the plantgateway is working for me as well! However I tried setting it up with PiBakery, and everything works except for the cron entry to run it every 30min / 1 hour. What entry do you use?

I am running it in a docker-container on raspbian.
Nevertheless, its a cronjob inside the docker container which looks like this:

PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
LD_LIBRARY_PATH=/usr/local/lib
*/15 * * * * /usr/local/bin/plantgateway >> /var/log/plantgw.log 2>&1
@reboot /usr/local/bin/plantgateway >> /var/log/plantgw.log 2>&1

The first two is set becasue cron runs in a minimal shell environment, so it needs the paths.
But this is after my troubleshooting, so I am not sure if they are required.
Perhaps it is enough to just set the full path to plantgateway as I have done in the last two rows. Anyway, it is working :slight_smile:
I am running it every 15 min and at reboot right now, but will probably adjust it to 30/min or 60 min interval as you suggested.

1 Like

Hi,

Do you had solve the problem with de location in the iPhone? If so how do you solved?
Thanks in advance. :slight_smile:

No, I was not able to use the app on the iPhone. But the chinese version works like the international version via HASS and an bluetooth BLE stick.