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

IPP Printer error Invalid response from API - integration not working #92714

Closed
Anto79-ops opened this issue May 7, 2023 · 34 comments
Closed
Assignees

Comments

@Anto79-ops
Copy link

The problem

Hi,

Since updating to 2023.5.2 my integration for my HP Printer has been broken (it was on and off during beta of 2023.5, but fully working on 2023.4.6). Here's what I see:

image

and logs

Logger: homeassistant.config_entries
Source: config_entries.py:429
First occurred: 7:22:04 PM (1 occurrences)
Last logged: 7:22:04 PM

Config entry 'HP OfficeJet Pro 8030 series [94F11B]' for ipp integration not ready yet: Invalid response from API: Timeout occurred while connecting to IPP server.; Retrying in background

thanks for your time

What version of Home Assistant Core has the issue?

2023.5.2

What was the last working version of Home Assistant Core?

2023.4.6

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Internet Printing Protocol (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

@home-assistant
Copy link

home-assistant bot commented May 7, 2023

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!

Code owner commands

Code owners of ipp can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign ipp Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


ipp documentation
ipp source
(message by IssueLinks)

@vingerha
Copy link
Contributor

vingerha commented May 8, 2023

+1
Running 2023.5.2 on Docker, hp printer mfp283

@pjannink
Copy link

pjannink commented May 9, 2023

Same issue with an Epson XP6000 Series printer. Running 2023.5.2 on Docker

@dragonjon
Copy link

dragonjon commented May 9, 2023

Same, with Kyocera ECOSYS P5021cdn in :
Home Assistant 2023.5.2
Supervisor 2023.04.1
Operating System 10.1
Frontend 20230503.3 - latest

Update: today I restart all the system and works again

@michal-b-kaminski
Copy link

Same, with Brother DCP-L2530DW on Home Assistant 2023.5.0 in Docker.

@david-b13
Copy link

+1, running 2023.5.2 on an rpi4

@lerlands
Copy link

lerlands commented May 9, 2023

For reference, two further "victims":
Brother HL-3140CW
HP LaserJet 200 colorMFP M276nw

@TekFan
Copy link

TekFan commented May 9, 2023

Same on HP M475 since upgrade to 5.2.
Was working on 4.6
Looking at the number of different printers here in a few hours, I guess this integration is just broken.
I hope someone is still maintaining it.

@mmccool
Copy link

mmccool commented May 9, 2023

Same with HP Envy 7640. To be fair though, at first I thought it was just me breaking things since I was doing some networking reorganization/bashing yesterday, but it seems others have a similar problem. It is still visible (and working) from other systems.

@jfencl
Copy link

jfencl commented May 10, 2023

Same error on an EPSON XP-7100.

@ActuandoWoody
Copy link

Note: That I recovered from exactly this error, by deleting the IPP intergration and then re-installing. So for me, the issue was caused by the 2023.5.2 upgrade.

@pjannink
Copy link

Deleting and reinstalling resolved also for me (Epson XP-6000 series printer).

@TekFan
Copy link

TekFan commented May 10, 2023

Yep, indeed, reinstalling seems to fix it.
Thanks to @ActuandoWoody

@Anto79-ops
Copy link
Author

Anto79-ops commented May 10, 2023

Thanks! You'll have to let me know if it survives restart. Because mine has actually been working since last restart, but it comes and goes when I restart.

@TekFan
Copy link

TekFan commented May 10, 2023

I didn't try a restart since the reinstall, but I noticed that it took a while between the auto-detection of the printer (and reconfiguration of the integration) and the moment where the entities actually had a value.
The integration was OK this time but the entities still stayed on "unavailable" for a while, I didn't time it, but that was for a minute or more.
And I still have 2 occurrences of the "Error fetching ipp data: Invalid response from API: ('HTTP 500', {'content-type': None, 'message': '', 'status-code': 500})" in the log, but this already happened from time to time in the past year.
So, there could be some timing issue in the integration that is now somehow exacerbated by the 5.2 core update.

@jfencl
Copy link

jfencl commented May 10, 2023

After rebooting my HA this morning, it started working again. Epson XP-7100.

@ActuandoWoody
Copy link

I just tried a re-start (a reboot of the entire RPI4 actually) and all was fine - so my removal and re-adding, seems to be sticking.

I just wish that the integration cached the status - so that we can have an entity for each ink that persists. Kind of like "The last time we saw it, the level was X" - rather than giving an "unknown" when the printer is off or asleep.

@mdisabato
Copy link

Home Assistant 2023.5.2
Supervisor 2023.04.1
Operating System 10.1
Frontend 20230503.3 - latest

HP 7740

Same error message. It usually shows up after the printer goes to sleep. It used to recover when the printer wakes up. Now I have to delete and re-install the integration or re-boot the RPi 4,

Thank you.

@ThrashinVictim
Copy link

Same issue with a Brother HL-L2350DW series
Deleted and readded, Rebooted and issue came back

@ggatenby
Copy link

I have the same issue post 2023.5.3 upgrade, the intermittent nature of this is sounding very much like an issue that I encountered with the Reolink integration #92891 that appears to have been caused by HA 2023.5.x - appears the Reolink issue is now resolved by 2023.5.3

Also curious to see that this issue as well as #93027 and #93006 all implicate 2023.5.x as potentially causing

_Logger: homeassistant.config_entries
Source: config_entries.py:1247
First occurred: 9:37:09 PM (1 occurrences)
Last logged: 9:37:09 PM

Config entry 'Canon TR8600 series' for ipp integration not ready yet: Invalid response from API: Timeout occurred while connecting to IPP server.; Retrying in background_

@TekFan
Copy link

TekFan commented May 15, 2023

Ok, so I just noticed something interesting.
Since my initial reinstallation of the integration, the problem seemed to be definitely fixed.
Even after multiple HA restart, printer on/off cycles, everything seemed to stay put.

But a few minutes ago, I updated HA to 5.3 and boom!: integration in error again...
So, from my seat, things are looking like something is happening when HA is updated and only then.
Because after reinstalling, it's fixed again, no matter how many times I restart HA.
At least in my case, it seems to really be linked to a HA update.

@mikeynp
Copy link

mikeynp commented May 15, 2023

Ok, so I just noticed something interesting. Since my initial reinstallation of the integration, the problem seemed to be definitely fixed. Even after multiple HA restart, printer on/off cycles, everything seemed to stay put.

But a few minutes ago, I updated HA to 5.3 and boom!: integration in error again... So, from my seat, things are looking like something is happening when HA is updated and only then. Because after reinstalling, it's fixed again, no matter how many times I restart HA. At least in my case, it seems to really be linked to a HA update.

+1 Exactly the same here when upgrading to 2023.5.3. I had previously reinstalled the integration after updating to 2023.5.2 with everything then working fine again.

Interestingly, after updating to 2023.5.3, a further manual restart of HA fixes it for me but only if the printer is powered on at the time HA restarts, then everything works fine! If the printer is powered off at the time HA restarts then it doesn’t appear to work, even if the printer is subsequently powered on post-restart.

I also get an error that states:

WARNING (MainThread) [homeassistant.config_entries] Config entry 'HP ENVY 6000 series' for ipp integration not ready yet: Invalid response from API: Error occurred while communicating with IPP server.; Retrying in background

so perhaps if the printer is powered off at time of restart then something is going wrong and it never actually retries in the background?

@ggatenby
Copy link

+1 to the manual restart bringing it back to life after HA 2023.5.3 upgrade, although not so sure about the printer on/off - both of my Canon TR8600's are reporting connected post restart. This could well depend on printer if off is really off or just a low power energy saving mode where API still responds.

Will report back if the printers drop again

@ctalkington
Copy link
Contributor

ctalkington commented May 17, 2023

I'm fairly certain this was a bug/side effect from the core updates that appears to resolve after restart, and I think 2023.5.3 has resolved based on what ive seen . I'm pretty sure roku (another one of my integrations) has encountered similar along with many others.

@dredjohn21
Copy link

Just fyi restarting fixes but only temporarily for me (I’m on latest version). I haven’t tried deleting and re-adding. I’ll do this if not resolved in next core update.

@TekFan
Copy link

TekFan commented May 17, 2023

I'm fairly certain this was a bug/side effect from the core updates that appears to resolve after restart, and I think 2023.5.3 has resolved based on what ive seen . I'm pretty sure roku (another one of my integrations) has encountered similar along with many others.

Well, it doesn't seems so, at least for me.
First, I had to re-install after update to 5.3, so 5.3 clearly didn't fix anything.
But, I had a bit of time to try a few things.

What appears, is that as long as the printer is reachable, the integration behaves correctly, even after multiple core restart.
But if for any reason, the printer is unreachable when core is starting, and so the integration, then the IPP integration is stuck in error mode. No reload can fix this situation and it seems to me that reloading doesn't do anything contrary to other integrations in similar situation.
The only solution is to restart the core and then we are back in a stable operation, even if the printer goes down, the integration successfully reconnects when the printer is back online.

Now, when a core update is done, then it becomes more serious as the integration becomes immediately stuck, even if the printer is online and never recovers from that, whatever how many core restart you try.
The only way out of this situation is to delete and re-install the integration and then we come back in the situation above.
This last happened to me already two times, first with 5.2 update and then again with 5.3, clearly indicating that 5.3 didn't fix anything.

[Edit]
While I was writing this, I finally decided to update HAOS from 9.5 to 10.1 (I was a bit anxious after the USB boot problems) and ended up in exactly the same situation as with a core update: IPP failure after startup and no cure after multiple core restart. So I had to delete and reinstall the integration for the third time...

I'm convinced that starting from 5.2 something plays havoc with this integration and probably a few others maybe using the same library or something.

But one thing is clear, this is still a problem (at least for me) that has to be fixed so this issue should remain open.

@mdisabato
Copy link

I have to agree. The HP 7740 goes to sleep each night, and the API is shut off. If HA is rebooted during that time, the integration never recovers. However, if it is rebooted during the day, when the API is awake, it will recover.

This is occurring with :
Home Assistant 2023.5.3
Supervisor 2023.04.1
Operating System 10.1
Frontend 20230503.3 - latest

As @TekFan said, this appears to still be a problem that should remain open. I am willing to test possible fixes for this, but not being a coder, I wouldn't know where to start looking at it.

Thank you.

@doctorlunch
Copy link

I have the same problem. I also logged it on the other thread. Restarting does not fix the problem. It occurred when I upgraded to 2023.5.3. Rolling back to 2023.5.2 fixes the problem. HA is Installed on Raspberry Pi 4. As this seems to be closed, it looks like it should be reopened.
Screenshot 2023-05-20 141747

@Tom-Heitbrink
Copy link

I don’t know why @ctalkington closed this one, as it still seems to happen. I also have the issue here quite consistent with an HP printer, and this is located on a powerplug that turns off each night. Only when I restart HA in the morning, I get my printer back. Restarting the integration makes no difference.

@ActuandoWoody
Copy link

Just to update, I had the problem again - and I now have a repro:

This happens when I re-start Home Assistant (which I only do if an integration requires it).

This remains a solid repro error: each HA re-start results in the API timeout error. HOWEVER,while this error is persisting, if I reboot system, on reboot, the error is gone and this integration is working fine.

To be clear, for me, an HA re-start causes the problem and the only fix is:

Either: uninstall and then re-install the IPP integration.

OR: reboot system.

@TekFan
Copy link

TekFan commented May 24, 2023

So, this morning, update to core 5.4 and as expected, IPP integration broken again...
As usual now with every last updates, nothing can fix it except for a delete and reinstall of the integration.
This is becoming very annoying and nothing seems to happen on the dev side.
@ctalkington, do you have any update on the troubleshooting progress and possible eta for a fix ?

@doctorlunch
Copy link

I saw Tekfan's comment and strangely, I updated to 5.4 today and it has fixed the problem.

@rolandmn
Copy link

My integration also broke today when I upgraded my docker container to 5.4. When I stopped the container and started it again, it was working again.

@ActuandoWoody
Copy link

Same for me as @doctorlunch - I updated to 2023.5.4 this morning, and IPP continued to work with no issues.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests