Cloud Plant DB with API for PlantCard

Thank you for your answer.

I’m using 5 Xiaomi MiFlora’s (now rebranded as VegTrug?) in combination with my Raspberry PI 4 which also runs my home assistant. I’m using ThomDietrich/miflora-mqtt-daemon: Linux service to collect and transfer Xiaomi Mi Flora plant sensor data via MQTT to your smart home system, with cluster support :seedling::blossom::wilted_flower::house_with_garden::deciduous_tree: (github.com) for the BLE to MQTT part.

This setup will receive the sensor data followed by a (currently set to) 12 hour sleep.
Does the 1 hour interval make the battery life go down quickly? I dont mind changing the battery every 6 months but not less than that.

Currently i’m experiencing a low LUX and moisture level. I will look into that later tonight. Maybe i will also swap to a ESP32.

I would like to contribute to the project, what are the key focus points right now?

My light levels seem really low but maybe the numbers are real and my room is less lit up than i expected.

Through the day i only received 200 lux in my room for a plant that needs 800.

@jorismathijssen I’d be great if you can help out and you are very welcome. Current efforts is to make HASS integration installation and updating easy and straight forward. Also @Olen wanted to implement Plant lookup and configuration using HASS UI. I’m currently working on editing and adding new plants via web ui on API end.

This thread is currently the only place to discuss development but we also chat via direct messages as well. Feel free to contact me anytime if any questions. Thank you for your interest and offering help!

In the near future I think that calculating and monitoring accumulated light during a day makes more sense. For example using PAR or PPFD to monitor light during a day for a specific plants.

@NOTORIOUSVR @At3
I have no double .jpg issue with local images so please make sure you are using the latest versions from github. If you are still having the problem - reach me out directly.

Latest here:
Plant component: https://github.com/Olen/homeassistant-plant
lovelace-flower-card for UI: https://github.com/Olen/lovelace-flower-card

My understanding is this integration cannot fetch images from API yet. Is it right, @Olen?

how do I search the database by image?? I don’t know the exact name of the plant in latin.

You can find a Latin name in Wikipedia for example. Also search works across many fields including description and common name so if you can find it then it may not be in DB yet.
If not then you can add plant into DB. Potential approach to find info about a new plant is described here.

yes: you would no longer have to manually load the updates of the homeassistant-plant component

Yes, bring this to Hacs please!

I would also love to see this in HACS as it is way easier to install and update from there.

1 Like

I would love to have the component in HACS as well.
You should just add hacs.json to your repository:

{
    "name": "Flower Card",
    "render_readme": true,
    "filename": "flower-card.js"
 }

Thx for your great work.

I hope you are planning to submit a PR for the plant integration

Simone

  1. The thing with PlantComponent is that at the moment there is no much updates so it is not super critical to put this into HACS (correct me if I’m wrong). This is partly because PR which @Olen submitted has not been approved and there is possibility that it will not be approved anytime soon due to some required HASS architecture changes. I think for plant component we need to find workaround.

  2. For this time, I think the more important thing is to understand what functionality people would like to see in the plant component and in Plantbook API as well. I’m under impression that what currently in there is good enough… or am I wrong?

  3. @chemelli is my understanding correct that you suggest to put FlowerCard UI component into HACS as well… or I misunderstood?

@slaxor

  1. as I read the architecture change @Olen could go with WebSockets and get the PR accepted.
    Do I miss something ?

  2. Looking around this thread and others, I don’t feel like some functionalities are missing.

  3. Correct, so to have a easy way of installing and most important be sure to have the correct repo and up-to-date code.

1 Like

@chemelli

  1. Oh… I did not know that. I’m currently busy with finishing adding new/editing existing plants in Plantbook UI. Maybe someone can try and implement integration using WebSockets. I can only take a look at this once I finish with UI.
  2. Good. The only thing pending is support for Fahrenheit degrees in PlantCard but I could not get response from the original requester. So if anyone needs that or anything else please post here.
  3. It should be easy change as far as I understand. Maybe PR with JSON to Olen’s FlowerCard?

Hi everyone,

Sorry I have been more or less absent in this thread for a while. I have not really prioritized the project for several reasons. First of all, I have been really buzzy at work. Which I guess is a good thing in this day and age… Secondly, it’s been winter here in Norway, so 90% of my plants are either dead or covered in snow. And thirdly, the PR to get access to the configuration values has not moved at all.

This core problem here is that we are not allowed to expose config-values (e.g. the max/min-values for each plant) as attributes for the plant. It is done in the integration today, but as soon as I touched it, to add some more values, that patch was rejected. Even though it could definitely be argued that even though they are set in the config, they are “attributes”, and not “configuration” of the entity. But that discussion seems to be lost, so I won’t keep beating that horse.

Now, one could quite easily expose them in a websocket as suggested (and I have code for that in a private branch), but that is only really helpful for the GUI. It does not expose the values for scripts and automations, so you can’t in an easy wayt create notifications, automatic irrigation etc. by going that route.

What COULD be done, is to create another integration, which uses the websocket from the plant integration, to create the neccessary sensors to expose the max/min-values. But to me that sounds like a terrible solution and really lots of extra work and abstractions to do something that should be very simple.

Another path forward, which I like more, but still are unsure will be accepted, is to recreate the plant component to be more like e.g. a thermostat entity. Meaning that you can modify the max/min-values like you modify the setpoint of a thermostat. That would probably allow us to expose the values as attributes, because they are separated from the actual config.
This would also allow you to more dynamically adjust the values, and fetch the data from either the Open Plant DB or from other sources.
This also requires some more work to be functional, and I did not want to start on this before I have verified that it is a viable route, by getting an ok from the core developers. If they accept that solution, we probably also need to create a GUI-setup for the plants, and other bits and pieces to make it up to the modern standards of an integration.

3 Likes

This also requires some more work to be functional, and I did not want to start on this before I have verified that it is a viable route, by getting an ok from the core developers. If they accept that solution, we probably also need to create a GUI-setup for the plants, and other bits and pieces to make it up to the modern standards of an integration.

I think you can you raise the question in the old architecture discussion so to get a green light from core Devs.

Simone

Added a new discussion here

https://github.com/home-assistant/architecture/discussions/533

After upgrading to version 2021.6.0, the config is now spitting out errors:

Invalid config for [plant]: [client_id] is an invalid option for [plant]. Check: plant->plant->openplantbook->client_id. (See /config/configuration.yaml, line 67).

1 Like

same for me

you must add the version in the manifest.json

exemple :
“domain”: “plant”,
“name”: “Plant Monitor”,
“documentation”: “Plant Monitor - Home Assistant”,
“after_dependencies”: [“recorder”],
“codeowners”: ["@ChristianKuehnel"],
“quality_scale”: “internal”,
“version”: “0.0.0”
}

1 Like