core
core copied to clipboard
PrusaLink doesn't work with Prusa MK4
The problem
Some entities offered by the integration are not available with the latest MK4 printer:
What version of Home Assistant Core has the issue?
core-2024.1.0
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
PrusaLink
Link to integration documentation on our website
https://www.home-assistant.io/integrations/prusalink/
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
Hey there @balloob, @skaronator, mind taking a look at this issue as it has been labeled with an integration (prusalink) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of prusalink can trigger bot actions by commenting:
@home-assistant closeCloses the issue.@home-assistant rename Awesome new titleRenames the issue.@home-assistant reopenReopen the issue.@home-assistant unassign prusalinkRemoves the current integration label and assignees on the issue, add the integration domain after the command.@home-assistant add-label needs-more-informationAdd a label (needs-more-information, problem in dependency, problem in custom component) to the issue.@home-assistant remove-label needs-more-informationRemove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.
(message by CodeOwnersMention)
prusalink documentation prusalink source (message by IssueLinks)
Hi,
what firmware version are you running on your MK4? Are there any errors in the log?
I am running v5.1.0 since the latest firmware seems to have a bug that prevents the printer to successfully complete the y-axis calibration.
Hi,
- Can you enable and provide debug logs
- Verify that you can reach the PrusaLink Web UI (Got o Settings -> Devices -> PrusaLink -> You Printer -> "Visit" button)?
- Could you remove and re-add the PrusaLink integration in home assistant? Maybe that solves that issue.
@home-assistant add-label needs-more-information
Same issue (firmware 5.1.2), tried removing and then adding back, still nothing. Debug log seems to show no error at all (file attached). home-assistant_prusalink_2024-01-15T18-04-13.185Z.log
Yeah, not much to see in the debug log beside that it successfully connected to your printer. Since I don't have a MK4 (only a XL) I cannot reproduce this issue. It would be great if you can provide the raw API response from your printer.
Curl is probably the easiest way to do that, you might have to run that command from your linux server/home assistant installation. Its usually pre-installed.
Adjust IP to your printer IP and enter the password/api-key when asked.
curl -s --digest -u maker 'http://192.168.0.5/api/v1/status'
curl -s --digest -u maker 'http://192.168.0.5/api/v1/job'
curl -s --digest -u maker 'http://192.168.0.5/api/printer'
Ideally, run these commands while the printer is printing.
Thanks
Yeah, not much to see in the debug log beside that it successfully connected to your printer. Since I don't have a MK4 (only a XL) I cannot reproduce this issue. It would be great if you can provide the raw API response from your printer.
Curl is probably the easiest way to do that, you might have to run that command from your linux server/home assistant installation. Its usually pre-installed.
Adjust IP to your printer IP and enter the password/api-key when asked.
curl -s --digest -u maker 'http://192.168.0.5/api/v1/status' curl -s --digest -u maker 'http://192.168.0.5/api/v1/job' curl -s --digest -u maker 'http://192.168.0.5/api/printer'Ideally, run these commands while the printer is printing.
Thanks
API seems to return the correct values just fine. I didn't yet started print, so job endpoint is empty, could send later if needed.
Thanks. JSON data structure is identically to my Prusa XL. So that's not the issue causing this...
I found out if I manually enable these entities, they starts to work. 🤔
But still don't know, why they are disabled by default 😅
Some are disabled by default, probably to avoid cluttering the UI. They are disabled by default since the very first version of this integration 2 years ago.
https://github.com/home-assistant/core/blob/3ff74fe20fc725781edceeec72e983817caa27fc/homeassistant/components/prusalink/sensor.py#L70
Some are disabled by default, probably to avoid cluttering the UI. They are disabled by default since the very first version of this integration 2 years ago.
https://github.com/home-assistant/core/blob/3ff74fe20fc725781edceeec72e983817caa27fc/homeassistant/components/prusalink/sensor.py#L70
Yes, I noticed that line, but shouldn't these entities be enabled by default if printer supports it?
Developer documentation states:
Indicate if the entity should be enabled or disabled when first added to the entity registry. This includes fast-changing diagnostic entities or, assumingly less commonly used entities. For example, a sensor exposing RSSI or battery voltage should typically be set to False; to prevent unneeded (recorded) state changes or UI clutter by these entities.
https://developers.home-assistant.io/docs/core/entity/
Most disabled values are fast-changing ones, so that's why they are disabled.
Developer documentation states:
Indicate if the entity should be enabled or disabled when first added to the entity registry. This includes fast-changing diagnostic entities or, assumingly less commonly used entities. For example, a sensor exposing RSSI or battery voltage should typically be set to False; to prevent unneeded (recorded) state changes or UI clutter by these entities.
https://developers.home-assistant.io/docs/core/entity/
Most disabled values are fast-changing ones, so that's why they are disabled.
Ahh, thanks for explanation! Don't know much about components development for home assistant 😄
Closing it as working as expected 👍