Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: beta branch collapse #67

Open
wants to merge 2,175 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2175 commits
Select commit Hold shift + click to select a range
360b9c1
fix(pressac/desk/logic): fix var name error in debug output
w-le Oct 31, 2019
aabf41a
feature(pressac/desk/sensors): Add list_stale_sensors()
w-le Oct 31, 2019
94a7a9a
fix(pressac/desk/sensors): syntax
w-le Oct 31, 2019
190e1f0
fix(pressac/desk/sensor): syntax
w-le Oct 31, 2019
9c66579
fix(pressac/desk/sensor): syntax
w-le Oct 31, 2019
f59b1ff
fix(pressac/desk/sensor): Remove gateway.busy_desk etc. status var, w…
w-le Oct 31, 2019
29e66e9
fix(pressac/desk/sensor): fix error on receive and list_stale
w-le Oct 31, 2019
089dd99
feature(pressac/desk/logic): unexpose stale sensors
w-le Oct 31, 2019
f18b9d2
fix(pressac/desk/logic): typo
w-le Oct 31, 2019
6e8f772
fix(pressac/desk/logic): fix list_stale_sensors()
w-le Oct 31, 2019
a55a18e
Merge branch 'pressac/desk-sensor' of https://github.com/acaprojects/…
w-le Oct 31, 2019
9e3c6f5
fix(pressac/desk/logic): add new desks to pending arrays
w-le Oct 31, 2019
00e0f53
fix(pressac/desk/logic): Fix status =false instead of [] when adding …
w-le Nov 1, 2019
291afd9
fix(pressac/desk/logic): avoid error on setting update
w-le Nov 1, 2019
621d6e1
Merge branch 'pressac/desk-sensor' into beta
w-le Nov 1, 2019
3a2265c
feat(sony:visca over ip): add camera driver
stakach Nov 11, 2019
5f5a77c
feature(pressac/desk/logic): Add custom delays (untested)
w-le Nov 17, 2019
83c2c21
fix(pressac/desk/logic: custom delays: syntax errors
w-le Nov 17, 2019
533e2d1
style(pressac/desk/logic: standardise log output
w-le Nov 17, 2019
f5b43d5
Merge branch 'pressac/desk-sensor' into beta
w-le Nov 17, 2019
405c526
feature(pressac/desk/sensor): delete stale sensors from status
w-le Nov 17, 2019
b66a3d4
fix(sony IP camera): improve responsivness and presets
stakach Nov 18, 2019
f0f721a
fix(pressac/desk/logic): fix hash ref for saved status on init
w-le Nov 18, 2019
f099528
Merge branch 'pressac/desk-sensor' into beta
w-le Nov 18, 2019
d6c8ba3
fix(pressac/desk/logic): logic error with custom delays
w-le Nov 18, 2019
abfeeee
Merge branch 'pressac/desk-sensor' into beta
w-le Nov 18, 2019
e41b19d
feat(sony camera): add HTTP CGI protocol
stakach Nov 19, 2019
dcdbb1e
fix(sony camera): add delete_position method
stakach Nov 19, 2019
ec3e076
fix(sony camera): movement ranges
stakach Nov 19, 2019
3af7392
chore(office2/client/logs): always output error responses (remove req…
w-le Nov 25, 2019
b9d30c8
fix(office2/client): fix syntax in check_response
viv-4 Nov 27, 2019
cd2aabb
feature(office2/RBP): Add support for https_proxy as a driver setting
w-le Nov 28, 2019
ecde821
fix(office2/RBP): param name for proxy server
w-le Nov 28, 2019
19e078e
feat(exchange bookings): add support for help emails
stakach Dec 2, 2019
4514af0
feat(aca meeting room): improve joining startup and shutdown
stakach Dec 2, 2019
14ea45f
fix(office2/lib/event/create): fix RECURRENCE (missing date func)
w-le Dec 2, 2019
769988d
feature(office2/RBP): add func for triggering reload of endpoints
w-le Dec 2, 2019
c3ba700
fix(office2/lib/event/new/recurrence): Syntax
w-le Dec 2, 2019
99b8c11
feature(pressac/desk_sensor): Support room PIR sensor
w-le Dec 3, 2019
4c1e4cc
feature(pressac/desk_sensor): PIR sensors use samelogic as Desk sensors
w-le Dec 3, 2019
c8630a3
docs(pressac/sensor/example): Add room PIR example
w-le Dec 3, 2019
db3f864
feature(office2/RBP): add booking.start_EPOCH
w-le Dec 3, 2019
f328098
feature(pressac/booking_canceller): add a new Logic for cancelling bo…
w-le Dec 3, 2019
db042ff
Merge branch 'beta' into pressac/booking_canceller
w-le Dec 3, 2019
97b7167
fix(pressac/booking_canceller): DeskManagement is in other system
w-le Dec 3, 2019
1a7be74
feature(pressac/booking_canceller): Add debug output
w-le Dec 3, 2019
f62f4b0
fix(office2/RBP): expose new start_epoch
w-le Dec 3, 2019
e2654db
fix(o365/rbp): change start/end to check for syms
kimburgess Dec 5, 2019
20637fc
[o365 lib] Allow for https proxy to be used in graph request
Dec 5, 2019
fc1430d
fix(lib/office2): pass connection options to client
kimburgess Dec 5, 2019
be44a02
fix(office2/client): fix error check on response
kimburgess Dec 5, 2019
51981a7
feature(office2/event/recurring): add new func for fast checking recu…
w-le Dec 9, 2019
df77d94
feature(office2/event): Add new avalability check endpoint; support r…
w-le Dec 9, 2019
1214408
fix(joiner): only retry load if on_load returns false
stakach Dec 10, 2019
c7cb0c1
feat(point_grab): add cogni point driver
stakach Dec 11, 2019
0cae03a
feat(atlona): virtual switcher can used input output names
stakach Dec 12, 2019
cf2cd8e
fix(office2/event/availability): Test in UAT fix many issues.
w-le Dec 12, 2019
569b2db
Merge branch 'beta' into feature/office2/check_recurring
w-le Dec 12, 2019
efe74a8
feat(atlona): update drivers to support auto switching
stakach Dec 12, 2019
2ec98d6
feature(office2/odata-extensions): disable via ENV var (optional)
w-le Dec 12, 2019
0eb13ac
fix(point grab): update how patch method is called
stakach Dec 13, 2019
cddf1c2
feat(atlona): auto-switcher to poll inputs for changes
stakach Dec 13, 2019
f864e3a
feat(atlona): ignore enabled changes where there is no change
stakach Dec 13, 2019
b8dbd58
feat: add office rnd driver
stakach Dec 16, 2019
37beb04
Merge branch 'pressac/booking_canceller' into beta
w-le Dec 16, 2019
6b38aab
Merge branch 'beta' of https://github.com/acaprojects/ruby-engine-dri…
w-le Dec 16, 2019
83c896d
feat: complete Office RnD integration
stakach Dec 16, 2019
bb0748d
office2/log/response: Always log response on error
w-le Dec 30, 2019
94c5695
fix(office2/event/available?): return conflicting start times instead…
w-le Dec 31, 2019
747b718
style(office2/events): remove debug stdouts
w-le Dec 31, 2019
35caafa
feat(office2/errors/412): Support graph error "Precondition Failed"
w-le Jan 3, 2020
4cda22f
feat(office2/event/error): Assume succesful booking on 409, 412. As f…
w-le Jan 3, 2020
bc283f4
feat(office2/RBP): support start/end params as both string and sym
w-le Jan 3, 2020
8049ac6
fix(office2/errors): 412 is actually "IrresolvableConflict" not "Prec…
w-le Jan 3, 2020
76924c2
feat(pressac/desk/logic): stale can be shown as free/busy/blank
w-le Jan 3, 2020
ef8626a
fix(pressac/desk/logic): syntax of new default setting
w-le Jan 3, 2020
bb81762
feat(office2/RBP): add default param for refresh_endpoints
w-le Jan 3, 2020
c0770cc
fix(pressac/booking_canceller): fix inverted logic for when to cancel
w-le Jan 13, 2020
f11ac7c
feat(office2/events/create+edit): default to timezone from env var in…
w-le Jan 13, 2020
6edae00
fix(office2/events/edit): re-instate missing is_private param
w-le Jan 13, 2020
68c11a7
feat(office2/events/create-json): PUTS with nil params don't overwrit…
w-le Jan 13, 2020
592bf58
fix(office2/events/create-json): syntax for rooms.nil?
w-le Jan 13, 2020
ecac57c
feat(office2/RBP): expose event body and organizer
w-le Jan 13, 2020
31cdd22
feat(office2/RBP/end_meeting) Add end_meeting() which SHORTENS events…
w-le Jan 13, 2020
a2a896e
fix(office2/RBP/end_meeting): fix event finding; body retrieval
w-le Jan 13, 2020
62a5c06
feat(office2/event/create_json): Allow nil start_param (edit event wi…
w-le Jan 13, 2020
53b3ff1
feat(office2/client/logs): output request if response is an error
w-le Jan 13, 2020
a9b2b14
fix(office2/client/log): syntax
w-le Jan 13, 2020
8af9641
fix(office2/client/log): fix inverted logic for log output; visually …
w-le Jan 13, 2020
5ee2aef
fix(office2/client/log): fix request output
w-le Jan 13, 2020
9d84fb2
fix(office2/client/log/requests): new lines for readability
w-le Jan 13, 2020
afd4b98
fix(event/create_json): don't overwrite sensitivity and subject
w-le Jan 13, 2020
92ac0bf
fix(office2/event/create_json): fix var reference
w-le Jan 13, 2020
968812a
feat(office2/RBP/end_meeting): raise error if attempting to end meeti…
w-le Jan 13, 2020
9517b9a
fix(office2/RBP/end_meeting): append text to html OR text descriptions
w-le Jan 13, 2020
b942ecc
style(office2/RBP/end_meeting): assume <html> in first 9 chars not 20
w-le Jan 13, 2020
026ad73
feat(office2/RBP/end_meeting): raise 400 if event.id not found
w-le Jan 13, 2020
1e97ebe
fix(office2/RBP/end_meeting): syntax for body.include?
w-le Jan 13, 2020
ee1afbc
fix(office2/event/availability/check/recur): on the end date of recur…
w-le Jan 13, 2020
a4b54b0
fix(office2/event/availability/check/recur): on the end date of recur…
w-le Jan 13, 2020
07f5aa1
fix(pressac/booking_canceller): send correct param (id not start_epoc…
w-le Jan 14, 2020
8607838
feat(office2/RBP/end_meeting): fetch events after ending one; so UI i…
w-le Jan 14, 2020
26d1bac
style(office2/RBP/end_meeting): line breaks in msg that is appended t…
w-le Jan 14, 2020
225486c
fix(cisco:sx camera): zoom values are inverted
stakach Jan 14, 2020
139230e
feat(pressac/booking_canceller): sensor name: use sensor_name || map_id
w-le Jan 15, 2020
c43356b
feat(pressac/booking_canceller): expose presence status; better log o…
w-le Jan 15, 2020
7c6e489
style(pressac/booking_canceller): indent
w-le Jan 15, 2020
c7d0dda
feat(office2/RBP/end_meeting): prepend ENDED: to ended meetings
w-le Jan 15, 2020
68eaafc
fix(pressac/booking_canceller): don't action bookings that have alrea…
w-le Jan 15, 2020
1931bc3
fix(pressac/desk_logic): for each zone, expose only that zone's desks…
w-le Jan 15, 2020
81f961a
Merge branch 'beta' of https://github.com/acaprojects/ruby-engine-dri…
w-le Jan 16, 2020
d2a6a1b
Revert "fix(pressac/desk_logic): for each zone, expose only that zone…
w-le Jan 16, 2020
de5b165
Merge branch 'feature/office2/RBP/end_meeting' into beta
w-le Jan 16, 2020
18b5bc4
feat(office2/groups): add new groups module with list_user_member_of()
w-le Jan 17, 2020
a9c768d
fix(pressac/booking_canceller): inverted cancel logic; default sensor…
w-le Jan 17, 2020
8b196cf
feat(pressac/booking_canceller): more log output
w-le Jan 18, 2020
1cdcd40
Merge branch 'feature/office2/RBP/end_meeting' into beta
w-le Jan 18, 2020
4541c4f
feat(office2/RBP/refresh_endpoints): in 120s not 300s
w-le Jan 18, 2020
63ff63b
fix(office2/event/organisation): safer parsing or organisation from e…
w-le Jan 18, 2020
5c6087f
fix(pressac/desk_logic/stale): when stale desks are marked as busy, d…
w-le Jan 18, 2020
736a24a
style(pressac/booking_canceller): fix indents; tidy up
w-le Jan 18, 2020
aaf7bd4
fix(pressac/booking_canceller): logic in determining when to cancel (…
w-le Jan 18, 2020
7e57085
chore(pressac/desk_sensor): default stale threshold 20m > 1h
w-le Jan 20, 2020
3e6cfd1
chore(pressac/sensor/stale): persist stale sensors in stale status an…
w-le Jan 20, 2020
c4c7a69
fix(pressac/desk/logic): new method for exposing stale IDs
w-le Jan 20, 2020
d32f17f
fix(pressac/desk/logic): syntax
w-le Jan 20, 2020
094ae1e
fix(pressac/desk/logic): missing var init @stale
w-le Jan 20, 2020
fbb0b4f
fix(pressac/sensors/stale): var ref and usage
w-le Jan 22, 2020
be71fe6
Merge branch 'feature/office2/group_restrictions' into beta
w-le Jan 22, 2020
9865ea5
Merge branch 'beta' of https://github.com/acaprojects/ruby-engine-dri…
w-le Jan 22, 2020
1be650a
feat(o365/lib/client): support multiple o365 tenants at the same time
w-le Jan 24, 2020
a7277a6
feat(pressac/desk/logic): Add free_count to zone status
w-le Jan 30, 2020
5568c3f
fix(pressac/desk/logic): correct desk_count status on load
w-le Jan 30, 2020
8f486d4
feat(desk_bookings): new desk bookings driver (untested)
w-le Feb 5, 2020
2fdddfd
fix(desk_bookings): expose all known desk ids; fix schedule var name …
w-le Feb 5, 2020
39f0750
fix(desk_bookings): fix syntax; fix status var notification
w-le Feb 5, 2020
720fe3e
fix(desk_bookings): syntax, var name
w-le Feb 7, 2020
4357b80
fix(desk_bookings): syntax, simplify status vars
w-le Feb 7, 2020
b7686b8
fix(desk_bookings): limit potential infinite loop if unexpected setti…
w-le Feb 10, 2020
00f9d56
fix(desk_bookings): save desk bookings to user model
w-le Feb 10, 2020
40d0249
fix(desk_bookings/book): support optional end time
w-le Feb 10, 2020
0877758
fix(desk_bookings): support optional end time; throw error if booking…
w-le Feb 10, 2020
2f1656d
fix(desk_bookings): store booking if there's another non-clashing boo…
w-le Feb 11, 2020
f90ab47
feat(desk_bookings): switch user.desk_bookings to array, from hash
w-le Feb 11, 2020
210906c
fix(desk_bookings): save bookings to user model
w-le Feb 17, 2020
13959df
feat(desk_bookings): remove ":bookings" from binding name
w-le Feb 17, 2020
63a34d8
docs(office2/availability): comment about bulk graph request IDs matc…
w-le Feb 25, 2020
b542ba6
feat: add gantner relaxx driver
stakach Feb 27, 2020
0e78989
feat(event.showAs): rename show_as > showAs
w-le Mar 5, 2020
af929fc
feat(odata_extensions): REMOVE support for odata extensions
w-le Mar 5, 2020
e1e08db
fix(o365/RBP): fix autocancel timeout setting
w-le Mar 5, 2020
0f495af
feat(o365/RBP): setting.timeout to human readable string
w-le Mar 5, 2020
797e4fc
style(o365/RBP): call Graph API 'msgraph' not 'office'
w-le Mar 5, 2020
63b06fd
feat(o365/RBP): graph credentials: remove support for env vars
w-le Mar 5, 2020
e69dffa
feat(office2/event): support showAs & responseRequested
w-le Mar 5, 2020
1ca6d17
feat(office2/log): support env var for verbose logging
w-le Mar 5, 2020
46bf6e8
feat(desk_bookings): support email invites
w-le Mar 5, 2020
1726dba
style(desk_bookings): shorter email nvite subject
w-le Mar 5, 2020
3f138da
feat(office2/events): find by icaluid works on recurrences, given an …
w-le Mar 6, 2020
cc39b21
fix(office2/RBP): settings/tenant: support "msgraph and "office" sett…
w-le Mar 8, 2020
f294ad0
feat(office2/RBP): expose booking.showAs ('busy', 'free')
w-le Mar 8, 2020
771f607
style(desk_bookings): shorten email subject
w-le Mar 9, 2020
8e7f972
Merge branch 'beta' of https://github.com/acaprojects/ruby-engine-dri…
w-le Mar 9, 2020
01ca525
feat(desk_bookings): add auto check-in window setting
w-le Mar 9, 2020
17bafad
fix(office2/RBP/autocancel): update for latset ngx-bookings frontend
w-le Mar 10, 2020
d194e43
feat(offic2/RBP): Support proxy calendars, even when host has never l…
w-le Mar 10, 2020
69d0d80
feat(office2/RBP): end_meeting: force push update to frontend
w-le Mar 10, 2020
5376372
feat(office2/groups): List fetches group ID
w-le Mar 16, 2020
22e81e8
feat(gallagher): Restructure folders and create initial rest lib
Mar 16, 2020
96c401f
feat(grops):get member groups
polonski Mar 17, 2020
70b4a0f
fix(pressac/desk/logic): expose stale desks
w-le Mar 19, 2020
1425e57
feat(pressac/event_canceller): Overhaul cancellation logic
w-le Mar 19, 2020
ead0c4c
fix(pressac/desk/mock): persist sensor.became_free
w-le Mar 20, 2020
d93057d
feat(pressac/canceller): more status vars testing
w-le Mar 20, 2020
e4e90a0
feat(pexip): add dialing support from admin server
stakach Mar 23, 2020
11518ff
fix(pexip): dialing details need to be json
stakach Mar 23, 2020
5b84407
fix(pexip): update with routing rule
stakach Mar 24, 2020
2a789ae
feat(cogni point): add support for traffic flow
stakach Mar 25, 2020
2cde45e
fix(o365/RBP): also use old setting office_https_proxy (not just msgr…
w-le Mar 27, 2020
5563d6e
feat(office2/users/list): allow filtering out Guests
w-le Mar 31, 2020
2077843
feat: add support for auto-switching atlona
stakach Apr 14, 2020
9604107
feat(QSC atlona monitor): provide virtual audio breakaway
stakach Apr 16, 2020
644e9d4
fix(QSC atlona monitor): add a check for unroute
stakach Apr 16, 2020
565f42e
fix(atlona virtual switcher): improve auto-switching
stakach Apr 17, 2020
d0c1b3e
feat: qsc atlona auto switcher to clear virtual switcher routes
stakach Apr 17, 2020
f5181d6
Merge branch 'pressac/booking_canceller' into beta
w-le Apr 20, 2020
f7fa315
feat(pressac/desk_logic): can ignore regex matched sensors
w-le Apr 20, 2020
806faad
feat(gallagher/rest): from downstream (tested OK)
w-le Apr 21, 2020
fc24744
fix(atlona virtual switcher): ensure inputs are stored as strings
stakach May 5, 2020
521dce2
feat(gallagher): Add disable card method
Apr 22, 2020
26be97c
feat(gallagher/rest): support PDF lookup in api < v8.10
w-le May 8, 2020
14d6e41
fix(gallagher/rest): typo in PDF lookup
w-le May 8, 2020
911317a
fix(gallagher/rest): parse api version
w-le May 11, 2020
11e0710
feat(gallagher/rest): api 8.0 has different cardTypes endpoint
w-le May 11, 2020
d202e44
feat: various fixes for deakin and LendLease
stakach May 20, 2020
6f3c5c8
feat(gallagher): add get_cardtype_max_number()
w-le May 22, 2020
92537cd
feat(gallagher): card assignment raises custom errors
w-le May 22, 2020
81d8fa3
fix(gallagher): syntax in new random cardnumbers feature
w-le May 22, 2020
e46990c
fix(gallagher): syntax; compare error codes instead of msg
w-le May 23, 2020
81a13cd
feat(gallagher): add delete_card()
w-le May 24, 2020
a613a0b
feat(gallagher): create_cardholder() raises errors
w-le May 24, 2020
2c71d0c
feat(gallagher): POSTs return location of new object
w-le May 24, 2020
9cee0b1
fix(gallagher): POST response header syntax
w-le May 24, 2020
362eb47
(ismart:camera) added discrete ismart driver
jeremy-west May 25, 2020
eb15961
remove ismart driver
jeremy-west May 25, 2020
0e5f93e
fix(cisco camera): improve zoom feedback
stakach Jun 11, 2020
bd49ed9
chore(office2/logging): remove "error" from log output, as it may jus…
w-le Jun 18, 2020
1dbfaf0
feat(pexip): support creating meetings with a theme
stakach Jun 22, 2020
ea476be
update(Gemfile):add yajl gem
polonski Jun 30, 2020
b5bcd23
fix(atlona:autoswitcher): clearing auto-switching
stakach Jul 2, 2020
c02e7fe
feat(pexip): add setting for theme name
stakach Jul 3, 2020
788dce7
feat: ensure keys are cleared when unrouting
stakach Jul 13, 2020
9e200ac
feat(lumens): add DC193 visualiser
stakach Aug 24, 2020
7ae65fa
fix(lumens dc193): issues found during testing
stakach Aug 24, 2020
3e698ad
feat(lumens dc193): match existing interface
stakach Aug 25, 2020
3886be7
feat: replace lumens 192 with 193 code
stakach Aug 25, 2020
c11f399
Revert "feat: replace lumens 192 with 193 code"
stakach Aug 25, 2020
f820e8a
fix(philips sicp): ensure buffer doesn't grow unbounded
stakach Aug 25, 2020
ee1ff47
feat(nec): add basic spec
pkheav Sep 10, 2020
90eb537
feat(toshiba/display/e_series): setting defines soft/hard power control
w-le Sep 23, 2020
b88c0fa
feat(toshiba/display/e_series): assume hard power off succeeded
w-le Sep 23, 2020
24ccbe2
fix(toshiba/display/e_series): naming of power command
w-le Sep 23, 2020
f8d14f3
fix(toshiba/display/e_series): power query supports soft/hard power
w-le Sep 23, 2020
7f2276f
fix(toshiba/display/e_series): don't select OPS input after power on;…
w-le Sep 29, 2020
9c90691
feat: add whispir sms message service
stakach Feb 10, 2021
3c2d6cc
fix(microsoft office2): remove domain from request paths
stakach Apr 6, 2021
2776408
refactor(gallagher): remove debugging and basic cleanup
Apr 6, 2021
642830d
feat(samsung): disable input osd display
stakach May 30, 2021
6f058be
fix(cisco sx series): don't strip out `-` characters
stakach Jun 17, 2021
6bcc824
feat(polycom group series): add a delay button press function
stakach Jul 6, 2021
104fdfc
chore(pexip) update system_location
jeremyw24 Sep 9, 2021
ceefa63
Merge pull request #82 from acaprojects/update-pexip-mgmt
stakach Sep 13, 2021
0915bd7
chore(pexip): add some extra logging on failure
stakach Sep 28, 2021
24751ce
feat(cisco sx series): keep track of upcoming bookings
stakach Oct 25, 2021
fc485bc
fix(pexip management): make dialing locations configurable
stakach Dec 16, 2021
156a319
feat(qsc/camera): allow power command to be inverted
w-le Sep 7, 2022
d368897
fix(o365_panel): convert cancel epoch to epoch if string
camreeves Oct 10, 2022
4496f84
fix(office2/event): datestring_to_epoch should handle epochs
stakach Oct 17, 2022
efdb714
revert: epoch check
stakach Oct 17, 2022
5833f45
feat(microsoft/office2/client): return response body
stakach Oct 17, 2022
8182876
feat(microsoft/office2/client): return response after checking
stakach Oct 17, 2022
66e6176
fix(microsoft/office2/events): don't error on success
stakach Oct 17, 2022
f89b261
fix(microsoft/office2/events): remove crystal error syntax
stakach Oct 17, 2022
f3c17e6
fix: attendee email parsing
stakach Oct 17, 2022
59f839d
fix(o365 booking panel): only convert to seconds epoch if using ms
camreeves Oct 19, 2022
c87c15f
fix(o365 booking panel): ensure start_epoch is set
camreeves Oct 19, 2022
b2b6763
Update example_output.txt
w-le Nov 15, 2022
f1b4133
docs(pressac): new example output
w-le Nov 30, 2022
71e555c
fix(gem): ruby 2.3 -> ruby 2.5
viv-4 Sep 23, 2024
2754bcc
revert(gem): revert ruby version change
viv-4 Sep 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
Gemfile.lock
.yardoc
doc
.vagrant
8 changes: 7 additions & 1 deletion .reek
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ NilCheck:
# Boolean switches on state based methods (such as power and mute) are useful.
BooleanParameter:
enabled: false
ControlParameter:
enabled: false

# Allow for a larger number of constants for protocol definitions.
TooManyConstants:
Expand All @@ -39,12 +41,16 @@ TooManyConstants:
# Suppress warning about parameter length within reason.
LongParameterList:
max_params: 4

# Prevent from flagging multiple calls to utility methods
# (e.g. is_affirmative?).
RepeatedConditional:
enabled: false

# Allow for device model numbers to be used as module names.
UncommunicativeModuleName:
enabled: false

# Support private, pure functions
UtilityFunction:
public_methods_only: true
7 changes: 7 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ Metrics/ClassLength:
Metrics/ModuleLength:
Max: 300

Metrics/LineLength:
Exclude:
- "**/**/*_spec.rb"

Metrics/ParameterLists:
Max: 5

Expand Down Expand Up @@ -70,3 +74,6 @@ Style/Documentation:

Style/NumericLiterals:
Enabled: false

Style/RegexpLiteral:
AllowInnerSlashes: true
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ source "https://rubygems.org"
gemspec

gem 'yard'
gem 'yajl-ruby'
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# ACAEngine Modules
# ACAEngine Drivers

Physical device drivers, service integrations and modular logic for [ACAEngine](https://github.com/acaprojects/ruby-engine).
Physical device drivers, service integrations and modular logic for [ACAEngine](https://docs.acaengine.com).

---

If you are getting started head on over to https://developer.acaprojects.com/ to get setup.

For those using these modules, you may find the [docs](https://acaprojects.github.io/aca-device-modules/) of use.
For those using these drivers, you may find the [API docs](https://acaprojects.github.io/ruby-engine-drivers/) of use.

Please read the [contributor guide](.github/CONTRIBUTING.md) for project guidelines, or check [support](.github/SUPPORT.md) if you're lost.
19 changes: 19 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# frozen_string_literal: true

# Local path to the drivers repo that you would like to use.
DRIVERS_PATH = './'

# Local path to the front-ends to have available.
WWW_PATH = nil

Vagrant.configure('2') do |config|
config.vm.define 'ACAEngine'

config.vm.box = 'acaengine/dev-env'

config.vm.synced_folder DRIVERS_PATH, '/etc/aca/ruby-engine-drivers' \
unless DRIVERS_PATH.nil?

config.vm.synced_folder WWW_PATH, '/etc/aca/www' \
unless WWW_PATH.nil?
end
29 changes: 29 additions & 0 deletions lib/aca/tracking/people_count.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module Aca; end
module Aca::Tracking; end
class Aca::Tracking::PeopleCount < CouchbaseOrm::Base
design_document :pcount

# Connection details
attribute :room_email, type: String
attribute :booking_id, type: String
attribute :system_id, type: String
attribute :capacity, type: Integer
attribute :maximum, type: Integer
attribute :average, type: Integer
attribute :median, type: Integer
attribute :organiser, type: String
attribute :counts, type: Array, default: lambda { [] }
attribute :start_time, type: Integer

protected


before_create :set_id

view :all, emit_key: :room_email

def set_id
self.id = "count-#{self.booking_id}"
end

end
2 changes: 1 addition & 1 deletion lib/aca/tracking/switch_port.rb
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def disconnected(temporary: 0)

# Block the MAC address from being discovered for a period of time
begin
self.class.set("temporarily_block_mac-#{self.mac_address}", ttl: temporary)
self.class.set("temporarily_block_mac-#{mac}", ttl: (temporary * 2))
::Aca::Tracking::UserDevices.with_mac(mac).each do |user|
user.remove(mac)
end
Expand Down
5 changes: 5 additions & 0 deletions lib/aca/tracking/user_devices.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ def add(mac)
.reject { |u| u.id == self.id }
.each { |u| u.remove(mac) }

if self.class.bucket.get("temporarily_block_mac-#{mac}", quiet: true)
remove(mac)
return
end

self.class.bucket.set("macuser-#{mac}", username)
return if self.macs.include?(mac)

Expand Down
250 changes: 250 additions & 0 deletions lib/cisco/broad_soft/broad_works.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,250 @@
# encoding: ASCII-8BIT
# frozen_string_literal: true

=begin

Example Usage:
bw = Cisco::BroadSoft::BroadWorks.new("xsi-events.domain.com", "[email protected]", "Password!", proxy: ENV['HTTPS_PROXY'])

# Processing events
Thread.new do
bw.open_channel do |event|
puts "\n\Processing! #{event}\n\n"
end
end

# Registering for Automatic Call Distribution Events
bw.get_user_events "[email protected]"

=end

require "active_support/all"
require "securerandom"
require "nokogiri"
require "logger"
require "httpi"
require "json"

module Cisco; end
module Cisco::BroadSoft; end

class Cisco::BroadSoft::BroadWorks
def initialize(domain, username, password, application: "ACAEngine", proxy: nil, logger: Logger.new(STDOUT))
@domain = domain
@username = username
@password = password
@logger = logger
@proxy = proxy
@application_id = application

@keepalive_active = false
@channel_open = false
@heartbeat = true

@channel_set_id = SecureRandom.uuid

@buffer = String.new
end

attr_reader :expires
attr_reader :channel_id
attr_reader :channel_set_id
attr_reader :channel_open

def open_channel
return if @channel_open
@channel_open = true

expires = 6.hours.to_i

channel_xml = %(<?xml version="1.0" encoding="utf-8"?>
<Channel xmlns="http://schema.broadsoft.com/xsi">
<channelSetId>#{@channel_set_id}</channelSetId>
<priority>1</priority>
<weight>50</weight>
<expires>#{expires}</expires>
</Channel>)

conn = new_request
conn.url = "https://#{@domain}/com.broadsoft.async/com.broadsoft.xsi-events/v2.0/channel"
conn.body = channel_xml

conn.on_body do |chunk|
@heartbeat = false
event = parse_event(chunk)
yield event if event
end

keepalive

@logger.info "Channel #{@channel_set_id} requested..."
HTTPI.post(conn)
@logger.info "Channel #{@channel_set_id} closed..."
ensure
@channel_open = false
# notify of the disconnect
yield nil
end

def heartbeat
conn = new_request
conn.url = "https://#{@domain}/com.broadsoft.xsi-events/v2.0/channel/#{@channel_id}/heartbeat"
response = HTTPI.put(conn)
if response.code != 200
if response.code == 404
# Seems multiple servers handle requests and not all are aware of channels!
# This just desperately tries to hit the right server to keep the channel alive
sleep 0.7
heartbeat if @heartbeat && @channel_open
else
@logger.warn "heartbeat failed\n#{response.inspect}"
end
end
end

def keepalive
return if @keepalive_active
@keepalive_active = true
@logger.debug "heartbeat starting..."
Thread.new do
begin
loop do
@heartbeat = true
sleep 6
break unless @channel_open
heartbeat if @heartbeat
end
rescue => e
@logger.error "error performing heartbeat: #{e.message}"
ensure
@keepalive_active = false
# Ensure this is always running if a channel is open
keepalive if @channel_open
end
end
end

def acknowledge(event_id)
channel_xml = %(<?xml version="1.0" encoding="utf-8"?>
<EventResponse xmlns="http://schema.broadsoft.com/xsi">
<eventID>#{event_id}</eventID>
<statusCode>200</statusCode>
<reason>OK</reason>
</EventResponse>)

conn = new_request
conn.url = "https://#{@domain}/com.broadsoft.xsi-events/v2.0/channel/eventresponse"
conn.body = channel_xml
response = HTTPI.post(conn)
if response.code == 200
@logger.debug "acknowledgment #{event_id}"
else
@logger.warn "acknowledgment failed\n#{response.inspect}"
end
end

def parse_event(data)
@buffer << data
data = @buffer

# Check if valid XML with our current buffer
xml = Nokogiri::XML(data)
return unless xml.errors.empty?
@buffer = String.new
xml.remove_namespaces!

begin
response_type = xml.children[0].name
case response_type
when 'Channel'
@channel_id = xml.xpath("//channelId").inner_text
@expires = (xml.xpath("//expires").inner_text.to_i - 5).seconds.from_now
@logger.info "channel established #{@channel_id}"
@logger.debug "channel details:\n#{data}"
{
channel_id: @channel_id,
event_name: 'new_channel'
}
when 'Event'
event_data = xml.xpath("//eventData")[0]
event = {
channel_id: xml.xpath("//channelId").inner_text,
user_id: xml.xpath("//userId").inner_text,
subscription_id: xml.xpath("//subscriptionId").inner_text,
event_id: xml.xpath("//eventID").inner_text,
event_name: event_data["type"].split(':')[1],
event_data: event_data
}
Thread.new { acknowledge(event[:event_id]) }
event
else
@logger.debug "recieved #{response_type} on channel"
nil
end
rescue => e
@logger.error "processing event\n#{e.message}\nevent: #{data}"
nil
end
end

# Admin Commands:
def renew(expires_in = 6.hours.to_i)
channel_xml = %(<?xml version="1.0" encoding="utf-8"?>
<Channel xmlns="http://schema.broadsoft.com/xsi">
<expires>#{expires_in}</expires>
</Channel>)

conn = new_request
conn.url = "https://#{@domain}/com.broadsoft.xsi-events/v2.0/channel/#{@channel_id}"
conn.body = channel_xml
response = HTTPI.put(conn)
if response.code != 200
@logger.warn "channel renewal failed\n#{response.inspect}"
end
end

def close_channel
conn = new_request
conn.url = "https://#{@domain}/com.broadsoft.xsi-events/v2.0/channel/#{@channel_id}"
response = HTTPI.delete(conn)
if response.code != 200
@logger.warn "channel close failed\n#{response.inspect}"
end
end

def get_user_events(group, events = "Call Center Queue")
channel_xml = %(<?xml version="1.0" encoding="UTF-8"?>
<Subscription xmlns="http://schema.broadsoft.com/xsi">
<event>#{events}</event>
<expires>#{6.hours.to_i}</expires>
<channelSetId>#{@channel_set_id}</channelSetId>
<applicationId>#{@application_id}</applicationId>
</Subscription>)

conn = new_request
conn.url = "https://#{@domain}/com.broadsoft.xsi-events/v2.0/user/#{group}"
conn.body = channel_xml
response = HTTPI.post(conn)
if response.code == 200
# extract the subscription ID
xml = Nokogiri::XML(response.body)
xml.remove_namespaces!
xml.xpath("//subscriptionId").inner_text
elsif response.code == 404
sleep 1
get_user_events(group, events) if @channel_open
else
@logger.warn "get user events failed\n#{response.inspect}"
raise "bad response when requesting events #{response.code}\n#{response.body}"
end
end

def new_request
conn = HTTPI::Request.new
conn.proxy = @proxy if @proxy
conn.headers['Content-Type'] = 'application/xml'
conn.headers['Accept'] = 'application/xml; charset=UTF-8'
conn.auth.basic(@username, @password)
conn
end
end
Loading