Open legantois opened 1 year ago
Hey there @ctalkington, mind taking a look at this issue as it has been labeled with an integration (ipp
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
ipp documentation ipp source (message by IssueLinks)
Same issue here
Same problem here, after upgrading to 2023.5.3 the following message; Invalid response from API: Timeout occurred while connecting to IPP server. (Epson ET2720 series). If I add the printer manually again via IP address, it says it is already configured, so that doesn’t help either.
Same issue here after upgraded to 2023.5.4 HP ENVY Photo 7800 series Invalid response from API: Error occurred while communicating with IPP server.
Same issue here after upgraded to 2023.5.4 Brother DCP-L3550CDW series Invalid response from API: Timeout occurred while connecting to IPP server.
Any clue?
Same here for 2 or 3 days now
I rebooted HA yesterday and seems the issue has gone so far!
Rebooting doesn't solve it for me unfortunately.
I rebooted HA yesterday and seems the issue has gone so far!
I can also confirm, upgraded from 2023.5.3 to 2023.5.4, rebooted the system, and problem was gone
Unfortunately, it's still an issue for me as well with an HP printer even after a full reboot. I'm on 2023.5.4, Supervisor 2023.04.1, HASS Operating System 10.2,
I have 3 printers configured through the IPP integration. Upon each restart of Home Assistant, it's likely that one of the printers has this issue. Sometimes they are all working, and it's not always the same printer that cannot be reached. Each restart can lead to a different set of printers being unavailable.
I have verified that this error occurs when Home assistant is restarted and that to avoid it, simply turn on the printer before restarting. But that's certainly not the solution...
Nope, in my case, this happens randomly, even when the printer is online. Sometimes, it even won't work again after multiple core restart, so I have to delete and reinstall the integration.
I frequently get a timeout talking to my printer during hass startup (when hass is near 100% cpu), which would be fine except that lately it never seems to recover. According to extra logging I added locally, IPPDataUpdateCoordinator._async_update_data
never gets called again if that initial update fails or times out. This appears to be a very similar issue to https://github.com/home-assistant/core/issues/90289#issuecomment-1588342217 and not reusing the coordinator across calls to async_setup_entry
appears to solve the issue for me:
--- a/homeassistant/components/ipp/__init__.py
+++ b/homeassistant/components/ipp/__init__.py
@@ -20,17 +20,16 @@ PLATFORMS = [Platform.SENSOR]
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Set up IPP from a config entry."""
hass.data.setdefault(DOMAIN, {})
- if not (coordinator := hass.data[DOMAIN].get(entry.entry_id)):
- # Create IPP instance for this entry
- coordinator = IPPDataUpdateCoordinator(
- hass,
- host=entry.data[CONF_HOST],
- port=entry.data[CONF_PORT],
- base_path=entry.data[CONF_BASE_PATH],
- tls=entry.data[CONF_SSL],
- verify_ssl=entry.data[CONF_VERIFY_SSL],
- )
- hass.data[DOMAIN][entry.entry_id] = coordinator
+ # Create IPP instance for this entry
+ coordinator = IPPDataUpdateCoordinator(
+ hass,
+ host=entry.data[CONF_HOST],
+ port=entry.data[CONF_PORT],
+ base_path=entry.data[CONF_BASE_PATH],
+ tls=entry.data[CONF_SSL],
+ verify_ssl=entry.data[CONF_VERIFY_SSL],
+ )
+ hass.data[DOMAIN][entry.entry_id] = coordinator
await coordinator.async_config_entry_first_refresh()
This was fixed for me in 2023.6.2: https://github.com/home-assistant/core/pull/94573
Not for me 2023-06-25 17:10:31.104 ERROR (MainThread) [homeassistant.components.ipp.coordinator] Error fetching ipp data: Invalid response from API: Timeout occurred while connecting to IPP server.
Fix with the latest release on my instance too.
Was working for me too but I just noticed it again for the first time 5 minutes after printing a document...
2023-07-09T10:05:47.217189806Z 2023-07-09 11:05:47.216 ERROR (MainThread) [homeassistant.components.ipp.coordinator] Error fetching ipp data: Invalid response from API: Timeout occurred while connecting to IPP server.
It resolved itself again after 1 minute though as seen in the Logbook
This is on 2023.7.1
Maybe it's just one of those things that isn't really an "Error" and should be marked as a "Timeout" or something else...
Hello @ctalkington, how can we help to solve this ?
I believe we should try to better catch these connection issues
Many Thanks
@legantois if you are a programmer or can copy+paste some scripts together then you may wish to try dealing with these in a different way, perhaps with a count of the number of times it happens and only reporting after 3 in a row... or look at what @meastman has added above...
The error is being thrown by the coordinator of the ipp component, around about line 50
I'd look at it myself but for some reason I am not seeing it any more without any update to HA - I have re-jigged my network since reporting though so not sure if pfsense or one of my switches was playing up and causing the connection to fail - it has been moved onto a different vlan and different port on the switch...
there was an issue resolved in 2023.6 release cycle that could explain alot of not recovering after failure.
ultimately we are using DataUpdateCoordinator here which handles retries and logging. I get the logging can be annoying as printers do often sleep or have smart plugs involved.
the long term goal is to implement restore functionality which would maintain the ink levels between HA and device on/off/sleep. with this we would also not fail setup if device is offline.
I'm currently catching up on multiple open source projects but I hope to circle back to my WIP PR In the coming month.
Facing the same issue also with 2023.11.1
Logger: homeassistant.components.ipp.coordinator
Source: helpers/update_coordinator.py:322
Integration: Internet Printing Protocol (IPP) ([documentation](https://www.home-assistant.io/integrations/ipp), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+ipp%22))
First occurred: 12:07:47 (1 occurrences)
Last logged: 12:07:47
Error fetching ipp data: Invalid response from API: Error occurred while communicating with IPP server.
It go along with Logbook entry "became unavailable"
Facing the same random issue with current version:
Core 2023.11.3 Supervisor 2023.11.6 OS 11.1
Same
Logger: homeassistant.components.ipp.coordinator Source: helpers/update_coordinator.py:332 Integration: Internet Printing Protocol (IPP) (documentation, issues) First occurred: 01:51:41 (2 occurrences) Last logged: 05:52:27
Error fetching ipp data: Invalid response from API: Timeout occurred while connecting to IPP server.
Same on 2024.1.6
@ctalkington how is the "circling back" progressing?
Same here:
Logger: homeassistant.components.ipp.coordinator
Source: helpers/update_coordinator.py:347
integration: Internet Printing Protocol (IPP) (documentation, issues)
First occurred: May 1, 2024 at 3:41:54 AM (15 occurrences)
Last logged: 9:51:55 AM
Error fetching ipp data: Invalid response from API: Timeout occurred while connecting to IPP server.
I only started seeing this recently (2024.5.x?). But like others, getting regularly logged. Oddly, only on 1 of my 2 printers. I get the errors constantly on an HP Color LaserJet MFP M277dw but never on a Brother MFC-9335CDW. One obvious difference at my end is that the HP LaserJet is on WiFi, while the Brother printer is on ethernet.
Logger: homeassistant.components.ipp.coordinator
Source: helpers/update_coordinator.py:347
integration: Internet Printing Protocol (IPP) (documentation, issues)
First occurred: 13:34:06 (78 occurrences)
Last logged: 22:22:54
Error fetching ipp data: Invalid response from API: Timeout occurred while connecting to IPP server.
I also encounter the same error while restarting Home Assistant and my Wi-Fi printer is turned off. Maybe this integration was designed with ethernet wired printers in mind mostly. 🤔
Unfortunately I have the same issue.
The problem
I get regularly this message when my printer is in sleep mode
on the other side my printer is always available
Is it possible to catch these connection errors (retrying every x minutes and providing a real error only when repeated erors occur)
What version of Home Assistant Core has the issue?
core-2023.5.2
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
IPP
Link to integration documentation on our website
https://www.home-assistant.io/integrations/ipp
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response