uhppoted/uhppote-core

Time Profiles

Closed this issue · 10 comments

Our application requires certain badges work on certain doors during certain hours.
The windows application calls this Time Profiles, but it looks like there isn't any support for that in uhppoted yet. Is this correct?
Thanks again for all your work on uhppoted.

It's something that's been on the TODO list for a while but yes, time profiles aren't currently supported in uhppoted.

Controller managed time profiles are supported by the SDK and it would be only a couple of days work to add the necessary functions to uhppote-core and the CLI. But what isn't at all clear from the available documentation is how to link a card to a time profile which makes them more or less unusable - if you're able to shed any light on how that works (even just Wireshark traces) it would be enormously helpful.

My feeling though is that ultimately time profiled access is going to be a whole lot simpler and more flexible if controlled from an application (and that may in fact be what UHPPOTE are doing). In the available sooner rather than later time frame, something based on NodeRED or the CLI listen-events command is certainly doable - it looks like I'd just have to implement one additional function:

  • set PC control swipe/open door

which is straightforward.

A fully-fledged industrial quality application though is going to be a fair bit of work - I'll bump it up the priority list and give it some more thought. Something file (or DB) based without a UI probably wouldn't be that difficult to do.

Oh - and one other option for a sooner rather than later solution is simply to generate a separate ACL file for each time period and use a cron job to load the appropriate file using uhppote-cli's load-acl command.

Not elegant certainly but very easy to do and surprisingly robust :-).

We've confirmed w/Wireshark that once Time Profiles are configured by the windows software and uploaded to the controllers, the function is independently implemented by the controllers. ie) the windows software does not make any contact with the controllers during operation. There is also a "Task List" functionality in the windows software which we use to unlock doors during business hours which is also independently handled by the controllers (although they don't handle daylight savings time changes automatically).

We are running 4 controllers in two buildings managed by the windows software. We have about 400 badges w/about half 24x7 and half time-restricted (we are a maker space). About 30 badges need to updating per month. Uhppoted with the WA integration is an almost turn-key solution except for the lack of Time Profiles. Thanks for the idea of a cron job which loads a new ACL. While that does add an external dependency and additional failure modes, It is probably the way we will have to go.

Hi Bob,

Thanks for the info - that's interesting .. and very useful! I've created a project to add support for the time profile and task list functions to uhppote-core and uhppote-cli - there's a fair amount of work involved though so it's going to take a little while. In the interim:

  • would you mind describing how you link a card to a time profile? It's not obvious from the SDK documentation and I'm on a Mac so not able to poke around in the manufacturer application...
  • I've found scheduling a uhppote-cli set-time command to run daily shortly after midnight keeps the controller time from drifting and also conveniently adjusts the controller time for daylight savings
  • it's actually quite possible to write rules for the Wild Apricot application that do time based access e.g.:
rule TBA "Removes after hours access to the Great Hall" {
     when
         member.HasGroup("Student") && (GetTimeHour(Now()) < 9 || GetTimeHour(Now()) > 19)
     then
         permissions.Revoke("Great Hall");
         Retract("TBA");
}

You'll obviously need to to run the WA load-acl command at the start of every time period (or just on a fairly frequent schedule e.g. every 30 minutes). The grule syntax is fairly basic but it mostly gets the job done and if necessary I can add support functions to make it simpler.

Hi, Here's the process of linking a card to a time profile in the windows software:

Enable Time Profiles
  Start Access Control Program
  Tools->Extended Function (enter password:5678)
  Restart Access Control Program
  Tools->Extended Function
  Configuration->Activate Time Profile
  Restart Software

Create Time Profile
  Configuration->Time Profile
  New-> Enter Description -> Weekday Business Hours 
  Time Seg 9:00 - 17:00
  Uncheck Sat and Sun
  OK

Apply Time Profile to a User
  Configuration->Personnel
  Select User, Select Privilege 
  Time Profile will appear w/pull-down
  Free Time == 24x7 access
  Other Time defined Time Profiles like "Weekday Business Hours" should appear in the pull-down 
  Confirm & Upload

 Note there is a "Link To" option so you could create a Weekend Business Hours and link it to Weekday Business Hours

Gotit! Entirely undocumented, but at some point in time carbonsphere must have either reverse-engineered that bit of the protocol or got an answer out of UHPPOTE. I do need to confirm that it works but it makes sense at least.

Thanks for the info Bob - it really helped narrow down the search. I just need to wrap up the current dev cycle and then I'll get started on this - say in the next day or two.

Hi,

Just a quick update: release v0.7.0 includes across the board support for time profiles. It's been reasonably thoroughly tested in development but not in production so use it at your own discretion. Any feedback would be much appreciated!

With any luck, tasks should probably make it into the next release.

Pleasure .. it was on the TODO list so it just got bumped up a little :-). The task stuff is probably going to take 3-4 weeks so it might be worth waiting for the that.

Hi,

I'm going to close this issue out - the v0.7.1 release includes support for the basic task list management functions so that's pretty much a wrap for the additional functionality you requested. From the testing I've done it seems reasonably usable, but please feel free to raise any issues you may find.

A more general implementation of schedules that will manage task lists and time profiles across multiple controllers is "in the works" but it is potentially fairly complex and may take a while to take shape.