Comments (26)
released v2.0.0b8 with fix for it, please check and update
thanks
from ha-hpprinter.
HI, unfortunately partially still there:
2024-05-18 13:04:34.136 ERROR (MainThread) [custom_components.hpprinter.managers.rest_api] Failed to get /DevMgmt/ProductConfigDyn.xml, Error: Connection timeout to host http://192.168.1.50:80/DevMgmt/ProductConfigDyn.xml, Line: 343
IS the only timeout line I get, all sensors are working fine.
from ha-hpprinter.
Can you pls try tobaccess that page directly?
Thanks
from ha-hpprinter.
Works fine:
from ha-hpprinter.
when trying to load the page, can you check if it take more than 3 seconds?
thanks
from ha-hpprinter.
root@MyHomeCenter:~$ time wget -pq --no-cache --delete-after http://192.168.1.50:80/DevMgmt/ProductConfigDyn.xml
real 0m0.203s
user 0m0.007s
sys 0m0.003s
from ha-hpprinter.
Thanks for answering the next question :)
I will increase the timeout to 10 seconds (for now it is defined for 3 seconds), that's the only thing that make sense...
Problem is that i'm abroad and will not be able to do it up until the weekend,
I can redirect you to the specific file that requires that change if you want to test it locally
from ha-hpprinter.
I can find it myself, no worries.
The bad is that there is something holding the request in your integration as doing it manually it takes way less that 1s
from ha-hpprinter.
Agree, can you please increase the timeout set logs to debug and share the logs, i will be able to see what is that process
Thanks
from ha-hpprinter.
Still
2024-05-22 10:22:43.557 ERROR (MainThread) [custom_components.hpprinter.managers.rest_api] Failed to get /DevMgmt/ProductConfigDyn.xml, Error: Connection timeout to host http://192.168.1.50:80/DevMgmt/ProductConfigDyn.xml, Line: 337
Let me enable debug now
from ha-hpprinter.
Cannot find any additional info in the log:
2024-05-22 10:58:22.849 DEBUG (MainThread) [custom_components.hpprinter.managers.ha_coordinator] Finished fetching HP Printer data in 4.293 seconds (success: True)
2024-05-22 11:03:25.556 ERROR (MainThread) [custom_components.hpprinter.managers.rest_api] Failed to get /DevMgmt/ProductConfigDyn.xml, Error: Connection timeout to host http://192.168.1.50:80/DevMgmt/ProductConfigDyn.xml, Line: 337
2024-05-22 11:03:25.907 DEBUG (MainThread) [custom_components.hpprinter.managers.rest_api] Request to http://192.168.1.50:80/DevMgmt/ConsumableConfigDyn.xml
2024-05-22 11:03:28.059 DEBUG (MainThread) [custom_components.hpprinter.managers.rest_api] Request to http://192.168.1.50:80/DevMgmt/ProductUsageDyn.xml
from ha-hpprinter.
Seems to oscillate a lot:
2024-05-22 10:43:07.781 DEBUG (MainThread) [custom_components.hpprinter.managers.ha_coordinator] Finished fetching HP Printer data in 5.226 seconds (success: True)
2024-05-22 10:48:12.468 DEBUG (MainThread) [custom_components.hpprinter.managers.ha_coordinator] Finished fetching HP Printer data in 4.913 seconds (success: True)
2024-05-22 10:53:18.148 DEBUG (MainThread) [custom_components.hpprinter.managers.ha_coordinator] Finished fetching HP Printer data in 5.593 seconds (success: True)
2024-05-22 10:58:22.849 DEBUG (MainThread) [custom_components.hpprinter.managers.ha_coordinator] Finished fetching HP Printer data in 4.293 seconds (success: True)
2024-05-22 11:03:28.137 DEBUG (MainThread) [custom_components.hpprinter.managers.ha_coordinator] Finished fetching HP Printer data in 5.582 seconds (success: True)
2024-05-22 11:08:33.582 DEBUG (MainThread) [custom_components.hpprinter.managers.ha_coordinator] Finished fetching HP Printer data in 5.027 seconds (success: True)
2024-05-22 11:13:38.351 DEBUG (MainThread) [custom_components.hpprinter.managers.ha_coordinator] Finished fetching HP Printer data in 4.797 seconds (success: True)
2024-05-22 11:18:41.415 DEBUG (MainThread) [custom_components.hpprinter.managers.ha_coordinator] Finished fetching HP Printer data in 2.859 seconds (success: True)
2024-05-22 11:23:44.040 DEBUG (MainThread) [custom_components.hpprinter.managers.ha_coordinator] Finished fetching HP Printer data in 2.484 seconds (success: True)
from ha-hpprinter.
Pls post a full debug log not parts of it, otherwise i cannot understand what happens in code
Fact that total update time is more than 3 seconds doesn't indicate an issue, timeout is per request while in single update there are multiple http request that each of them can be timed out.
I didn't experience any timeout that's the reason i'm asking for that information
Thanks
from ha-hpprinter.
@chemelli74 is it still relevant?
thanks
from ha-hpprinter.
I still see it from time to time, I think there is something blocking the refresh and this is the reason it's so slow.
from ha-hpprinter.
What machine are you running ha on? How many integrations do you have? I'm thinking maybe limitation of threads (as there are 5-6 endpoint to collect the data from)
from ha-hpprinter.
found out that ProductUsageDyn loading time can take up to 4.5 seconds at my network, printer from postman,
timeout set to 5 seconds, which supposed to be enough, pls check latest and update
thanks
from ha-hpprinter.
found out that ProductUsageDyn loading time can take up to 4.5 seconds at my network,
Only inside the integration, look at #129
from ha-hpprinter.
4.5 seconds is for ProductUsageDyn measured in postman not HA
same test as you conducted above for both resources:
user@host:~# time wget -pq --no-cache --delete-after http://IP/DevMgmt/ProductUsageDyn.xml
real 0m4.577s
user 0m0.003s
sys 0m0.002s
user@host:~# time wget -pq --no-cache --delete-after http://IP/DevMgmt/ProductConfigDyn.xml
real 0m0.485s
user 0m0.002s
sys 0m0.002s
if it would happen for different resources i would go with the assumption that something is blocking one of the threads that leads to the error, but since it's specific resource, maybe you can run the same test as load test, or just enable debug log level in logs,
i have added in v2.0.2 timing for each of the calls (regardless ok, timeout or 404).
from ha-hpprinter.
Side note:
Seems that with v2.0.2 I have again all entities doubled;
Did you change again the unique id ?
Can you please add a migration method when this happen ?
It's a pain to fix everything at every update.
Thank you in advance
from ha-hpprinter.
no, it was done at 2.0.1 but i also expirenced it when upgraded to 2.0.2
from ha-hpprinter.
the method is to delete those entities, you can do it in the entity tab in device & services
from ha-hpprinter.
did you manage to check it with v2.0.2 or above?
thanks
from ha-hpprinter.
the method is to delete those entities, you can do it in the entity tab in device & services
The method is to use the migrate in config_flow ;-)
Should not be done manually by users.
from ha-hpprinter.
did you manage to check it with v2.0.2 or above?
thanks
Installed but need a bit of time to enable debug and check.
Sorry for being slow.
from ha-hpprinter.
With debug enabled I don't experience the timeout error anymore
Will try now without.
from ha-hpprinter.
Related Issues (20)
- After upgrading to 2.0.0, 282nw does not work. HOT 5
- Ink levels etc. not remembered when printer is offline HOT 2
- Status sensor missing HOT 1
- New Entities after update (2.0.0 -> 2.0.1) HOT 2
- Time-out errors HOT 1
- HP Officejet Pro 8600 showing no sensors except Status HOT 6
- After upgrading to version 2.0.2, certificate errors are my part HOT 5
- Entities no longer available after HA restart HOT 17
- Unsupported value of consumable_type_enum, expecting: ['ink', 'inkcartridge', 'printhead', 'toner', 'tonercartridge'], received: inkTank HOT 4
- SSL Handshake on HP MFP 283 nw HOT 5
- Error "/DevMgmt/ProductUsageDyn.xml" every 10 sec HOT 15
- FEATURE REQUEST: Add Service for printing diagnostic page HOT 5
- 2.0.4 creates very verbose entity names and friendly names HOT 1
- All ink devices renamed and have no colour HOT 2
- v2 doesn't show ink levels for Deskjet 2700 series HOT 4
- Failed to format translation for key 'component.hpprinter.config.error.error_400' in language 'en' HOT 1
- Unsupported API with HP Color Laser 150nw HOT 1
- missing sensor for error
- Printer Status when Printing HOT 1
- Feature request HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ha-hpprinter.