Skip to main content

The Virtual Bean Counter

Prior to the trip to buy groceries each week, the tedious chore of wandering round the house checking how much of all the consumables that a household requires is actually present must be completed. Everywhere there is a stash; upstairs, downstairs, all the cupboards, the fridge, the freezer, etc., etc. I could try to do it from memory, but who has the available headspace to remember how many tins of beans you have at any particular moment and, even if you do try to use this method, how many extra tins of corned beef or jars of mustard is it reasonable to have to buy just to save yourself from the weekly traipse around the house doing a stock-check?

What I need is a Bean Counter.

I want to be able to scan in the barcode on a tin of beans when I buy it and when I use it scan it out again and have the stock level reflect that fact. Then, on shopping day, I can just look at the stock levels from my desk. Or even better it could just tell me when I need to buy more beans again.

Of course this is a really basic function for most businesses and there are whole suites of software for stock management, but this is a household not Amazon. Fortunately a nice person called Bernd Bestel has already solved this problem and the solutions' name is Grocy.

It is supposedly a whole ERP (Enterprise Resource Planning) system designed for the household. It sits on a central server (ie computer) and you or your SO can use a phone as a barcode scanner to interface with that server. Perfect. I don't need the whole ERP shebang, but if it can solve the bean problem then I am willing to give it a try.

Let's set it up.

The first task is to set up the main software on a server that, ideally, should be on all the time, or at least all the times that you want to be using or buying things. I could do this on my main PC but I don't necessarily trust Windows to be able to properly uninstall the package if I decide it isn't going to do what I want. However, if I do decide that it is the right solution, I would prefer to run it on a lower power consumption device as it is going to be on all the time, for example a Small Form Factor device like a Raspberry Pi. In addition, I have also been looking at home automation and wondering whether it is worth getting involved and this too would require an always-on device.

Happily, Grocy has already been integrated into Home Assistant (the leading open source platform for home automation). So I could kill two birds with one stone (a horrible metaphor, btw) and I do have a Raspberry Pi somewhere. But as to where exactly I don't know and really can't be bothered to go a-hunting for it. The answer, then, is to virtualise a Raspberry Pi and install the system on that while I determine whether it is a keeper or not.

Virtualise? I'll leave Copilot to explain that;

Virtualization in computing refers to the process of creating a simulated, or virtual, computing environment rather than a physical one. Virtualization uses software to create an abstraction layer over physical computer hardware. This layer allows for the division of a single computer’s components (such as processors, memory, and storage) into multiple virtual machines. Each virtual machine runs its own operating system and behaves like an independent computer, even though it shares the underlying hardware.

In short I can create one computer inside my desktop PC - like blowing a bubble inside a bigger bubble - then set up Home Assistant and Grocy and if I don't like it I can just trash the whole system rather than trying to uninstall a chunk of programs and any alterations they have made to my PC. Simples!

OK, but how? VirtualBox (VB) from Oracle is my preferred software - other virtualisation software or hypervisors are available, but A) I haven't used them before and B) they are normally more complex than VB, not that VB is exactly user friendly.

Setting up VB is not too taxing though, just download the right one for Windows 11, currently v7.1.4, and install it. To test it out I decided to set up a Linux system, Ubuntu 22.04 LTS, obtained from here. As why not have access to Linux on my desktop?

Unfortunately it was not to be that simple as VirtualBox started with error messages as soon as I tried to get Ubuntu running.

VERR_SVM_DISABLED error message from VirtualBox

Let's debug.

Comments

Popular posts from this blog

How-to: Setting up a Blogger account with a non-Google e-mail address

As I've set up an e-mail address for the blog it makes sense to be able to post from it too. To do that I will need to set up an account with Blogger for the new e-mail address. At the same time I'll create a gmail account to both manage the blog and give access to the Google apps suite without the monthly fee. Skullcinema@gmail.com is already taken (as there is nothing new under the sun), but I can take a related e-mail address. I won't publish it here as the first address will generate enough spam as it is. Setting up a gmail account really doesn't require a guide, but it is covered here if you need one. So, off to set up an account  through Blogger . First of all though, log out of Google and/or Chrome or it will pull you straight through to Blogger on the account you are logged in on. Choose SIGN IN in the top right-hand corner of the Blogger home page, and then select  Use another account underneath the list of your current Google accounts. Now ...

Getting moving with Grocy

Now we have Grocy working , even if in skeletal form, the next hurdle is to cut the tie to the PC and go mobile. The advantages of being able to update stock levels on the hoof are obvious. All consume and purchase operations can be done at the point of use without the need to make notes and mark these up later. Inventorying can be performed at the storage location rather than dragging everything to the computer or more note making. What is needed, therefore, is mobile access to Grocy via a smartphone or tablet. There are multiple ways to achieve this. Web Browser The first and simplest method is to use the web browser on your device. Although, at least with Android devices, the browser is slightly finnicky about which address it will accept for the Home Assistant (HA) server. Using the standard homeassistant.local:8123 address results in an error message ' This site can't be reached DNS_PROBE_FINISHED_NXDOMAIN. ' There appear to be known problems with Android phones ...

HMRC a-no-go

A few years ago I set up a new company in the UK. The government here has invested quite heavily in digital services so this can be almost entirely completed on-line. You begin the process by notifying Companies House , the venerable UK registrar for companies (for 180 years this year), that you have set up a company. In order for you to do that on-line the Government needs to have some sort of user registration system and one that is a bit more secure than your regular website. Enter the Government Gateway , a government-wide ID system launched in 2001. It was initially designed to be a one-stop-shop that would provide a log-on solution for all of the UK government's on-line services. Whether you were a business/organisation or an individual citizen, with security credentials backed up by GCHQ no less. The Companies House process was exceptionally straightforward and a Government Gateway ID (GG ID) was set up by Companies House for the business. No problems. Another early task...