Comments (3)
Any news on this? I'm also looking for a solution
from barcodebuddy-homeassistant.
Overview of solution
If you have a USB barcode scanner, like the Bur3069-2d wireless USB barcode scanner that I'm using, you only need to expose the /dev/input/eventX
device as in the Barcode Buddy Docker Documentation to the Docker container. This is done via the config.json
by forking this repository and making the change.
Here is my change to the config.json
"devices": [ "/dev/input/event0" ],
"environment": {
"ATTACH_BARCODESCANNER": "true"
},
I have no idea how Homeassitant works under the hood so I don't know if there's a way to expose those config.yaml variables to the UI to allow the user to set their input, but that would be one way to make this easier for users. I started looking at these docs, but they only scratch the surface. I'll keep looking but hopefully someone with a better working knowledge of HA can chime in.
Determining your input device
If you are running on a Raspberry Pi without a keyboard, mouse, or anything other than the barcode scanner that might show up as an HID device, then you can stick to using /dev/input/event0
. Otherwise, you'll have to figure out which event device to use.
# ls -l /dev/input/event*
crw-rw---- 1 root input 13, 64 Sep 19 02:07 /dev/input/event0
You can verify that the device is your barcode scanner by dumping the device on your screen and scanning a barcode. If you see a bunch of garbage after pulling the trigger, you'll know you have the correct device; you might want to try if you have more than one device to ensure the output isn't a coincidence.
# cat /dev/input/event0
M'cc ��%M'cc � �M'cc M'ck ��%M'ck � M'ck M'cs ��#M'cs ��M'cs M'c?{ ��#M'c?{ �M'c?{ M'cU ��'M'cU ���M'cU M'c ��'M'c ��M'c M'c
��'M'c ���M'c M'c> ��'M'c> ��M'c> M'c ��'M'c ���M'c M'c ��'M'c ��M'c M'c ��#M'c ��M'c M'c ��#M'c �M'c M'cc ��#M'cc ��M'cc M'cL ��#M'cL �M'cL M'c� ��'M'c� ���M'c� M'c ��'M'c ��M'c M'c ��#M'c ��M'c M'c~ ��#M'c~ �M'c~ M'c1 ��$M'c1 �M'c1 M'c� ��$M'c� M'c� M'c ��'M'c ���M'c M'c
Root access
For troubleshooting or if you have more than one input device, you'll need SSH root access to the Raspberry Pi and HomeassistantOS; this was an infuriating process for me trying to follow the official developer documentation scouring the forums until I ran across the HassOS SSH Port 22222 Configurator. Using that approach worked for me, the only trick there is that you must disable "Protection Mode" for it to work. After you run it without protection mode, you only need to hard reboot twice to get SSHD to come up and ready to accept your private key.
from barcodebuddy-homeassistant.
Hi, any update to this feature? I want to add USB barcode scanner to this addon.
from barcodebuddy-homeassistant.
Related Issues (14)
- Upgrade HOT 2
- Error preventing use
- Can not install the Addon HOT 3
- s6-overlay-suexec: fatal: can only run as pid 1 HOT 12
- Won't Start Anymore HOT 4
- Cant access the web ui HOT 3
- Unable to connect to API: Invalid API key
- Feature Request: Support hassio ingress
- AddOn doesn't run after installation with fatal error HOT 2
- Missing persistent storage in Dockerfile / no data saved HOT 6
- Redis cannot connect?
- Files are stored directly in config folder of Home Assistant
- BCB Grocy addon not showing up in HA Supervised HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from barcodebuddy-homeassistant.