Xiaomi Mi Plants Monitor Flower

I think the real-time value is more intuitive to display. We would still use max_brightness to register a problem and highlight the value so that provides the linkage. Seems this is common with a few people so I’ll make the change over the next week. Let me know if there is any other suggestions for improvement.

3 Likes

Somehow my sensors stopped working suddenly. Was working fine for months untill my sdcard crashed and I had to reinstall everything. After adding the 8th sensor, it worked for about 2 days and since then nothing at all. Not even when commenting out the last sensor.
sensors.yaml:

  - platform: miflora
    name: "Mi Flora 1"
    mac: 'C4:7C:8D:64:46:77'
    force_update: true
    monitored_conditions:
      - temperature
      - moisture
      - light
      - conductivity
      - battery
  - platform: miflora
    name: "Mi Flora 2"
    mac: 'C4:7C:8D:64:42:27'
    force_update: true
    monitored_conditions:
      - temperature
      - moisture
      - light
      - conductivity
      - battery
  - platform: miflora
    name: "Mi Flora 3"
    mac: 'C4:7C:8D:64:45:C7'
    force_update: true
    monitored_conditions:
      - temperature
      - moisture
      - light
      - conductivity
      - battery
  - platform: miflora
    name: "Mi Flora 4"
    mac: 'C4:7C:8D:64:45:D3'
    force_update: true
    monitored_conditions:
      - temperature
      - moisture
      - light
      - conductivity
      - battery
  - platform: miflora
    name: "Mi Flora 5"
    mac: 'C4:7C:8D:64:45:9C'
    force_update: true
    monitored_conditions:
      - temperature
      - moisture
      - light
      - conductivity
      - battery
  - platform: miflora
    name: "Mi Flora 6"
    mac: 'C4:7C:8D:65:BA:EB'
    force_update: true
    monitored_conditions:
      - temperature
      - moisture
      - light
      - conductivity
      - battery
  - platform: miflora
    name: "Mi Flora 7"
    mac: 'C4:7C:8D:65:BA:DB'
    force_update: true
    monitored_conditions:
      - temperature
      - moisture
      - light
      - conductivity
      - battery
  - platform: miflora
    name: "Mi Flora 8"
    mac: 'CC4:7C:8D:66:1E:6C'
    force_update: true
    monitored_conditions:
      - temperature
      - moisture
      - light
      - conductivity
      - battery  

configuration.yaml:

plant:
  Yucca:
    sensors:
      moisture: sensor.mi_flora_1_moisture
      battery: sensor.mi_flora_1_battery
      temperature: sensor.mi_flora_1_temperature
      conductivity: sensor.mi_flora_1_conductivity
      brightness: sensor.mi_flora_1_light_intensity
    min_moisture: 22
#    max_moisture: 60
#    min_battery: 15
#    min_conductivity: 350
#    min_temperature: 15
  tafel_links:
    sensors:
      moisture: sensor.mi_flora_2_moisture
      battery: sensor.mi_flora_2_battery
      temperature: sensor.mi_flora_2_temperature
      conductivity: sensor.mi_flora_2_conductivity
      brightness: sensor.mi_flora_2_light_intensity
    min_moisture: 22
#    max_moisture: 60
#    min_battery: 15
#    min_conductivity: 350
#    min_temperature: 15
  tafel_rechts:
    sensors:
      moisture: sensor.mi_flora_3_moisture
      battery: sensor.mi_flora_3_battery
      temperature: sensor.mi_flora_3_temperature
      conductivity: sensor.mi_flora_3_conductivity
      brightness: sensor.mi_flora_3_light_intensity
    min_moisture: 22
#    max_moisture: 60
#    min_battery: 15
#    min_conductivity: 350
#    min_temperature: 15
  vensterbank_links:
    sensors:
      moisture: sensor.mi_flora_4_moisture
      battery: sensor.mi_flora_4_battery
      temperature: sensor.mi_flora_4_temperature
      conductivity: sensor.mi_flora_4_conductivity
      brightness: sensor.mi_flora_4_light_intensity
    min_moisture: 22
#    max_moisture: 60
#    min_battery: 15
#    min_conductivity: 350
#    min_temperature: 15
  vensterbank_rechts:
    sensors:
      moisture: sensor.mi_flora_5_moisture
      battery: sensor.mi_flora_5_battery
      temperature: sensor.mi_flora_5_temperature
      conductivity: sensor.mi_flora_5_conductivity
      brightness: sensor.mi_flora_5_light_intensity
    min_moisture: 22
#    max_moisture: 60
#    min_battery: 15
#    min_conductivity: 350
#    min_temperature: 15
  dressoir_links:
    sensors:
      moisture: sensor.mi_flora_6_moisture
      battery: sensor.mi_flora_6_battery
      temperature: sensor.mi_flora_6_temperature
      conductivity: sensor.mi_flora_6_conductivity
      brightness: sensor.mi_flora_6_light_intensity
    min_moisture: 22
#    max_moisture: 60
#    min_battery: 15
#    min_conductivity: 350
#    min_temperature: 15
  dressoir_rechts:
    sensors:
      moisture: sensor.mi_flora_7_moisture
      battery: sensor.mi_flora_7_battery
      temperature: sensor.mi_flora_7_temperature
      conductivity: sensor.mi_flora_7_conductivity
      brightness: sensor.mi_flora_7_light_intensity
    min_moisture: 22
#    max_moisture: 60
#    min_battery: 15
#    min_conductivity: 350
#    min_temperature: 15
  dwarf_umbrella:
    sensors:
      moisture: sensor.mi_flora_8_moisture
      battery: sensor.mi_flora_8_battery
      temperature: sensor.mi_flora_8_temperature
      conductivity: sensor.mi_flora_8_conductivity
      brightness: sensor.mi_flora_8_light_intensity
#    min_moisture: 22
#    max_moisture: 60
#    min_battery: 15
#    min_conductivity: 350
#    min_temperature: 15

log:

2018-03-24 10:26:00 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.mi_flora_5_battery is taking over 10 seconds
2018-03-24 10:26:30 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.mi_flora_5_conductivity is taking over 10 seconds
2018-03-24 10:27:01 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.mi_flora_1_battery is taking over 10 seconds
2018-03-24 10:27:31 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.mi_flora_7_conductivity is taking over 10 seconds
2018-03-24 10:28:02 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.mi_flora_2_conductivity is taking over 10 seconds
2018-03-24 10:28:32 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.mi_flora_6_temperature is taking over 10 seconds
2018-03-24 10:29:03 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.mi_flora_7_battery is taking over 10 seconds
2018-03-24 10:29:33 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.mi_flora_4_battery is taking over 10 seconds
2018-03-24 10:30:04 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.mi_flora_3_conductivity is taking over 10 seconds
2018-03-24 10:30:35 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.mi_flora_4_light_intensity is taking over 10 seconds
2018-03-24 10:31:12 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.mi_flora_1_light_intensity is taking over 10 seconds
2018-03-24 10:31:43 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.mi_flora_5_battery is taking over 10 seconds
2018-03-24 10:32:13 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.mi_flora_4_battery is taking over 10 seconds
2018-03-24 10:32:44 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.mi_flora_1_battery is taking over 10 seconds
2018-03-24 10:33:14 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.mi_flora_7_temperature is taking over 10 seconds
2018-03-24 10:33:45 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.mi_flora_2_light_intensity is taking over 10 seconds
2018-03-24 10:34:15 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.mi_flora_3_battery is taking over 10 seconds
2018-03-24 10:34:46 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.mi_flora_6_light_intensity is taking over 10 seconds
2018-03-24 10:35:16 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.mi_flora_5_temperature is taking over 10 seconds
2018-03-24 10:35:47 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.mi_flora_3_conductivity is taking over 10 seconds
2018-03-24 10:36:18 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.mi_flora_4_light_intensity is taking over 10 seconds
2018-03-24 10:36:48 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.mi_flora_1_conductivity is taking over 10 seconds
2018-03-24 10:37:19 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.mi_flora_2_battery is taking over 10 seconds
2018-03-24 10:37:49 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.mi_flora_6_battery is taking over 10 seconds
2018-03-24 10:38:20 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.mi_flora_7_battery is taking over 10 seconds
2018-03-24 10:38:57 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.mi_flora_6_battery is taking over 10 seconds
2018-03-24 10:39:28 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.mi_flora_2_light_intensity is taking over 10 seconds
2018-03-24 10:39:58 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.mi_flora_5_battery is taking over 10 seconds
2018-03-24 10:40:29 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.mi_flora_6_moisture is taking over 10 seconds

Looks like I have a bluetooth problem?

sudo hcitool lescan
LE Scan ...
42:CA:0E:52:74:9D (unknown)
42:CA:0E:52:74:9D (unknown)
71:2A:87:20:BE:B9 (unknown)
71:2A:87:20:BE:B9 (unknown)
5D:80:4E:AA:62:8D (unknown)
5D:80:4E:AA:62:8D (unknown)
46:5B:75:9C:3A:67 (unknown)
46:5B:75:9C:3A:67 (unknown)
6C:D8:82:3E:47:11 (unknown)
07:A2:3C:5E:C5:DA (unknown)
5B:98:39:25:0E:6A (unknown)
5B:98:39:25:0E:6A (unknown)
7B:FA:BA:BF:6B:91 (unknown)
7B:FA:BA:BF:6B:91 (unknown)
6C:D8:82:3E:47:11 (unknown)
C4:7C:8D:66:1E:6C (unknown)
C4:7C:8D:66:1E:6C Flower care
C4:7C:8D:64:45:C7 (unknown)
C4:7C:8D:64:45:C7 Flower care
Disable scan failed: Input/output error

@molodax, @aherbjornsen, @MrEd, changed plant card to use real-time brightness. Merged in PR1029.

2 Likes

would you mind sharing your code? i like how the data is shown left to right, and not top to bottom.

There’s no code to it. I’ve just configured using the “plant monitor” component:

Cool. Thanks. Didn’t know of that component.
Looks all great now :slightly_smiling_face:

Just added support for MiFlora to this BT to MQTT gateway: https://github.com/zewelor/bt-mqtt-gateway/

It works really well for me, especially since it’s not device specific so I’m also using it for my thermostats.

This is a great initiative: MiFlora Sensor Plant Database

3 Likes

Hi, I bought the Xiaomi Flower Pot (RoPot). Has anyone made Home Assistant compatible with that one? I set it up with the MiFlora sensor component but it does not read any data, only battery.

It looks like this guy has added it for Homey…

OK, any idea how to get it to Hass?

Not a clue I don’t know JS :P, I was hoping someone here would know :slight_smile:

If anyone is interested, you can now set an entity picture to show up on the plant card, with something like:

  customize:
    plant.miflora_1:
      friendly_name: Dragon Tree (Bedroom)
      entity_picture: /local/dragon_tree.jpg

You need to copy the image file into the www directory within your configuration folder.

19 Likes

nice, were did you got this pictures from

I have the values from my Miflora showing up now.

I’d like to do some actuation (Open a Sonoff Sv switch connected to a water valve) when the moisture values are low.

I’m keen to explore node red for this. How can I get the Miflora values into node red? I suspect I need to turn them into MQTT? Is there a guide for this?

Nice! Is this based on a custom state card by any chance?
Because simply setting the entity_picture doesn’t show any images for me when using the default ha-plant-card

@syphernl, no custom component required. The PR went onto the main branch and is in from about release 0.70.0. You might need to update to latest version. Also, make sure the images are in the www directory below your main configuration files.

@ViperRNMC, images by google.

Odd. I’m on 0.71 but they aren’t working for me :thinking:

Hmm, curious, can you check whether your plant entity has an entity_picture property set using the Developer Tools - States <> . That should at least ensure you have things configured properly. If not then post the relevant customize: section so we can see if there is any problem.

Could it be that the image format might not be supported but that feels like a long shot. Is it a common format?

Finally, if you are using Chrome then you could open the browser’s More Tools -> Developer Tools to see if there are any error messages showing.

Having said all of the above, would be interested to know if anyone else has had this problem (or better yet can confirm working for them 8)

1 Like