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

PrusaLink integration does not work with the current version PrusaLink 0.7.0 #95529

Closed
larsschweier opened this issue Jun 29, 2023 · 16 comments · Fixed by #114210
Closed

PrusaLink integration does not work with the current version PrusaLink 0.7.0 #95529

larsschweier opened this issue Jun 29, 2023 · 16 comments · Fixed by #114210

Comments

@larsschweier
Copy link

The problem

Have intalled PrusaLink 0.7.0 on my Raspberry Pi3 on PrusaMKS3+, unfortunately the integration fails with the error "Only PrusaLink API v2 is supported".

PrusaLink does display:

API 0.9.0-legacy
Hostname prusalink
Firmware 3.12.2-5713
Server 0.7.0
Text PrusaLink 0.7.0
SDK 0.7.0
Frontend 3.12.0

What version of Home Assistant Core has the issue?

System Information version | core-2023.6.3 -- | -- installation_type | Home Assistant OS dev | false hassio | true docker | true user | root virtualenv | false python_version | 3.11.4 os_name | Linux os_version | 6.1.21-v8 arch | aarch64 timezone | Europe/Berlin config_dir | /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4965 Installed Version | 1.32.1 Stage | running Available Repositories | 1276 Downloaded Repositories | 6
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 10.3 -- | -- update_channel | stable supervisor_version | supervisor-2023.06.4 agent_version | 1.5.1 docker_version | 23.0.6 disk_total | 916.2 GB disk_used | 5.9 GB healthy | true supported | true board | rpi4-64 supervisor_api | ok version_api | ok installed_addons | File editor (5.6.0), Mosquitto broker (6.2.1)
Dashboards dashboards | 2 -- | -- resources | 2 views | 9 mode | storage
Recorder oldest_recorder_run | 19. Juni 2023 um 12:03 -- | -- current_recorder_run | 29. Juni 2023 um 10:36 estimated_db_size | 157.15 MiB database_engine | sqlite database_version | 3.41.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

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

@home-assistant
Copy link

Hey there @balloob, 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 close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign prusalink Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


prusalink documentation
prusalink source
(message by IssueLinks)

@WebSpider
Copy link
Contributor

Prusalink 0.7.0 was released 19th of may 2023. It seems the integration into homeassistant hasnt picked up the latest changes in the API's since Prusalink 0.6.0

@aderusha
Copy link

Discussion on the forums here: https://community.home-assistant.io/t/prusa-3d-printers-support/550070

I had created an issue previously that was closed by way of changing the documentation to say it only supports the mini: #86230

That documentation change was reverted to remove that text without any change to the code: home-assistant/home-assistant.io#27922

I don't have a mk4 to test with, but the version they claim works with the mk4 does not work with my XL, and there have been no substantial code changes to the integration so I'm wondering how or if it actually supports the mk4 when it didn't before.

@tomber71
Copy link

tomber71 commented Aug 5, 2023

Just removed OctoPrint and installed PrusaLink and found out PrusaLink 0.7.0 is NOT supported. Failing with error: "Only PrusaLink API v2 is supported". What a bummer :-(

@aderusha
Copy link

aderusha commented Aug 5, 2023

I have to walk back the "does not work with my XL", turns out that was a "me" problem and it does work fine w/ the XL as delivered. I've updated the PrusaLink software running my mk3 to the latest dev build from the repo and the behavior is still the same.

So, this integration supports the embedded PrusaLink but not the standalone PrusaLink project.

@tomber71
Copy link

tomber71 commented Aug 5, 2023

Looks like API version is 0.9.0-legacy.

curl -H "X-Api-Key: XXXXXXXXXX" -s http://192.168.1.219:80/api/version
{"api": "0.9.0-legacy", "server": "0.7.0", "original": "PrusaLink I3MK3S", "text": "PrusaLink 0.7.0", "firmware": "3.13.0-6873", "sdk": "0.7.0", "capabilities": {"upload-by-put": true}, "hostname": "prusalink"}

API-doc: https://github.com/prusa3d/Prusa-Link-Web/blob/master/spec/openapi-legacy.yaml

@skint007
Copy link

skint007 commented Aug 27, 2023

Mine doesn't work on my mk4 either.

{
    "api": "2.0.0",
    "server": "2.1.2",
    "nozzle_diameter": 0.4,
    "text": "PrusaLink",
    "hostname": "PrusaMK4",
    "capabilities": {
        "upload-by-put": true
    }
}

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@aderusha
Copy link

aderusha commented Nov 25, 2023

Replying here to keep the bot from marking this issue as stale. This is still a problem for systems running the PrusaLink software. Further, several attempts to fix it have been met with a "nope not good enough" which means instead of an OK solution we have absolutely no solution that works at all.

@github-actions github-actions bot removed the stale label Nov 25, 2023
@Skaronator
Copy link
Contributor

Looks like the Prusa Link for MK3.x will get an update to the new API with the next release: prusa3d/Prusa-Link@02e6a82

@Atarinside
Copy link

Atarinside commented Feb 4, 2024

Hi,

I've updated my MK3s (firmware 3.13.2-7080 + PrusaLink 0.7.2 on a RPI 2 w), i can't login anymore to the printer within HA.
it previously worked for some time when i was with Prusalink 0.6, recently i had a "migration error" message so i decided to update everything and delete/reinstall the integration.
Since then i can't reinstall the integration, it keeps asking for an unknown user/password : I tried the user/password of prusalink and also with the api key, nothing is working.

With a browser:

http://[Myip]/api/printer :
{"temperature": {"tool0": {"actual": 22.2, "target": 0.0}, "bed": {"actual": 23.3, "target": 0.0}}, "sd": {"ready": true}, "state": {"text": "Operational", "flags": {"operational": true, "paused": false, "printing": false, "cancelling": false, "pausing": false, "sdReady": true, "error": false, "ready": true, "closedOrError": false, "finished": false, "prepared": false, "link_state": "IDLE"}}, "telemetry": {"temp-bed": 23.3, "temp-nozzle": 22.2, "material": " - ", "z-height": 0.15, "print-speed": 100, "axis_x": 0.0, "axis_y": 0.0, "axis_z": 0.15}, "storage": {"local": {"free_space": 28248391680, "total_space": 31132934144}, "sd_card": null}}

Same for http://[Myip]/api/version
{"api": "0.9.0-legacy", "server": "0.7.2", "original": "PrusaLink I3MK3S", "text": "PrusaLink 0.7.2", "firmware": "3.13.2-7080", "sdk": "0.7.1", "capabilities": {"upload-by-put": true}, "hostname": "prusa"}

HA:
Core 2024.1.6
Supervisor 2023.12.1
Operating System 11.4
Interface utilisateur 20240104.0

What am i doing wrong ?
Thanks.

@aderusha
Copy link

aderusha commented Feb 5, 2024

What am i doing wrong ?

Right now, nothing. The PrusaLink integration still doesn't work with the software called PrusaLink. It looks like the next release of PrusaLink is going to change the API version response string so that could maybe work? We'll see when that's released I guess.

@Skaronator
Copy link
Contributor

Additionally, the digest implementation is currently broken (but a PR is open) home-assistant-libs/pyprusalink#77

@Atarinside
Copy link

Ok thanks, wait and see then...But why not using the API key instead (like a lot of other integrations in HA) ?
Because you can generate an API key in Prusalink (in the settings).

@Skaronator
Copy link
Contributor

API key is considered deprecated and the HTTP Digest Auth is the way to move forward. The SL1(s) printer doesn't even have the old API key auth. On Mini/MK4/XL the API Key and Digest Auth Password are equal. Probably the same for Raspi PrusaLink as well. So not a big change for the enduser.

@the-ress
Copy link
Contributor

the-ress commented Feb 8, 2024

Probably the same for Raspi PrusaLink as well.

On Raspi PrusaLink they're different. (Just a nitpick, it doesn't really matter since MK3 isn't officially supported yet.)

@github-actions github-actions bot locked and limited conversation to collaborators Apr 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.