Plugin Design Approach for non-solicited HTTP requests

I need some input on creating a plugin to interface with an HID RFID badge reader system called the HID Edge Solo that?s meant for a single door. It?s a standalone IP based interface that doesn?t have an API that you can call and make web requests, but there are configurable end point URLs that you can configure the unit to call when certain events occur. These events are highly configurable and can pass along additional information such as a Date, Time, Person?s First Name, Person?s Last Name, and the Name of the Door. As an example, when an authenticated user?s RFID card is swiped, it can send an http request (originating at the HID Edge solo) to an endpoint. I?d like that endpoint to be the Vera.

To set the stage, in the past I?ve created a luup plugin (Serial port based) that monitors serial port traffic by using the code block of the implementation (I_*.xml) file and I feel comfortable with that paradigm. I’ve never written any IP based communication plugins. I started looking through existing plugins that use IP based communications instead of serial communications. My observations thus far is that the plugins I?ve looked at originate communication from the Vera and get responses back, which are then processed. However, in my use case, the Vera would be merely an endpoint. What are some techniques I could use to get this data through a plugin? Here?s what I was thinking:

[ul][li]Can I have Vera listen on a certain port for this device?s traffic? How does that work? What I don’t understand is what URL to call or how that information gets routed to my plugin (if that makes sense).
[/li]
[li]
Should I just create a variable associated with my plugin and have the HID reader call the variableset Luup Request URL? Then I could just watch for changes? This method I understand but am wondering if there?s a better way.
http://ip_address:3480/data_request?id=variableset&DeviceNum=6&serviceId=urn:micasaverde-com:serviceId:DoorLock1&Variable=Status&Value=1

[/li][/ul]

Any guidance would be appreciated!

Reference:
EdgeSolo User?s Guide (HTTP Parameter Substitutions, P42)
https://www.hidglobal.com/edge-solo-users-guide-v120-1

You can use:
http://wiki.micasaverde.com/index.php/Luup_Lua_extensions#function:_register_handler

to setup arbitrary URL to be called (which will also receive any URL parameters).

You can see [lose] examples of it’s usage in the Phone Plugin:
L_sPhoneUI.lua – SmartPhone plugins

This would give you a way to call a URL that you’re publishing, where you could do any number of data collection steps (putting the content passed as parameters into multiple Device State Variables, for example).

You could also just define a service, and “invoke” that ServiceId using the URL-based “lu_action” (aka “[tt]data_request?id=action[/tt]”) that you see at the bottom of this page:
http://wiki.micasaverde.com/index.php/Data_Provider_Catalog_Plugin_Requests

It’s a bit more formal, since you need to define a ServiceId (S_xxxx.xml) in addition to other files to “declare” that you’re exposing that Service, but it’ll probably work better if you end up having multiple of these “locks” in your house

The technique to choose may depend upon how much flexibility you have in the input URL call, and how well/correctly those values are “encoded”

And if you can’t use the methods that guessed suggests in the previous post (say, because you haven’t got enough control over the URL format) you can go the whole hog and make a standalone HTTP server. For example code, start with the UPnP Event Proxy.