Jump to content

- - - - -

Modules: Best way to login to a device?

  • Please log in to reply
No replies to this topic

#1 123



  • Registered
  • PipPipPipPip
  • 2169 posts
  • Location:Montreal, QC
  • Experience:average
  • Software:Premise
  • Hardware:Elk M1

Posted 07 March 2008 - 11:46 AM

I've combed through the forum(s) and found several modules to control AV equipment. Be they serial or IR controlled, none of the examples requires logging-in to the device.

On the other hand, a Security Panel requires authentication before it will accept commands. Typically, a 4 or 6 digit number is used to identify the user.

Premise's native Security Panel drivers (Ademco, Caddx, HAI) all contain a "PanelEx" class that includes "MasterCode" and "Codelength" properties. I plan to create an Elk M1 module so I guess I'll need to include the PanelEx class.

My questions are:
1) When does the driver authenticate with the panel?
It seems to me that it should login to the security panel upon some initialization event. Is the OnInit event the right one?

2) How does it keep the connection alive?
If communications between the Premise Server and the Security Panel are momentarily interrupted, the driver will have to login again. What event is used to trigger a re-login?

3) How do you add PanelEx to a custom class?
I'm guessing this is done by editing the XDO file rather than using the Class Wizard.
OK, I've found the answers to my questions. For the curious:

OnChangeOnInit is the script where you initialize whatever needs initialization.

There is no concept of "session" that obliges you to login to a Security Panel. The Mastercode and Password are simply issued together with an Arm/Disarm command (at least that's how it works with an Elk M1).

Some form of error-handling script should take care of dropped connections. I haven't figured this one completely.

"CreateObject" will allow me to instantiate whatever SYS or custom class is needed.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users