You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My plan is to make it look better - add a progress bar, clean up the text presentation, etc.
It connects to Klipper/Moonraker's API and retrieves info about the state of the current print. Since it was put up on Github six months ago, there seem to be some updates in Micropython that keep it from working.
%Run -c $EDITOR_CONTENT
Traceback (most recent call last):
File "", line 39, in module
File "requests/init.py", line 180, in get
File "requests/init.py", line 76, in request
OSError: -2
Line 39 is:
response = urequests.get(host+printer_api)
The error on line 180 refers to:
return request("GET", url, **kw)
The error on line 76 refers to:
ai = usocket.getaddrinfo(host, port, 0, usocket.SOCK_STREAM)
I think I covered all the info. I'm still new to working with this stuff in Micropython, so any help is appreciated!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I found this project to make a portable 3D printer monitor, using a D1 Mini and an OLED:
https://github.com/nmavor/klipper-esp8622/blob/master/main.py
It's a bare-bones implementation that just shows text on the screen:
https://www.youtube.com/watch?v=T31bh5aNVHc
My plan is to make it look better - add a progress bar, clean up the text presentation, etc.
It connects to Klipper/Moonraker's API and retrieves info about the state of the current print. Since it was put up on Github six months ago, there seem to be some updates in Micropython that keep it from working.
I found that urequests has been updated to "requests" and added the new versions.
https://github.com/micropython/micropython-lib/tree/master/micropython/urequests
Running it in Thonny gets the following errors:
Line 39 is:
response = urequests.get(host+printer_api)
The error on line 180 refers to:
return request("GET", url, **kw)
The error on line 76 refers to:
ai = usocket.getaddrinfo(host, port, 0, usocket.SOCK_STREAM)
I think I covered all the info. I'm still new to working with this stuff in Micropython, so any help is appreciated!
Beta Was this translation helpful? Give feedback.
All reactions