City-of-Bloomington / timetrack

Digital time keeping system with both a web-based calendar entry and a kiosk based badge entry interface
GNU General Public License v2.0
78 stars 2 forks source link

Question regarding badge reader #276

Closed sbayeta closed 3 years ago

sbayeta commented 3 years ago

Hi guys! Really nice project 👌. I just went over the source trying to find out how you interface the badge reader, but couldn't find anything. Are you using the web serial api? Can you point me to some relevant code? Thanks!

inghamn commented 3 years ago

The badge readers are connected to Raspberry Pis which submit the clock-in clock-out times via an HTTP web service call to Timetrack.

https://github.com/City-of-Bloomington/timetrack/blob/master/docs/index.md

schertza commented 3 years ago

Hello sbayeta,

I interpreted your question as: how are we reading data from the serial card reader. We are taking advantage of the card reader being on the usb bus of the Pi. It is then just like a keyboard device where the data is coming in on sdtin. We did setup the card reader to append a carriage return on the end of the data stream when a card is read. This data is just submitted as Cliff described. I hope this answers your serial api question and why you could not find the code.

Thanks, alan

sbayeta commented 3 years ago

Thanks guys! I don't know why I assumed that the RPi was running a web client.

Edit: it is running a web client, isn't it? It's just that the interface is via keyboard emulation on the badge reader right?

Cheers! Santiago