After only a few hiccoughs along the way we are entering the final stage of the Grocy set-up procedure. Getting barcode scanning working should markedly streamline the process of dealing with products.
As this was a test of the Grocy system it was definite that I was going to use the camera on my phone as a barcode scanner. But there are options around this choice if everything works as required and the system progresses into an installation phase.
Although use of a phone camera is by far the simplest method of capturing barcodes, it is not the one suggested by Grocy's creator, Bernd Bestel. He recommends the use of a dedicated barcode scanner. These days they are not that expensive and a basic wired model can be found for as low as £12. Not that I think that this is a good idea unless you want to lose the mobility that we have just set up. For twice the price (still not that much if you are using Grocy routinely) you can get a wireless version, which should retain your freedom of access to the system. However, there are some other differences between the two types of scanner beyond the presence or absence of a cable.
Undeniably a dedicated barcode scanner will do a more reliable job of capturing barcodes. But set against this is that it is another system that requires hardware/software maintenance and you will need to be able to interface it with Grocy. These issues aren't insurmountable however, a barcode scanner typically operates in the same manner as a keyboard for instance. Conversely neither are they requirements prior to operating the system. Indeed, if your barcode scanner is not operational the ability to fall back to phone use is really useful if you want a resilient system. You can hardly push pause on eating and drinking while you wait for your barcode scanner to become functional again, even if it has only run out of charge.
So, with the above in mind, let's review the three options for mobile Grocy access; the Android browser, the Home Assistant (HA) app and the Grocy app.
But first we need to associate a barcode with our test product. To do this return to Manage master data > Products and select Edit this item (teal icon circled).
On the PC browser interface you can see the section for Barcodes. Grocy provides a pre-generated "Grocycode" for use in cases when the product does not have one already (eg local bakers' or home-made items). As products come in different pack sizes and from different shops multiple barcodes can be associated with each product. OK, not so commonly for Heinz Baked Beanz, but a kilo of flour is the same thing even though it comes with a different barcode from each shop you buy it from. Clicking Add (circled) brings up the Create Barcode dialogue.
Our test beans are coming from Tesco (Shop) and in a single tin (Amount = 1). The Barcode field can be typed into directly. At this point I found out that my tins of beans didn't have a barcode (as they were part of a multipack) so I had to use a stunt-tin of tomatoes.
Clicking the blue photo icon brings up another dialogue allowing you to Scan a barcode, which, if there had been a camera (or a barcode scanner) on my PC, allows you to scan the barcode in directly.
With a barcode registered to the beans in Grocy it was time to move onto testing the mobile access options.
When I tried to scan in the barcode using both the Android browser and Home Assistant app interfaces for Grocy neither came up with an image of the barcode as there was no access to the camera. I discovered later that this was probably due to HA not using a secure connection (https:) for Grocy, as described here. I could have worked out how to re-install HA with SSL in order to see if these access options would work, but I only needed to confirm that barcode scanning works. If I decide that using either of these options is important for future use I can always return to this, unless the Grocy app doesn't work either...
Fortunately there were no issues with the Grocy app. Using Purchase as a test for the scanner, I simply tapped on the barcode icon, held the red line over the barcode and the app read it and brought up the correct product details from the Grocy database.
And that concluded the testing of the Grocy system; this last test showed that the criteria I set out in the first post of this series were met. The next task was to move from testing the system's functionality to testing it operationally, ie it works, but is it useful?
Comments
Post a Comment