Cloud Plant DB with API for PlantCard

Great work on this integration. Keen to get it up and running but have a couple of problems/queries.

Is the use of OpenPlantbook required? Docs suggest the new v2 doesn’t need it but I can’t get the integration added.

Second, my issue adding the integration is on the final page of setup where you can assign min/max limits. It won’t allow me to press ‘submit’ and there’s a message of ‘Did not find «plant name» in OpenPlantbook. Using default values for thresholds.’

I am using a Xiaomi Miflora via ESPHome which is sending MQTT data to HA. I removed my plant: config from configuration.yaml but still have a ‘plant.’ device which is autogenerated by MQTT. Not sure if that’s something of the issue.

I’m on the latest v2 beta 7 version of the integration.

Thanks.

Don … thanks again Olen

Im running HA in Proxmox with no build in Bluetooth and I can’t get a Dongel to work. so Im sniffing Bluetooth via ESPHome and esp32

Is the use of OpenPlantbook required? Docs suggest the new v2 doesn’t need it but I can’t get the integration added.

Openplantbook is not strictly required, but it greatly helps you gettting sensible values for the thresholds, and nice pictures of the plants. The defalt values I reference are probably not the right ones for any species.
What problem do you have when adding it? It should be very easy to set up. You just need to register with Openplantbook and get a token and secret and input those when you add the integration.

Second, my issue adding the integration is on the final page of setup where you can assign min/max limits. It won’t allow me to press ‘submit’ and there’s a message of ‘Did not find «plant name» in OpenPlantbook. Using default values for thresholds.’

If you can’t press submit, it is probably because one of the reuired fields are empty. All fields are required except for Image (and all fields should be pre filled with some values). Are some of the fields missing data?

Could you add a screenshot of the form?

I removed my plant: config from configuration.yaml

If you keep that until after the first restart after adding the new integration, all your plants should be migrated to the new setup automatically. And you shuld really not have to do much at all to get it working.

Got it working - thanks. I did have to install the OpenPlantbook integration and search for species when adding the plant integration.

For my purposes I’d rather not have to use OpenPlantbook. I can see the appeal, but for those happy to input their own min/max values it would be nice for it to not be a requirement. I like to keep my HA as clean as possible so would rather not have integrations installed that I don’t need.

Great work on this and I look forward to seeing it develop further!

Glad you got it working.
Openplantbook is not a strict requirement (I have updated the readme to reflect this). If something is not working without Openplantbook I will investigate that.

Thanks. From my experience, it doesn’t seem possible to add a plant via the UI unless the species is found on OpenPlantbook. Perhaps I’m missing something, or you can advise on how a plant can be added without OpenPlantbook? Happy to provide further details and raise an issue on Github if you would like.

Also, my lovelace card isn’t showing units. Would you have any suggestions for how to fix this?

Right now I’m sitting in the August sun, drinking a beer on a two years postponed music festival, but I’ll get back to it as soon as I recover…

2 Likes

No worries at all mate! No rush - just enjoy your break!!

A few updates today as well.

  • A bunch of minor fixes to ensure everything works fine without Openplantbook
  • Fixed a default image in the flower-card if entity_picture is not set
  • Sometimes the websocket did not respond correctly

@Cassio299 I work with promox too. If not check which kind of sensors you use. If you use MiFlora you should be aware that espHome does not read battery values.

If use tasmota with mqtt so i could spread some esp32 trough the house.

@Olen - hope you enjoyed the music festival. Which one was it?

Testing latest beta I’m able to set up without OpenPlantbook which is great :+1:t3:. To me, it seems a little strange having species as a required field. For me it would make more sense to have it as an optional field with a note referencing it as required for OpenPlantbook. To be honest, I think the UI config flow you have is excellent and should be incorporated into the core HA as the default plant integration seems to be one of the few yaml only integrations left.

Moving onto the lovelace card, i realised the units weren’t showing for me due to screen size - turning phone landscape showed them. In any case I’m delighted with the card. Would be nice to have a few more config options for colours, name, subtitle.

Just giving a bit of personal feedback which you can feel free to ignore! Thanks, and keep up the good work!

@fenty17 It was great. https://www.oyafestivalen.no/

Anyway. I am glad you made it work. And thank you for reporting the issues you find.

Regarding required fields, there is a very limited set of options you can use when creating a config flow. I am already stretching it beyond what was intended I think, by (ab)using a few hacks. The whole project started because I wanted to integrate Openplantbook into the plant component, so in that way, it makes sense to have species as a required field.
Also, how I set up my plants is that I give them name such as “Big white pot”, “Wooden box outside” etc. and then the species is displayed nicely below. Notice that you now have a separate “Species to display” field whch is used throughout the UI,
If you don’t use Openplantbook you can just write whatever you want it the “species” field, and it is not actually used for anything after the plant is set up.

Regarding replacing the official implementation, I sort of agree, but on the other hand I don’t think it will happen anytime soon. First of all, Integrations that use or rely on other integrations in the way this one uses the openplantbook integration is quite unique, and probably not up to how they like it.
It is also not up to all the standards, so it probably requires a lot of work to make it ready for mainline inclusion.

I’ll see if I add some more options to the card for coloring etc, but I want to keep having all info that is dsplayed in the card read from the plant device (and it’s entites). If you want to change the name in the card, change the plant name. If you want to change the “subtitle”, change the “Species to display” in the plant config. I don’t want all o those things in the card config as well. That way things are consistent, and there is never any doubt where the info is coming from.

I managed to make species optional. New beta released yesterday where it is easier to add and remove both species, display species and image. Also includes a few other related fixes.

I looked into options for coloring the flower-card, but as far as I can tell, the css is generated before the config is parsed, so at least with the current version of card-tools that seems to be a non trivial fix. If you feel strongly for it, I suggest you add it as an issue to the flower-card github page, and I’ll see if I can do something about it later.

Amazing work! Thanks, and well done. I will give the updated version a test later regarding the optional species tweak.

No worries about the card colours etc. I’m more than happy to try some CSS tweaks via card-mod - just haven’t gotten round to it yet.

The classes are “good”, “bad” and “unavailable” (not “ugly”), so you can probably make some tweaks.

@Thomas Bail Home assistant doesn’t see my usb dongle so I do not get any sensors from my flower pins how ever I get the sensors via ESPHome integration in Home assistant Only the old (2017 and before sticks support, as I understand it, Battery usages

@Olen can I suggest that you make a new tread in here with 2022 in the title when you release version 2 the tread is quite long and the title could be more specific. I believe that your card is the only card still supported in here.

1 Like

@Cassio299: That is probably a good idea.

I am sorry for the number of betas here, but I’d rather release them as soon as fixes are available than have the commits piling up, at least during the beta period.

I hope most of the corner cases, especially when it comes to migration of yaml-config as that has been the main source of bugs lately, are fixed now, so I currently plan to release 2.0 this weekend.

One last treat, that is not directly related to the plant integration, is that I am currently testing an option in the openplantbook integration that will download the images automatically.

I have published a beta-release (1.1.0-beta.1) of the OpenPlantbook integration so It should be available from HACS if you enable beta releses.
More info in the README.

2 Likes

Thats the point only the old ones :frowning: These are sending battery values.