The Leap of Faith

Leap of Faith

I am doing some work for a client that involves migrating a bunch of their old websites from one server to a new one. The old hosting/design company hasn’t been helpful or very professional at all. They’ve got a stick up their ass apparently, pissed off they lost business I guess. Have caused us some delays and a few issues. Anyways, I have to SSH into the servers no cPanel or anything of the sort, no phpMyadmin, they rock it old school. So I tarballed the site and download it. After doing the SQL and tarball dance I went to access the site and was presented with a bunch of depreciation errors. The errors were coming from wp-settings.php. Depreciated calls. The old servers were also using mySQL v5.3. Get with the times man.

The errors I were getting was  Parse error: syntax error, unexpected new (T_NEW) .

I did some Google-Fu and found this site http://codecaveme.de/blog/en/php-7-and-wordpress-how-to-fix-unexpected-new-t_new-error/. I had to go through and take out all the  &  in the code calls. After doing that the blog loaded.

WordPress v2! Holy WTF!? Why are they still operating on WP2??? Well the server they were on was also old as bones, Ubuntu 10. Great hosting company eh? After logging in to the admin section I was presented with a super super old admin interface. I should have taken a screenshot, damn it. So being that it was WP2 I decided fuck this, I am going to try to upgrade.

I went and clicked the WordPress upgrade button and bam! It worked. Holy shit. There were no problems. I did not however update any of the plugins or themes in use. I was not willing to risk that. I’m sure that would break something. So far all functionality of the site is fine, everything seems to work ok. I’ll comment back if something does go wrong or pop up. But for now upgrading from WP 2.8.4 to 4.8.1 is pretty straight forward. Who’da thought?

Oh, I also had to change the PHP version from 7 to 5.5, shit just wouldn’t run. I have not tried moving it back to PHP 7 since the upgrade.

My 3d Printer Toughts: Revisited

Thoughts

Updated: October 5th, 2017

I have a 3D printer, a Monoprice Maker Select v2.1. I have had this thing for a few months now and feel like I have gotten a pretty good hang of it. I can get some pretty nice looking prints out of this thing. So here are my rambling thoughts on 3D printers so far:

Get something entry level your first time around. Don’t go spending thousands of dollars on it, you won’t know what you are doing. You wont know the basics. I nabbed a Monoprice (Wanhao/Cocoon Create clone) Maker Select v2.1. It’s a great entry level printer and for a great price. Once you’ve got it all setup and tweaked it will produce great prints. But it did print pretty decent right out of the box. If I had to choose again I would have gotten the Creality CR-10, but purely for its build size. I have found that I would very much like to produce larger objects. Bigger than the build plate of the Maker Select can handle. The MS is 8″ x 8″ x 7″. The CR-10 is 12″ x 12″ x 15″!! But I have no regrets on getting the Maker Select.

Being that it is an entry level printer and a cheap one from China, it needs some help in the safety “I won’t burn your house down” department. Remember those stupid “hover” boards and the fires? Yeah. So buy a $10 MOSFET to offload the heatbed amperage from the printer board to the more powerful MOSFET. The traces on the printer board cannot handle the amps the bed requires and will eventually burn out. Some people have tried just swapping the plugs for a higher rated plug but thats just bypassing the issue, not fixing it. Don’t do the XT plug mod, it won’t solve the problem.

  • Wire up the and install the MOSFET immediately, there are tons of tutorials and YouTube videos for it, its pretty simple. Order the MOSFET and printer at the same time.
  • Level that bed, then level that bed. Then level the bed. Then level the bed. Seriously. This is THE most important step out of everything minus the MOSFET. If you are not level you WILL have issues of some kind.

Level the bed again! This WILL be the hardest thing you have to do. There are many methods to do this, find one that works for you. For me I use a single piece of paper. With a cold bed and a cold nozzle I will slide the paper between the nozzle and bed and loosen the bed screws until its a snug fit but still moves. Then when I heat up and print (I use a 0.2mm first layer) everything is rockin.

  • Make sure you’ve squared your printer. It did NOT come that way. https://www.youtube.com/watch?v=XaroNfMVE4M
  • Make sure all the scews are tight
  • Print some Z-axis levelers, and make sure they are level to the bed.
  • I would order at least (2) 5150 radial fans to replace the 40mm stock fans. They suck and are loud, prone to failure. Or upgrade to noctua ($$) fans as people suggest.
  • A lot of people replace the electronics box fan with a 120mm for air flow and noise.
  • Print some Z braces. AzzA’s Z-brace is pretty nice, thats what I went with. But now there are rear Z-brace kits. I’d rock one of those if I had to do it again. Check out “Z-brace yourself” on Thingiverse.
  • Get a glass bed. This is next on my list of upgrades as well as… I want those glass smooth first layer surfaces.
  • Ditch the thumbwheels on the build plate and print some new ones, use M3 nylon nuts. The stock ones vibrate lose over time and don’t hold.
  • Print a razor blade part scraper (and this), the default putty knife can damage the buildtak surface.
  • Print the cable chain relocation bracket and cable shroud for the extruder head.
  • Upgrade and install the MicroSwiss all metal hotend. No more PTFE tubes and I hear it prints so much better. This is next on my list of things to-do.
  • Get a few rolls of filament in different colors. Stock up. Its nice to have that perfect color needed for something whenever it pops up. Or when you feel like a certain color. Its nice. I use Inland and Hatchbox.
  • Get some good superglue for glueing prints together. I use Gorilla Glue Super Glue 10 second bond. Good stuff.
  • Get a Raspberry Pi 3 and run OctoPrint (OctoPi) on it for ease of use. No fucking with an SD card, and you get to monitor and control the printer from a browser or cellphone/tablet (TouchUI).
  • Get a camera for the RPi to take timelapses or see progress. I use a raspberry pi camera and this mount.
  • Use an app. I use Printoid (for Android) to monitor and control the printer from my phone and tablet. It is much better and way more responsive than using the TouchUI.
  • Have a ton of things lined up that you want to print, and they better not be fucking fidget spinners! You are gonna have the urge to keep that machine printing 24/7.
  • Build an enclosure for it. It prints so much better when enclosed. No air drafts from doors or vents to fudge up your print. Having it enclosed also greatly reduces the amount of dust that will build up on the printer.
  • Have some shit on hand for maintenance. Oil and lubes, heh. Got to lube them rods! I use oil on the rods and lithium grease on the screw rods (z axis).
  • Print belt tensioners. Ditch the springs and tension the belts. They are probably too loose already, think guitar string. Some people just use zip ties like stock, I like the tensioners.
  • Lower your jerk and acceleration settings, as well as your speed. Jerk and acceleration settings you can play with. Most people seem to cut them in half of the default. Setting accel to 800 and jerk to 8 or lower. Speed, I did drop to 40mm/s. I print slow. I find anything over 50mm/s causes visible problems in your prints. My first layer speed I always run 8-15mm/s. Depending on how intricate the design is. This speed gets me screw hole circles perfectly. Over 15mm/s and the filament doesn’t stick for small circles and such, maybe better luck with glass?
  • Print a bed cable relief.
  • Print some brackets to hold the printer in one spot.
  • Print a filament runout sensor.
  • I print PLA with a heated bed. Nozzle at 200-215C and the bed at 60-70C. I print directly on the Buildtak (black mat surface) and have zero adhesion issues (most of the time). I don’t use glue or hairspray or anything of the sort. Too fucking messy, and I find it unneeded. YMMV. But I do have issues here and there with edges curling on large prints.
  • Get some lighting for your printer. You are going to want some LED lights in your enclosure, or at least on the printer pointing at your print. Because I guarantee you are going to sit there and watch it print. Plus you need the light for the camera (either just to watch or for time lapses).
  • Print test cubes and heat temperature towers for every new roll of filament that you get. Every roll is different. I guess you should also measure the filament with some calipers to make sure its 1.75mm (adjust in your slicer if not).
  • Get yourself some good fucking calipers!! You WILL need these. To check measurements on test cubes and such to make sure your printer is calibrated correctly. And to help you out when designing and making your own prints (the fun stuff!!).
  • Hot glue doesn’t stick well to printed parts, it does and doesn’t.

I’m sure there is more but thats what I have noticed so far.

Ah Crap

my Monday

WTFMYMONDAY

My site hosting provider account was expiring, I knew this. I had some plans, then my home server died on me. Well shit, there goes the backup plan. Cut to the point, I had to go to the hospital again for another few days last week. Just in time to get out with one day left on my hosting.  Throw in some other bullshit and you get a 90% backup of the site. It’s up, it’s running (thanks to some friends) but in the whole shenanigans of the all I forgot to backup all the god damn media (I swear I always do this). I may have some images still on my hard drive and I may update it over time but as for now, all of the images are gone. Sorry about that. I am probably more pissed off about it than you are.

If you do get to a post that has a broken image and it feels important to you, shoot me a comment on the page and I will see what I can do for you. Also, if you see anything else broken let me know as well.

Update: I was able to jam back into the master ftp account. The domain had been moved already, but there was still some others left on the account leaving the ftp up. Fucking SAWEEET!! All images should be restored.

My OctoPrint (nightmare) Setup

octoPrint

While I was digging around for 3D printer stuff I came across OctoPrint (and OctoPi). OctoPrint acts as a print server for your printer. So you don’t have to do the SD card shuffle anymore, or waste a power hungry x86 for the task. My printer is not in the same room as my computers so this works a treat. Also, it allows you to monitor the entire process. It also supports a camera to watch the build. Perfect, I have a RPi camera available. I also found a tutorial to allow OctoPrint to support turning relays off and on to control other stuff (lights, the printer itself, etc…).

(Stay with me, this post is a little erratic)

I followed this and it helped me a lot: http://www.joemiketerranella.com/post/158553998358/octoprint4

If you have a cheap eBay Raspberry Pi LCD module you will most likely need to go here http://www.waveshare.com/wiki/3.5inch_RPi_LCD_(A)

For my 3.5″ Inch “RPi LCD” I needed this: wget http://www.waveshare.com/w/upload/7/74/LCD-show-170309.tar.gz sudo apt-get update sudo apt-get upgrade  (needed to get 109mb)

Install the driver and it toggles the mode to LCD display: Note: The Raspberry Pi must be connected to the network, or else the touch won’t work properly for some reason.

Your screen should pop on to show the command line, I also got booted from my SSH session, closed by remote host – as the Pi rebooted.

The OctoPi images runs off Jessie Lite, so there is no GUI which fucking sucks, so we need to install one.

Install lightdm (needed 222mb in downloads)

sudo apt-get install lightdm sudo raspi-config

Boot Options > boot go desktop and login as ‘pi’.

Fuck didn’t work.

https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=133691

sudo apt-get install --no-install-recommends xserver-xorg sudo apt-get install --no-install-recommends xinit sudo apt-get install raspberrypi-ui-mods  (needed to get 140mb, 315mb used…Jesus…)

try again to…

sudo apt-get install lightdm

startx without lightdm

no go… Fuck.

https://raspberrypi.stackexchange.com/questions/43847/startx-command-not-found

[/crayon] startx……ok? tossed errors. Lets reboot. pixman.

./scripts/install-desktop  …. didn’t work either.

Black screen and cursor… ugh damn it all. Nothing but fucking grief… Damn you Jessie Lite, and damn you for removing the GUI guts, and while I’m at it damn you OctoPrint for not having the GUI shit either…

https://github.com/foosel/OctoPrint/wiki/Setup-on-a-Raspberry-Pi-running-Raspbian

Use the image that works with the screen, that i still have or ? Well the image is Wheezy so shit, nope. Lets try a new install of Raspbian on a SD card, then add the video driver. Will we get a desktop?

So Jessie (full) and lets try the newest drivers for the screen this time?

I finally got it fucking working, and I am not happy that it took this long, and I am not happy with the unit as a whole. Most likely because I m using an RPiB2 maybe? I have also tried a RPiB and that was soooo fucking slow… to the point it was unusable with a touch screen. Might have been ok for just the OctoPrint server but I didn’t even try it I switched back to the B2 immediately.

So… load the OctoPi image (Jessie lite bastards) and once that is done, do the LCD show bullshit… it should reboot and give you a desktop…

Now the god damn camera wont work…I tried the B no go, tried the B2 no go. Tried the B2 again wtf? Oh maybe I should enable the camera via raspi-config?….wtf no where does it mention that, not anywhere… after i found a forum post saying to enable the camera it finally fucking worked…wtf guys.

Now another fucking problem… the browser. Chromium wont load, requires a kernel upgrade or some bullshit… dude wtf, I just downloaded your “complete” image. Complete my ass, I have to do extra shit then it ain’t fucking complete. Epiphany works but no supports for kiosk mode. Jesus…

Is this fucking worth it??

On top of that I hear transferring files via wifi to the SD card is horribly slow. Most people seem to just stick to using the SD card and use the screen on the printer… all for touch control and a camera…gah.

Three fucking days….solid days so far… trying to get this bullshit working.

So to get chromium to work I had to upgrade the kernel, rpi update….

Which broke the fucking LCD screen….fuck this shit. I give up. I’m going back to square one. reflashing the SD card with OctoPi (Jessie lite) enabling the camera and leaving it as is..no touch screen.

I feel depressed now, and lost three days of my life. Dont make the same mistake… or buy an official RPi screen and a new RPi 3. I would actually recommend a 7″, as the 3.5 is way too small. It doesn’t even fill the whole screen.

 

(Update: this shit was a pain in my ass. I turned out just flashing a straight copy of OctoPi to the card and running it as is. And to correct my mi-information, OctoPrint allows you to transfer files to the Pi or the printer SD card. Going to the Pi is fast, the printers SD card is where it takes FOREVER. Just don’t do it.)

 

OctoPrint and Email Notifier woes

Email Notifier Woes

Update 3-22-19: It appears that the plugin is broken, dead, and abandoned by its creator. I currently know of no other way to send notifications besides Twilio or IFTTT.

I have OctoPrint (via OctoPi) setup and I wanted a way to be notified when my print was done without constantly walking into the garage. So I searched the plugins one day and found the Email Notifier.

After I installed it I could not get it to work for the life of me. I followed the instructions of adding my username and password to the keyring but it always produced an error NameError: global name ‘keyring’ is not defined”. Tried some fixes here and there but nothing had worked. So I bailed.

I tried to install the SMS Notifier (Twilio) instead, and that seems to have broken my plugin installation manager. Great. Now whenever I try to install a plugin after I tried to install the SMS Notifier I get the error message about pip not understanding the output or some shit. Great. I have flashed an SD card 2x and tried this twice, it always causes this issue. Damn you SMS Notifier. I have not looked at their Github for a fix yet, so… (Update: it did not break my plugin manager, that was another issue.)

I went back to the Email Notifier, and this time I got it working. I spent some more time digging on the net and found the solution to the issue I had of the keyring not defined. Then… I ran into a different error of yagmail not wanting to send mail via Google because of some reason (it didn’t say exactly) just gave me the generic error code of “send-mail: Authorization failed 534 5.7.14”. Looking that up had no help. But… I did find the answers to my problems and now my Email Notifier is up and running!

I get the error message of there being a new pip version but I have ignored this so far. These are the steps I took to get it working, YMMV.

First make sure that your Google account is setup to allow less secure sign-ins.
https://support.google.com/accounts/answer/6010255

Then SSH into your OctoPrint and update yagmail then install keyring.

Install yagmail (its probably already installed but hey)
/home/pi/oprint/bin/pip install yagmail[all] --upgrade /home/pi/oprint/bin/pip install keyring --no-deps

Start OctoPrint Python
/home/pi/oprint/bin/python

then

(control+z to exit)

Reboot the Raspberry Pi for all the changes to take effect. I tried just restarting OctoPrint but that didn’t work. After the reboot I ran into another issue (of course).

“sending failed. Reason :: send() got an unexpected keyword argument “validate_email”

Modify the file init.py (__init.py__ is how it showed on my system with ls ) found in /home/pi/oprint/lib/python2.7/site-packages/octoprint_emailnotifier and change the line:
mailer.send(to=emails, subject=subject, contents=body, validate_email=False)

to
mailer.send(to=emails, subject=subject, contents=body)

(here is the fix https://github.com/anoved/OctoPrint-EmailNotifier/issues/41#issuecomment-315799836)

Places I found my answers:

https://github.com/anoved/OctoPrint-EmailNotifier/issues/8#issuecomment-187017056
https://github.com/anoved/OctoPrint-EmailNotifier/issues/27#issuecomment-295525220
https://github.com/anoved/OctoPrint-EmailNotifier/issues/27#issuecomment-302890618