Solution for OctoPrint’s update “git diff failed with returncode 129” issue

So I have been wrestling with performing updates within OctoPrint’s GUI update manager.  Returncode 129… every… time.

I searched the web.  The only answer was that maybe my local git repo was corrupted, or that I needed to use the OctoPi image instead of installing OctoPrint on a vanilla Raspian image. (I immediately ditched the OctoPi image once I noticed they renamed an ethernet device from wlan0 to wlan0-octopi!)

Yeah, I was able to log into my Pi and get the update by pulling the new git version.  But that was lame.  I wanted to update through the GUI as it seemed everyone else was clearly able to do without issue.

Here’s what I got every time using the upgrade feature from within OctoPrint:

RuntimeError: Could not update, "git diff" failed with returncode 129

After debugging the update script, I discovered the solution through trial and error.

Here’s what you do, as the user ‘pi’:

cd /tmp
git init
git remote add origin https://github.com/foosel/OctoPrint.git

And then you should be able to update the app through the OctoPrint update interface! Celebrate!

Looking for a soldering mat? Try a (less expensive) baking mat instead.

I was searching for a soldering mat for my new work surface in my new basement’s office.  I was not happy with the available sizes (and prices) for larger, branded silicone rubber soldering mats.

In one of my searches, I came across several larger baking mats that are considerably less expensive – and they come in some cool colors too!

I ended up with this one…  massive at 23.4″ x 15.6″ and very cool in orange!  Bonus: it comes with some handy kitchen tools too!

I’ll have to update this post with pictures once it arrives and is in its place in my office/lab.

Turn Supermicro’s Java IPMIView into a native Mac Application

In my struggles with managing a few Supermicro machines I recently acquired, I finally found a clean way to run their Java IPMIView/iKVM software on my Mac.

You can find the code here:

https://github.com/TheCase/IPMIView.app

DIY Store Foam Medieval Practice Sparring Sword

IMG_2783

One afternoon, like many others, I found myself engaged in an intense battle with with my son on the backyard grass.  This day’s chosen weapons are blocky foam replica swords from some a slightly popular video game.  I decided I’d had enough with trying to have a entertaining battle with the things – and if they break? Costly at $25 each.  A new, CHEAPER, more realistic design was necessary.

Now, when I was a kid, we rolled up newspapers as tightly as we could, wrapped them with duct tape and did battle in the middle of our street.  Builder skills varied, and so did the quality of the weapons – if you wanted durability, you had to use a good amount of newspaper. In the end, you basically had to swing these heavy things like battle axes to get them going.

While I thought about going back to this design for our duels; my 32 additional years of building experience led me to a simpler, more nimble design.

COMMON SENSE ALERT!  These swords are not toys.  They will hurt you if someone swings it hard and hits you.  I’d imagine in the right hands it could break fingers or small/thin bones.  Build and use these at your own risk!  Be cool. Don’t hurt people.  These can be super fun if used with some common sense – I designed them to be safe should there be the accidental missed block or something… but we can’t NERF the world, people!  Kids need to be kids.  As the authors of The Dangerous Book for Boys said:

I think we’ve become aware that the whole “health and safety” overprotective culture isn’t doing our sons any favors. Boys need to learn about risk. They need to fall off things occasionally, or–and this is the important bit–they’ll take worse risks on their own. If we do away with challenging playgrounds and cancel school trips for fear of being sued, we don’t end up with safer boys–we end up with them walking on train tracks. In the long run, it’s not safe at all to keep our boys in the house with a Playstation.

So don’t sue me if someone gets hurt, ok?  I already told you it could happen.  Have fun, but be smart.

And with that out of the way, let’s get to building!

You’ll be able to find what you’ll need at your local big box DIY superstore:

  • 1/2″ foam pipe insulation – one 6 foot section should be good for two swords
  • 1/2″ PVC pipe (thin!  see below) – a little over 3 feet per sword
  • one (1) 1/2″ PVC four-way junction
  • three (3) 1/2″ PVC end caps
  • clear PVC cement
  • duct tape – I like the cheaper, off-brand stuff for this project – its thinner and easier to work with.
  • spray paint (optional).  You can leave your PVC uncolored if you want.  I chose to go with gold for the hilt to give it a touch of class and honor

NOTE: get the thinnest walled PVC pipe you can find.  The standard schedule-40 stuff that comes in the shorted lengths near all the fittings is way to thick.  It’ll be heavy and really hurt when someone misses a parry!  At my local store, I could only find the real thin stuff in the bulk area in 10 foot lengths.  Don’t say I didn’t warn you!

Hopefully you have something to cut PVC.  These crazy cutter things work really well.  Avoid hacksaws as they make all kids of nasty PVC dust.  You don’t need to breathe that.  Your store will cut stuff for you for a nominal fee.  They might think your cut list is crazy, but who cares… tell them what you’re making and they’ll probably think its pretty cool.

Cut the PVC into these lengths:

  • 1 piece 26 inches
  • 1 piece 5.75 inches
  • 2 pieces 1.75 inches

First, we’re going to use the three shortest pieces to make the hilt.  Dry-fit the pieces (no cement) before-hand to make sure you like the sizes you’ve cut.  Once the cement comes out, you can’t go back.

The hilt will look like the letter ‘T’.  Take the two smallest pieces and fit them into the junction opposite of each other.  Put the 5.75 inch piece of pipe in one of the remaining holes.  This will be your handle.  You can put caps on the ends of each of the pipes.  If you’re happy with the sizing, you can take it all apart and glue it together.  When I use PVC cement, I like to let the brush drain off for a bit and even wipe it along the inside edge of the can to get most of the excess, drippy glue off of the brush.  Then quickly use the brush to coat the inside of three of the holes in the junction, as well as the inside of each of the caps.  I like to swirl the brush once around to make sure I’ve evenly coated the inside of the fitting.  Quickly put all three pipes into the four-way junction first, then put the caps on the ends of the pipes.  When you’re done, it should look like this (note this one is already painted – I got too excited to finish and forgot to photo document this part of the process!)

IMG_2726

Now we are ready to work on reinforcing the foam with duct tape so that it doesn’t split when we slide it onto the 26 inch PCV “blade”.  Cut the foam to a length of 26 and one-half inches (26 1/2″) Start with a 6 inch length of duct tape and wrap around one end of of the foam.  Do not apply pressure to the point that it starts compressing the foam.  You should be able to smooth it lightly on to the foam and make sure there are no wrinkles as it wraps around the tube:

IMG_2727

For added strength add another piece of 6 inch duct tape over the tape you just applied.

Continue this procedure down the length of the of the foam, butting each new section against the last.  You can overlap a bit between sections if you’d like.  Try not to leave any foam exposed between the tape wrappings:

IMG_2728

Before you get to the end, we want to add a couple tape squares as a cap before we wrap the last bit of the end.  Offset two square pieces of tape on the end of the tube.  Fold down the diagonal ends and hold them down with the last 6 inch section of tape:

IMG_2729IMG_2732IMG_2733

And an additional 6 inch wrap of tape over the end:

IMG_2734

We are now ready to start sliding the foam on to the blade.  Now, note that in these pictures that I took, I was waiting for the painted hilt to dry – so I ended up pushing the foam on to a lone piece of PVC and pressed it against my belt.  You might find it easier to use the hilt handle with pressure against your thighs for this part.

Put the 26-1/2″ long blade PVC into the open end of the taped foam.  While it’ll be easy at first, it’ll take a considerable amount of effort once you get about half way.  I like to switch between pulling on the bottom end an about the middle of the foam section to move further on to the PVC.  Use your judgement – if you pull too hard on a stubborn section, you may rip the foam and have to start over.  Keep working it until you’ve got about all but four inches of the PVC covered with the foam/tape “blade”.

IMG_2761

(here I’m using the open end of the PVC against my belt to push the foam on to the PVC)

As you work it down, you may find that some parts get compressed and are wrinkled.  This is ok, just apply more pulling pressure to the bottom of the foam and it should smooth out.

IMG_2769

Wrinkles are ok, they will smooth out.

Now that the foam is mostly pulled down, you’ll add some layers of tape lengthwise to the blade.  Rip a section that is almost 26 inches and pull on both ends to keep it straight.  With this method, you should be able to smooth out the tape to run the length of the blade without wrinkles.  Repeat this two more times, slightly overlapping the last layer as you go.

IMG_2777IMG_2778

Add one more width-wise 6 inch strip at the top and bottom of the sword to cover up the fact that the last three lengthwise strips didn’t make it to each end of the blade.  On the open end of the foam, I like to offset it a bit over the end so that it will cover the black part of the blade near the hilt:

IMG_2779IMG_2781

If you were working like I did from the pictures, swap some PVC cement on the remaining channel of the hilt and press your blade in.  Give it a minute to set up, and pull the foam all the way to the top of the hilt.

IMG_2783

I used a hot glue gun to wrap a small section of fake leather fabric to the handle between the end cap and the junction.  You could do the same, or use electrical tape or paint… its up to you.

 

Now that you’re done, you just need to build one more and you’re ready for some knight-style sword practice!  Remember: be cool, be smart, have fun!

40W Chinese Laser: More upgrades

Made some upgrades over the long weekend:

Took out the stock work holder in preparation for the adjustable Z bed. It is hard to see in the first picture, but all but two of the posts were standing about 10% off of vertical. Even the allen screws securing the original work holder were at an extreme angle:

IMG_0939

IMG_0940

The LED strip lights got installed. If there is any upgrade that adds instant polish to your rig, its this one. The lights look amazing:

IMG_0950

IMG_0951

IMG_0953

Also removed all of the original cooling system and installed fresh tubing. Added reservoir, radiator, fan and anti-freeze:

IMG_0954

IMG_0957

IMG_0959

40W Chinese Laser: First cuts with open-source toolchain

Now, since I haven’t removed the stock work area, and because of the way the machine homes before the cut, I had to rest the test piece up higher than the normal work height. Outside the ideal laser focus width. Therefore the cut width is a bit thicker than if the material was a proper distance from the lens.

Still, I’m pretty happy with the performance – this is an example of a vector drawing:

IMG_0938

Digital source:

Screen Shot 2015-09-04 at 9.17.55 PM

40W Chinese Laser: Public Service Announcement: Clean your mirrors and lenses!

Don’t trust that your mirrors and lenses will be even remotely clean.

Remember when I mentioned I saw some soot on the lens carrier? Well, today I took it out for a closer inspection:

IMG_0933

And the mirror wasn’t in much better shape:

IMG_0934

I cleaned them up with some alcohol imbibed lens wipes:

IMG_0937

40W Chinese Laser: Brain Transplant!

IMG_0857

I’m removing the stock controller board. The proprietary software is terrible. It is getting replaced with the Open Source RapRep RAMPS G-Code controller. Thanks to the customized Marlin firmware by TurnkeyTyranny, this gives us several new advantages:

  • open source software chain (thanks again to TurnkeyTyranny and the Inkscape G-Code Export Extension)
  • programmatic control over the laser output power (ditching that terrible manual pot)
  • A slick new LCD control panel
  • I’m surprised I’ve not seen this elsewhere, but I plan to use a thermistor in my coolant tank to monitor the coolant temperature. Hopefully I can hack the firmware to stop firing the laser if the tank temperature rises beyond the set threshold.

    I ordered a new ribbon connector and made a new transfer cable to connect to the RAMPS pins. I was too impatient to design and order a wiring harness board, so I just soldered the cable right to the pins on the connector. I covered the contacts with some Liquid Electrical Tape.

    IMG_0928

    Below is a diagram of the wiring. Thankfully this was my exact power supply, so I didn’t have to get creative. Now, on the RAMPS, the servo pins are marked 2B 2A 1A 1B and the diagram has A- A+ B- B+. Here is the translation:

    A- -> 2B (ribbon cable pin 9)
    A+ -> 2A (ribbon cable pin 10)
    B- -> 1A (ribbon cable pin 11)
    B+ -> 1B (ribbon cable pin 12)

    It’s also not very clear on the diagram, but the XHOME goes on the first Signal pin on the endstop header and YHOME goes to the third signal pin. Even though it shows the 5v and GND going to the AUX-3/SPI header, you can use any 5V/GND connections on the other AUX or SERVOS header blocks.

    The Y stepper cable connects the following colors to pins:

    red -> 2B
    blue -> 2A
    white > 1A
    yellow -> 1B

    I’m borrowing this photo from TurnkeyTyranny’s git repo and putting this here so I can find it later:

    wiring_diagram

    This is not the greatest photo, but some of the wiring choices can been seen here:

    IMG_0927

    I made sure to test the steppers and homes before I even hooked up the laser fire and PWM controls to the RAMPS board. Once everything was moving as I expected, it was time to test the laser! Something about this screen preparing to push the button had me feeling like a mad evil genius set to take over the world: “FIRE ZEE LAZOOR!”

    IMG_0930

    As you can see by the burn, the initial tests were a success:

    IMG_0932

    Now its time to mount the board and get the wiring cleaned up to make room for more upgrades!

40W Chinese Laser: First cuts!

Today I finally wrangled a Windows XP machine back into shape so that I could run the stock software that works with the stock controller board.

I did the test cuts on 1/8″ thick hardboard.

We immediately see the value in having an air assist cutting nozzle. Without one, the exhaust fan pulls the smoke and heat up and across the work.
IMG_0889

No problem – a couple hits with the sandpaper and its clean! Not bad for a machine out of the box with zero calibration!
IMG_0890

The RAMPS arrives Monday. That’s when the teardown and upgrade will begin. Honestly, I can’t wait, because the stock software provided is terrible! Perhaps I’ll experiment with different power settings in the meantime.

40W Chinese Laser: Improvements

This is currently just a list of the upgrades I intend to make on my new machine. I’ll add links as I complete each item:

Add LED interior lighting
Remove controller and replace to RAMPS CNC controller
Replace controller panel with RAMPS LCD and switches for cooling, lighting, etc
Change chassis bolts to proper length
Add Air Assist head and pump
Upgrade Water Cooling
Enlarge build area
Upgrade Exhaust Assembly
Add fan to interior of power supply

LINK: Click here for a link to my post that contains a shopping list of parts required for the various upgrades.