#Blocked event loop

1 messages · Page 1 of 1 (latest)

nocturne nimbus
#

Did you patch arepr to see if it would give you a longer log line?

rugged grail
#

I didn't. Doing it now.

#

Is it possible to modify the file directly from the file system? I don't find where the home assistant core code is

rugged grail
#

a custom component with a cloned profiler?

nocturne nimbus
#

I'd make a simple one that has an async_setup that adjusts the maxstring and maxother to 1000

rugged grail
#

I think I understand.
I just need to make a component that does

async_register_admin_service(
        hass,
        DOMAIN,
        SERVICE_LOG_EVENT_LOOP_SCHEDULED,
        _async_dump_scheduled,
    )

and have a patched _async_dump_scheduled, right?
So it will be my custom component that would do the warnings

#

Nope.

#

Ohhh just

async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
    """Set up Hello World from a config entry."""

    reprlib.aRepr.maxstring = 1000
    reprlib.aRepr.maxother = 1000

from any component. got it

nocturne nimbus
#

yeah or async_setup()

#

so you don't even need a config entry

rugged grail
#

brilliant!
<Job EntityPlatform poll media_player.sox: track time interval 10.0
The robot vacuum cleaner was one of my TTS speakers and it broke after 3 years so it is off until I fix it. "Obviously" this means my whole home automation system became trash.

#

I had completely forgotten about this one, and it is setup via configuration.yaml, so I totally missed it

#

Disabled it and the problem is gone.
You fixed it!
Thank you a lot, this has been haunting me for 3 months

nocturne nimbus
#

is that entity provided by a core comp?

rugged grail
#

no, it is a custom integration.
Just opened an issue: https://github.com/definitio/ha-sox/issues/8

It uses "raw" sockets from the event loop instead of asyncio streams. Device offline leads to it blocking until it times out

#

are there any disadvantages if I keep debugpy: enabled? seems quite handy

analog crater
#

8000 writes a minute when I left it on iirc

rugged grail
#

Gotcha. thanks

analog crater
#

I’ve gotta ask… why didn’t you try disabling one custom integration at a time and dealt with this for three months?

#

Enjoy a lil pain?

rugged grail
#

Hehe, I did! but this one was in configuration.yaml (not the UI) and was one of the first ones I ever installed years ago so I forgot about it

#

It may be a good feature request that integrations enabled through yaml also show in the UI (even if they have no actions or options available there). To save idiots like me

analog crater
#

not 100% tho

#

possibly core instead as a feature request issue

rugged grail
#

And to be honest I didn't know what it was (my router? esphome? the switches?) until now that I am implementing a custom component for 3d printers and clicking buttons a lot

analog crater
#

what will it do that octoprint integration or the octoprint mqtt and octoprint home integration doesnt?

nocturne nimbus
#

or worse in some cases

rugged grail
analog crater
#

never heard of that

#

sounds like a pi but worse

#

you notice no print defects with such a tiny weak microcontroller?

rugged grail
#

Oh, no the board has a beefy 550MHz stm32. I just don't want to add a pi to it. The esp is just there hooked to the serial

#

the main board has a socket for an ESP so I put one ther

#

e

analog crater
#

so because no pi with usb to serial you are using an esp as middle man to go serial to printer to what to the stm board?

#

i guess i'm having trouble grasping the benefit or why

#

i have 5 printers and 5 pis controlling them