Cloud Plant DB with API for PlantCard

Odd + interesting all at the same time… Did you update/download the latest versions of these files?

Mine is missing the version part completely compared to both of yours:

{
  "domain": "plant",
  "name": "Plant Monitor",
  "documentation": "https://www.home-assistant.io/integrations/plant",
  "after_dependencies": ["recorder"],
  "codeowners": ["@ChristianKuehnel"],
  "quality_scale": "internal"
}

I just re-downloaded the latest files from here and then didn’t change anything besides removing the .txt extension that was added when I downloaded them: GitHub - Olen/homeassistant-plant: Fork of the Plant component of home assistant

mine reads like this now:

{
  "domain": "plant",
  "name": "Plant Monitor",
  "documentation": "https://www.home-assistant.io/integrations/plant",
  "issue_tracker": "https://github.com/Olen/homeassistant-plant/issues",
  "after_dependencies": ["recorder"],
  "codeowners": ["@ChristianKuehnel"],
  "quality_scale": "internal",
  "version": "0.2"
}

Cool! I’ll have to give that a try once I can snapshot the HA VM and give it a whirl with the update again!

Thank you!

EDIT - that worked! HA is up to date with the latest and greatest.

1 Like

Hi there fellow gardeners ! First thanks for this nice integration into HA ! It works like a charm !

I wanted your advice on the soil moisture values I read from the DB for my plants, the four I added can go up to more than 60% of humidity, which seems a lot to me, regarding the Mi Flora most of the time never goes above 30% and the soil is already pretty humid at this value…

What is your average value for soil moisture ? Thank you for sharing your experience !

First of all, thank you for wonderful work! Within a day I managed to hook everything up and set up basic stuff.
However, I currently have a problem with the tooltips for some reason. Values seem to be there but instead of units I see “undefined” and “null”. Any ideas?

Thanks!

My spider plant is a water sucking monster and I have difficulty getting it above around 20% humidity, even when I dump a ton of water on it. That said my lemon tree frequently goes up to 35-40% humidity if I water it regularly. My aloe plant barely takes a sip. I water it maybe every 2-3 weeks, only a touch, and it usually happily stays between about 10-15%.

Thank you for sharing your insights :slight_smile: so if I get it correctly you share my conclusion that soil moisture value range is too high on this DB ?

IMHO you also should consider the pot shape/depth because sensor (Xiaomi) is pretty short and it only measure humidity at the depth the tip is inserted at and vice versa. So the soil can feel wet on top but dry at depth so the measurement could be imprecise in comparison with your sense.

Does it show right values though?

Hey guys.
Please let me know if you need any improvements or new features to both HASS integration or Cloud service. I will appreciate that.

What I really wish existed, is a way to skip all of the yaml configuration and instead:

  1. Somewhere in the UI just click “Add plant” (Lovelace dashboard > add card?)
  2. A list of detected, unused bluetooth devices is shown. User clicks the one which is their Miflora sensor device.
  3. AFter its sensors are detected, user can start typing the name of the plant (eg “Roma tomatoes” ) and choose from a filtered list of what’s in the cloud DB. The bottom entry is always “Add a new plant to the database” which allows entering custom values and asks permission to upload them to the cloud DB for others.
  4. Min, Max settings and image are automatically imported based on the plant type selected in step 2.

I spent months without the light sensors in any of my Mifloras working because of a minor wording issue in the yaml. >.<

1 Like

Hey @Olen - I’ve just pushed a PR for both the homeassistant-plant and GitHub - Olen/lovelace-flower-card to update the image value to use the Home Assistant standard naming convention of entity_picture

The main reason for this is that there are a number of components/themes/cards that make use of the entity_picture field for images.

It is a breaking change, but should hopefully allow more people to make use of the attribute :slight_smile:

Hi, and thank you.
We could make this “less breaking” by having both attributes set to the same value for a while, and then remove “image” later.

Now, the flower-season is starting up again here in Norway, so I’ll probably be inspired to work on this a bit more again.

What I really want to is to create the “plant” to be more like a “device” with multiple sensors and config-entities attached to it. But it requires a lot of rewrite, which I have not had a chance to look at for a long time now.

2 Likes

Hey,

I’ll give that a go!

I did take a look at making it more integrated, however Python is not my strong point

Hey @Olen - Change `image` to `entity_picture` by greghesp · Pull Request #18 · Olen/homeassistant-plant · GitHub and Use `entity_picture` instead of `image` by greghesp · Pull Request #5 · Olen/lovelace-flower-card · GitHub

PR sent in. Pretty sure this is working OK now. Accepts either image or entity_picture in the config, and outputs both the image and entity_picture attribute

Guys, impressive work, thanks a lot for this. It increases the WAF (woman acceptance factor) a lot.

What i am really missing is a small battery sign. As i understand there is a min_battery option and i assume i get a problem value if my battery drops below the desired value. But it would be nice if we could get a visual sign as well.

1 Like

@slaxor @Olen

Not sure if this is an API bug, or a plugin bug at the moment, however I’m finding that sometimes, it fails to get the image from Plantbook

Some examples:

  avocado_plant:
    species: Persea americana
    image: openplantbook

returns

image: https://objectstorage.ap-sydney-1.oraclecloud.com/n/sdyd5yr3jypo/b/plant-img/o/persea%20americana.jpg

However

  pachira_aquatica:
    species: Pachira macrocarpa
    image: openplantbook

returns

image: openplantbook

I’ve checked on Plantbook and it seems the display_pid is correct and does exist: https://open.plantbook.io/api/v1/plant/detail/pachira%20macrocarpa/

I think it might be a bug in the plugin which I will raise, but the logs suggest everything is OK

2022-04-26 11:31:42 DEBUG (MainThread) [custom_components.plant] Fetched data from https://open.plantbook.io/api/v1/plant/detail/pachira macrocarpa:
2022-04-26 11:31:42 DEBUG (MainThread) [custom_components.plant] {'pid': 'pachira macrocarpa', 'display_pid': 'Pachira macrocarpa', 'alias': 'pachira aquatica', 'max_light_mmol': 4700, 'min_light_mmol': 2800, 'max_light_lux': 40000, 'min_light_lux': 1200, 'max_temp': 32, 'min_temp': 10, 'max_env_humid': 85, 'min_env_humid': 30, 'max_soil_moist': 60, 'min_soil_moist': 15, 'max_soil_ec': 2000, 'min_soil_ec': 350, 'image_url': 'https://objectstorage.ap-sydney-1.oraclecloud.com/n/sdyd5yr3jypo/b/plant-img/o/pachira%20macrocarpa.jpg'}
2022-04-26 11:31:42 DEBUG (MainThread) [custom_components.plant] Plant: pachira_aquatica Var: name Config: None Value: Pachira macrocarpa
2022-04-26 11:31:42 DEBUG (MainThread) [custom_components.plant] Plant: pachira_aquatica Var: min_temperature Config: 10.0 Value: 10
2022-04-26 11:31:42 DEBUG (MainThread) [custom_components.plant] Plant: pachira_aquatica Var: max_temperature Config: 40.0 Value: 32
2022-04-26 11:31:42 DEBUG (MainThread) [custom_components.plant] Plant: pachira_aquatica Var: min_moisture Config: 20 Value: 15
2022-04-26 11:31:42 DEBUG (MainThread) [custom_components.plant] Plant: pachira_aquatica Var: max_moisture Config: 60 Value: 60
2022-04-26 11:31:42 DEBUG (MainThread) [custom_components.plant] Plant: pachira_aquatica Var: min_conductivity Config: 500 Value: 350
2022-04-26 11:31:42 DEBUG (MainThread) [custom_components.plant] Plant: pachira_aquatica Var: max_conductivity Config: 3000 Value: 2000
2022-04-26 11:31:42 DEBUG (MainThread) [custom_components.plant] Plant: pachira_aquatica Var: min_brightness Config: 0 Value: 1200
2022-04-26 11:31:42 DEBUG (MainThread) [custom_components.plant] Plant: pachira_aquatica Var: max_brightness Config: 100000 Value: 40000
2022-04-26 11:31:42 DEBUG (MainThread) [custom_components.plant] Plant: pachira_aquatica Var: image Config: openplantbook Value: https://objectstorage.ap-sydney-1.oraclecloud.com/n/sdyd5yr3jypo/b/plant-img/o/pachira%20macrocarpa.jpg

Compare it against the one that does work

2022-04-26 11:31:41 DEBUG (MainThread) [custom_components.plant] Fetched data from https://open.plantbook.io/api/v1/plant/detail/persea americana:
2022-04-26 11:31:41 DEBUG (MainThread) [custom_components.plant] {'pid': 'persea americana', 'display_pid': 'Persea americana', 'alias': 'pear', 'max_light_mmol': 8000, 'min_light_mmol': 4200, 'max_light_lux': 76000, 'min_light_lux': 4000, 'max_temp': 35, 'min_temp': 8, 'max_env_humid': 80, 'min_env_humid': 30, 'max_soil_moist': 60, 'min_soil_moist': 15, 'max_soil_ec': 2000, 'min_soil_ec': 350, 'image_url': 'https://objectstorage.ap-sydney-1.oraclecloud.com/n/sdyd5yr3jypo/b/plant-img/o/persea%20americana.jpg'}
2022-04-26 11:31:41 DEBUG (MainThread) [custom_components.plant] Plant: avocado_plant Var: name Config: None Value: Persea americana

This line seems to be the difference: 2022-04-26 11:31:41 DEBUG (MainThread) [custom_components.plant] Plant: avocado_plant Var: name Config: None Value: Persea americana

1 Like

Hi all! I’ve deployed CloudFlare proxied image links to OpenPlantbook. Now all image requests are proxied/cached using CloudFlare so they should be fast to download independently on your location on the globe. Thanks to @0x107d and @The-Jeffski on Discord channel for the suggestion and help with deployment of this cool feature. Let me know if any issues with image loading.

2 Likes

Thanks for reporting this on github. I will look into this!

After the HASS 2022.7.0 update the plant component needs to be updated. Please take the latest version from the repo.

1 Like