elad-bar / ha-hpprinter

HP Printer Integration
94 stars 26 forks source link

Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble #143

Closed jchristianj closed 3 months ago

jchristianj commented 3 months ago

Hi, wanted to go back to 1.0.12 because new version 2 had too many issues for me (missing sensors, long-term-statistics issues due to missing measurement parameters etc). So I downloaded 1.0.12 in hacs, rebooted HA and then wanted to add the integration. It ends up in the failure Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble and doesn't let me configure the hp printer plugin. Already completely removed the repo in hacs, rebooted, re-installed. Nothing helps.

cmilanf commented 3 months ago

I am experiencing this one as well. It is not possible to go back to version 1.x. In my case is for supporting multiple printers.

elad-bar commented 3 months ago

to go to v1 you will to do a fully clean installation - remove the intergation, delete .storage/hpprinter* files, restart HA, re-add the intergation from hacs in v1 then add the device.

what are the issues you experiencing? any reported issue explains it in more details?

jchristianj commented 3 months ago

Thanks, will try this and let you know. For my issues: Main issue is, that status sensor is missing. So my light-on automation for the printer room is not working any longer. Side issue is that the toner cartridge status (%) is not defined as measurement and therefore will not be logged in long-term-statistics. I don't remember the exact words, but there was some window popping up when I tried to fix issues with the toner-% in developer tools -> statistics.

elad-bar commented 3 months ago

Regarding the first issue, it was reported will try to add it as soon as i will have time, Regarding 2nd issue, will try to understand why it is not acting as measurement, can you pls share diagnostic file?

Thanks

jchristianj commented 3 months ago

Hi, no way for me to go back to v1: Followed your steps, but still the error occurs when I try to add the integration:

image

For the measurement issue: Will come back to this an can provide logs and diagnostics as soon as I am on v2.

elad-bar commented 3 months ago

Will try to get to it soon

elad-bar commented 3 months ago

issues will be fixed in v2.0.1 both status sensor and long-term-statistics, will update here once released

elad-bar commented 3 months ago

Released v2.0.1, please check and update if it works

thanks

jchristianj commented 3 months ago

Hi, sorry to say but it does not solve the missing status sensor. If I setup the integration without SSL, then there is a device named "HP Printer", but it does not contain any entity. If I setup the integration and checking the SSL box, then there is an entity named "status" but it is always OFF no matter what the printer is doing. Switching back to no SSL and reloading the plugin makes the status entity unavailable. Furthermore I noted that the status "printing" is no longer available?

image

I had huge problems installing the 2.0.1 version: In the first attempt it did not create any entities. Second attempt I checked the Is SSL box, and only one entity (HP Printer status) was created, but it only showed OFF. I had to completely remove the Integration again and even edit the core.device_registry and core.entity_registry files manually and remove all hpprint related entries before I could install and the entities were created.

elad-bar commented 3 months ago

Regarding status state - please open a new issue with debug logs and diagnostics file.

I have no control of how your printer is configured (http/s), only you can set it correctly, i just provide the ability to work with one of them, for me, i'm using http, sounds like your logs has some more information about it to share.

Before releasing that version as result of that issue, I performed clean setup, upgrade from v1, upgrade from v2.0.0, all of them worked, so if the issue is about configuring the integration i will need debug logs

Thanks

jchristianj commented 3 months ago

Set the printer to non-https, did a complete re-install and have it working now except the missing status sensor, I'll be opening a new issue and submit the logs, thanks a lot.

The measurement issue for long-term-statistics seems to be resolved as well.

One more point: After setup I renamed the Printer from "HP Printer" into "HP Laserjet 200 MFP" in the three-dots menu of the integration, and all devices got the new name as well, which is correct. But all entities stayed at the default name, e.g. sensor.hpprinter... instead of being renamed to sensor.hp_laserjet_200..... is that a limitation in Home Assistant? In the end I had to rename all entities manually to match the new device name, because renaming the devices brought up the dialog if the device's entities shall be renamed too, which I confirmed; but somehow the entities still remained at sensor.hp_printer.... (the former default name). Did I do something wrong?

elad-bar commented 3 months ago

Please open issue for both issues, In general since HA allows to change title no need to define it in the config, at most take it from the name of the print at set up time and allow users to set it as they want, As for the status, it should be under the main device

elad-bar commented 3 months ago

pls check with v2.0.1 (or above) and update

thanks

elad-bar commented 3 months ago

any update?

jchristianj commented 3 months ago

Can be closed, as issue for 1.0.12 is no longer relevant and other issues seem to be fixed. Thanks!

elad-bar commented 3 months ago

great, thanks for the update!