Going Full Root on the KE, Getting Deep and Dirty!

Warning, the information in this post could create issues with your 3d printer and could even render it inoperable, proceed with caution!

Hello from the new guy :wave:

I have had my KE for about 2 months now and have zero prior experience in 3d printing. Although I do have significant experience with electrical, electronic and mechanics as well as the Linux operating system so I am fairly confident in the start of this adventure. With that out of the way, letā€™s get started.

So first off we have to gain root access to our printer. (this guided adventure only pertains to the KE from my perspective) From the front control panel in settings you will see ā€˜Root Accessā€™ or something to that effect. You will be presented with a disclaimerā€¦READ the disclaimer, once you agree you will be given 30 seconds to contemplate your decision. Once you go root it will change to yellow, this indicated the printer has been rooted and it may very well void your warranty.

The root username and password are ā€˜rootā€™ and ā€˜Creality2023ā€™, this has been the same for every video/tutorial I have seen so I assume yours will be the same. So this brings to mind that every single KE printer all have the same password and it is in fact networked over wifi, something to consider.

Next you will need your network address, this will be under networking and will be something to the effect of 192.168.xxx.xxx on a typical home network running dhcp. Mind you this is a dynamic leased address and will change from time to time. Mine seems to bounce between 2 different addresses. If you have the ability it would be advantageous to assign the printer a static IP address.

To access the core system and get Deep and Dirty into this thing you are going to need to jump in as root, so lets do that now. As a note you will be accessing a command line environment only that is running on a Linux kernel, so you will need to be adept and comfortable with a CLI interface.

So fire up your preferred terminal program, in Windows 10/11 you can open up power shell, you do not need any additional 3rd party programs. I am on a Mac and will be using the terminal, same as linux/unix. To gain access we will use SSH (Secure Shell) to access the system.

ssh root@your_ip_address

unknown@unknown-imac ~ % ssh root@192.168.xxx.xxx
The authenticity of host '192.168.xxx.xxx (192.168.xxx.xxx)' can't be established.
ECDSA key fingerprint is SHA256:YSm9hqU8BBZ8Wxxxxxxxxxxxxxxxxxxxxxxxxxxx.
This host key is known by the following other names/addresses:
    ~/.ssh/known_hosts:4: 192.168.xxx.xxx
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.xxx.xxx' (ECDSA) to the list of known hosts.
root@192.168.xxx.xxx's password: 
root@Ender3V3KE-95B8 /root [#] 

You will be logged into the root users directory in which is just an empty directory. If you run ā€˜lsā€™ it will return nothing as there is nothing to return.

Ok so now youā€™re in, you have got root access to your printer. Now some standard warnings about this if your not familiar, root access gives you full elevated privileges and you can do Anything you want to doā€¦like make mistakes that can have severe consequences. Linux doesnā€™t care, if you tell it to remove (rm) a file, it will do so without further confirmation, it will not ask you if your sure, it will not send it to a trash can to be retrieved later, noā€¦ it will do as you ask without question. With this said it would be wise to create a regular user to log in with, then when elevated privileges are needed you can use the switch user (su) to switch to the root user. When you are done doing your administrative task you would then again switch back to the standard user.

Now, this is only a printer and not a daily user environment so in most cases your going to get in, do a task and get out, so you may opt not to create a standard user account and simply log in as root with the factory password and do what you want. For me personally I adhere to standard operating principles of a secure system so I will be creating a standard user. Again, running around the system as root is akin to running with scissors, its all fine until you fall and stab yourself.

Letā€™s talk about the system briefly. The system your logging into is whatā€™s known as ā€˜Busy Boxā€™, it is colloquially referred to as the Swiss army knife of Linux. It is a very stripped down minimal version of a Linux operating environment meant specifically for embedded systems where processor power and memory is constrained.

So lets take a quick look at what we got here:
uname -a returns
Linux Ender3V3KE-95B8 4.4.94 #47 SMP PREEMPT Fri Apr 12 18:00:37 CST 2024 mips GNU/Linux

So we have the operating system, hostname, kernel version, kernel release date, the hardware platform, etcā€¦ Here we can see we are running on a mips risc architecture.

First lets change the password for the root account for basic security.

root@Ender3V3KE-95B8 /root [#] passwd
Changing password for root
New password: 
Retype password: 
passwd: password for root changed by root

Now log out and log back in, type exit and then ssh back in as root

root@Ender3V3KE-95B8 /root [#] exit
Connection to 192.168.xxx.xxx closed.
unknown@unknown-imac ~ % ssh root@192.168.xxx.xxx
root@192.168.xxx.xxx's password: 
root@Ender3V3KE-95B8 /root [#] 

Alright so now we have a root account that has a unique password. Letā€™s create a standard user account so we can go explore without having to stress about screwing something up critical.

root@Ender3V3KE-95B8 /root [#] adduser jester
**adduser: /home/jester: No such file or directory**
Changing password for jester
New password: 
**Bad password: too weak**
Retype password: 
passwd: password for jester changed by root

Now you will see that it called out weak password, it will accept it but it will warn you that a password of password is not a wise choice. So lets clean that up real quickā€¦

root@Ender3V3KE-95B8 /root [#] passwd jester
Changing password for jester
New password: 
Retype password: 
passwd: password for jester changed by root

Also notice we got a warning from the adduser command that it was unable to create the home directory. This is where things get complicated since this is such a minimal version of Linux, and my first time working with busy box so I had to really dig into my knowledge bank (ChatGPT) and work through it.

Lets create that home directory, set ownership and permission.

root@Ender3V3KE-95B8 / [#] mkdir -p /home/jester
root@Ender3V3KE-95B8 / [#] chown jester:jester /home/jester
root@Ender3V3KE-95B8 / [#] chmod 700 /home/jester

This is were we ran into just a little troubleā€¦we need to add the user to the users group so they can log into the system. Busy box does not have the user mod command availableā€¦

root@Ender3V3KE-95B8 /etc [#] usermod -aG users jester
**-sh: usermod: not found**

Now this will have to be done manually so you will need to edit the group file directly which means you will have to use the ā€˜viā€™ editor. I will explain the steps but the vi editor is tricky if youā€™re not versed in it. Proceed with caution and patience.

First things first, lets make a back up of the original file before we go screwing it up, this is where you can get into trouble running around as root. You should get in the habit of backing up any config files before modifying them unless you consider yourself expert level. Also this is good practice if your going to modify future files on the system.

root@Ender3V3KE-95B8 /etc [#] cp group group.bak

Now we have a backup of the original group file and we can edit the original.
You can view it first with the command ā€˜cat /etc/groupā€™
I recommend using the -R switch (vi -R group) to view the file in readonly mode first before attempting to modify it if you not familiar. Or just jump in if you know what your doingā€¦
Take note we are in the /etc directory, but it lets use the absolute path name hereā€¦

root@Ender3V3KE-95B8 /etc [#] vi /etc/group

You can use your arrow keys to scroll down to the user line and go to the ending of the line users:x:100: and press a, this will put you into ā€˜appendā€™ mode. Now type in your user name then press the esc (escape) key. Now you are out of edit mode and back in command mode, so letā€™s write the change and quit with :wq

Now type

cat /etc/group

You should now have the modified lineā€¦

users:x:100:your_user_name

If you screw up or panic just hit esc and then type :!q If you really freak out just turn off the printer, lol It will be fineā€¦

So now type the following:

root@Ender3V3KE-95B8 /root [#] id jester
uid=1004(jester) gid=1004(jester) groups=1004(jester),100(users)

Ok thatā€™s it, we created a standard system user that can now log into the system and freely move around without worrying about screwing things up.

root@Ender3V3KE-95B8 / [#] exit
Connection to 192.168.xxx.xxx closed.
unknown@unknown-imac ~ % ssh jester@192.168.xxx.xxx
jester@192.168.xxx.xxx's password: 
jester@Ender3V3KE-95B8 /home/jester [$]

Woot, there you are all logged in as a standard user, now in the next episode we are going to actually go and dig around the file system and find the pertinent files for the printer. That was a lot of information to take in.

If your going to be operating in the linux command line environment I recommend you buy a book on linux or even an old book on unix, for a stripped down version of linux like busy box its basically an old school version of linux/unix. I purchased a 1996 version of ā€˜Inside Unixā€™ 2nd edition for $6 at the local used book store and the best part of the book are two full chapters on the VI editor, which is now known as Vim (VI Improved).

Bet you didnā€™t a lesson on linux and user management before even getting started haha!

4 Likes

Alrighty lets get back at it and continue our journey into the bowels of the Crealityā€™s file system and see what we can find.

First though for those unfamiliar with how to navigate the file system I should give a basic overview of how the file system is setup so that some of the directory names are not such a mystery. Basically you start at the root level signified by the forward slash ā€˜/ā€™. For those using windows you might be familiar with the backslash. So starting at root level you will then descend into the lower directories, while they are not really leveled this way of thinking will help you later when moving through directories.

Here is a quick overview of the general linux directory structure, our minimal busy box installation may not have all of these directories.

#SUB-DIRECTORY PURPOSE
/bin      common binary executables used by all users
/boot     files associated with boot loader
/dev      attached devices (usb, cdrom, mouse, keyboard)
/etc      configuration files
/home     personal directories for each user account
/lib      shared system libraries
/media    directory for mounting removable devices (floppy drive, cdrom)
/mnt      directory for mounting filesystems (nfs, smb)
/opt      optional vendor add-on software
/proc     virtual filesystem for system processes/resources information
/root     home directory for administrator account
/run      storage for runtime information
/sbin     binary executables used by administrator
/srv      data for server services
/sys      virtual filesystem for hardware/driver information
/tmp      temporary files purged on reboot
/usr      utilities and read-only user data/programs
/var      variable and log files

Couple of quick commands we need first
cd The cd command is ā€˜Change Directoryā€™, should be self explanatory.
ls The ls command is ā€˜Listā€™ or list directory contents, there are several ā€˜switchesā€™ available for it but the most common is going to the -l for ā€˜longā€™ format. Normally a linux system has what are called ā€˜manā€™ pages, man standing for manual. I will provide one of the longest living linux links I know of, I have been using this link since the 90ā€™s and it never goes down.

Linux Manual Pages

So you have logged in as root in the root users directory, or if you set-up a user account you will be logged into that users directory. So lets start exploring and seeing what trouble we can get ourselves into, lets get Deep and Dirty!

My first commands are to go to the root directory and list the file structure.

jester@Ender3V3KE-95B8 /home/jester [$] cd /
jester@Ender3V3KE-95B8 / [$] ls
bin            home           linuxrc        module_driver  proc           run            tmp
dev            lib            media          opt            rom            sbin           usr
etc            lib32          mnt            overlay        root           sys            var
jester@Ender3V3KE-95B8 / [$] 

Thatā€™s nice but Iā€™m a detailed orientated geek and I need more information, ok, I got youā€¦

jester@Ender3V3KE-95B8 / [$] ls -l
total 6
drwxr-xr-x    2 root     root          1079 Apr 12 18:01 bin
drwxr-xr-x   11 root     root          2960 Mar  1  2020 dev
drwxr-xr-x    1 root     root          1024 Jul 28 02:18 etc
drwxr-xr-x    3 root     root          1024 Jul 28 02:30 home
drwxr-xr-x    5 root     root           882 Apr 12 18:01 lib
lrwxrwxrwx    1 root     root             3 Mar  4 17:32 lib32 -> lib
lrwxrwxrwx    1 root     root            11 Mar  4 17:46 linuxrc -> bin/busybox
drwxr-xr-x    2 root     root             3 Aug 14  2023 media
drwxr-xr-x    2 root     root             3 Aug 14  2023 mnt
drwxrwxr-x    2 root     root           884 Apr 12 18:01 module_driver
drwxr-xr-x    2 root     root             3 Aug 14  2023 opt
drwxr-xr-x    5 root     root          1024 Mar  1  2020 overlay
dr-xr-xr-x   98 root     root             0 Jan  1  1970 proc
drwxr-xr-x   20 root     root           296 Mar  4 17:57 rom
drwx------    1 root     root          1024 Jul 26 12:30 root
drwxr-xr-x    8 root     root           480 Mar  1  2020 run
drwxr-xr-x    2 root     root          1581 Apr 12 18:01 sbin
dr-xr-xr-x   12 root     root             0 Mar  1  2020 sys
drwxrwxrwt    5 root     root           500 Jul 28 07:11 tmp
drwxr-xr-x    1 root     root          1024 Apr 12 18:01 usr
drwxr-xr-x    1 root     root          1024 Apr 12 18:01 var
jester@Ender3V3KE-95B8 / [$] 

What you see here are the file attributes, number of links to file, owner, group, size in bytes, last modified date/time and the file itself. Keep in mind that everything is a file, a directory is a file with more files.

Now at the beginning of each entry we see some letters such as drwxr-xr-x. This is file type and permissions, so in this example we see it is a directory, owner root has read, write, execute, group root has read and execute and same for others. So file type, owner, group, other is the format. I am not going to get into file permissions here as that gets a little deep.

Real quick edit, I just noticed a historical tid bit in the listing, on the proc folder you will see a date of Jan 1 1970. That my friends is what is known as the starting point of Unix time, the ā€˜Epochā€™ time, the time long long ago when a new era of computing was unleashed upon mankind! But really it is a key part of time keeping in the Unix/Linux systems and it is listed in seconds since the ā€˜Epochā€™ date. The Unix timestamp is often used in computing for timekeeping because itā€™s a simple, continuous count of seconds. For exampleā€¦

jester@Ender3V3KE-95B8 /usr/data/printer_data/config [$] date +%s
1722125992

If you do some mathematics on that number you will get about 54 years and some change. Anyways just a little bit of historical computing knowledge.

Moving on lets find out how much space we are dealing with on this embedded printer and where it existsā€¦ We will use the disk free command df with the -h switch for ā€˜human readableā€™.

jester@Ender3V3KE-95B8 / [$] df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root               109.9M    109.9M         0 100% /rom
devtmpfs                 98.4M         0     98.4M   0% /dev
tmpfs                    98.5M      4.0K     98.5M   0% /dev/shm
tmpfs                    98.5M    288.0K     98.2M   0% /tmp
tmpfs                    98.5M    192.0K     98.3M   0% /run
/dev/mmcblk0p9          290.5M      2.6M    272.9M   1% /overlay
overlayfs:/overlay      290.5M      2.6M    272.9M   1% /
/dev/mmcblk0p10           5.9G    655.4M      5.0G  11% /usr/data
jester@Ender3V3KE-95B8 / [$] 

Well this is very interesting data indeed. Two things that stand out to me is that the /dev/root file system is 100% read only memory and that /usr/data is a whopping 6 Gigabytes! Thatā€™s massive for an embedded system, I am assuming that is a eMMC storage chip either on the firmware board or the display console. Thatā€™s the beautiful thing about linux/unix, you can have your file system spread across multiple locations and operating system sees it all as one cohesive ā€˜driveā€™.

So this makes me wonder if we should create a folder in /usr/data and link our /home/your_user_name to so that we can upload and save files to it. Hmmm, can we print directly from the command line, now that would be cool.

Lets bounce over to /usr/data real quick and see what we find shall weā€¦

jester@Ender3V3KE-95B8 / [$] cd /usr/data/
jester@Ender3V3KE-95B8 /usr/data [$] ls
creality             lost+found           printer_data         wpa_supplicant.conf
factory_test_result  macaddr.txt          swap
jester@Ender3V3KE-95B8 /usr/data [$] 

Oh, looky there, we got a Creality and a printer_data folder, lets dive in and look see shall we :smile_cat:

Oh ya, I should tell that the system has ā€˜tab completeā€™, so if you start typing a file name and hit tab it should complete it for you. There is more to that but that is the basic gist of it. So if you start with cd cre and hit the tab key it will complete the file name creality.

jester@Ender3V3KE-95B8 /usr/data [$] cd creality/
jester@Ender3V3KE-95B8 /usr/data/creality [$] ls
tmp       upgrade   userdata
jester@Ender3V3KE-95B8 /usr/data/creality [$] cd upgrade/
jester@Ender3V3KE-95B8 /usr/data/creality/upgrade [$] ls
Ender-3_V3_KE_F005_ota_img_V1.1.0.14.img
jester@Ender3V3KE-95B8 /usr/data/creality/upgrade [$] 

So here we see that in the folder Creality/upgrade we find the latest firmware update image 1.1.0.14. This is the entire system image, basically itā€™s the entire operating system we are currently rooting around in. When there is a new firmware update it will place the image here. Also notice the ota which means it was ā€˜over the airā€™, I did this upgrade from the control panel when I first got the printer.

Ok letā€™s go back up the ladder a couple rungs to get back to that printer_data folder. We can do this a couple ways, the fastest is to simply type cd ā€¦/ā€¦ or cd /usr/data/ Now lets see whatā€™s in the printer data folderā€¦

jester@Ender3V3KE-95B8 /usr/data/creality/upgrade [$] cd ../..
jester@Ender3V3KE-95B8 /usr/data [$] ls
creality             lost+found           printer_data         wpa_supplicant.conf
factory_test_result  macaddr.txt          swap
jester@Ender3V3KE-95B8 /usr/data [$] cd printer_data/
jester@Ender3V3KE-95B8 /usr/data/printer_data [$] ls
config  gcodes  logs
jester@Ender3V3KE-95B8 /usr/data/printer_data [$] cd config/
jester@Ender3V3KE-95B8 /usr/data/printer_data/config [$] ls
factory_printer.cfg          printer-20240716_114112.cfg  printer-20240719_084129.cfg  printer-20240721_105301.cfg
gcode_macro.cfg              printer-20240716_114230.cfg  printer-20240719_084130.cfg  printer-20240721_105427.cfg
printer-20240715_003930.cfg  printer-20240716_121658.cfg  printer-20240720_045317.cfg  printer-20240722_103855.cfg
printer-20240715_004050.cfg  printer-20240716_121817.cfg  printer-20240720_045436.cfg  printer-20240722_104020.cfg
printer-20240715_090534.cfg  printer-20240717_120039.cfg  printer-20240720_082700.cfg  printer.cfg
printer-20240715_090653.cfg  printer-20240717_120204.cfg  printer-20240720_082826.cfg  printer.cfg.1
printer-20240715_110611.cfg  printer-20240717_121126.cfg  printer-20240720_084519.cfg  printer_params.cfg
printer-20240715_110736.cfg  printer-20240717_122446.cfg  printer-20240720_084644.cfg  sensorless.cfg
printer-20240715_110737.cfg  printer-20240717_123552.cfg  printer-20240720_084645.cfg
printer-20240715_120625.cfg  printer-20240717_124451.cfg  printer-20240720_085131.cfg
printer-20240715_120751.cfg  printer-20240719_084004.cfg  printer-20240720_085250.cfg
jester@Ender3V3KE-95B8 /usr/data/printer_data/config [$] 

Woozers look at all the fun stuff but the file we are interested in here is the factory printer configuration file, so letā€™s print that to the screen so we can have a quick look at it. We will use the cat command meow, no we not going to meow at it, unless you want to :smile: The cat command isā€¦well go to that website I linked earlier and look at the man page for it. Basically we are going to print to the standard output which is the things your staring into right now, the monitor.

jester@Ender3V3KE-95B8 /usr/data/printer_data/config [$] cat factory_printer.cfg 
# Ender-3V3KE
# Printer_size: 220x220x240
# Version: v1.2.4
# CreateDate: 2023/08/30
# mcu: chip: GD32F303RET6
#      version: CR4NS200323C10
[include sensorless.cfg]
[include gcode_macro.cfg]
[include printer_params.cfg]
[mcu]
serial:/dev/ttyS1
baud:230400
restart_method: command

[force_move]
enable_force_move: True

[mcu rpi]
serial: /tmp/klipper_host_mcu

[bl24c16f]
i2c_mcu: rpi
i2c_bus: i2c.2
i2c_speed: 400000

######################################################
[prtouch_v2]
pres_cnt: 1                     #ęŽ¢ē‚¹ę¬”ꕰ
pres0_clk_pins: PA4             #åŽ‹åŠ›ę£€ęµ‹ę—¶é’Ÿå¼•č„šé…ē½®
pres0_sdo_pins: PC6             #åŽ‹åŠ›ę£€ęµ‹ę•°ę®å¼•č„šé…ē½®
step_swap_pin: PA15                 
pres_swap_pin: PA15
step_base:2
# show_msg: True
tri_min_hold: 1000      
tri_max_hold: 1500            #åŽ‹åŠ›ę£€ęµ‹äæ”ęÆ展ē¤ŗ
speed: 1
# tri_wave_ip: 172.22.30.204
#####################################################


[z_compensate]
tri_min_hold: 1400      
tri_max_hold: 2000            #åŽ‹åŠ›ę£€ęµ‹äæ”ęÆ展ē¤ŗ
tri_expand_mm = 0.13
# tri_min_hold: 3
speed: 5
hot_start_temp: 180#ę“¦å–·å˜“ę˜Æęœ€å°ęø©åŗ¦
hot_rub_temp: 200#ę“¦å–·å˜“ę˜Æęœ€å°ęø©åŗ¦
hot_end_temp: 140#ę“¦å–·å˜“ę˜Æęœ€å°ęø©åŗ¦
bed_add_temp: 60#č°ƒå¹³ę—¶ēš„ēƒ­åŗŠęø©åŗ¦
clr_noz_start_x: -3 #ę“¦å–·å¤“åŒŗ域ēš„čµ·å§‹xåę ‡ļ¼ˆé»˜č®¤åœØēƒ­åŗŠåŽę–¹ę­£äø­åæƒä½ē½®ļ¼‰
clr_noz_start_y: 20 #ę“¦å–·å¤“åŒŗ域ēš„čµ·å§‹yåę ‡
clr_noz_len_x: 3 #ę“¦å–·å¤“åŒŗ域ēš„xę–¹å‘ēš„é•æåŗ¦
clr_noz_len_y: 50 #ę“¦å–·å¤“åŒŗ域ēš„yę–¹å‘ēš„é•æåŗ¦
pa_clr_dis_mm_x = 0
pa_clr_dis_mm_y =30
# show_msg = True
bl_offset: 0,27
noz_pos_center: 20,25
noz_pos_offset: 3,7
pumpback_mm: 10
vs_start_z_pos: 3
pr_probe_cnt: 3
pr_clear_probe_cnt: 3
type_nozz = 0


[printer]
kinematics: cartesian
max_velocity: 500
max_accel: 8000
max_accel_to_decel: 2500
max_z_velocity: 30
square_corner_velocity: 5.0
max_z_accel: 300

[idle_timeout]
timeout: 99999999

[stepper_x]
step_pin: PC2
dir_pin: !PB9
enable_pin: !PC3
microsteps: 16
rotation_distance: 40
endstop_pin: !PA5
position_endstop: -13
position_min: -13
position_max: 220
homing_speed: 30
homing_retract_dist:0 #10

[tmc2208 stepper_x]
uart_pin:PB12
interpolate: True
run_current:0.75
sense_resistor: 0.150
stealthchop_threshold: 0


[stepper_y]
step_pin: PB8
dir_pin: PB7
enable_pin: !PC3
microsteps: 16
rotation_distance: 60
endstop_pin: !PA6
position_endstop: -20
position_min: -20
position_max: 225
homing_speed: 30
homing_retract_dist:0

[tmc2208 stepper_y]
uart_pin:PB13
interpolate: True
run_current:0.8
sense_resistor: 0.150
stealthchop_threshold: 0

[stepper_z]
step_pin: PB6
dir_pin: !PB5
enable_pin: !PC3
microsteps: 16
rotation_distance:8
endstop_pin:probe:z_virtual_endstop#PA15   #probe:z_virtual_endstop
position_max: 245
position_min: -5

[tmc2208 stepper_z]
uart_pin: PB14
interpolate: True
run_current: 0.8
stealthchop_threshold: 0
sense_resistor: 0.150


[bltouch]
sensor_pin:PC14
control_pin: PC13
x_offset: 0
y_offset: 27
z_offset: 0
probe_with_touch_mode: true
stow_on_each_sample: false
speed:5
lift_speed:20


[filament_switch_sensor filament_sensor]
switch_pin: !PC15
pause_on_runout: true

[output_pin MainBoardFan]
pin: !PB1

[extruder]
max_extrude_only_distance:1000
max_extrude_cross_section:80
pressure_advance = 0.036
step_pin: PB4
dir_pin: PB3
enable_pin: !PC3
microsteps: 16
rotation_distance: 7.53
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PA1
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC5
control = pid
pid_Kp=20.584 
pid_Ki=1.737 
pid_Kd=60.981
min_temp: 0
max_temp: 320 # Set to 300 for S1 Pro


[heater_bed]
heater_pin: PB2
sensor_type: EPCOS 100K B57560G104F 
sensor_pin: PC4
control = pid
pid_kp = 70.652
pid_ki = 1.798
pid_kd = 694.157
min_temp: 0
max_temp: 120 # 
temp_offset_flag = True

[verify_heater extruder]
[verify_heater heater_bed]
check_gain_time: 120
heating_gain: 1.0
hysteresis: 10

[temperature_sensor mcu_temp]
sensor_type: temperature_mcu
min_temp: 0
max_temp: 100

[output_pin fan0]
pin:PA0
pwm: True
cycle_time: 0.0100
hardware_pwm: false
value: 0.00
scale: 255
shutdown_value: 0.0

[heater_fan nozzle_fan]
pin: PC1
max_power: 1.0
shutdown_speed: 0
cycle_time: 0.010
hardware_pwm: False
kick_start_time: 0.100
off_below: 0.0
heater: extruder
fan_speed: 1.0
heater_temp: 60.0


[bed_mesh]
speed: 350
mesh_min: 5,10        #need to handle head distance with bl_touch
mesh_max: 215,215       #max probe range
probe_count: 5,5
fade_start: 1
fade_end: 10
fade_target: 0
horizontal_move_z: 8

[input_shaper]
shaper_type_y = mzv
shaper_freq_y = 32.0

shaper_type_x = mzv
shaper_freq_x = 27.5

[mcu rpi]
serial: /tmp/klipper_host_mcu

[adxl345]
cs_pin: rpi:None
spi_speed: 2000000
spi_bus: spidev2.0
axes_map: z,y,x

[resonance_tester]
accel_chip: adxl345
accel_per_hz: 70
probe_points: 117.5,117.5,100
max_freq: 90
jester@Ender3V3KE-95B8 /usr/data/printer_data/config [$] 

Bingoā€¦Jackpot!

I think that is enough for this session. I will be back after I investigate creating a user directory in the usr/data directory and linking that to our users home directory

Until then Sasha Cat says Meow! :smile_cat:

2 Likes

So in our last installment we discovered that we had approximately 5gb of usable space in the /usr/data directory. We also discovered this is where Creality is storing the system firmware image and we found the printer configuration file.

But we also wanted to see if we could create some space for our system user to be able to also store some files if needed. In this process we are going to get a great example of when we will need to switch users to the root user and then back to our standard system user. So lets get at itā€¦

Ok so we are going to need to create what is called a symbolic link from our new user directory to the traditional /home/your_user_name. But in order to do this we need to delete the original home/user directory as the symbolic link will create it for us.

jester@Ender3V3KE-95B8 /usr/data [$] mkdir /usr/data/jester
mkdir: can't create directory '/usr/data/jester': Permission denied
jester@Ender3V3KE-95B8 /home [$] su root
Password: 
/home # cd /
/ # rm -rf /home/jester
/ # ln -s /usr/data/jester /home/jester
/ # chown jester:jester /usr/data/jester
/ # chmod 700 /usr/data/jester
/ # ls -ld /usr/data/jester
drwx------    2 jester   jester        4096 Jul 28 09:11 /usr/data/jester
/ # exit

So here we tried to run an administrative task and the system told us to buzz off
ā€œmkdir: canā€™t create directory ā€˜/usr/data/jesterā€™: Permission deniedā€
So we had to su or ā€˜switch userā€™ to perform these tasks. Here is a quick rundown of what we accomplished.

    1.	su root: Switches to the root user.
	2.	rm -rf /home/jester: Removes the existing /home/jester directory (if it existed).
	3.	ln -s /usr/data/jester /home/jester: Creates a symbolic link at /home/jester that points to /usr/data/jester.
	4.	chown jester:jester /usr/data/jester: Changes the ownership of the /usr/data/jester directory to the user jester and the group jester.
	5.	chmod 700 /usr/data/jester: Sets the permissions on /usr/data/jester so that only the owner (jester) can read, write, and execute.
	6.	ls -ld /usr/data/jester: Lists the details of the /usr/data/jester directory, confirming the permissions and ownership.

So now letā€™s try to get some data into our user directory. So I am going to create a text document using vi and I am also going to see if we can transfer files off a usb stick into our directory.

jester@Ender3V3KE-95B8 /home/jester [$] vi Sasha_Cat
jester@Ender3V3KE-95B8 /home/jester [$] ls
Sasha_Cat
jester@Ender3V3KE-95B8 /home/jester [$] cat Sasha_Cat 

Hello, this file was created by Shasha Cat

We are using this as a simple test file to see if we
are able to use the system as expected.

Thanks for reading! :)


jester@Ender3V3KE-95B8 /home/jester [$] 

Now lets verify that it is also showing in the /usr/data/jester folder

jester@Ender3V3KE-95B8 /home/jester [$] ls -l /usr/data/jester/
total 4
-rw-r--r--    1 jester   jester         164 Jul 28 10:00 Sasha_Cat

Beautiful, now letā€™s see if we can copy the ā€˜benchyā€™ file off the factory usb drive and move it to our personal user directory.

Oh ya, real quick, my badā€¦if your screen is full of text and you want to clear it and have a ā€˜freshā€™ screen, just type clear into the command prompt.

Ok this got a little advanced and I am getting kinda fried myself. Ok I plugged the usb device into the printer console usb port and it brought up the boat g-code file so I know it is reading it, but the trick was to find it as it would normally mount under media, but we have to remember this is busy box running on limited hardware so lets find our usb stick using the df command as it will show all the drives and viola!

jester@Ender3V3KE-95B8 /mnt [$] df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root               109.9M    109.9M         0 100% /rom
devtmpfs                 98.4M         0     98.4M   0% /dev
tmpfs                    98.5M      4.0K     98.5M   0% /dev/shm
tmpfs                    98.5M    424.0K     98.1M   0% /tmp
tmpfs                    98.5M    208.0K     98.3M   0% /run
/dev/mmcblk0p9          290.5M      2.6M    272.9M   1% /overlay
overlayfs:/overlay      290.5M      2.6M    272.9M   1% /
/dev/mmcblk0p10           5.9G    641.5M      5.0G  11% /usr/data
/dev/sda1                14.6G    832.2M     13.8G   6% /tmp/udisk/sda1

Itā€™s listed last in the list as /dev/sda1, mounted as /tmp/udisk/sda1. So letā€™s go get it!

jester@Ender3V3KE-95B8 /mnt [$] cd /tmp/udisk/sda1/
jester@Ender3V3KE-95B8 /tmp/udisk/sda1 [$] ls
1-Boat.gcode                                    System Volume Information
Ender-3 V3 KE _supplementary files_EN_V1.3.zip
jester@Ender3V3KE-95B8 /tmp/udisk/sda1 [$] cp 1-Boat.gcode /home/jester/
jester@Ender3V3KE-95B8 /tmp/udisk/sda1 [$] cd /home/jester/
jester@Ender3V3KE-95B8 /home/jester [$] ls
1-Boat.gcode  Sasha_Cat
jester@Ender3V3KE-95B8 /home/jester [$] 

Now for the ultimate test, lets unplug the usb stick, log out, turn off the printer, restart the printer and log back in, will all of this work?

Until next episode :smile_cat:

2 Likes

Wait, is it time again, it is in fact another episode of Getting Deep and Dirty going Full Root on the KE!

So over the last several posts we have changed the default root password, created a standard system user, discovered we have usable space on the printers storage, created a user folder, set permissions, made text files, copied a g-code file from a usb stick attached to the printer to the users directory. Our last challenge was to shut down the printer which wipes all temp files and rewrites the busy box linux system from scratch everytime, did our user space files survive?

Lets find out:

jester@Ender3V3KE-95B8 /home/jester [$] client_loop: ssh_packet_write_poll: Connection to 192.168.xxx.xxx port 22: Host is down
unknown@unknown-imac ~ % ssh jester@192.168.xxx.xxx
jester@192.168.xxx.xxx's password: 
jester@Ender3V3KE-95B8 /usr/data/jester [$] ls
1-Boat.gcode  Sasha_Cat
jester@Ender3V3KE-95B8 /usr/data/jester [$] cd /home/jester/
jester@Ender3V3KE-95B8 /home/jester [$] ls
1-Boat.gcode  Sasha_Cat
jester@Ender3V3KE-95B8 /home/jester [$] 

So our files did in fact survive, we do have live user storage and this confirms our file ownership and permissions settings and our symbolic link to our virtual /home/jester directory.

This is a huge step in owner our printer, we are in command now and we have secured it from mishap by not running around as root. So now what, well anything really. You have full command of the linux subsystem of your printer now.

I think some things we could do are make a back up of the printer config file and clean it up to remove all the Chinese characters to make the file your own. This is where you would make all your modifications, at least that is what I am in belief of.

I am editing this later in the evening, one thing that was bugging me was the timezone was set to central time and I am on pacific time, so it needs to be updated manually. There is a list of timezones available to the system that we need to see to make sure we get the right spelling.

jester@Ender3V3KE-95B8 /etc [$] cd /usr/share/zoneinfo/US
jester@Ender3V3KE-95B8 /usr/share/zoneinfo/US [$] ls
Alaska          Arizona         East-Indiana    Hawaii          Michigan        Pacific         Samoa
Aleutian        Central         Eastern         Indiana-Starke  Mountain        Pacific-New

Now we can actually make the change, this is another moment that we will need to su (switch user) to the root account. We will need to delete the existing config file in the /etc directory and setup a new symbolic link, we also want to make sure ntpd (network time protocol daemon) is running so letā€™s walk through it.

jester@Ender3V3KE-95B8 / [$] su root
Password: 
/ # rm /etc/localtime
/ # ln -s /usr/share/zoneinfo/US/Pacific /etc/localtime
/ # date
Sat Jul 27 21:19:44 PDT 2024
/ # ps aux | grep ntpd
 1157 root      0:00 /usr/sbin/ntpd -g
/ # exit
jester@Ender3V3KE-95B8 / [$]

Beautiful, we got the proper timezone and we are currently connected to time servers to update the correct time.

Ok I did find some juicy stuff in the /etc/init.d folder. init.d is the initialization daemon and it was the default way for Linux to start. Linux now uses systemd to initialize, but in a minimal system such as this init.d works great.

Here is some of what I found so farā€¦these are all shell scripts and run in order of numbering. These are what tells the system to do at startup.

jester@Ender3V3KE-95B8 /etc/init.d [$] ls
S01hostname                  S11module_driver_default     S41bt_bsa_download_firmware  S70cx_ai_middleware
S01syslogd                   S12boot_display              S43wifi_bcm_init_config      S96wipe_data
S02klogd                     S12udev                      S44wifi_bcm_up               S97webrtc
S02mount_mmc_ext4            S13board_init                S45ifplugd                   S98swap
S03ubusd                     S13mcu_update                S49ntp                       S99mdns
S04device_manager            S20urandom                   S50dropbear                  S99start_app
S05cpu_reg                   S30dbus                      S55klipper_service           rcK
S11jpeg_display_shell        S40network                   S57klipper_mcu               rcS

Found this little tidbit under the hostname file

 "F005")
                model="Ender3V3KE"

Then I found this tidbit in the 'mcu_update script and had a ā€˜ahaā€™ momentā€¦

"NEBULA V1.0.0.1")
            if [ "$model" = "F005" ]; then
                mcu0_serial=/dev/ttyS1
                fw_dir=F005

So I am wondering if I did want to send a g-code file directly from command line, would it be as simple as $] cat /home/jester/boat.gcode > /dev/ttyS1

Hmm, my printer is down for mechanicals at the moment although I am still able to keep it powered up and connected. This will be interesting to try to print directly from onboard file to printer.

Some other tidbits I found in the same file:

PROG=/usr/bin/mcu_util
VERSION_FILE=/tmp/.mcu_version
LOG_FILE=/tmp/mcu_update.log
KLIPPER_DIR=/usr/share/klipper
FW_ROOT_DIR=$KLIPPER_DIR/fw

Now we know where klipper files live, /usr/share/klipper

Anyways, I would enjoy hearing what you think of this whole adventure in rooting the KE printer. Useful or a waste of time?

Cheers, until next time :smile_cat:

3 Likes

Mucho thanks for posting this incredibly detailed account of your experience dissecting the scripts involved in rooting the KE.

Although you lost me at " Hello from the new guy" I am impressed and for sure members will be able to take away a lot of your info to useā€¦
Thank you again @Sasha_Cat ā€¦

1 Like

Ok so I have had some more adventures tonight. I am trying to figure out how the start up logos are displayed on the nebula touch pad. I did figure out how some of it works but I have failed to get my cats picture to display. :smile_cat:

Speaking of which I have been able to use the rsync command to transfer files back and forth between the iMac and the printer. The rsync version on the printer is quite out of date so it wonā€™t use compression which is no big deal as these are all small files. So to transfer files from the printer to the computer would look something like this: (This is running the command from the desktop)

rsync -av -e ssh username@192.168.xxx.xxx:/usr/data/creality/printer.cfg ~/Desktop/Ender3_files

To upload files from the desktop to the printer, again from the computer we would use for the following:

rsync -av -e shh ~/Desktop/photos/shasha_cat.jpg jester@192.168.xxx.xxx:/usr/data/jester_files

Typically we would use -avz the z being for standard compression but my computer was not having it and complained the version on the printer was out of date, which is very likely.

There has been some difficulty with some files because an obvious windows user is has named several files/directories in lazy windows format as opposed to linux/unix standards. So this might look something like thisā€¦ my Creality printer v3 ke.boo.

For one, this breaks tab auto complete, two linux/unix just doesnā€™t recognize it so its impossible to type the file name since you cannot have spaces in file or directory names in linux/unix. So that same file in Linux/Unix would be named my_Creality_printer_v3-ke.boo

That is proper naming convention, so to get around the sloppy file names you need enclose the file name in quote ā€œsloppy file name.booā€ and then you can move on. Anyways moving onā€¦

Oh ya, I do believe that I have found the particular printer config file that is being called within Klipper. I ran a check of the running processes and found the following process running and it gives the path to the file being called.

 jester@Ender3V3KE-95B8 / [$] ps | grep klipp
 1227 root      0:33 /usr/share/klippy-env/bin/python /usr/share/klipper/klippy/klippy.py /usr/data/printer_data/config/printer.cfg -l /usr/data/printer_data/logs/klippy.log -a /tmp/klippy_uds

Next up I want to change the hostname, just hoping it doesnā€™t break anything.

Also today I did some mechanicals, I pulled the bed plate system to pieces to reset the base z height and eliminate all the plastic stand offs.

Thatā€™s all I got for tonight, until next time, :smile_cat:

1 Like

Super helpful thread. Thank you for posting, @Sasha_Cat.

Here is a tip Iā€™ve learned along the way for monitoring my Ender-3 V3 KE over ssh:

Monitoring printer temperatures
Tail the klippy log file and trim the lines containing heater_bed:

tail -n 100 -f /usr/data/printer_data/logs/klippy.log | sed s/".*heater_bed"/heater_bed/

This should print out lines that look like the following:

heater_bed: target=50 temp=50.0 pwm=0.192 mcu_temp: temp=42.2 sysload=0.72 cputime=3848.536 memavail=129656 print_time=40028.825 buffer_time=2.888 print_stall=0 extruder: target=220 temp=220.0 pwm=0.376
heater_bed: target=50 temp=50.0 pwm=0.192 mcu_temp: temp=42.3 sysload=0.72 cputime=3848.675 memavail=129440 print_time=40031.099 buffer_time=4.161 print_stall=0 extruder: target=220 temp=220.0 pwm=0.376
heater_bed: target=50 temp=50.0 pwm=0.192 mcu_temp: temp=42.3 sysload=0.72 cputime=3848.740 memavail=129696 print_time=40031.099 buffer_time=3.160 print_stall=0 extruder: target=220 temp=220.0 pwm=0.345

In the above lines you can see:

  • The hotbed is targeted to be 50ĀŗC (and it is 50.0ĀŗC)
  • The print head is targeted to be 220ĀŗC (which it is, too!)
  • The pwm values after hotbed and print head temperatures is the % that the heating element is engaged. (pwm of 1 = 100% power to a particular heater)
  • The MCU temperature refers to the board inside the printer, which should be under 80ĀŗC at all times. (Iā€™m not sure of the official limit, but Iā€™ve rarely seen mine hit 50ĀŗC)

While printing, youā€™ll also see debug info like the following:

[INFO] 2024-08-07 20:29:08,927 [root] [klippy:set_rollover_info:293] toolhead: max_velocity: 500.000000
max_accel: 5000.000000
max_accel_to_decel: 1250.000000
square_corner_velocity: 10.000000
[INFO] 2024-08-07 20:29:13,319 [root] [clocksync:_handle_clock:100] Resetting prediction variance 39854.462: freq=119998967 diff=-66931 stddev=10122.108

This might be useful, but I havenā€™t inferred much from these messages yet.

To see everything in the klippy log, simply remove the sed filter and make the number of lines really big:

tail -n 100000 -f /usr/data/printer_data/logs/klippy.log

You can also print the entire file to the screen by con-cat-enating it out the screen:

cat /usr/data/printer_data/logs/klippy.log

I put commands like these into aliases, which is handy for referencing when I havenā€™t done this in awhile.

Create a file in your home directory called .profile. Iā€™m simply using the root account, so I create this file in /root:

root@ken /root [#] vi .profile

Add one line per command that youā€™d like to ā€œbookmarkā€. (press i to start inserting text in vi):

alias l1='tail -n 100 -f /usr/data/printer_data/logs/klippy.log | sed s/".*heater_bed"/heater_bed/'
alias ll='ls -lah'

Save your file by pressing [ESC] and then type :wq.

Log out and back in (which should force the shell to load your newly created .profile) and see all of your aliases by typing alias.

root@ken /root [#] alias

l1='tail -n 100 -f /usr/data/printer_data/logs/klippy.log | sed s/".*heater_bed"/heater_bed/'

ll='ls -lah'

Then, simply type the alias instead of the long command when you want to quickly poke at your logs:

root@ken /root [#] l1
heater_bed: target=0 temp=39.1 pwm=0.000 mcu_temp: temp=34.9 sysload=0.15 cputime=3879.397 memavail=129436 print_time=40218.563 buffer_time=0.000 print_stall=0 extruder: target=0 temp=57.8 pwm=0.000

Thatā€™s it for now! Iā€™ll add more later.

-Brian from Michigan

2 Likes

Hot Damn, a fellow Linux user emerges to drop some knowledge. I hadnā€™t thought about polling the log files, great work and a very valuable post.

I tried your command in a quick copy paste and I got a ton of extra information that is not shown in your example output.

Mind you the printer is sitting idle so the temps are very low with no pwm command on the heaters. I do find the bed mesh data interesting and a hard date of March 1st 2020.

I am going to have to play around with this for a while and see if I can get it to pull more specific data and perhaps even send the command to the background and poll the data in time intervals and

jester@Sasha_Cat3D-KE /usr/data/jester [$] tail -n 100 -f /usr/data/printer_data/logs/klippy.log | sed s/".*heater_bed"/
heater_bed/
[INFO] 2020-03-01 04:00:15,535 [root] [mcu:_send_config:712] Sending MCU 'mcu' printer configuration...
[INFO] 2020-03-01 04:00:15,554 [root] [serialhdl:handle_output:301] mcu 'mcu': #output: allocMax=3804 usedMax=0
[INFO] 2020-03-01 04:00:15,563 [root] [mcu:_connect:785] Configured MCU 'mcu' (3794 moves)
[INFO] 2020-03-01 04:00:15,569 [root] [mcu:_send_config:712] Sending MCU 'rpi' printer configuration...
[INFO] 2020-03-01 04:00:15,575 [root] [serialhdl:handle_output:301] mcu 'rpi': #output: allocMax=4096 usedMax=0
[INFO] 2020-03-01 04:00:15,578 [root] [mcu:_connect:785] Configured MCU 'rpi' (4086 moves)
[INFO] 2020-03-01 04:00:15,580 [root] [bl24c16f:_init_bl24c16f:228] bl24c16f init...
[INFO] 2020-03-01 04:00:15,580 [root] [tmc:_handle_connect:376] Enabling TMC virtual enable for 'stepper_x'
[INFO] 2020-03-01 04:00:15,647 [root] [tmc:_handle_connect:376] Enabling TMC virtual enable for 'stepper_y'
[INFO] 2020-03-01 04:00:15,713 [root] [tmc:_handle_connect:376] Enabling TMC virtual enable for 'stepper_z'
heater_bed
[INFO] 2020-03-01 04:00:16,780 [root] [verify_heater:handle_connect:40] Starting heater checks for extruder
[INFO] 2020-03-01 04:00:16,780 [root] [bed_mesh:print_generated_points:430] bed_mesh: generated points
Index |  Tool Adjusted  |   Probe
[INFO] 2020-03-01 04:00:16,781 [root] [bed_mesh:print_generated_points:435]   0   | (5.0, -17.0)    | (5.0, 10.0)
[INFO] 2020-03-01 04:00:16,781 [root] [bed_mesh:print_generated_points:435]   1   | (57.5, -17.0)   | (57.5, 10.0)
[INFO] 2020-03-01 04:00:16,782 [root] [bed_mesh:print_generated_points:435]   2   | (110.0, -17.0)  | (110.0, 10.0)
[INFO] 2020-03-01 04:00:16,782 [root] [bed_mesh:print_generated_points:435]   3   | (162.5, -17.0)  | (162.5, 10.0)
[INFO] 2020-03-01 04:00:16,783 [root] [bed_mesh:print_generated_points:435]   4   | (215.0, -17.0)  | (215.0, 10.0)
[INFO] 2020-03-01 04:00:16,783 [root] [bed_mesh:print_generated_points:435]   5   | (215.0, 34.2)   | (215.0, 61.2)
[INFO] 2020-03-01 04:00:16,784 [root] [bed_mesh:print_generated_points:435]   6   | (162.5, 34.2)   | (162.5, 61.2)
[INFO] 2020-03-01 04:00:16,784 [root] [bed_mesh:print_generated_points:435]   7   | (110.0, 34.2)   | (110.0, 61.2)
[INFO] 2020-03-01 04:00:16,785 [root] [bed_mesh:print_generated_points:435]   8   | (57.5, 34.2)    | (57.5, 61.2)
[INFO] 2020-03-01 04:00:16,786 [root] [bed_mesh:print_generated_points:435]   9   | (5.0, 34.2)     | (5.0, 61.2)
[INFO] 2020-03-01 04:00:16,787 [root] [bed_mesh:print_generated_points:435]   10  | (5.0, 85.5)     | (5.0, 112.5)
[INFO] 2020-03-01 04:00:16,787 [root] [bed_mesh:print_generated_points:435]   11  | (57.5, 85.5)    | (57.5, 112.5)
[INFO] 2020-03-01 04:00:16,788 [root] [bed_mesh:print_generated_points:435]   12  | (110.0, 85.5)   | (110.0, 112.5)
[INFO] 2020-03-01 04:00:16,788 [root] [bed_mesh:print_generated_points:435]   13  | (162.5, 85.5)   | (162.5, 112.5)
[INFO] 2020-03-01 04:00:16,789 [root] [bed_mesh:print_generated_points:435]   14  | (215.0, 85.5)   | (215.0, 112.5)
[INFO] 2020-03-01 04:00:16,789 [root] [bed_mesh:print_generated_points:435]   15  | (215.0, 136.8)  | (215.0, 163.8)
[INFO] 2020-03-01 04:00:16,790 [root] [bed_mesh:print_generated_points:435]   16  | (162.5, 136.8)  | (162.5, 163.8)
[INFO] 2020-03-01 04:00:16,790 [root] [bed_mesh:print_generated_points:435]   17  | (110.0, 136.8)  | (110.0, 163.8)
[INFO] 2020-03-01 04:00:16,791 [root] [bed_mesh:print_generated_points:435]   18  | (57.5, 136.8)   | (57.5, 163.8)
[INFO] 2020-03-01 04:00:16,791 [root] [bed_mesh:print_generated_points:435]   19  | (5.0, 136.8)    | (5.0, 163.8)
[INFO] 2020-03-01 04:00:16,792 [root] [bed_mesh:print_generated_points:435]   20  | (5.0, 188.0)    | (5.0, 215.0)
[INFO] 2020-03-01 04:00:16,792 [root] [bed_mesh:print_generated_points:435]   21  | (57.5, 188.0)   | (57.5, 215.0)
[INFO] 2020-03-01 04:00:16,793 [root] [bed_mesh:print_generated_points:435]   22  | (110.0, 188.0)  | (110.0, 215.0)
[INFO] 2020-03-01 04:00:16,794 [root] [bed_mesh:print_generated_points:435]   23  | (162.5, 188.0)  | (162.5, 215.0)
[INFO] 2020-03-01 04:00:16,794 [root] [bed_mesh:print_generated_points:435]   24  | (215.0, 188.0)  | (215.0, 215.0)
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=25.7 sysload=0.81 cputime=5.838 memavail=153412 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
[INFO] 2020-03-01 04:00:17,686 [root] [webhooks:set_client_info:202] webhooks client 1980194720: Client info {'program': 'c440x', 'version': 'V1.1.0.14'}
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=25.6 sysload=0.81 cputime=5.862 memavail=152372 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
[INFO] 2020-03-01 04:00:17,895 [root] [webhooks:_handle_rpc_registration:384] webhooks: registering remote method 'shutdown_machine' for connection id: 1980194720
[INFO] 2020-03-01 04:00:17,998 [root] [webhooks:_handle_rpc_registration:384] webhooks: registering remote method 'reboot_machine' for connection id: 1980194720
[INFO] 2020-03-01 04:00:18,101 [root] [webhooks:_handle_rpc_registration:384] webhooks: registering remote method 'pause_job_queue' for connection id: 1980194720
[INFO] 2024-08-08 21:45:18,432 [root] [webhooks:_handle_rpc_registration:384] webhooks: registering remote method 'start_job_queue' for connection id: 1980194720
[INFO] 2024-08-08 21:45:18,534 [root] [webhooks:_handle_rpc_registration:384] webhooks: registering remote method 'timelapse_newframe' for connection id: 1980194720
[INFO] 2024-08-08 21:45:18,659 [root] [webhooks:_handle_rpc_registration:384] webhooks: registering remote method 'timelapse_saveFrames' for connection id: 1980194720
[INFO] 2024-08-08 21:45:18,760 [root] [webhooks:_handle_rpc_registration:384] webhooks: registering remote method 'timelapse_render' for connection id: 1980194720
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=25.8 sysload=0.81 cputime=5.906 memavail=151976 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed': None, 'temperature_sensor mcu_temp': None, 'output_pin fan0': None, 'heater_fan nozzle_fan': None, 'bed_mesh': None, 'motion_report': None, 'query_endstops': None, 'system_stats': None, 'manual_probe': None, 'toolhead': None, 'extruder': None}
[INFO] 2024-08-08 21:45:19,168 [root] [webhooks:_handle_query:552] _handle_query before complete.wait
heater_bed': {'temperature': 22.22, 'target': 0.0, 'power': 0.0}, 'temperature_sensor mcu_temp': {'temperature': 25.75, 'measured_min_temp': 25.6, 'measured_max_temp': 25.75}, 'output_pin fan0': {'value': 0.0}, 'heater_fan nozzle_fan': {'speed': 0.0, 'rpm': None}, 'bed_mesh': {'profile_name': 'default', 'mesh_min': (5.0, 10.010000000000002), 'mesh_max': (215.0, 215.0), 'probed_matrix': [[-0.0325, 0.0375, 0.145, 0.2075, 0.2375], [-0.0725, -0.0125, 0.0725, 0.1175, 0.1825], [-0.0575, -0.0525, -0.01, 0.04, 0.1225], [-0.075, -0.0775, -0.0925, -0.095, -0.005], [-0.035, -0.06, -0.125, -0.16, -0.11]], 'mesh_matrix': [[-0.0325, -0.022335, 0.003189, 0.0375, 0.075195, 0.112047, 0.145, 0.172171, 0.19285, 0.2075, 0.217757, 0.22643, 0.2375], [-0.06465, -0.049234, -0.018643, 0.019105, 0.057712, 0.092601, 0.120916, 0.141521, 0.155002, 0.163663, 0.17153, 0.184349, 0.209588], [-0.074712, -0.061153, -0.032708, 0.002654, 0.038736, 0.07111, 0.097119, 0.11588, 0.128276, 0.136965, 0.146373, 0.162698, 0.193909], [-0.0725, -0.064434, -0.042088, -0.0125, 0.018837, 0.047973, 0.0725, 0.091553, 0.105813, 0.1175, 0.130381, 0.149763, 0.1825], [-0.065638, -0.063969, -0.049097, -0.026728, -0.00136, 0.023722, 0.04644, 0.065929, 0.08253, 0.097798, 0.114496, 0.136595, 0.16928], [-0.059558, -0.063198, -0.055276, -0.040123, -0.021179, -0.000983, 0.018817, 0.037472, 0.055129, 0.072829, 0.092511, 0.117008, 0.150051], [-0.0575, -0.064115, -0.061399, -0.0525, -0.039887, -0.02535, -0.01, 0.00573, 0.022088, 0.04, 0.06107, 0.087582, 0.1225], [-0.060514, -0.067262, -0.067471, -0.063395, -0.056698, -0.048454, -0.039146, -0.02867, -0.016331, -0.000844, 0.019665, 0.04766, 0.086193], [-0.067459, -0.07173, -0.072725, -0.072068, -0.070772, -0.06924, -0.067263, -0.064023, -0.058088, -0.047418, -0.02936, -0.000651, 0.042582], [-0.075, -0.075165, -0.075628, -0.0775, -0.081214, -0.086523, -0.0925, -0.097541, -0.099362, -0.095, -0.080813, -0.052479, -0.005], [-0.077613, -0.073758, -0.073874, -0.078395, -0.087075, -0.098984, -0.11251, -0.125359, -0.134552, -0.13643, -0.126651, -0.100189, -0.051337], [-0.067582, -0.062256, -0.06439, -0.073179, -0.087352, -0.105176, -0.124455, -0.142529, -0.156275, -0.162109, -0.155981, -0.13338, -0.089331], [-0.035, -0.033951, -0.043333, -0.06, -0.080988, -0.103519, -0.125, -0.143025, -0.15537, -0.16, -0.155062, -0.138889, -0.11]], 'profiles': {'default': {'points': ((-0.0325, 0.0375, 0.145, 0.2075, 0.2375), (-0.0725, -0.0125, 0.0725, 0.1175, 0.1825), (-0.0575, -0.0525, -0.01, 0.04, 0.1225), (-0.075, -0.0775, -0.0925, -0.095, -0.005), (-0.035, -0.06, -0.125, -0.16, -0.11)), 'mesh_params': OrderedDict([('min_x', 5.0), ('max_x', 215.0), ('min_y', 10.010000000000002), ('max_y', 215.0), ('x_count', 5), ('y_count', 5), ('mesh_x_pps', 2), ('mesh_y_pps', 2), ('algo', 'lagrange'), ('tension', 0.2)])}}}, 'motion_report': {'live_position': Coord(x=0.0, y=0.0, z=0.0, e=0.0), 'live_velocity': 0.0, 'live_extruder_velocity': 0.0, 'steppers': ['extruder', 'stepper_x', 'stepper_y', 'stepper_z'], 'trapq': ['extruder', 'toolhead']}, 'query_endstops': {'last_query': {}}, 'system_stats': {'sysload': 0.81, 'cputime': 5.906446333, 'memavail': 151976}, 'manual_probe': {'is_active': False, 'z_position': None, 'z_position_lower': None, 'z_position_upper': None}, 'toolhead': {'homed_axes': '', 'axis_minimum': Coord(x=-12.0, y=-20.0, z=-5.0, e=0.0), 'axis_maximum': Coord(x=221.0, y=223.0, z=246.0, e=0.0), 'print_time': 0.013400119681782757, 'stalls': 0, 'estimated_print_time': 12.686453283333334, 'extruder': 'extruder', 'position': Coord(x=0.0, y=0.0, z=0.0, e=0.0), 'max_velocity': 500.0, 'max_accel': 8000.0, 'max_accel_to_decel': 2500.0, 'square_corner_velocity': 5.0}, 'extruder': {'temperature': 22.47, 'target': 0.0, 'power': 0.0, 'can_extrude': False, 'pressure_advance': 0.036, 'smooth_time': 0.04}}}
heater_bed: target=0 temp=22.3 pwm=0.000 mcu_temp: temp=25.7 sysload=0.99 cputime=5.987 memavail=147056 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.4 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=25.8 sysload=0.99 cputime=6.021 memavail=146924 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=25.8 sysload=0.99 cputime=6.053 memavail=146832 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.4 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=25.8 sysload=0.99 cputime=6.081 memavail=146868 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=25.9 sysload=0.99 cputime=6.108 memavail=146872 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.3 pwm=0.000 mcu_temp: temp=25.9 sysload=0.91 cputime=6.136 memavail=146812 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=25.9 sysload=0.91 cputime=6.165 memavail=146736 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=26.0 sysload=0.91 cputime=6.193 memavail=145320 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=25.9 sysload=0.91 cputime=6.222 memavail=145668 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=26.1 sysload=0.91 cputime=6.254 memavail=142056 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=26.1 sysload=0.92 cputime=6.282 memavail=143800 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=26.0 sysload=0.92 cputime=6.310 memavail=144052 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=26.1 sysload=0.92 cputime=6.340 memavail=144088 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=26.2 sysload=0.92 cputime=6.368 memavail=144088 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=26.1 sysload=0.92 cputime=6.396 memavail=144100 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.3 pwm=0.000 mcu_temp: temp=26.1 sysload=0.84 cputime=6.424 memavail=144232 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=26.1 sysload=0.84 cputime=6.451 memavail=144176 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=26.2 sysload=0.84 cputime=6.479 memavail=144244 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=26.3 sysload=0.84 cputime=6.507 memavail=144248 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=26.3 sysload=0.84 cputime=6.537 memavail=143836 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=26.3 sysload=0.77 cputime=6.564 memavail=143956 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=26.4 sysload=0.77 cputime=6.592 memavail=144152 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.3 pwm=0.000 mcu_temp: temp=26.3 sysload=0.77 cputime=6.619 memavail=144172 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=26.4 sysload=0.77 cputime=6.647 memavail=144176 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.3 pwm=0.000 mcu_temp: temp=26.4 sysload=0.77 cputime=6.675 memavail=144176 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=26.4 sysload=0.71 cputime=6.702 memavail=144184 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.3 pwm=0.000 mcu_temp: temp=26.5 sysload=0.71 cputime=6.730 memavail=144184 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=26.5 sysload=0.71 cputime=6.757 memavail=144196 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=26.5 sysload=0.71 cputime=6.784 memavail=144200 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.4 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=26.5 sysload=0.71 cputime=6.813 memavail=144004 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.3 pwm=0.000 mcu_temp: temp=26.6 sysload=0.65 cputime=6.842 memavail=144084 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=26.5 sysload=0.65 cputime=6.868 memavail=144088 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=26.6 sysload=0.65 cputime=6.897 memavail=144092 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=26.6 sysload=0.65 cputime=6.924 memavail=144096 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=26.6 sysload=0.65 cputime=6.951 memavail=144096 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=26.6 sysload=0.60 cputime=6.978 memavail=144100 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=26.7 sysload=0.60 cputime=7.006 memavail=144104 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.3 pwm=0.000 mcu_temp: temp=26.6 sysload=0.60 cputime=7.033 memavail=144108 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=26.7 sysload=0.60 cputime=7.060 memavail=144112 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=26.7 sysload=0.60 cputime=7.088 memavail=144112 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=26.7 sysload=0.87 cputime=7.116 memavail=144048 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=26.8 sysload=0.87 cputime=7.143 memavail=144052 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.4 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=26.7 sysload=0.87 cputime=7.171 memavail=144056 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=26.8 sysload=0.87 cputime=7.198 memavail=144060 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=26.8 sysload=0.87 cputime=7.226 memavail=144060 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000
heater_bed: target=0 temp=22.2 pwm=0.000 mcu_temp: temp=26.8 sysload=0.80 cputime=7.254 memavail=144064 print_time=0.013 buffer_time=0.000 print_stall=0 extruder: target=0 temp=22.5 pwm=0.000

Ok so I wanted to update this entire post and rewrite it for clarity and to update with new information.

So I followed bkelllyā€™s very useful information and created a .profile for my user ā€˜jesterā€™ and I was able to include an alias to the script that chat gpt helped me write. So in this post I am going to post up the script that will pull temperature data directly from the klipper data log.

What I found was that as long as the printer was in operation it will be updating the log file, but once that operation is over it will not continue to update the log file. For instance I ran a print and once it presented the print that was the last update to the log file. So if you run the temperature script an hour later you are not getting the current temps. How to force an update to the log file without interrupting the printer in the middle of operations is something to investigate. So far in the last hour I have not been able to figure this out except to force a restart of the klipper service which would be disastrous if the printer was in the middle of a print operation.

Now the web interface is getting current temps all the time so I am not sure how the web interface is working and how to access those apiā€™s but now its just getting complicated.

For now lets just check out the script that will pull the temp data from the existing log file.

jester@Sasha_Cat3D-KE /usr/data/jester [$] cat parse_temperatures.sh

#!/bin/sh

# Define the path to the log file
LOG_FILE="/usr/data/printer_data/logs/klippy.log"

# Use tail to get the last lines and pipe it to awk
tail -n 1 "$LOG_FILE" | awk '
{
  heater_bed_temp = "";
  mcu_temp = "";
  extruder_temp = "";
  
  if ($0 ~ /heater_bed:/) {
    split($0, arr, " ");
    for (i=1; i<=length(arr); i++) {
      if (arr[i] ~ /heater_bed:/) {
        heater_bed_temp = substr(arr[i+2], 6);
      }
    }
  }
  
  if ($0 ~ /mcu_temp:/) {
    split($0, arr, " ");
    for (i=1; i<=length(arr); i++) {
      if (arr[i] ~ /mcu_temp:/) {
        mcu_temp = substr(arr[i+1], 6);
      }
    }
  }
  
  if ($0 ~ /extruder:/) {
    split($0, arr, " ");
    for (i=1; i<=length(arr); i++) {
      if (arr[i] ~ /extruder:/) {
        extruder_temp = substr(arr[i+2], 6);
        if (heater_bed_temp != "" && mcu_temp != "" && extruder_temp != "") {
          print "";
          print "heater_bed_temp=" heater_bed_temp ", mcu_temp=" mcu_temp ", extruder_temp=" extruder_temp;
          print "";
        }
      }
    }
  }
}'

Ready for the exciting output? :smile_cat:

jester@Sasha_Cat3D-KE /usr/data/jester [$] temp

heater_bed_temp=46.3, mcu_temp=38.7, extruder_temp=50.0

You will notice that the command is simply ā€œtempā€ as has been configured in my .profile as an alias to the /usr/bin/parse_temperatures.sh shell script.

So the script is using the tail command to poll the last single line of log data, tail -n 1, then we pipe that to the awk command and then tell awk what we want.

What the hell is awk you might ask? I will let our friend ol chatty boy give a brief description.

awk is a command-line tool used in Unix/Linux systems for processing and analyzing text files. It reads through lines of text and performs operations based on patterns or rules you specify. Itā€™s often used for tasks like extracting specific fields from data, performing calculations, and formatting output.

For those interested, and overview and historical data is here:

For an users manual spanning hundreds of pages of mind altering knowledge, here is the link for that as well:

Alright that enough for this evening.

1 Like

Incredible write up, this appeals to all xp levels and I learnt so much by only skimming each post. Thank you thank you, I feel less hopeless :rocket: Hereā€™s for the bestā€‹:pray:

Nice write-up. Even though I knew much of it, I learned something.
A look at S01hostname was interesting. I changed my hostname to simply ā€œenderā€ (all lower case) and now access the printer with mDNS as ā€œender.localā€. Having upper-case characters in the hostname caused issues in the browser. ping always workedā€¦

I was not able to figure out how to set a static IP for wlan0. Has anybody else?

1 Like

Either through your router settings or you can edit /etc/network/interfaces. Mine looks like this:

iface lo inet loopback

auto wlan0
iface wlan0 inet static
  pre-up /etc/network/nfs_check
  wait-delay 15
  address 192.168.1.10
  netmask 255.255.255.0
  gateway 192.168.1.1
  dns-nameservers 192.168.1.12
  hostname $(hostname)

There is actually a package manager on the ke called opkg, so you can install an editor such as nano if you dont like vi.

There is no package manager in busybox. You must have installed Entware to get opkg. Also, the /etc/network/interfaces changes appear to be ignored by my printerā€¦

Not related: Are you running a separate DNS server?

Ah, yep! Sorry. I had forgotten I set up entware via the scripts from Guilouzā€™ github. Itā€™s very odd your config is being ignoredā€¦ Iā€™m not sure why thatā€™d be happening. I guess double check itā€™s valid?
Yes I am running an adguard home instance.

Fun story: I completely forgot about this post.

A few minutes ago I was googling to see if anyone discovered any other temperature sensors on the Ender V3 KE. This post shows up as one of the first resultsā€¦ and then I remembered Hey! I actually replied to this oneā€¦.

Thanks for the kind words and riffing on what I shared, @Sasha_Cat. Nice to have this available for some reference.

I added a while true; do [..] sleep 60; done loop to your script to monitor my printer just now. Works great.

heater_bed_temp=50.0, mcu_temp=39.0, extruder_temp=216.8
heater_bed_temp=50.0, mcu_temp=39.4, extruder_temp=219.7
heater_bed_temp=50.1, mcu_temp=39.3, extruder_temp=220.6
heater_bed_temp=50.0, mcu_temp=39.5, extruder_temp=220.0
heater_bed_temp=50.0, mcu_temp=39.6, extruder_temp=220.3
heater_bed_temp=50.0, mcu_temp=39.7, extruder_temp=220.3