Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0 data collected #439

Open
1 task done
cappa88 opened this issue Jul 13, 2024 · 36 comments
Open
1 task done

0 data collected #439

cappa88 opened this issue Jul 13, 2024 · 36 comments
Assignees
Labels
bug Something isn't working continuous_updates

Comments

@cappa88
Copy link

cappa88 commented Jul 13, 2024

What happened?

After the last update, no more data is collected.
This night he therefore did not irrigate despite the high temperatures. And this morning there are still 0 data collected
Screenshot_20240713-091315

How to reproduce

Currently in progress
config_entry-smart_irrigation-73ee0f4bb3c39b6f9c7c010022a9f909-4.json

Relevant log output

No response

Which version are you running?

v2024.7.4

Diagnostics file

  • I have attached a diagnostics file

Additional information

No response

@cappa88 cappa88 added the bug Something isn't working label Jul 13, 2024
@jeroenterheerdt
Copy link
Owner

Please install 2024.7.5 first and try again.

@LPX64
Copy link

LPX64 commented Jul 14, 2024

Hi,
Just updated to 2024.7.5. Got the same issue. I needed to enter OW api key once again but OpenWeather stopped working. In sensors groups OpenWeather is crossed out.
it seems that latest update completely broke this integration.
How can I install 2024.4.3?

@jeroenterheerdt
Copy link
Owner

Clear your browser cache and restart HA. Mostly likely that's the solution. If doesn't help please open your own issue. Saying 'same issue' doesn't help.

@cappa88
Copy link
Author

cappa88 commented Jul 15, 2024

I have upgraded to v2024.7.5.
I activated the new continuous data collection function, Now it would seem to collect data correctly but even tonight the watering time was 0 despite the great heat.
config_entry-smart_irrigation-73ee0f4bb3c39b6f9c7c010022a9f909-5.json

@mistergyle
Copy link

I have upgraded to v2024.7.5. I activated the new continuous data collection function, Now it would seem to collect data correctly but even tonight the watering time was 0 despite the great heat. config_entry-smart_irrigation-73ee0f4bb3c39b6f9c7c010022a9f909-5.json

Try this:
#435 (comment)

@cappa88
Copy link
Author

cappa88 commented Jul 15, 2024

I have everything selected correctly. I only use entities from the weather station
Screenshot_20240715-103737

@jeroenterheerdt
Copy link
Owner

@cappa88 it looks like you are hitting a bug with the continuous data collection feature. can you enable debug logging (for a short period) and post your logs?

@cappa88
Copy link
Author

cappa88 commented Jul 19, 2024

That's what I suspected.
I disabled the new feature and everything was working again.
I was also having trouble opening the integration interface.
I will do the test you asked me and I will provide you with the results.

@cappa88
Copy link
Author

cappa88 commented Jul 19, 2024

I generated the file but I don't know if you will find anything.
Throughout the day it gave me no problems.
I will launch another recording tonight covering the calculation time.

I have a question out of curiosity regarding your integration. Why does it need to collect data instead of simply consulting the logs from Home Assistant, which records all the data for an entity?

I don't have the technical expertise to understand this on my own

@jeroenterheerdt
Copy link
Owner

It can't parse the home assistant logs but it does collect the info from the home assistant sensors. So I am not sure what you mean exactly. Thanks for providing the files.

@cappa88
Copy link
Author

cappa88 commented Jul 19, 2024

Did you receive the file? I thought I couldn't load it because it was larger than 2,5GB.

@jeroenterheerdt
Copy link
Owner

Sorry no, I am not seeing any files.

@cappa88
Copy link
Author

cappa88 commented Jul 19, 2024

Here is the link where you can download the file.
unfortunately it always generates me a file larger than 2GB even if I do a debug of a few seconds

https://drive.google.com/file/d/1rM0QZxKeCFJl5HHt28dVnHMuN-H7FdBn/view?usp=sharing

I hope it's helpful
Now (11:00 p.m. local time) I launch another debug which I will stop tomorrow morning.
The calculation should take place at 2:50

@cappa88
Copy link
Author

cappa88 commented Jul 20, 2024

https://drive.google.com/file/d/1EX_cFAm18hBHojyjmqV-YCe_PE_5EK7i/view?usp=drive_link
this is tonight's debug.
This time there were no crashes and the calculation was done even though the result seems a bit high to me

config_entry-smart_irrigation-73ee0f4bb3c39b6f9c7c010022a9f909.json

Another thing to report is that during the day, while collecting data, I would see the bucket change even far from the time of calculation,
I hope my feedback is helpful to you

@cappa88
Copy link
Author

cappa88 commented Jul 23, 2024

After working one day, it returned a time of 0 s last night.
As can be seen from the diagniostics (attached), a bucket of -6.8 was calculated and a time of 1268s for one zone and 441s for the other.
How is it then that the remained at 0?
Plus the interface seems to crash
image
config_entry-smart_irrigation-73ee0f4bb3c39b6f9c7c010022a9f909.json

@jeroenterheerdt
Copy link
Owner

jeroenterheerdt commented Jul 30, 2024

After working one day, it returned a time of 0 s last night. As can be seen from the diagniostics (attached), a bucket of -6.8 was calculated and a time of 1268s for one zone and 441s for the other. How is it then that the remained at 0? Plus the interface seems to crash image config_entry-smart_irrigation-73ee0f4bb3c39b6f9c7c010022a9f909.json

so you still have continuous updates enabled - any chance you can post debug logs? the other logs didn't give me clues as to why your UI is failing.

@jeroenterheerdt jeroenterheerdt added dev responded and removed bug Something isn't working labels Jul 30, 2024
@cappa88
Copy link
Author

cappa88 commented Jul 30, 2024

In these last few days I have disabled continuous collection and everything works fine.
However, I did not try again with the latest updates.
As soon as I try again I'll let you know

@cappa88
Copy link
Author

cappa88 commented Aug 4, 2024

I still can't use continuous data collection.
The result of the calculation is always 0.
error_log-1.txt
config_entry-smart_irrigation-73ee0f4bb3c39b6f9c7c010022a9f909-8.json

@jeroenterheerdt
Copy link
Owner

thanks, I noticed this in the error log:

 File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
    handle._run()
  File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2122, in async_forward_entry_setup
    _report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1175, in _report_non_awaited_platform_forwards
    report(
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 151, in report
    _LOGGER.warning(msg, stack_info=True)
2024-08-03 22:57:53.705 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'battery' when rendering '{{ value_json.battery }}'
2024-08-03 22:57:53.706 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'device_temperature' when rendering '{{ value_json.device_temperature }}'
2024-08-03 22:57:59.469 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template<template=({{states('sensor.velocita_vento')|float()*(4.87/log((67.8*3.3)-5.42))}}) renders=2>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2258, in forgiving_float_filter
    return float(value)
           ^^^^^^^^^^^^
ValueError: could not convert string to float: 'unavailable'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 604, in async_render
    render_result = _render_with_context(self.template, compiled, **kwargs)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2639, in _render_with_context
    return template.render(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/jinja2/environment.py", line 1304, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.12/site-packages/jinja2/environment.py", line 939, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "<template>", line 1, in top-level template code
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2261, in forgiving_float_filter
    raise_no_default("float", value)
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1872, in raise_no_default
    raise ValueError(
ValueError: Template error: float got invalid input 'unavailable' when rendering template '{{states('sensor.velocita_vento')|float()*(4.87/log((67.8*3.3)-5.42))}}' but no default was specified

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 716, in async_render_to_info
    render_info._result = self.async_render(  # noqa: SLF001
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 606, in async_render
    raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: ValueError: Template error: float got invalid input 'unavailable' when rendering template '{{states('sensor.velocita_vento')|float()*(4.87/log((67.8*3.3)-5.42))}}' but no default was specified
2024-08-03 22:57:59.476 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: float got invalid input 'unavailable' when rendering template '{{states('sensor.velocita_vento')|float()*(4.87/log((67.8*3.3)-5.42))}}' but no default was specified') while processing template 'Template<template=({{states('sensor.velocita_vento')|float()*(4.87/log((67.8*3.3)-5.42))}}) renders=4>' for attribute '_attr_native_value' in entity 'sensor.vento_a_2m'

Seems like a template to convert the windspeed to 2m high is not working?

Also, it looks like your PyETO module has forecast days > 0 so any zones using that module will not be included in the continuous updates, as is shown in the log:

2024-08-03 23:01:42.549 INFO (MainThread) [custom_components.smart_irrigation] checked config for PyETO module on zone 3, forecast_days>0, skipping to avoid API calls that can incur costs.

Can you check that forecast days is indeed > 0?

@cappa88
Copy link
Author

cappa88 commented Aug 5, 2024

Speed conversion seems to work.
Screenshot_20240805-193916
The weather station is 3.3 meters high, so it doesn't change much.
Yes the forecast days is at 1. I didn't realize I had to put it at 0

@cappa88
Copy link
Author

cappa88 commented Aug 5, 2024

If the conversion creates problems I can directly enter the entity of wind, it shouldn't change much

@jeroenterheerdt
Copy link
Owner

jeroenterheerdt commented Aug 5, 2024

No, the issue is the forecast days, that needs to be 0 for the zone to be continuously updated.

@cappa88
Copy link
Author

cappa88 commented Aug 8, 2024

It still doesn't work. Now the forecast days are at 0.
I also replaced (to be sure) the entity of the wind with the actual one of the weather station, without the cast at 2 meters.
The problem now is that the calculation is not done at the set time 2:50 AM
https://drive.google.com/file/d/1Jf4kDxvJELIANlf0YD9WFpbBtFTrH5lh/view?usp=drivesdk

@jeroenterheerdt
Copy link
Owner

It still doesn't work. Now the forecast days are at 0. I also replaced (to be sure) the entity of the wind with the actual one of the weather station, without the cast at 2 meters. The problem now is that the calculation is not done at the set time 2:50 AM https://drive.google.com/file/d/1Jf4kDxvJELIANlf0YD9WFpbBtFTrH5lh/view?usp=drivesdk

Remind me please, do you have continuous updates enabled now? If so, then of course the zones that can be continuously updated and calculated will not be included in the automatic calculation schedule. So if that's what your seeing that is expected.

@cappa88
Copy link
Author

cappa88 commented Aug 8, 2024

Sorry, Now I'm confused.
Yes, I'm trying to use continuous updates. I thought he still had to make the calculation at the appointed time.
How should it work then? The bucket always remains at 0 if the calculation is not done

@jeroenterheerdt
Copy link
Owner

continuous updates should update and calculate in real time.

@cappa88
Copy link
Author

cappa88 commented Aug 9, 2024

Ok then my problem is that the bucket always remains at 0 despite the data being collected.
Screenshot_20240809-074237

@jeroenterheerdt
Copy link
Owner

And you are still using continuous updates, right?

@jeroenterheerdt jeroenterheerdt added bug Something isn't working and removed dev responded labels Aug 9, 2024
@cappa88
Copy link
Author

cappa88 commented Aug 9, 2024

Yes. The integration is always the continuous update, But the bucket never updates, It always remains at 0.
Now I have momentarily disabled the automation otherwise it would never irrigate. I'm using an automation with set times.

@cappa88
Copy link
Author

cappa88 commented Aug 9, 2024

Here is my whole configuration
Screenshot_20240809-201042
Screenshot_20240809-201023
Screenshot_20240809-201028
Screenshot_20240809-201007

@jeroenterheerdt
Copy link
Owner

Some other users have had success with recreating the zone and sensor group. Not sure why that matters, but can you try to see if that helps at all?

@jeroenterheerdt jeroenterheerdt added dev responded and removed bug Something isn't working labels Aug 10, 2024
@cappa88
Copy link
Author

cappa88 commented Aug 10, 2024

I did this test. I also tried uninstalling the integration.
But nothing: the bucket never updates automatically.
Could I solve this by calling the "Calculate all zones" service at the beginning of the automation?

@jeroenterheerdt
Copy link
Owner

jeroenterheerdt commented Aug 10, 2024 via email

@jeroenterheerdt jeroenterheerdt added bug Something isn't working and removed dev responded labels Aug 10, 2024
@cappa88
Copy link
Author

cappa88 commented Aug 10, 2024

Ok. Thank you for the effort you put in.
So in the meantime I disable continuous updates, so I can use the integration

@jeroenterheerdt jeroenterheerdt added dev responded and removed bug Something isn't working labels Aug 22, 2024
@cappa88
Copy link
Author

cappa88 commented Aug 30, 2024

Since there have been a few updates I have tried re-enabling the continuous updates, but still nothing... it does not update the bucket in real time.
I was going to try uninstalling the integration to reset everything from the beginning, but I can't completely delete the data.
Once I reinstall from HACS I already find all the old configuration.
How can I do to reinstall the integration as if for the first time?

@cappa88
Copy link
Author

cappa88 commented Aug 30, 2024

I attach debug and diagnostic files. I have also tried creating new test zones and new modules and sensor groups
config_entry-smart_irrigation-01J6HCVJYKBM47NG5NEBYYXGEG.json

https://drive.google.com/file/d/1va-rF4WJJBE1LbayoEOO1Rteei1jS6dW/view?usp=sharing

@jeroenterheerdt jeroenterheerdt added bug Something isn't working and removed dev responded labels Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working continuous_updates
Projects
None yet
Development

No branches or pull requests

4 participants