Skip to: Site menu | Main content

Automation > Data Input Ideas > Barcode scanner

Barcode scanner

Barcode scanners are one of the easiest things ever to add to a home automation system. They typically come with either a USB connection or a "keyboard wedge" which plugs into your computer's keyboard port and the keyboard itself, so as far as your computer is concerned it's just a keyboard. When you scan a barcode it's basically exactly the same as if you'd typed the code in by hand and hit "enter", so your software doesn't even have to do anything special to use it.

I set up an old Macintosh LC475 with the laser reader in the pic, with a web browser in the startup items and the default page in the browser pointing to a web server on another computer elsewhere in the house. The web page contains a simple form with one input box that automatically gets focus and since "enter" submits the form, it all Just Works. When the form is submitted it checks a MySQL database to see if that particular product is on file and increments the inventory count if it is, or displays a screen to enter product data (description, etc) if it isn't.

What would be cool would be adding another reader at the rubbish bin so I could track groceries both at point of purchase and at point of disposal so inventory could be tracked totally automatically.