CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • CiviEvent Barcode Scanning
Pages: [1] 2

Author Topic: CiviEvent Barcode Scanning  (Read 12158 times)

Infinium

  • Guest
CiviEvent Barcode Scanning
June 14, 2009, 07:27:49 pm
Hello, CiviCRM community.

I am a part of a student project (nicknamed Infinium) whose purpose is to modify the CiviEvent module to:
   - Allow event hosts the option of inserting a barcode within event registration e-mails
   - Allow said barcode to be read via a scanner or interpreted by its numeric value (punched in manually)
   - Update the status of a participant who has attended

The purpose of the project is to have participants be able to check-in to an event as quickly and painlessly as possible, while being able to monitor and track which participants chose to attend. The monitoring and tracking is not the focus of our module; rather the focus is on implementing a barcode+scanner solution.

Ideally, we would like to produce something worthy to the open source community. It is our first time engaging in such a project, and at this point we're still unfamiliar with the inner workings of CiviCRM, so any advice, criticism or helpful information would be great.

Has a project such as this been attempted in the community before? Or even just something using scanners or barcodes? We've only just begun looking at source code (Only one of us knows PHP), but can anyone predict impacted files? Or any other useful source to examine?

Any comments are appreciated. If I didn't make something clear enough, just ask. Thanks in advance.

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: CiviEvent Barcode Scanning
June 14, 2009, 08:15:41 pm
Hi Infinium - sounds interesting.  I know of one sports team who are looking to use just this sort of feature - the plan being to issue players with a card, so the card gets scanned each time they turn up, in order to keep a track of attendees. But since this doesn't involve sending out barcodes by email we weren't anticipating trying to generate the barcode to be included in civiMail.

Our suggested approach would have involved producing a csv export from the database for all the players each season, then converting their IDs in to a barcode using a standalone program - print those out on cards for each player and/or a big sheet with all names/barcodes on so those who turn up can just put a tick against their names.

Then scan those who turn up, and import the table of those who showed up back in to civicrm so that it enters the data in to a new Data Field that will have one option for each game.

I anticipated this would be easiest to scan directly in to spreadsheets for importing as the impression I got was that the barcoding will basically be a standalone system - and that the software that comes with the barcoding should take care of converting the Participant ID in to a barcode to then get printed on to their cards or big sheets for those who forget their cards! - in the latter case they participant would just need to 'tick/check' against their name on a sheet - then the organiser can run the barcode reader over those barcodes.

A quick search suggests that one option would be to use software that operates off a video camera / web cam connected to a laptop - this may be a good cheap option as they won't have to invest significantly on the technology side of the set up.

I also see that there is a Drupal barcode module though I haven't yet considered how this might be applied to provide a barcode for each player, but certainly worth following up http://drupal.org/project/barcode

This site is more typical of what is out there. http://www.comdirections.com/AttendanceTracker/

Not sure if any of the above helps, but thought your efforts deserved some encouragement ;-)
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Infinium

  • Guest
Re: CiviEvent Barcode Scanning
June 15, 2009, 11:22:29 am
Thanks for the quick response!

We appreciate the suggestions; it really helps us to see the problem from multiple perspectives. Although, perhaps I should have mentioned that we are working under a client-signed statement of scope... so our approach is somewhat constrained. The basic requirements are: coding/decoding barcodes, a simple and intuitive interface (for manually punching in barcode numbers, or registering on the spot at events), the barcode scanner itself (which exists as an option to manually entering data), and compatibility with Windows and Linux.

The whole "manual-checkin-with-some-guy-holding-a-spreadsheet-on-a-clipboard" will definitely be a part of the backup system, in case there are technical problems at the event.

That idea with the web cam / video camera is interesting. I'm sure the participants would love just flashing their barcodes in front of a webcam and walking on through. The client would probably like it too, but I'm sure the rest of the team is groaning as they read this. ;)

We may not have time for development but I would definitely like to look into this further. Are there any known projects dealing with something like this?

Also, is there a VM available with Apache/Drupal/CiviCRM etc available for us to use for development and testing? It would save us a good deal of trouble.

More questions are sure to come as our team progresses.

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: CiviEvent Barcode Scanning
June 15, 2009, 12:58:43 pm
I dont think the vidcam was meant to be running all the time - but maybe.

What's the time frame for your project?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: CiviEvent Barcode Scanning
June 15, 2009, 02:27:26 pm
I would expect the code reader system to be fairly standalone, and I suspect you'll find that there's already a product which does that which you could integrate. The code reader only does one task AFAIK - scanning a code and converting what looks like a series of lines into a series of characters (and maybe doing some custom action with the characters afterwards).

So what you'd probably want is:

1. A barcode scanner which can read the barcode. This might be a standalone unit or it might be a person with a barcode reader of some form.

2a. You could use a regular CiviCRM form here. Place the cursor into the CiviCRM contact ID field, and use the barcode reader to scan in a unique identifier. Enter additional details (if required). Submit the form. Barcode reader is doing no more here than reading and entering the contact UID. It is just saving you a few seconds typing. (This is the simplest possible solution IMO.)

2b. OR, you could scan the code and use the barcode reading software to trigger a request which notifies CiviCRM remotely. This would require a code reader which can perform an action when the code is read (eg, running your own custom php script) and that script would communicate the attendee details to a CiviCRM instance.

3. CiviCRM receives your attendee request. If 2a then this is completely standard CiviCRM. If 2b then could be via CiviCRM's exposed SOAP systems, OR there are other approaches, like using Drupal's XMLRPC api or your own PHP handler to call CiviCRM's API/internal functions to add the attendee details.

Re VM images -

Probably best to look for a LAMP VM image which is made for your VM software (you don't say which you have), then add Drupal + CiviCRM on top of that. I'd avoid Drubuntu as it's from mid-2006, which is getting a bit old now. Not aware of any VMs readily available.

Re barcodes -

There are many types of barcodes. First-gen barcodes (parallel lines) will require a dedicated barcode reader, but more recent code formats can be more easily read using a standard camera and special software. You might look into formats like QR Code if you want to use webcam hardware you already have (though, I heard that Fry's in the US was selling portable barcode readers for $1 a few years back).

1st-gen code:
(http://upload.wikimedia.org/wikipedia/commons/thumb/5/5d/UPC-A-036000291452.png/180px-UPC-A-036000291452.png)

QR Code:
(http://upload.wikimedia.org/wikipedia/en/4/42/Wikipedia_mobile_en.png)

Drupal's barcode generator will help you create barcodes, but it won't make Drupal read them AFAIK.

Good luck with your project! Don't forget the KISS principle :)
« Last Edit: June 15, 2009, 02:34:25 pm by xurizaemon »
@xurizaemon ● www.fuzion.co.nz

Infinium

  • Guest
Re: CiviEvent Barcode Scanning
June 16, 2009, 06:13:33 am
I'd really like to answer in more detail, but that'll have to wait until we have time to learn PHP and study CiviCRM in detail. I'll answer as best I can.

Quote
What's the time frame for your project?

Until the end of August. Currently we're students on a co-op work term, so we're just putting in free hours for research and development (I don't think the school realized how small the project was before they gave it to us...). From about September to mid-November is the "official" detailed design and implementation phase.

In other words, until September we're just getting a head start on the project. Our best-case scenario is to have it done before then (And maybe even have it working too).

Quote
The code reader only does one task AFAIK - scanning a code and converting what looks like a series of lines into a series of characters...

Yeah. We recently managed to find a scanner that reads a barcode and passes it to the OS as keyboard input. I don't know if that's standard, but it's very handy for filling out form fields.

Quote
2a. You could use a regular CiviCRM form here.

Personally, I'm still totally unfamiliar with CiviCRM's mechanics. Other members of the team have more experience with it, and only one of us knows PHP (Though we'll all be picking it up over the next short while). But I get the gist of what you're saying.

Quote
OR there are other approaches, like using Drupal's XMLRPC api or your own PHP handler to call CiviCRM's API/internal functions to add the attendee details.

This sounds like how we're approaching it. But, after seeing how CiviCRM works, we'll very possibly take a different path depending on what requires the fewest changes or additions to existing code. What would you say that would be?

Quote
There are many types of barcodes.

We're probably going to stick with a 1st generation barcode, since it seems to be what our client is expecting. Plus, QR seems like overkill. :)

Quote
Don't forget the KISS principle

Eh?

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: CiviEvent Barcode Scanning
June 16, 2009, 01:07:48 pm
KISS = Keep It Simple (less polite word beginning with S and ending with *tupid)
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: CiviEvent Barcode Scanning
June 16, 2009, 01:21:29 pm
Hi there,

Can i ask what sort of platform you will be running on the box attached to the barcode reader? When we had talked about this at our end I had been assuming the requirement would be to have the barcode read and nothing else (ie. no keystrokes / submitting of forms).

I had been thinking a VBA form (i.e. MS Excel) using a REST interface call would be the easiest way to implement this (bearing in mind of course that I am comfortable with VBA)
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: CiviEvent Barcode Scanning
June 16, 2009, 01:24:40 pm
Just adding to this - the use case Eileen and Pete (and potentially Xuri) are discussing would involve offline data gathering for uploading later. Hence no intention of having barcode reading direct in to civicrm.

Avoids any issues of not having internet access at critical times of sign up  ;)
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: CiviEvent Barcode Scanning
June 16, 2009, 04:12:59 pm
Quote from: Infinium on June 16, 2009, 06:13:33 am
Quote
2a. You could use a regular CiviCRM form here.

Personally, I'm still totally unfamiliar with CiviCRM's mechanics. Other members of the team have more experience with it, and only one of us knows PHP (Though we'll all be picking it up over the next short while). But I get the gist of what you're saying.

That's why I advise the simplest possible approach as being the best starting point. No PHP hacking required. I may have not been clear with what I was suggesting.
 * Configure the barcode reader to scan the barcode and enter the result as keyboard input.
 * Print unique contact IDs as the barcodes - could be CiviCRM Contact ID or External Identifier.
 * Build a CiviCRM form using the GUI which allows a contact to register for an event using their unique ID.
 * When attendant arrives, place cursor in form field, scan barcode (enters unique ID), enter other details via keyboard if req'd, press submit. Repeat.

 * Javascript code suggestion: automatically place the cursor in this form field on page reload; configure CiviCRM to redirect back to the starting form after the attendance is submitted. Will make the process much smoother.

Quote from: Infinium on June 16, 2009, 06:13:33 am
Quote
OR there are other approaches, like using Drupal's XMLRPC api or your own PHP handler to call CiviCRM's API/internal functions to add the attendee details.

This sounds like how we're approaching it. But, after seeing how CiviCRM works, we'll very possibly take a different path depending on what requires the fewest changes or additions to existing code. What would you say that would be?

I believe the path of least resistance is the one outlined above.

Quote from: Infinium on June 16, 2009, 06:13:33 am
Quote
Don't forget the KISS principle

Eh?
Quote from: peterd on June 16, 2009, 01:07:48 pm
KISS = Keep It Simple (less polite word beginning with S and ending with *tupid)

I was actually shooting for "Keep It Short and Simple", which is the traditional meaning AFAIK :)

Quote from: peterd on June 16, 2009, 01:24:40 pm
Just adding to this - the use case Eileen and Pete (and potentially Xuri) are discussing would involve offline data gathering for uploading later. Hence no intention of having barcode reading direct in to civicrm.

Avoids any issues of not having internet access at critical times of sign up  

Yes, you could just scan the barcodes into a CSV and import that to CiviEvent later. Even simpler.
« Last Edit: June 16, 2009, 06:40:43 pm by xurizaemon »
@xurizaemon ● www.fuzion.co.nz

Infinium

  • Guest
Re: CiviEvent Barcode Scanning
June 17, 2009, 06:07:37 am
Quote
Can i ask what sort of platform you will be running on the box attached to the barcode reader?

Linux and Windows XP.

Quote
* Print unique contact IDs as the barcodes - could be CiviCRM Contact ID or External Identifier.

I guess now's a good time to mention the data to be contained in the barcode:

- Participant ID, somehow related to the registrant database (A three or four digit number... but it's a big difference between 1,000 and 10,000 participants...)
- Event ID, uniquely identifying the event (Two digits)
- Participant type, distinguishing between speaker, viewer, host, etc (One digit)
- Checksum, to help prevent people from entering random numbers and gaining access (Two digits)

Keeping the barcode 8 digits or less should make manual entry quick enough. The checksum has a 1% chance of failing, but security isn't an issue. As long as it helps prevent people from gaining access by smacking their heads repeatedly on the keyboard.

Quote
Yes, you could just scan the barcodes into a CSV and import that to CiviEvent later. Even simpler.

We probably would do it this way, except that our client wants participants to be able to register on the spot at an event. The primary purpose of this add-on is to track statistical information (Who registers and attends, who registers at the event, who registered but didn't attend... etc). Using a CiviCRM form and javascript to control the fine details sound like a solid solution for what we need. But, yes, scanning all the barcodes into a CSV when there's no available network connection sounds like a great backup system.

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: CiviEvent Barcode Scanning
August 02, 2009, 10:59:01 pm
Dear Mr Infinium,

How goes it - is your project progressing? Mere curiosity at this stage.
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

majortom

  • I post occasionally
  • **
  • Posts: 50
  • Karma: 0
Re: CiviEvent Barcode Scanning
August 03, 2009, 02:11:01 am
Quote from: Infinium on June 17, 2009, 06:07:37 am

I guess now's a good time to mention the data to be contained in the barcode:

- Participant ID, somehow related to the registrant database (A three or four digit number... but it's a big difference between 1,000 and 10,000 participants...)
- Event ID, uniquely identifying the event (Two digits)
- Participant type, distinguishing between speaker, viewer, host, etc (One digit)
- Checksum, to help prevent people from entering random numbers and gaining access (Two digits)


Why would you encode anything other than the person's ID? If they have a barcode, they have already registered for your event. You are going to use your check in system to log that they attended. Your work flow seems pretty straight forward.

You create a version of the participant search page that contains a field for Contact ID (with event either hardcoded, or with a pop up list for the event) and a search button, and a second page that contains a participant data page that includes a check box for "attended" and a submit button. As suggested earlier, use a keyboard wedge style or USB keyboard emulating barcode scanner (very common) and set the search form page to default to that field.

You do not need to encode the event ID nor the role in the bar code, since from what you are saying, you system would only be used for one event at a time. When one enters the participant's ID, if he is registered for that event his participant record will show appear with his role and any other pertinent information. It is at this point you could check ID or other useful information before saving the edited participant record.

Quote
We probably would do it this way, except that our client wants participants to be able to register on the spot at an event. The primary purpose of this add-on is to track statistical information (Who registers and attends, who registers at the event, who registered but didn't attend... etc). Using a CiviCRM form and javascript to control the fine details sound like a solid solution for what we need. But, yes, scanning all the barcodes into a CSV when there's no available network connection sounds like a great backup system.

Not knowing anything about your specific group, but having both run and attended many events large and small, including those like CES and NAB that e-mail participants a bar code, I predict that many people will just show up without having printed theirs. That means that you need a fall back method to find these users (like their names). If you are not online, scanning bar codes creates another set of problems, chief of which is that you would not know you had a bad read until it was too late (that is only part of the code was read or some other failure). In an offline situation, a simple printed list with each participant's name in alphabetical order that would match a bulk profile edit page would be much more useful and accurate.

We are currently have an intern writing a Drupal module for use with CiviEvent that does event check in. It has an AJAX form that lets one type in letters from a participant's first name, last name or badge name (nickname) and fills in a table view with the names that match that search string. One can then choose a name from the table view and have all their participant data appear.

One can then verify ID, submit their badge to the print queue, note that they paid, that they were given there registration packet or sponsor gift, etc. and save a modified participant record.

All this assumes that your goal is not to have an anonymous registration system. Even then however, just issuing a 10 digit participant ID would be more useful as many who have mail access on iPhones and Blackberries would be able to look up that number but might not be able to have a readable barcode on their display.

/carmi




priyag

  • Guest
Re: CiviEvent Barcode Scanning
August 26, 2010, 06:47:18 am
Hello,
I'm new to Drupal and CiviCRM. Me and another friend have been using Drupal and CiviCRM for designing couple of web-sites for non-profit cultural organizations. In one of the sites, we have utilized CiviEvent for online event registrations and payments, so that part is fine. But now one of the client wants to incorporate a barcode generator for the online event registration. So basically a barcode gets generated, when someone pays and registers for an event, which gets sent through the automatic confirmation e-mail, so the attendee just needs to print the e-mail and bring it to the venue, where the organizers scan it using a barcode reader and the status gets updated as "scanned" in the database.
SO in short, what the client wants is exactly same as you guys were trying last year, so I was wondering if you were able to finish that project or not. Even if you were not able to finish it, please give us some advice as to how to approach this problem and how much coding do you think might be involved?
I would appreciate any help in this matter from anybody.
Thanks.

whisper27

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: 3.4
  • CMS version: drupal
  • MySQL version: 2.7
  • PHP version: 5.0
Re: CiviEvent Barcode Scanning
February 14, 2012, 02:34:05 pm
Hi Everyone,

Hope this thread is still alive  :)

Currently I'm working on the college project which is basically the same problem as you guys were attempting: add a QR code to the CiviEvent ticket and scan it with an iPad app at the doors. So I was wondering what is your progress on this, and could the author of the topic share the results of his work? Thanks!

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • CiviEvent Barcode Scanning

This forum was archived on 2017-11-26.