Jump to content

Stealthburner beta(0) macros


BDW

Recommended Posts

You can start going through my config backup here: https://github.com/claudermilk/TridentBackup

There's a lot to digest, but you can see all my LED trickery. The two main files you will be interested in is macros.cfg where my print_start and print_end are and led.cfg where I do all the LED setups. Just mentally swap out z_tilt_adjust for quad_gantry_level.

  • Like 2
Link to comment
Share on other sites

@claudermilk I'm also trying to adjust my config based on yours and also struggle with the G28. I've used your G28 code 1:1 and get the following error:

Code I used:

[gcode_macro G28]
description: G28 homing with SB LED status
rename_existing: G2828
gcode:
  LED_HOMING
  RESPOND MSG="Homing"
  G2828 { rawparams }
  UPDATE_DELAYED_GCODE ID=_CLEAR_DISPLAY DURATION=1
  LED_STANDBY

Error (see image)

Bildschirm­foto 2022-12-10 um 15.36.08.png

What can I do?

Edited by BlackSpirit
Link to comment
Share on other sites

I think I found it. You commented out the Homing Override in klicky-macros.cfg. 

Ok, was able to get it working. The only thing is, that you loose all the klicky handling which was defined in the Homing Override in klicky-macros. 

You also don't use the endstop variables in variables_setup.cfg. Those are defined in printer.cfg.  But this can be changed easily. 🙂

Edited by BlackSpirit
Found the solution
Link to comment
Share on other sites

Yes, I have homing_override commented out. It's been a while, but I seem to recall it was giving me issues and removing it cleared them up. I am using z-calibration as well which has variables to define the Z endstop location & I think that was why. So look in my klicky-z-calibration.cfg file and you will see it defined there.

Link to comment
Share on other sites

9 hours ago, claudermilk said:

Yes, I have homing_override commented out. It's been a while, but I seem to recall it was giving me issues and removing it cleared them up. I am using z-calibration as well which has variables to define the Z endstop location & I think that was why. So look in my klicky-z-calibration.cfg file and you will see it defined there.

 

It appears based on your LED config macros that you are using the Klipper LED effects plugin.  I tried downloading it, and kept getting the same error.

I SSH'd into my OrangePi and used the script from the github, and got this error:

 

fatal: unable to access 'https://github.com/julianschill/klipper-led_effect.git/': could not resolve host: github.com -bash: cd: klipper-led_effect: no such file or directory -bash: ./install-led_effect.sh: no such file or directory

 

Any idea what this means?  I'm pretty new to linux.

And, is there a way to install it from a file folder using SSH, rather than the github download?

 

 

Link to comment
Share on other sites

6 hours ago, ken226 said:

fatal: unable to access 'https://github.com/julianschill/klipper-led_effect.git/': could not resolve host: github.com

The key part is the "could not resolve host: github.com" - name resolution on the PI has failed for some reason (DNS is not working).  This could be for a number of reasons. It could be a temporary failure (DNS lookups do sometime fail) or I imagine it will be more permanent.

The fact that you can SSH into the PI means the networking is generally working (and the fact you can post here means your t'internet connection is up 😉 ).

I'm not familiar with the OrangePI Linux Distro (but it can't be the dissimilar). On the PI have a look at the "/etc/resolv.conf" file (you can simply do a "cat /etc/resolv.conf" to display the contents. You are looking for one or more "nameserver" lines, for example:

nameserver 192.168.5.5
nameserver 192.168.5.4

(NB: those are my internal DNS servers so make no sense anywhere else in the universe). There are multiple ways that resolv.conf file can be populated (need to find out how OrangePI does it).

At an absolute pinch you could manually edit the file and put in some generic google public resolvers, for example:

nameserver 8.8.8.8
nameserver 8.8.4.4

 

That (manual) change would be overwritten each time the machine rebooted and the resolvers (DNS servers) would be replace by whatever ones the automatic configuraiton routine was putting in.

 

Edit: I should have remembered to say "Happy to help, if you need a hand battling with Linux". On reflection you need to get DNS name resolution sorted otherwise you will not be able to do things like update Klipper/Mainsail/Moonraker/Fluidd/Linux at some point in the future.

 

Link to comment
Share on other sites

6 hours ago, ken226 said:

And, is there a way to install it from a file folder using SSH, rather than the github download?

You can download a ZIP file of that github repo (and the copy the ZIP file to you OrangePI using SFTP and then unzip it on the PI).

If you go to the URL forthe klipper-led effect repository there will be a green "CODE" button on the screen. Clicking that button will give you the option to "Download ZIP":

git-led-repo.jpeg.1d6c0ddd09deb8852ee2762b002cd1dd.jpeg

 

The "easiest" thing to do is unzip the file directly on the PI, but that assumes there is a unzip command on the OrangePI. If you get a "file not found"or "command not found" message when trying "unzip" then you do not have it. Ordinarily I would say "have no fear, just install it" however, without working name resolution that won't work.

 

At this point I think your options would be:

  1.  Fix the DNS lookup issue (then you can use the GIT command, or go the unzip route and if needs be download the unzip command). That means you're sorted for future e.g. updating your set up.
  2. Download the ZIP file, transfer it to the PI using SFTP (e.g.filezilla) and hope you have unzip on the PI. If you don't then a friendy person 😉 on the forum could repackage the ZIP file into, say, a tar file (there's bound to be a "tar" command on the PI).
  3. Get the ZIP file unzip it on your PC and then transfer all 34 files (in the correct directory structure, which you will have to create manually). That's a lot of hassle.

In my opinion, I've put the things in order of "best thing to do"

I should've said in my first response: happy to help where I can.

 

Link to comment
Share on other sites

6 hours ago, smirk said:

 

The fact that you can SSH into the PI means the networking is generally working (and the fact you can post here means your t'internet connection is up 😉 ).

nameserver 192.168.5.5
nameserver 192.168.5.4

 

nameserver 8.8.8.8
nameserver 8.8.4.4

 reflection you need to get DNS name resolution sorted otherwise you will not be able to do things like update Klipper/Mainsail/Moonraker/Fluidd/Linux at some point in the future.

 

It sounds like the issue may actually be my connection then.

 

Basically, my Pi is connected to wifi,  but it doesn't seem to want to stay connected.  Every time it drops the connection, I have to reboot the printer to reacquire the connection,  which has been frustrating me. That connection is via a proprietary and obsolete Comcast modem, that will painful to upgrade.

 

As a result, im controlling the Pi via a wired Ethernet connection to its own router (an old Linksys I had in the closet, no internet).

  The Pi is still actively connected to wifi with its own onboard wireless adapte but I've been SSH'ing into it via the wired Ethernet connection.  

 

So, if I'm SSH'ing into the pi via one Internetless router,  but the pi is connected to the  internet via WiFi, from a different access point (the proprietary, obsolete, Comcast cable modem),  could that be the problem?

 

 

Link to comment
Share on other sites

Yes, that could be the problem. You need a connection to the internet from the pi for the git stuff to work. If you're having to SSH in through a LAN only wired connection, then the next option I would try is to download as @smirk suggested, then get WinSCP and copy the files over that way to get them on the Pi. I have zero experience with OrangePis so I'm not sure how much different they are from a Raspberry Pi.

Also, yes, I'm using the julianschill LED-effects library. It is very cool, and once you understand (more-or-less) how to define the effects, you can play around to get what you want it to do fairly easily.

Link to comment
Share on other sites

3 hours ago, ken226 said:

could that be the problem?

Kinda, sorta!

By the sound of it you have two active network connections on your PI, so almost like you PI would be set up as a router on it's very own. I can understand why you've done what you've done, but you have made it rather "interesting" for yourself 😉

To be honest at a minimum I would have expected your PI to have picked up DNS automatically via DHCP (in the same manner as it would get an IP address for each interface). It is possibly gettting confused as to which interface is the primary/default gateway (i.e. the main route out to the rest of the universe.

I guess a key question is: do you now the IP address of your comcast router (your gateway to the internet?)....well the "internal" IP Address basicallywhat your own PC would recognise as it's gateway address.

(On a windows machine, in a command prompt if you run the "route print" command it will give you a list of network routes. In the list of output, you are looking for something like:

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0    192.168.122.1  192.168.122.248     25

That line with "0.0.0.0" means the "default route" and the "gateway" address is the one you're interested in, here 192.168.122.248, that would be your gateway to the internet (probably the comcast routers internal IP address if I understand your setup) )

 

Anyway, if you log into the PI you can run  "route" command as in:

 

pi@voronpi2:~ $ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.5.1     0.0.0.0         UG    302    0        0 wlan0
192.168.5.0     0.0.0.0         255.255.255.0   U     302    0        0 wlan0
pi@voronpi2:~ $ 

or if it does not like "route" you could also try a "ip route show" as in:

pi@voronpi2:~ $ ip route show
default via 192.168.5.1 dev wlan0 proto dhcp src 192.168.5.202 metric 302 
192.168.5.0/24 dev wlan0 proto dhcp scope link src 192.168.5.202 metric 302 

Both these commands will show what your PI thinks is the default gateway/default route - basically that is your connection to the internet (anything that is not local to your own WIFI network gets sent to that default gateway). In the two examples above my default gateway (and connection to the internet) is 192.168.5.1 (yours will probably be different).

Now the question is - does the IP address listed as the default gateway match that of your COMCAST router? If it does then that's a lot more useful, we could work with that. If it's not (and probably using your old linksys for it's default route) then you'd haveto manually change the default route and/or get rid of the linksys from the setup.

 

Since things are a little more complex than I'd first thought, I would probably suggest "option 3" from my previous reply as the most pragmatic way forward in the short-term. However, you really need to get the connectivity sorted as it will be an utter PITA if you don't.

 

On a related note. I have attached a "tar ball" (aka tar archive) of the klipper LED effect github repo, I just downloaded the ZIP file and unbundled it. Just in case there is no "unzip" file on your PI.

If you SFTP that tar archive to your PI you can extract it with the "tar xvf" command (the overwhelming majority of *NIX installations I've ever come across manage to have "tar" installed. It's a fundamental....NB: I don't say 100% do 😉 ). For example (assuming you uploaded the tar file into the home directory of user pi):

pi@voronpi2:~ $ tar xvf ~/klipper-led-effect-master.tar 
./klipper-led_effect-master/
./klipper-led_effect-master/simulator/
./klipper-led_effect-master/simulator/simulator/
./klipper-led_effect-master/simulator/simulator/__init__.py
./klipper-led_effect-master/simulator/simulator/klippermock.py
./klipper-led_effect-master/simulator/simulator/simgui.py
./klipper-led_effect-master/simulator/simulator/simulator.py
./klipper-led_effect-master/simulator/README.md
./klipper-led_effect-master/simulator/simgui.fbp
./klipper-led_effect-master/simulator/poetry.lock
./klipper-led_effect-master/simulator/tests/
./klipper-led_effect-master/simulator/tests/__init__.py
./klipper-led_effect-master/simulator/app.py
./klipper-led_effect-master/simulator/pyproject.toml
./klipper-led_effect-master/README.md
./klipper-led_effect-master/LICENSE
./klipper-led_effect-master/docs/
./klipper-led_effect-master/docs/LED_Effect.md
./klipper-led_effect-master/.gitignore
./klipper-led_effect-master/examples/
./klipper-led_effect-master/examples/Voron_Stealthburner/
./klipper-led_effect-master/examples/Voron_Stealthburner/stealthburner_led_effects_3_leds.cfg
./klipper-led_effect-master/examples/Voron_Stealthburner/stealthburner_led_effects_barf_fan.cfg
./klipper-led_effect-master/examples/Voron_Stealthburner/stealthburner_led_effects_barf.cfg
./klipper-led_effect-master/file_templates/
./klipper-led_effect-master/file_templates/led_effect.service
./klipper-led_effect-master/file_templates/moonraker_update.txt
./klipper-led_effect-master/install-led_effect.sh
./klipper-led_effect-master/src/
./klipper-led_effect-master/src/led_effect.py
./klipper-led_effect-master/.github/
./klipper-led_effect-master/.github/workflows/
./klipper-led_effect-master/.github/workflows/build.yaml
./klipper-led_effect-master/.github/workflows/release.yaml
pi@voronpi2:~ $ 

 

I appreciate that's a lot of info - just shout if you need a hand.

 

klipper-led-effect-master.tar

Link to comment
Share on other sites

The IP to my Comcast router is 192.168.0.1,  but that info is mostly useless as I get "cipher mismatch" error from edge when I try to access it   apparently,  browsers now use a different SSL?  Something about http vs https.

 

This appears to be a bit overy head.   I think I'll focus on sorting out the connectivity issue first, so I can do this the easy way. By copying/pasting the script into a terminal and letting the pi download it.

I found and ordered of these routers for 130$, on sale, from Amazon.   

ASUS AX5400 WiFi 6 Gaming Router (RT-AX82U) - Dual Band Gigabit Wireless Internet Router, AURA RGB, Gaming & Streaming, AiMesh Compatible, Included Lifetime Internet Security https://a.co/d/ag7RcxR

 

It has pretty good reviews for it's stability and range.   I'll just use the proprietary Comcast junk as a cable modem, and do all my networking through the Asus router.   It'll probably work at least a little better than my 2003 model Linksys befw11s4.

I came across a post from 2010, where it was referred to as "grandma's router".

 

Edited by ken226
Link to comment
Share on other sites

1 hour ago, ken226 said:

"grandma's router".

🤣 That's brilliant.

1 hour ago, ken226 said:

"cipher mismatch" error from edge when I try to access it   apparently,  browsers now use a different SSL?

Oh god, yes! It's not even SSL any more (SSLv3 was the last and seriously deprecated protocol). Browsers these days get sniffy at anything less than TLS1.2 (most just block you). So definitely Grandma's "Victorian" router.

 

Ok, sounds like you have a plan and I agree the best (long term) approach is to resolve your connectivity issues. Just getting the PI down to a singular connection (doesn't really matter if it was wireless or wired, just that you are only dealing with a singular network interface) will make things a lot better. Unless the OrangePI is using some really hokey-cokey distro of Linux (and I very much doubt it would, unless it was created by sadists who were deliberately trying to make it harder) then it will auto-configure (via DHCP) and acquire all the necessary network info that it needs to connect to t'internet.

If you need assitance after that then just holler

Link to comment
Share on other sites

54 minutes ago, smirk said:

🤣 That's brilliant.

Oh god, yes! It's not even SSL any more (SSLv3 was the last and seriously deprecated protocol). Browsers these days get sniffy at anything less than TLS1.2 (most just block you). So definitely Grandma's "Victorian" router.

Ok, sounds like you have a plan and I agree the best (long term) approach is to resolve your connectivity issues. Just getting the PI down to a singular connection (doesn't really matter if it was wireless or wired, just that you are only dealing with a singular network interface) will make things a lot better. Unless the OrangePI is using some really hokey-cokey distro of Linux (and I very much doubt it would, unless it was created by sadists who were deliberately trying to make it harder) then it will auto-configure (via DHCP) and acquire all the necessary network info that it needs to connect to t'internet.

If you need assitance after that then just holler

 

I really appreciate your help.

 

The Orange Pi is running Debian.  It must be pretty similar to whatever Raspberry Pi uses,  as I used Raspberry Pi imager, commands, instructions and pretty much everything else, to install Mainsail and Klipper.  

Link to comment
Share on other sites

3 hours ago, smirk said:

🤣 That's brilliant.

Oh god, yes! It's not even SSL any more (SSLv3 was the last and seriously deprecated protocol). Browsers these days get sniffy at anything less than TLS1.2 (most just block you). So definitely Grandma's "Victorian" router.

Ok, sounds like you have a plan and I agree the best (long term) approach is to resolve your connectivity issues. Just getting the PI down to a singular connection (doesn't really matter if it was wireless or wired, just that you are only dealing with a singular network interface) will make things a lot better. Unless the OrangePI is using some really hokey-cokey distro of Linux (and I very much doubt it would, unless it was created by sadists who were deliberately trying to make it harder) then it will auto-configure (via DHCP) and acquire all the necessary network info that it needs to connect to t'internet.

If you need assitance after that then just holler

so, does this mean it worked?

 

image.png.204007ca975dba8aa11fb1edfbd36775.png

Link to comment
Share on other sites

Awesome! Glad you got it sorted.

 

Raspberry Pi is using a version of Debian, so I'm sure that's why OrangePi (and probably the other clones) do as well. No need to make it even harder.

FYI, I ran across a West3D video on setting up the Rainbow Barf Stealthburner logo LED. Turns out you can have RGB and RGBW NeoPixels on the same chain. I happen to have one of those Rainbow Barf guys sitting in my parts box. Adding that to my mod-o-rama next month(-ish).

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
On 12/8/2022 at 4:54 PM, ken226 said:

Does anyone have an example of how to add the LED calls for the extruder and bed heater.

using the examples posted above, I've been able figure it out for the commands like "QUAD_GANTRY_LEVEL",  G28, G32, etc.

But the heater commands have a temperature command attached, such as M104 S230.  

 

 

I still havn't got this question sorted out.

 

So,  when m-code such as for the extruder or bed heater are run, they have a temperature component, such as M104 s235.   Does the gcode macro need anything in addition the the M104 command?  Will the rename function still work, if set up as below:

 

 

[gcode_macro M104]
description: Extruder Heating with LED status
rename_existing: M10401
gcode:
  led_heating
  M10401 { rawparams }


Or, does it need to have something after the M104? 

[gcode_macro M104 s??????]
description: Extruder Heating with LED status
rename_existing: M10401
gcode:
  led_heating
  M10401 { rawparams }

 

I can't find anything in the documentation, and just trying things until something works seems like a good way to ruin parts.  Anyone know?
 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...