odwdinc / dwin_t5uic1_lcd Goto Github PK
View Code? Open in Web Editor NEWPython class for the Ender 3 V2 LCD
License: GNU General Public License v3.0
Python class for the Ender 3 V2 LCD
License: GNU General Public License v3.0
Hey, hoping you can help.
I did everything as per the list but getting stuck on an error
When I run the run.py file it stops on KeyError: 'job'. Here is a copy from putty:
pi@octopi:~/DWIN_T5UIC1_LCD $ python3 ./run.py
DWIN handshake
DWIN OK.
http://127.0.0.1:80
Waiting for connect to /tmp/klippy_uds
Connection.
Boot looks good
Testing Web-services
Web site exists
Traceback (most recent call last):
File "./run.py", line 13, in
API_Key
File "/home/pi/DWIN_T5UIC1_LCD/dwinlcd.py", line 322, in init
self.pd.init_Webservices()
File "/home/pi/DWIN_T5UIC1_LCD/printerInterface.py", line 355, in init_Webservices
self.update_variable()
File "/home/pi/DWIN_T5UIC1_LCD/printerInterface.py", line 400, in update_variable
self.file_name = self.job_Info['job']['file']['name']
KeyError: 'job'
The screen is on with the Creality boot logo but nothing else.
Can you please give me same guidance
Setup:
Ender 3 v2
4.2.7 board
Rpi 4
Klipper with octoprint (dont know what moonraker is maybe i need this?)
Any plans to change the program to use the moonraker API directly? The octoprint dependency is a bit inconvenient for those of us who use different klipper frontends
DELETE
Is there a way to use a seperate moonraker host like klipperscreen? I'm running Klipper on a laptop motherboard I fixed because a decent Raspberry Pi 3 or 4 where I live is really expensive. I really want to reuse the the display so I used a Raspberry Pi Zero W I had lying around collecting dust to control the screen. I got to the point where the screen boots up and displays the Creality Logo but I'm having trouble with connecting to Moonraker "or so I think" and keeps throwing this error:
"Unable to connect socket http://10.24.47.195 [2,ENOENT]"
As you can see I already changed the address in printerInterface.py to match my Moonraker host hoping that It will magically work but so far nothing, I know a bit about python but my knowledge is way behind to you guys python mastery. I tried reading the docs about moonraker api/klipper api but honestly it went over my head.
Any help would be greatly appreciated.
hi,
I'm trying to connect a raspberry pi 0 (which the screen is connected) to an Android box where Klipper/moonracker/octoprint are installed. The screen lights up with the logo but run.py returns the message "DWIN OK. Unable to connect socket /home/florian/printer_data/comms/klippy.sock [2,ENOENT]"
I changed the IP 127.0.0.1 to the IP of the box (192.168.X.X) on line 256 of "printerinterface.py". The API key is good. But it does not work.
My question: how to connect remotely?
Thks
Hi, great project, thanks very much.
I was wondering if it would be possible to add a button to toggle a moonraker power device? I'm not sure if the interface is customisable or not. Any pointers in the right direction welcome.
Thanks.
Hey, great project!
Just wanted to ask how hard would it be to make the display communicate with klipper through the mainboard instead of the Rpi? I know someone accomplished this for the T5UID1 touchscreen display that comes with Ender 5 plus, Ender 6, CR10S pro. Are you planning to test this approach on the T5UIC1? I think that would be awesome.
The printer communicates well with Octoprint and can control all the relevant settings but when I home axes via the display, I get a wait screen with an image that says "Homing XYZ Please wait until Done" Which is to be expected but it never clears and goes back to the main screen. I have to reboot the pi to get it back to functional.
The relevant data (temperatures and such at the bottom) do update while this is occuring. Longest wait time is around 15 minutes because I walked away. Happy to send logs if you can tell me what to send.
Thanks!
Hey,
First let me say thanks for working on this!
I can get it to work with OctoPrint but I want to use Klipper with Moonraker exclusively.
How would I do that?
I've tried setting the Octoprint Port to 7125 so it tries to use Moonraker but I get errors.
Hey, it would be awesome if this could support standard GPIO rather than being locked down to the Raspberry Pi only (which are really expensive now).
For example a commonly used alternative/upgrade is the RockPi series SBCs.
The RockPi 4 and newer use the exact same GPIO pin outs and are supported by mraa - https://wiki.radxa.com/Rockpi4/hardware/gpio.
I see you're currently using the gpiozero library which is somewhat hardcoded to only work with raspberry pis likewise with the fallback pigpiod.
There is a rpi.gpio drop-in replacement for SBCs other than the Raspberry Pi - https://github.com/rm-hull/OPi.GPIO
You can query the GPIO using libmraa and related tooling:
mraa-gpio list
01 3V3:
02 5V:
03 SDA7: GPIO I2C
04 5V:
05 SCL7: GPIO I2C
06 GND:
07 SPI2_CLK: GPIO SPI
08 TXD2: GPIO UART
09 GND:
10 RXD2: GPIO UART
11 PWM0: GPIO PWM
12 GPIO4_A3: GPIO
13 PWM1: GPIO PWM
14 GND:
15 GPIO4_C5: GPIO
16 GPIO4_D2: GPIO
17 3V3:
18 GPIO4_D4: GPIO
19 SPI1TX,TXD4: GPIO SPI UART
20 GND:
21 SPI1RX,RXD4: GPIO SPI UART
22 GPIO4_D5: GPIO
23 SPI1CLK: GPIO SPI
24 SPI1CS: GPIO SPI
25 GND:
26 ADC_IN0: AIO
27 SDA2: GPIO I2C
28 SCL2: GPIO I2C
29 SCL6,SPI2RX: GPIO I2C SPI
30 GND:
31 SDA6,SPI2TX: GPIO I2C SPI
32 GPIO3_C0: GPIO
33 SPI2CS: GPIO SPI
34 GND:
35 GPIO4_A5: GPIO
36 GPIO4_A4: GPIO
37 GPIO4_D6: GPIO
38 GPIO4_A6: GPIO
39 GND:
40 GPIO4_A7: GPIO
crw------- 1 root root 254, 0 Mar 9 07:25 /dev/gpiochip0
crw------- 1 root root 254, 1 Mar 9 07:25 /dev/gpiochip1
crw------- 1 root root 254, 2 Mar 9 07:25 /dev/gpiochip2
crw------- 1 root root 254, 3 Mar 9 07:25 /dev/gpiochip3
crw------- 1 root root 254, 4 Mar 9 07:25 /dev/gpiochip4
crw-rw---- 1 root i2c 89, 0 Mar 9 07:25 /dev/i2c-0
crw-rw---- 1 root i2c 89, 1 Mar 9 07:25 /dev/i2c-1
crw-rw---- 1 root i2c 89, 3 Mar 9 07:25 /dev/i2c-3
crw-rw---- 1 root i2c 89, 4 Mar 9 07:25 /dev/i2c-4
gpioinfo
gpiochip0 - 32 lines:
line 0: unnamed unused input active-high
line 1: unnamed unused input active-high
line 2: unnamed unused input active-high
line 3: unnamed unused input active-high
line 4: unnamed "host-wakeup" input active-high [used]
line 5: unnamed unused input active-high
line 6: unnamed unused input active-high
line 7: unnamed "cd" input active-low [used]
line 8: unnamed unused input active-high
line 9: unnamed "shutdown" output active-high [used]
line 10: unnamed "reset" output active-low [used]
line 11: unnamed unused input active-high
line 12: unnamed unused input active-high
line 13: unnamed unused input active-high
line 14: unnamed unused input active-high
line 15: unnamed unused input active-high
line 16: unnamed unused input active-high
line 17: unnamed unused input active-high
line 18: unnamed unused input active-high
line 19: unnamed unused input active-high
line 20: unnamed unused input active-high
line 21: unnamed unused input active-high
line 22: unnamed unused input active-high
line 23: unnamed unused input active-high
line 24: unnamed unused input active-high
line 25: unnamed unused input active-high
line 26: unnamed unused input active-high
line 27: unnamed unused input active-high
line 28: unnamed unused input active-high
line 29: unnamed unused input active-high
line 30: unnamed unused input active-high
line 31: unnamed unused input active-high
gpiochip1 - 32 lines:
line 0: unnamed unused input active-high
line 1: unnamed unused input active-high
line 2: unnamed unused input active-high
line 3: unnamed "vcc5v0-typec-regulator" output active-high [used]
line 4: unnamed unused input active-high
line 5: unnamed unused input active-high
line 6: unnamed unused input active-high
line 7: unnamed unused input active-high
line 8: unnamed unused input active-high
line 9: unnamed unused input active-high
line 10: unnamed unused input active-high
line 11: unnamed unused input active-high
line 12: unnamed unused input active-high
line 13: unnamed unused input active-high
line 14: unnamed unused input active-high
line 15: unnamed unused input active-high
line 16: unnamed unused input active-high
line 17: unnamed unused input active-high
line 18: unnamed unused input active-high
line 19: unnamed unused input active-high
line 20: unnamed unused input active-high
line 21: unnamed unused input active-high
line 22: unnamed unused input active-high
line 23: unnamed unused input active-high
line 24: unnamed unused input active-high
line 25: unnamed unused input active-high
line 26: unnamed unused input active-high
line 27: unnamed unused input active-high
line 28: unnamed unused input active-high
line 29: unnamed unused input active-high
line 30: unnamed unused input active-high
line 31: unnamed unused input active-high
gpiochip2 - 32 lines:
line 0: unnamed unused input active-high
line 1: unnamed unused input active-high
line 2: unnamed unused input active-high
line 3: unnamed unused input active-high
line 4: unnamed unused input active-high
line 5: unnamed unused input active-high
line 6: unnamed unused input active-high
line 7: unnamed unused input active-high
line 8: unnamed unused input active-high
line 9: unnamed unused input active-high
line 10: unnamed unused input active-high
line 11: unnamed unused input active-high
line 12: unnamed unused input active-high
line 13: unnamed unused input active-high
line 14: unnamed unused input active-high
line 15: unnamed unused input active-high
line 16: unnamed unused input active-high
line 17: unnamed unused input active-high
line 18: unnamed unused input active-high
line 19: unnamed unused input active-high
line 20: unnamed unused input active-high
line 21: unnamed unused input active-high
line 22: unnamed unused input active-high
line 23: unnamed unused input active-high
line 24: unnamed unused input active-high
line 25: unnamed unused input active-high
line 26: unnamed "vcc3v3-pcie-regulator" output active-high [used]
line 27: unnamed "device-wakeup" output active-high [used]
line 28: unnamed unused input active-high
line 29: unnamed unused input active-high
line 30: unnamed unused input active-high
line 31: unnamed unused input active-high
gpiochip3 - 32 lines:
line 0: unnamed unused input active-high
line 1: unnamed unused input active-high
line 2: unnamed unused input active-high
line 3: unnamed unused input active-high
line 4: unnamed unused input active-high
line 5: unnamed unused input active-high
line 6: unnamed unused input active-high
line 7: unnamed unused input active-high
line 8: unnamed unused input active-high
line 9: unnamed unused input active-high
line 10: unnamed unused input active-high
line 11: unnamed unused input active-high
line 12: unnamed unused input active-high
line 13: unnamed unused input active-high
line 14: unnamed unused input active-high
line 15: unnamed "snps,reset" output active-low [used]
line 16: unnamed unused input active-high
line 17: unnamed unused input active-high
line 18: unnamed unused input active-high
line 19: unnamed unused input active-high
line 20: unnamed unused input active-high
line 21: unnamed unused input active-high
line 22: unnamed unused input active-high
line 23: unnamed unused input active-high
line 24: unnamed unused input active-high
line 25: unnamed unused input active-high
line 26: unnamed unused input active-high
line 27: unnamed unused input active-high
line 28: unnamed unused input active-high
line 29: unnamed "status" output active-high [used]
line 30: unnamed unused input active-high
line 31: unnamed unused input active-high
gpiochip4 - 32 lines:
line 0: unnamed unused input active-high
line 1: unnamed unused input active-high
line 2: unnamed unused input active-high
line 3: unnamed unused input active-high
line 4: unnamed unused input active-high
line 5: unnamed unused input active-high
line 6: unnamed unused input active-high
line 7: unnamed unused input active-high
line 8: unnamed unused input active-high
line 9: unnamed unused input active-high
line 10: unnamed unused input active-high
line 11: unnamed unused input active-high
line 12: unnamed unused input active-high
line 13: unnamed unused input active-high
line 14: unnamed unused input active-high
line 15: unnamed unused input active-high
line 16: unnamed unused input active-high
line 17: unnamed unused input active-high
line 18: unnamed unused input active-high
line 19: unnamed unused input active-high
line 20: unnamed unused input active-high
line 21: unnamed unused input active-high
line 22: unnamed unused input active-high
line 23: unnamed unused input active-high
line 24: unnamed unused input active-high
line 25: unnamed "vcc5v0-host-regulator" output active-high [used]
line 26: unnamed unused input active-high
line 27: unnamed "ep" output active-high [used]
line 28: unnamed unused input active-high
line 29: unnamed unused input active-high
line 30: unnamed unused input active-high
line 31: unnamed unused input active-high
By default, the Klipper's API socket is not enabled. In order to use the API server, the file /etc/default/klipper need to be updated form
KLIPPY_ARGS="/home/pi/klipper/klippy/klippy.py /home/pi/printer.cfg -l /tmp/klippy.log"
To:
KLIPPY_ARGS="/home/pi/klipper/klippy/klippy.py /home/pi/printer.cfg -a /tmp/klippy_uds -l /tmp/klippy.log"
Sorry if this is inappropriate but couldn't find a way to communicate with you elsewhere.
I'm trying to find a way to connect the ender 3 s1 touchscreen (not lcd, which has a solution via one of the forks from this repo) to the raspberry pi 4b.
I have no idea how to start approaching this as I can't find any documentation of the ender 3 s1 touch screen kit connections.
Is there any reason this can't be done?
Thank you
Hey I already tried different pins (5,6) but nothing happens when turning it. Anything I can try?
I made everything of the setup and connected the Display properly to the Raspberry Pi.
The Display doesnt show anything (but the Backlight is on) and when i spin or push the button this is the output of run.py:
DWIN handshake
Traceback (most recent call last):
File "/home/pi/DWIN_T5UIC1_LCD/encoder.py", line 47, in transitionOccurred
self.callback(self.value)
File "/home/pi/DWIN_T5UIC1_LCD/dwinlcd.py", line 2252, in encoder_has_data
if self.checkkey == self.MainMenu:
AttributeError: 'DWIN_LCD' object has no attribute 'checkkey'
Traceback (most recent call last):
File "/home/pi/DWIN_T5UIC1_LCD/encoder.py", line 38, in transitionOccurred
self.callback(self.value)
File "/home/pi/DWIN_T5UIC1_LCD/dwinlcd.py", line 2252, in encoder_has_data
if self.checkkey == self.MainMenu:
AttributeError: 'DWIN_LCD' object has no attribute 'checkkey'
Traceback (most recent call last):
File "/home/pi/DWIN_T5UIC1_LCD/dwinlcd.py", line 2252, in encoder_has_data
if self.checkkey == self.MainMenu:
AttributeError: 'DWIN_LCD' object has no attribute 'checkkey'
My setup:
Raspberry Pi 3
Octoprint Version 1.5.3
Klipper v0.9.1
Adding controls to shutdown the pi via the LCD would allow the entire setup to be turned off without use of the web interface or an ssh connection, allowing klipper to be used independent of a laptop/phone to view the web interface or form an ssh connection
Does anybody know how to add a new Preheat line, e.g. for PETG?
I can see you can change the values for PLA or ABS in code, but would like to add a third.
The main bit I think I'm missing is how characters are created or copied, so for ABS we do:
def Item_Prepare_ABS(self, row):
self.lcd.Frame_AreaCopy(1, 107, 76, 156, 86, self.LBLX, self.MBASE(row)) # "Preheat"
self.lcd.Frame_AreaCopy(1, 172, 76, 198, 86, self.LBLX + 52, self.MBASE(row)) # "ABS"
self.Draw_Menu_Line(row, self.ICON_ABSPreheat)
How do I find out what position (e.g. 172, 76 above for ABS) holds string 'PETG' or if it's just not available?
i am installing this on mainsail os and after i did everything on the page i got stuck on run.py
terminal log
DWIN handshake
DWIN OK.
http://127.0.0.1:80
Waiting for connect to /tmp/klippy_uds
Unable to connect socket /tmp/klippy_uds [2,ENOENT]
cananyone help me?
Not sure what to do about this one...
# python3 run.py
DWIN handshake
DWIN OK.
http://127.0.0.1:80
Waiting for connect to /tmp/klippy_uds
Connection.
Boot looks good
Testing Web-services
Web site exists
Traceback (most recent call last):
File "run.py", line 13, in <module>
API_Key
File "/home/pi/DWIN_T5UIC1_LCD/dwinlcd.py", line 322, in __init__
self.pd.init_Webservices()
File "/home/pi/DWIN_T5UIC1_LCD/printerInterface.py", line 357, in init_Webservices
self.SHORT_BUILD_VERSION = ppp['model']
KeyError: 'model'
LCD Is now showing that initial Creality Loading Bar indefinitely without animation.
Ideas?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.