safepay / sensor.fronius

A Fronius Sensor for Home Assistant
MIT License
80 stars 32 forks source link

Error: "Detected I/O inside the event loop." #31

Closed Maco65 closed 4 years ago

Maco65 commented 4 years ago

After recent upgrade of Home Assistant Core to 0.109.6 from 0.109.4 I have notices processor use increase from typical 1% to appr. 4% and the following logs

Source: util/async_.py:120
First occurred: May 14, 2020, 4:23:32 PM (1846 occurrences)
Last logged: 8:16:30 AM

    Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for fronius_inverter doing I/O at custom_components/fronius_inverter/sensor.py, line 325: result = requests.get(self._build_url(), timeout=10).json()
    Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for fronius_inverter doing I/O at custom_components/fronius_inverter/sensor.py, line 356: result = requests.get(self._build_url(), timeout=10).json()

On the full log this error is reported 1-2 time every minute. What can I do to fix it ?

nilrog commented 4 years ago

A fix has been merged into master but it has not been released as an update yet (see #28). Until then you can manually copy sensor.py from master and restart HA and the I/O warning will go away.

Maco65 commented 4 years ago

Thanks. This link mentioned on the other issue: https://github.com/nilrog/sensor.fronius/tree/async-io does not work for me :( Where can I find fixed sensor.py file ?

nilrog commented 4 years ago

Because it is in master of this repo now as I wrote.

But there is a new release out now so if you are using HACS just update it there :)

Maco65 commented 4 years ago

@nilrog Thank you ! I am kind if new here so it seems I did not understand all correctly. Anyhow updating to v0.9.3 (via HACS) has fixed the issue ! Excellent !