Tag Archives: diy

Quicker switching of active docker machines

fbbb494a7eef5f9278c6967b6072ca3e_400x400           machines

As it stands today, with the docker machine command you have to manually specify environment variables for DOCKER_HOST and DOCKER_AUTH.

So the process would be:

This is a bit of a pain when doing it manually, so I was looking for a quicker way to switch back and forth and I think this works pretty well, though not totally elegant.

I started with a shell script which contains the following.  It takes the machine name as input, outputs the syntax to a script and sources it.   I found I had to do it this way, otherwise the current user session wouldn’t have the variables changed, only for the script itself.

So you would run it with:

Let me know if you have a better way!

Tagged , , ,

Dinner as a Service – Electronics

This post is part of a project I’m calling ‘Dinner As A Service.’
Electricity Costs

(This post is entirely on the hardware side of things so if you only care about my software ramblings, these are not the droids you are looking for.)

Since physical computing is an area I really have no deep background in, as with most of my projects that involve it, I owe quite a bit of credit to others.  Here are most if not all of the sources I used:

The build started like any self respecting build would…. as a prototype in a fishing tackle box!

High voltage! Don't Touch!

High voltage! Don’t Touch!

Surprisingly enough, once the kinks were worked out this worked pretty darn well.   Believe it or not, I cooked about 5 meals like this.  A fire extinguisher was near by.

The prototype consisted of:

Now that I’m writing this ex post facto, the high voltage bits are WAY FREAKING overkill for this implementation with my current slow cooker. (25A SSR?!? I think the later bits I added are bout 10A capable…)  See the last post on electricity usage for more on that.   What’s good is, assuming I didn’t make any huge errors (which may be a leap) I’ll be able to use this with much more powerful heating elements like a heat stick to brew beer…. we’ll see…..

*I’ll post a wiring diagram here* from EAGLE once I figure it out.  It’s not the most intuitive application.

Now this prototype worked great, but I wanted some bling.  I’ve never built anything with much bling to date so this was quite the learning experience.  Via the Awesomeness that is Adafruit, I found the 7 Segment display.  I’m in love:

So retro. So cool. I MUST HAVE THESE.

So retro. So cool. I MUST HAVE THESE.

I scrapped my first idea of just using a LCD text display, and went with two of these days.   Partly this decision was because I was having stability issues with the LCD i first tested with gibberish eventually always showing up, but also because I don’t need to display much text at all.  I wanted to keep this build purpose built and not add bells and whistles (like speakers and pandora functions like I originally spec’ed!).  So target temp, current temp and some sort of status indicators is all I need.    I wanted to include some timer displays to help with the cooking process but the lack of a real time clock in the rPi gave me some headache so I scrapped that idea.  Maybe i’ll revisit with either the add on board or a beagle bone.

I ordered a number of bits up from Adafruit and Digikey.  Found a case at the hardware store (which probably was a mistake….need to do more research on cases next time…).  And dove in…   Slowly I started adding bits.  First a 7segment LCD:

Hey look bitcoin used to be a bit higher

Hey look bitcoin used to be a bit higher

I read somewhere it really helps when cutting cases to use painters tape on top to draw your lines and keep the edges clean.   Yeah i doubt that helped my absolute hack job:

If i get cancer this is why.

If i get cancer this is why.

Progress was made pretty quickly, as I started getting time pressure to move on to other projects.

Hey look I call that progress.

Hey look I call that progress. Look at that LEGIT heat shrink wire!

And started cutting the ports for the power in & out:

Again. This case decision sucked. Anyone want to fund a 3d printer for me please?

Again. This case decision sucked. Anyone want to fund a 3d printer for me please?

And there she is. Fully working and how she looks today (with a slightly corrected label that someone on Facebook wouldn’t let go).   Notice all the empty space on the bottom half which may some day be used for some timer displays.

Yay. Blinky things.

Yay. Blinky things.

And on her maiden voyage, she cooked us up quite possibly the most tasty meal yet.  Tenderloin Steaks with Morel Cream.   As Ferris Bueller said, “If you have the means, I highly recommend picking one up.”

omgomgomg nommers.

omgomgomg nommers.

And here she is, mostly finished (TM).

May or may not burn your house down, make the dogs run away, make the child cry (TM)

May or may not burn your house down, make the dogs run away, make the child cry (TM)

Parts added for the final build:

If I was to continue development on this, the items on my list are:

  • Add timers
  • Add audible alerts
  • Add on/off switch
  • Add detachable temperature probe
  • Better case
  • Currently the rPI uses power from an external USB source due to lack of space for the transformer within the case.  This should be wired in.

There you have it.  Now I don’t really need feedback on everything I did wrong here.  No I don’t have a fuse wired into the box, I’m relying on the GCFI that I plug into, etc..   This is more or less a proof of concept that is sticking a round a while.   If I keep using it, as it seems like I am, I really am considering going legit with one of these store bought monsters.

Tagged , ,