3 # UCC Door Server - fake finger client for cfingerd(8)
5 # Released under an MIT-style license; see COPYING for details.
7 # incorporate into the cfingerd.conf(5) file with a line similar to:
8 # FILES finger_fakeusers = {
9 # "door", "The Doors", FALSE, "/home/other/door/uccdoor/client-finger.py"
15 doorstrings = {0: 'The door is currently closed.',
16 1: 'The door is currently open.',
17 -1: 'The door sensor is currently malfunctioning.',}
19 pirstrings = {0: 'There is nothing moving here.',
20 1: 'There is something moving here.',
21 -1: 'There is a malfunctioning PIR here.',}
23 if __name__ == '__main__':
26 system_bus = dbus.SystemBus()
28 doors = {'uccdoor': None, 'unisfadoor': None, 'chdoor': None, 'mrdoor': None, 'uccpir': None}
30 for door in doors.keys():
32 remote_object = system_bus.get_object('au.asn.ucc.DoorServer', '/au/asn/ucc/doors/%s' % door)
33 state = remote_object.get_status(dbus_interface='au.asn.ucc.DoorInterface')
36 # map the status to a string
38 doors[door] = pirstrings[state]
40 doors[door] = doorstrings[state]
48 The UCC Machine Room door:
54 The Cameron Hall top door: