Raspberry Pi Zero Octoprint / OctoPi setup

Written on Dec 2015

I expect this post to age quickly but will hopefully find people setting up OctoPi for the newly released Pi Zero.

OctoPi is a Raspbian image with Octoprint installed and configured on it. Octoprint allows network access and control of a USB connected 3D printer. It is the best thing since sliced bread, in my opinion and it has allowed the whole household to access the printer. The software has also created freedom to control the printer from multiple devices in the house. The webcam monitoring allows progress of prints to be checked too. There is even a mobile phone app now that allows control of the printer from an Android smart phone.

Get the case

House your Pi Zero in a case to protect it or use self adhesive posts to mount it somewhere on or in your 3D printer, remembering to allow access to SD slot and USB sockets. I’d recommend this case I made: http://www.thingiverse.com/thing:1167846

Get the image

If the current release version of Octopi is placed into a Pi Zero, then the Pi Zero will flash the on-board LED repeatedly 8 times and the Pi Zero will refuse to show any output to HDMI and will fail to boot.

This is because the current (Dec 2015) release version of OctoPi (2015-07-02_2015-05-05-octopi-wheezy-0.12.0) is built on the wheezy version of Raspbian. Raspbian is the flavour of Linux operating system developed for the Raspberry Pi devices. The Pi Zero requires the jessie version of Raspbian as a minimum to boot. Luckily the nightly builds of OctoPi are now using Jessie, although the nightly builds are not official releases and may have some issues yet to be ironed out, I’ve actually found them reliable in practice. Download the latest nightly build from the nightly build folder, for example today it is https://storage.googleapis.com/octoprint/2015-12-04_2015-11-21-octopi-jessie-0.13.0.zip, the 04th of Dec being today.

Write the image

Uncompress the zip file and use the resulting disk image to write to your micro SD card that will be placed into the Pi Zero. Follow the standard instructions for writing Raspbian to SD cards. Follow the instructions on “how to use it” here https://github.com/guysoft/OctoPi. Remember to configure the network settings in the network text file located in the root directory of the written SD card.

Plug in the Pi Zero and 3D printer

Use a micro-B USB on the go to USB A female cable adapter, to plug in a (powered preferably) USB hub, into which you plug a WIFI dongle and the printer. Next plug in the micro-B USB power to the right hand socket, this is the dedicated power socket, does not do data and also note the data USB socket next to it cannot be used to power the Pi Zero.

Boot and using a web browser browse to http://octopi.local or find the IP address your network has assigned to the Pi by checking the router or DHCP services.

At this point you should be up and running.

IMG_7897

Printrbot, Pi Zero & USB 3.0 Hubs

Trying to connect Printrbot Simple Metal Printrboard to the Pi Zero resulted in no serial port being listed in OctoPi. The message on trying to auto connect was:

Failed to autodetect serial port, please set it manually

Connecting to the OctoPi via SSH and looking at the $ dmesg output revealed issues with the Pi identifying the Printrboard, which presents itself as a serial device.

device descriptor read/64 error -71 dwc_otg

This normally indicates a power issue, but the hub is a Amazon Basics USB 3.0 powered hub, so this seems unlikely. From the previous Pi to the Pi Zero, the printer has moved from being directly plugged into the Pi to going via the hub, due to the Pi having no internal USB hub.

After some research it turns out that support for USB 3.0 hubs might not be very good on the Raspberry Pi. I tested this by getting a simple, old unpowered USB 2.0 hub out the drawer, much to my delight this worked allowing the printer to be detected by OctoPi.

Please comment if this was helpful as it motivates me to write more!

Dynamics GP Power Tools–what will it not do?

image

If you are developing on top of Dynamics GP, or perhaps go to the many Dynamics GP conferences, or maybe just using search engines to find answers to your common GP problems, then you will have encountered David Musgrave (MVP).

His work is pervasive in the Dynamics GP world and he has saved my bacon, more times than I can count via technical blogs revealing the obscure corners of the GP product that I too often find myself despairing in.

Until a year ago David was working for Microsoft. You may have experienced that there are major world news events that you remember exactly where and when you heard that big news. I remember the moment I was told by a MS developer that David was having to leave Microsoft, news that made the group groan. I had been waxing lyrical about his work and suddenly felt deflated. Not long after, that same news shook the partner community as it propagated out to all corners of the world. You may ask, Why the drama? Well David has given a lot to the GP community both user and partner side of it and he is someone that I think we all respect and hold in highest regard and esteem. I also think that we were being a bit selfish in worrying that this news might herald his exit from that community. Thankfully this was not the case! In fact it turns out that it may have been one of the best things that could have happened for us and time will tell for David. For now all us GP developers have our code warrior, bridging the chasm that lies between Dexterity, the barren dry scripting language GP is written in and the world of .NET development, the lush palace where the rest of us live (yes I mean palace)..

A year ago, the dust settled, David went quiet for a little while and surfaced with a product, Power Tools published by his company Winthrop Development Consultants, whose logo has an uncanny resemblance to GP Dynamics sails log (although it predates his MS days). David has released the product and is continuously developing it a high rate of knots. It is a product that helps the rest of us developers be more productive, and in many cases enables us access to do things with some aspects of GP that otherwise we would be barred from! The product is called GP Power Tools, for indeed it is powerful. The product provides not only developer APIs and helpers to develop solutions with Dynamics GP, it also provides facilities for administrators to perform admin tasks and access to specialised debugging diagnostic tools together with exposing so many GP configuration switches. Power Tools has sprung from a product from Microsoft named The Support Debugging Tool, something that David actually wrote in the first place and got the rights back from Microsoft for.

Features

Find below the extensive feature list, as of today Build 20, from the user guide: GP Power Tools User Guide

Feature

Description

Manual Logging Mode

Manually turn on SQL Logging and Dexterity Logging and Profiling

Individual Logging

Control Individually control SQL Logging and Dexterity Logging and Profiling

Dex.ini Settings

Change System and Debugger Dex.ini Settings

Resource Information

Obtain Details of any Table, Form, Window, Field or Report resource

Security Profiler

Monitor all Security check activity

Security Information

Display Security settings for specific resources for a user and company

Security Log

Security activity tracking for users, companies and the entire system.

ScreenShot

Capture and either email or save Screenshots and System Status information

Send Email

Send Email messages from within the application.

Automatic Debugger Mode

Automatically starts logging and watches for specified events

Dictionary Control

Enable and Disable third party products

XML Table Export

Export any table(s) to an XML file

XML Table Import

Import previously exported tables

Runtime Execute

Run Dexterity sanScript scripts

SQL Execute

Run Transact SQL scripts

.Net Execute

Run C# and VB.Net scripts

Configuration Export/Import

Export and Import settings

Configuration Maintenance

Clear Debugging Tool settings

Administrator Settings

Change system wide Administrator Settings controlling the behavior of the tool

Dex.ini Configuration

Automatically update Dex.ini settings across multiple workstations.

Database Validation

Validate SQL user and database information and table structures.

About GP Power Tools

Display version and build information or un-install GP Power Tools

 

Tools & Utils for all

toolboxPower tools has some very dangerous, in an exciting way and powerful facilities that only power users, developers or system administrators should use and offers other features that are end user friendly. End user features such as emailing a screenshot & snapshot of the Dynamics GP configuration to the support people in your organisation on the press of a button in GP is really useful.

Indeed Power Tools is much like one of those concertina tool boxes, where you can dig deeper and deeper inside to find just the right fitting tool.

One more thing, David has a sponge like special power, he soaks up any ideas in the atmosphere from users, partners and I can only guess where else. He then refines those ideas into feature sets for products. His pace of development is astounding, so I have no doubt that by this time next year there will be little Power Tools can not do! I am also expecting to see some other products emerging into the GP market, long may it last.

Now, go read the product pages, get it ordered and start benefiting from David’s hard work.

Mystery of Qty Allocated & field name ATYALLOC

In Dynamics GP the inventory quantity allocated has a field name of “ATYALLOC”. You can see it lurking in IV00102 table, as a decimal (19,5). .

Why is is named ATYALLOC?

imageA field typed day in and day out, I ponder each time it is why it was named so. After all, would we not expect it to be named “QTYALLOC”, so tell me where did that “A” come from?

My horrific assumption is that this was a typo, the Q and A key on a keyboard being so close together, please let me be wrong. Did such an error get through QA back in the dark days of software development?
I have the feeling there may be a back story to this naming that someone on the inside may be able to tell us about. Perhaps there was a conflict with another field, or some obscure reason it was named so?

Please comment if you can add anything to this mystery…or simply that I’m stupid for not seeing some obvious reason!

 

[updated 25th Oct 2015] The legend…

.. so I was listening to The Enterprise Software Podcast Episode 28 featuring Ed Kless https://twitter.com/edkless where he turned a myth into legend, Ed mentioned the ATYALLOC field and had a story about it. This was really odd as the podcast was in Aug and I independently posted this post without knowing about it in the September – bizarre!

Ed said,
“I think I have the corrected legend”

Ed goes on to explain that Mitch Ruud, former manager of technologies at Great Plains Software  https://www.linkedin.com/in/mruud told him the origin of this field name.

Ed continued, “He {Mich Ruud} was ‘Demo God’, he was the man for OLAP cubes”,
“...it was a pain at the time, you'd bring up the list of fields, and there was like 200 fields. He had to scroll so far down that it took like forever. It was messing up his demo. So he said,
‘what we need to do is temporarily make one of these an A so I can easily find it  and it will make it much easier to do the demo.’
So they did it and it {the field} mistakenly found its way into {a production} build and it remains there today...”

Well there we have it, this field has its own legend! –I’d love to know if anyone out there can verify this with Mitch! If there are any other variations on the story let me know! Personally I have doubts about the validity of this story, as David in the comments of this post indicates it is not easy to rename a Dexterity field. My question is, would they really rename a field just to make a demo quicker? Why would you rename just one field for a demo, and if you were to, would it really be qty allocated, are there not more interesting fields to demo?

Dynamics GP User Group for the UK, or not?

imageToday at m-hance customer day there was a session titled “Joining Information,New Microsoft GP User Group”, hosted by Andy Brown of m-hance.

This session was short, at half hour with an open questions to the audience.

The questions were on purpose seeing formative views along the lines:

  • Do the people present think that a GP user group is a good idea?
  • If so what should that User Group look like?
  • Who should run it?
  • Should  it be independent of partners
  • What would it offer to members?

At this time September 2015, I am unaware of any UK user groups for Dynamics GP. In the US, there is GPUG (GP User Group) a user group that is strong enough to hold a conference each year in the US. It is supported by Dynamic Communities an organisation from that describes itself as…

Dynamic Communities Inc. is the administrative organization behind professional associations and software user groups such as the Dynamics AX User Group (AXUG), the Dynamics GP User Group (GPUG), the Dynamics CRM User Group (CRMUG), and the Dynamics NAV User Group (NAVUG).

Should Dynamic Communities be approached to help?
m-hance would consider helping with seeding a new user group, supporting it to get it going, after all it is in their benefit to grow a strong user community that shines and evangelises the product. It could  be just a user group affiliated with that single partner, but an independent user group seems like a much better proposition, one in a position to encompass all the users of GP across all partners in the UK. Any sponsors would find an partner agnostic group spanning all users a more tempting proposition, I would imagine.

Data protection prevents partners passing on customer details, but they can promote such a user group’s existence in say email communications with their customers, thus drive users to such a group.

A show of hands showed half the audience to be interested, however my personal view is that each of those who were interested had a different idea of what a user group should look like to them. There was no firm conclusion.

I would be interested in any comments against this post from people who have touched GP user groups in other territories and how they work there, and what they get out of them.