Olen / homeassistant-plant

Alternative Plant component of home assistant
350 stars 23 forks source link

Did not find in OpenPlantbook. #82

Closed kuradi closed 1 year ago

kuradi commented 1 year ago

so ive trying to add 2 plants dracaena braunii and yucca elephantipes and for both im getting "Did not find «dracaena braunii» in OpenPlantbook. Using default values for thresholds." using 2.2.0-beta1

Opera Snapshot_2023-07-08_104445_192 168 1 185

Opera Snapshot_2023-07-08_104507_192 168 1 185

Opera Snapshot_2023-07-08_104627_192 168 1 185

but openplantbook shows: Opera Snapshot_2023-07-08_105157_open plantbook io

Opera Snapshot_2023-07-08_104544_open plantbook io

ha log: 2023-07-08 10:47:13.748 DEBUG (MainThread) [custom_components.plant.config_flow] User Input {'name': 'Test', 'species': 'dracaena braunii'} 2023-07-08 10:47:13.748 DEBUG (MainThread) [custom_components.plant.config_flow] Validating step 1: {'name': 'Test', 'species': 'dracaena braunii'} 2023-07-08 10:47:13.748 DEBUG (MainThread) [custom_components.plant.config_flow] Plant_info: {'name': 'Test', 'species': 'dracaena braunii', 'search_for': 'dracaena braunii'} 2023-07-08 10:47:13.748 DEBUG (MainThread) [custom_components.plant.plant_helpers] openplantbook in services? True 2023-07-08 10:47:15.237 DEBUG (MainThread) [custom_components.plant.plant_helpers] openplantbook in services? True 2023-07-08 10:47:15.237 INFO (MainThread) [custom_components.plant.plant_helpers] Did not find 'dracaena braunii' in OpenPlantbook 2023-07-08 10:47:15.237 DEBUG (MainThread) [custom_components.plant.plant_helpers] Parsing input config: {'name': 'Test', 'species': 'dracaena braunii', 'sensors': {}, 'display_pid': None} 2023-07-08 10:47:15.237 DEBUG (MainThread) [custom_components.plant.plant_helpers] Display pid: None 2023-07-08 10:47:15.237 DEBUG (MainThread) [custom_components.plant.plant_helpers] Resulting config: {'data_source': 'Default values', 'plant_info': {'name': 'Test', 'species': 'dracaena braunii', 'entity_picture': '', 'display_pid': '', 'limits': {'max_illuminance': 100000, 'min_illuminance': 0, 'max_conductivity': 3000, 'min_conductivity': 500, 'max_moisture': 60, 'min_moisture': 20, 'max_temperature': 40, 'min_temperature': 10, 'max_humidity': 60, 'min_humidity': 20, 'max_dli': 30, 'min_dli': 2}, 'temperature_sensor': None, 'moisture_sensor': None, 'conductivity_sensor': None, 'illuminance_sensor': None}} 2023-07-08 10:47:15.237 DEBUG (MainThread) [custom_components.plant.plant_helpers] openplantbook in services? True

Olen commented 1 year ago

What happens if you go to Developer Tools -> Services and run an "Openplantbook Search" and search for "dracaena braunii" Then go to Developer Tools -> States and look for "openplantbook.search_result"

kuradi commented 1 year ago

image

Olen commented 1 year ago

Ok, so it does actaully find it.
Need to look a bit more at it then

cromelex commented 1 year ago

Same issue here with the BETA. Openplantbook is return the results but the integration is not retrieving the values, ie taking the defaults and I had to populate manually:

image

kohlerryan commented 1 year ago

+1 - finding it in search, but not in Plant Monitor

posreg commented 1 year ago

+1 for me, for 3 species

brunano21 commented 1 year ago

@Olen

+1 for me. Search works via Call Service, but when I try to add a plant I get the following (looking at Chrome Dev tool response content)

500 Internal Server Error

Server got itself in trouble

Using 2.1.1

nezu-gh commented 1 year ago

+1 Happens for every new plant I am trying to add. Home Assistant 2023.7.1, homeassistant-plant 2.2.0 beta 1

Andor commented 1 year ago

same here for plant hibiscus rosa sinensis 'cheerleader yellow': https://open.plantbook.io/api/v1/plant/detail/hibiscus%20rosa%20sinensis%20'cheerleader%20yellow'/ It exists in openplantbook.hibiscus_rosa_sinensis_cheerleader_yellow with:

pid: hibiscus rosa sinensis 'cheerleader yellow'
display_pid: Hibiscus rosa sinensis 'Cheerleader Yellow'
alias: hawaiian hibiscus
category: Malvaceae, Hibiscus
max_light_mmol: 7100
min_light_mmol: 3400
max_light_lux: 55000
min_light_lux: 2500
max_temp: 35
min_temp: 5
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: /local/images/plants/hibiscus rosa sinensis cheerleader yellow.jpg
timestamp: 2023-07-13T21:03:33.399705

but the plant integration can't find it:


2023-07-13 21:04:33.238 DEBUG (MainThread) [custom_components.plant.config_flow] User Input {'name': "hibiscus rosa sinensis 'cheerleader yellow'", 'species': "hibiscus rosa sinensis 'cheerleader yellow'"}
2023-07-13 21:04:33.238 DEBUG (MainThread) [custom_components.plant.config_flow] Validating step 1: {'name': "hibiscus rosa sinensis 'cheerleader yellow'", 'species': "hibiscus rosa sinensis 'cheerleader yellow'"}
2023-07-13 21:04:33.239 DEBUG (MainThread) [custom_components.plant.config_flow] Plant_info: {'name': "hibiscus rosa sinensis 'cheerleader yellow'", 'species': "hibiscus rosa sinensis 'cheerleader yellow'", 'search_for': "hibiscus rosa sinensis 'cheerleader yellow'"}
2023-07-13 21:04:33.239 DEBUG (MainThread) [custom_components.plant.plant_helpers] openplantbook in services? True
2023-07-13 21:04:34.777 DEBUG (MainThread) [custom_components.plant.plant_helpers] openplantbook in services? True
2023-07-13 21:04:34.778 INFO (MainThread) [custom_components.plant.plant_helpers] Did not find 'hibiscus rosa sinensis 'cheerleader yellow'' in OpenPlantbook
2023-07-13 21:04:34.780 DEBUG (MainThread) [custom_components.plant.plant_helpers] Parsing input config: {'name': "hibiscus rosa sinensis 'cheerleader yellow'", 'species': "hibiscus rosa sinensis 'cheerleader yellow'", 'sensors': {}, 'display_pid': None}
2023-07-13 21:04:34.781 DEBUG (MainThread) [custom_components.plant.plant_helpers] Display pid: None
2023-07-13 21:04:34.781 DEBUG (MainThread) [custom_components.plant.plant_helpers] Resulting config: {'data_source': 'Default values', 'plant_info': {'name': "hibiscus rosa sinensis 'cheerleader yellow'", 'species': "hibiscus rosa sinensis 'cheerleader yellow'", 'entity_picture': '', 'display_pid': '', 'limits': {'max_illuminance': 100000, 'min_illuminance': 0, 'max_conductivity': 3000, 'min_conductivity': 500, 'max_moisture': 60, 'min_moisture': 20, 'max_temperature': 40, 'min_temperature': 10, 'max_humidity': 60, 'min_humidity': 20, 'max_dli': 30, 'min_dli': 2}, 'temperature_sensor': None, 'moisture_sensor': None, 'conductivity_sensor': None, 'illuminance_sensor': None}}
2023-07-13 21:04:34.782 DEBUG (MainThread) [custom_components.plant.plant_helpers] openplantbook in services? True```
Olen commented 1 year ago

Thanks for the reports. I don't really need any more "+1"-s. I am currently on vacation, and can't do any development or testng for the next few weeks, unless someone are able to come up with a working and tested PR, in which case I'll be able to merge and create a new release.

jonnybergdahl commented 1 year ago

This issue is fixed in my pull request https://github.com/Olen/homeassistant-plant/pull/85

posreg commented 1 year ago

apologies for commenting in Closed issue, I don;t want to create new one. I copied all amended files from https://github.com/Olen/homeassistant-plant/pull/87 , restarted HA, and i still face an issue where Integration is not able to find the Plant Is there something else I need to do ?

bergdahl commented 1 year ago

You need the new version of the Openplantbook integration as well.

Olen commented 1 year ago

Sorry I haven't been able to create a new release yet. I don't have access to anything but my phone, and apparently I can't make a release from the Android Github App. I will make a release early next week when I am back home.

Olen commented 1 year ago

Please try the latest beta