Jump to content

Stealthburner beta(0) macros


BDW

Recommended Posts

I have the Stealthburner beta(0) running, but I've run into a problem.  When I include the klipper macro cfg file into printer.cfg in Klipper, Klipper throws an error "Section 'sb_led.cfg' is not a valid config section".  I don't follow everything that's going on in the cfg file, but I don't see anything that looks structurally different from other included cfg files that are not causing problems.  The contents of the file were copy/pasted from the file in the "klipper macros" folder inside the Stealthburner beta(0) file I downloaded (did change the pin to pin: PB0, using the neopixel connector on the BTT Octopus board).  Also tried copy/pasting the macros from voron_2.4_klipper_config/stealthburner_leds.cfg at master · wuzefacke/voron_2.4_klipper_config · GitHub .  Same result.  Any ideas what I might be missing/doing wrong?

 

  • Like 1
Link to comment
Share on other sites

These are the only macros I use for the stealthburner LEDS (Shouldn't matter if it is Beta 0 or release of stealth burners as the LED's in the toolhead should be the same)

https://github.com/PrinterConfigs/DoomConfig/blob/master/stealthburner.cfg

Unless you have any other LED's (Chamber, logo, heated, etc) you would be better off disabling any reference to LED in the Printer.cfg and macro.cfg files, then download the above, save as "stealthburner.cfg" and add the following to printer.cfg [include stealthburner.cfg]

Link to comment
Share on other sites

Solved it!  (At least I thing so - no more complaints about bad sections.)  I missed it AND I did it wrong.  Because I am basically a lazy lout, I shortened the name of the cfg file to sb_led.cfg.  Apparently Klipper doesn't like something about that name or file.  I thought it was that a label in the file was the same, but that label is sb_leds, not sb_led.  But creating a new stealthburner.cfg file and coping the contents of the sb_led.cfg to the new one either fixed something about the file or fixed the name. 

Thanks to the people who offered suggestions.  Ultimately those suggestions got me to thinking about the file name.

Link to comment
Share on other sites

(I don't see a red faced emoji)

1) The only stupid questions are the ones that don't get asked.

2) When you're dealing with in idiot, stupid questions (see #1) aren't allowed!

Claudermilk, to answer your question, I did have the include statement in the printer.cfg file.  Unfortunately, that statement was missing the word "include".  Works much better when your include statement includes the word include!  Thank you for having the courage to ask the painfully obvious.

And while I'm at it....   Unless I'm missing something (else!) the leds I have are RGB units (nothing about RGBW in the description and no pale yellow section in the chip window).  From what I've read it isn't clear to me.  If these are RGB leds, should I be editing the color descriptions in the configuration file to remove the "'w' : 0.0"at the end of each color description line?  The leds actually came on, so I'm guessing it doesn't matter - the w is ignored if you don't have a w led.

Again, thanks to everyone for your time and assistance.

Link to comment
Share on other sites

6 hours ago, claudermilk said:

Stupid question, but you do have the include statement in your printer.cfg set up, right?

[include stealthburner.cfg]

@BDW Correct, as initially stated - this tells the printer to also look at that file. The purpose of this is to clutter up your printer.cfg file with too many macros and only have the essentials in there. Also easier if you want to change the settings for that specific element of your printers. For example I have:

[include macros.cfg]

[include Euclid.cfg]

[include autos.cfg]

[include KlipperExpander.cfg]

Just makes life easier in the long run

 

 

Link to comment
Share on other sites

3 hours ago, BDW said:

If these are RGB leds, should I be editing the color descriptions in the configuration file to remove the "'w' : 0.0"at the end of each color description line?  The leds actually came on, so I'm guessing it doesn't matter - the w is ignored if you don't have a w led.

 

You. can remove this or leave it - should not matter. As long as the cooler sequence of your LED are set correctly, everything should work: (RGB, RBG, etc) The stealth burner LED's are normally RGB

Link to comment
Share on other sites

22 hours ago, BDW said:

(I don't see a red faced emoji)

1) The only stupid questions are the ones that don't get asked.

2) When you're dealing with in idiot, stupid questions (see #1) aren't allowed!

Claudermilk, to answer your question, I did have the include statement in the printer.cfg file.  Unfortunately, that statement was missing the word "include".  Works much better when your include statement includes the word include!  Thank you for having the courage to ask the painfully obvious.

And while I'm at it....   Unless I'm missing something (else!) the leds I have are RGB units (nothing about RGBW in the description and no pale yellow section in the chip window).  From what I've read it isn't clear to me.  If these are RGB leds, should I be editing the color descriptions in the configuration file to remove the "'w' : 0.0"at the end of each color description line?  The leds actually came on, so I'm guessing it doesn't matter - the w is ignored if you don't have a w led.

Again, thanks to everyone for your time and assistance.

:classic_blush: <- you mean this? 😛

I'm glad it was that easy. It's an easy thing to miss if you're unfamiliar, and have gotten so deep in the woods it's hard to step back. Fresh eyes help.

It's probably easier to just eliminate the W commands for clarity.

For color order, the stock stealthburner config should start up with violet light. There should be a troubleshooting guide in the  start comments block.

Link to comment
Share on other sites

  • 2 months later...
On 9/6/2022 at 6:51 PM, mvdveer said:

These are the only macros I use for the stealthburner LEDS (Shouldn't matter if it is Beta 0 or release of stealth burners as the LED's in the toolhead should be the same)

https://github.com/PrinterConfigs/DoomConfig/blob/master/stealthburner.cfg

Unless you have any other LED's (Chamber, logo, heated, etc) you would be better off disabling any reference to LED in the Printer.cfg and macro.cfg files, then download the above, save as "stealthburner.cfg" and add the following to printer.cfg [include stealthburner.cfg]

 

New Voron 2.4 builder here.

I finished my Voron 2.4 build a few days ago.  It was quite a challenge, as I went with an Orange Pi rather than Raspberry Pi due to scalper prices on Raspberry Pi's.

 

Anyway, it runs like a champ, but I cant quite figure out the Stealthburner LED config.  I used the config you suggested in the post above, but in only seems to work if I manually click the macro buttons on the Mainsail UI "Dashboard" tab/page.   I hope i'm not misunderstanding the purpose of these macros, but is it not the case that they should run automatically, while using the printer?

 

For example, when I click the "home all" button, shouldn't the LEDs change to the color indicated in the config file, when the homing process starts?  When I start a print, shouldn't the LED's change to the colors in the config file when it starts printing,  Heating, cooling, etc?

 

As it is now, using that config file,  It just stays at the colors in the "initial LED color" section of the config.  It wont change to the "status_printing" colors unless I click the status printing macro button on the Mainsail Dashboard page?

 

All of the Mainsail UI dashboard buttons work and show the correct colors.  The little LED color button at the bottom works fine, I can click it and move the cursor around, and whichever color I select shows correctly in the logo and nozzle.  Just, nothing happens while acually running Gcode.

 

What am I missing?

Edited by ken226
Link to comment
Share on other sites

At least in my experience (and I make no claims to being an expert!), the Stealthburner LEDs don't "automatically" start changing color.  You have to insert calls to the LED macros.  For an example, this is the G32 macro in the the Macros section in the printer.cfg file on my Voron (the lines in bold are the macro calls changing the LED color):

 

[gcode_macro G32]
gcode:
    BED_MESH_CLEAR
    STATUS_HOMING
    G28
    STATUS_CLEANING
    CLEAN_NOZZLE
    STATUS_LEVELING
    QUAD_GANTRY_LEVEL
    STATUS_CLEANING
    CLEAN_NOZZLE
    STATUS_HOMING
    G28 Z
    STATUS_READY

Wherever you want the LEDs to change color, you'll have to find a place (not necessarily only in printer.cfg) to insert the corresponding macro call.

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

4 minutes ago, BDW said:

At least in my experience (and I make no claims to being an expert!), the Stealthburner LEDs don't "automatically" start changing color.  You have to insert calls to the LED macros.  For an example, this is the G32 macro in the the Macros section in the printer.cfg file on my Voron (the lines in bold are the macro calls changing the LED color):

[gcode_macro G32]
gcode:
    BED_MESH_CLEAR
    STATUS_HOMING
    G28
    STATUS_CLEANING
    CLEAN_NOZZLE
    STATUS_LEVELING
    QUAD_GANTRY_LEVEL
    STATUS_CLEANING
    CLEAN_NOZZLE
    STATUS_HOMING
    G28 Z
    STATUS_READY

Wherever you want the LEDs to change color, you'll have to find a place (not necessarily only in printer.cfg) to insert the corresponding macro call.

 

 

That appears to be exactly what I'm missing.  Thank you!

Link to comment
Share on other sites

Great. I appreciate the help, I did as suggested and it now works while running a print.

Another question,

I tried to do the same thing with the homing, and extruder / bed heating gcodes, but got an error.  If refuses to allow me to create a G28 macro, or others, because they already exist.  

 

I couldn't find a g28 macro in the config file, im assuming thats because its an integrated klipper command and doesn't use a macro.  Is there away to get the  led's to work for Dashboard commanded g28, g34, etc commands?

Edited by ken226
Link to comment
Share on other sites

When you are replacing a default macro, you have to insert the rename_existing line to tell Klipper what macro you are overriding. Then you usually call the original macro from within your modified one.

For example, here's my modified G28 incorporating my LED macro calls (killing two birds with one stone here):

[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

So see that I renamed G28 to G2828 here. Then ran my custom stuff--basically run the LED macro and send a message to the console & KlipperScreen. Then run stock G28. Finally turn off the message on KlipperScreen and run another LED macro.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

7 hours ago, claudermilk said:

When you are replacing a default macro, you have to insert the rename_existing line to tell Klipper what macro you are overriding. Then you usually call the original macro from within your modified one.

For example, here's my modified G28 incorporating my LED macro calls (killing two birds with one stone here):

[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

So see that I renamed G28 to G2828 here. Then ran my custom stuff--basically run the LED macro and send a message to the console & KlipperScreen. Then run stock G28. Finally turn off the message on KlipperScreen and run another LED macro.

I'm having some trouble getting this to work.

So, the line "G2828 { rawparams }"  commands it to run the stock G28?  If so, why is it G2828 rather than just G28?

I tried it like this:

[gcode_macro G28]
rename_existing: g2828
gcode:
    STATUS_HOMING
    G2828 { rawparams }
    STATUS_READY

and the firmware wouldn't restart.

 

 

Link to comment
Share on other sites

I don't remember if the uppercase/lowercase in the actual macro, is as I typed it out here on the forum.   When I get home this evening, I'll double check that.

 

Also, I don't remember the wording of the error.  This evening, I'll try again and screenshot the error so I don't forget again.

My memory, for anything more that a few words, is only good for a couple hours these days.  Once I've slept, it's gone.

 

Edited by ken226
Link to comment
Share on other sites

9 hours ago, claudermilk said:

Yes the G2828 call is to run the stock G28.

I was going to reiterate @mvdveer's question, but I noticed your rename_existing is renaming to "g2828" not "G2828" then you call "G2828" in the macro. Often case matters; try fixing that and restarting.

It switches to the "homing" color, but stays there after homing.  The "status_ready" color throws the follwing error:

 

Edit to add:

 

Nevermind the G28 to G2828 errors.  I got that taken care of.  I was missing  a line in the stealthburner led config file.

 

 

 

 

image.thumb.png.86bc36709c58c52b2effa3c90cfee3c9.png

Edited by ken226
Link to comment
Share on other sites

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.  

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...