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

Slowing down home assistant #4

Closed
Krocko opened this issue Jan 15, 2020 · 10 comments
Closed

Slowing down home assistant #4

Krocko opened this issue Jan 15, 2020 · 10 comments

Comments

@Krocko
Copy link

Krocko commented Jan 15, 2020

First thank you for the nice integration.
But this integration is slowing down home assistant.
Also if i change the icons via custom ui, this changes don't get displayed after restart home assistant.
If i remove this integration, home assistant is working normal.
Here is the printer file:
Printer.txt

@elad-bar
Copy link
Owner

@Krocko , can you please provide the entire set of files created by running the service:
2 XML and 3 JSONs (JSONs are good enough).

As for the slowing down the home assistant - can you share more details about the issue?
My HA is starting up after less than 12 seconds with over 250 components and I didn't experience what you probably experienced.

@Krocko
Copy link
Author

Krocko commented Jan 17, 2020

If i restart home assistant, i takes normally about 5 seconds until home assistant is shutting down.
If i activate this integration, i takes about 30 seconds.
If i set icons and icon color for the entities from this integration in the custom ui settings, it is visible in home assistant. After a restart the standard icons and color is showing again, but in the customize.yaml the lines for the custom icon and colors are still present.

Printer.zip

@Krocko
Copy link
Author

Krocko commented Jan 22, 2020

Hi @elad-bar. Any news?
Have you found something in this files?

@elad-bar
Copy link
Owner

no, still didn't have the chance to review the files and reproduce it, will do it in the upcoming weekend.

Just a question, since it doesn't happen to anyone else, can you please try to access those XML directly from your browser? if you can, what is the latency until you are getting the response (Postman / Developer tools of browser)?

It seems that you either suffer from long latency to the printer or lack of available threads to handle all HTTP calls during startup,
If that's the case, I can add delay attribute for you to postpone the first call after X seconds of initalization... what do you think?

@Krocko
Copy link
Author

Krocko commented Jan 22, 2020

/DevMgmt/ProductUsageDyn.xml - Status: 200 OK | Time: 67ms | Size: 10.79 KB
/DevMgmt/ConsumableConfigDyn.xml - Status: 200 OK | Time 200ms | Size: 8.24 KB

Yes, we can try it.

@elad-bar
Copy link
Owner

elad-bar commented Feb 7, 2020

I updated the integration and the first call is now async, it should work better, please note that the integration changed and now it works from the integration section of HA settings

Please let me know how it works for you

thanks

@Krocko
Copy link
Author

Krocko commented Feb 7, 2020

I have updated an added it to the integrations.
The result is still the same like before.
Also i noticed that the integration have no device.

Bildschirmfoto 2020-02-07 um 17 51 03

@elad-bar
Copy link
Owner

elad-bar commented Feb 7, 2020

still work in progress to see the entities over there, but those should be available in the states, will check later how to solve it

thanks for the update

@kaosmagix kaosmagix mentioned this issue Feb 9, 2020
elad-bar added a commit that referenced this issue Feb 12, 2020
#8 - added icon per sensor
#7 - support entities in the integration section
#4 - load is being done after 5 seconds of loading the custom component, running in async mode
@elad-bar
Copy link
Owner

can you check if issue solved for you?

@Krocko
Copy link
Author

Krocko commented Feb 14, 2020

It is solved now. Thank you.

@Krocko Krocko closed this as completed Feb 14, 2020
royto added a commit to royto/ha-hpprinter that referenced this issue Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants