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

[BUG] Is there a way to use this without needing to install the windows AnkerMaker software? #151

Open
pghpete opened this issue Feb 15, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@pghpete
Copy link

pghpete commented Feb 15, 2024

I do not have a windows system at my house and the Ankermaker Slicer software will not load properly within a Windows VM due to an openGL compatibility issue. Since that is legacy I attempted to install there new version on the vm but failed their too.

Is there a way to get or create the login credentials necessary to use this Ankermake-M5-Protocol without the need of the older, windows/mac only AnkerMaker Slicer software?

I should note: I have a login.json file but I cannot import it.
This is the error I get...

web.config.ConfigImportError: Config import failed: API request failed: 401 Unauthorized. Auth token might be expired: make sure Ankermake Slicer can connect, then try again

@pghpete pghpete added the bug Something isn't working label Feb 15, 2024
@treitmayr
Copy link

There are two options:

  • The traditional way with ankerctl: Run "AnkerMake Slicer" (not the newer "AnkerMake Studio") using wine, log in, and then grab the generated encrypted login.json file and import it in ankerctl.
  • With PR Add support for fetching configuration via login #148 you can directly log in with ankerctl via the CLI or the web interface.

In addition there is PR #150 which allows you to store the IP address of your printer in the ankerctl configuration file, otherwise it seems you need to manually add it to the configuration file because it is not part of the login data (at least for me it is not when directly logging in via ankerctl). You could either apply these PRs yourself or try my integration branch - which also adds support for the M5C (it you do not need that, it should still work flawlessly): https://github.com/treitmayr/ankermake-m5-protocol/tree/m5c-integration

@pghpete
Copy link
Author

pghpete commented Feb 15, 2024

Thank you @treitmayr I will give those options a go now and report back.

@treitmayr
Copy link

You might want to start with option 2, because it should make things easier :-)

@pghpete
Copy link
Author

pghpete commented Feb 15, 2024

@treitmayr Thank you!! I greatly appreciate your help with this. For others that may need to do the same thing...

git clone --branch m5c-integration https://github.com/treitmayr/ankermake-m5-protocol
cd ankermake-m5-protocol
./ankerctl.py config login US [email protected] "pw"

...replacing US with your 2 letter country code and adding your own UN/PW.

@treitmayr
Copy link

Good to know it worked for you! Just make sure that your configuration includes the printer's IP address (CLI: ./ankerctl.py config show and search for "ip:"). If this is empty, try: ./ankerctl.py pppp lan-search --store (or use the corresponding button in the web interface).

@Phoenix-DH
Copy link

@treitmayr Thank you!! I greatly appreciate your help with this. For others that may need to do the same thing...

git clone --branch m5c-integration https://github.com/treitmayr/ankermake-m5-protocol cd ankermake-m5-protocol ./ankerctl.py config login US [email protected] "pw"

...replacing US with your 2 letter country code and adding your own UN/PW.

Great, I did get it managed to create the default.json file, afterwards I used the command to get the ip, but when I try to import it in the webserver I get that:
Unexpected Error occurred: 'data'

@treitmayr
Copy link

treitmayr commented Jul 10, 2024

I suspect there is a misunderstanding - the configuration file used by ankerctl.py is in its own file format and contains all the things ankerctl.py has to know whenever it is (re)started. And this is true for both the commandline version and the web interface. However, for the original ankerctl.py the only way to generate its config file was to import the old ankermake slicer's config file (which is in a different format).
So please just use the forked version from anselor:exiles (which includes the mentioned PRs) and you do not have to worry about any config file anymore or even have to know about the existence of either of these config files. I even recommend to enter the credentials and find your printer via the web interface instead of the commandline if you want to use it anyway.

@Phoenix-DH
Copy link

Phoenix-DH commented Jul 10, 2024

Maybe there is a misunderstanding from my side.
I tried now the fork again, also webserver is running and accepts the config.

I have a home assistant instance running with the ofiicial ankerctl add-on. There I tried to import that generated json file and there then the error occurs.

My goal and my thought was that this generated json file should work on all variousities of ankerctl.

@treitmayr
Copy link

@Phoenix-DH it seems to you running this issue in multiple threads. Also I am confused why you want to switch to the HA integration version of ankerctl.py - according to this comment you should be able to use the exiles version. But I did not try any HA integration myself, so I cannot confirm this. If it is possible, just initialize anterctl.py via the web interface (login + printer search, all right there), and you are done.
As written before, due to my lack of experience with the HA integration, I will not be able to comment more than done above.

@Phoenix-DH
Copy link

I will use home assistant because I do not want to run an additional instance, because this must always be powered to use the home assistant plugin to get current state. This is the case for me.

Thanks for your support here. I think I found a HA compatible version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants