"So what we'd like to do is have the lights turn on in the foyer when people come into the office," the Health and Safety rep says.
"Yep, put a PIR+Daylight sensor unit in," I say. "One of the sparkies could do that for about a hundred quid - or £150 if he's got a holiday coming up."
"Yes, but what we'd like to do is have the lights stay on for 12 minutes," says the rep.
"Sure, sensors can do that. They have a variable timer on them."
"Yes, but we'd like it on for exactly 12 minutes because according to our analysis people enter the building about every 11 minutes,” burbles the rep, “so if it stayed on for 12 minutes it wouldn't turn off and on unnecessarily."
I lean back. "You mean because the light would be triggered again by the person that comes in at 11 minutes?"
"Yes, though we tried that..."
"And it doesn't work, does it?" the PFY says. "Because most of those PIRs can't be retriggered while the light is on - it has to be off, and dark, for the light to be retriggered."
"Yes, I suppose that's what it is,” concedes the slightly sweaty rep. “So we were wondering if you could do something computerey to make a lighting system that would do what we'd want."
"Nah," I say. "It's not possible."
"Hang on a tick," the PFY says, not wanting to contradict me outright but doing it anyway. "We could link up a light sensor to a Raspberry Pi, add a movement detector on another channel, and then use an output channel to trigger a contactor."
"Or you could just use a one-minute interval on the timer so that it always gets reset," I suggest.
"Yes,” says the rep, “but the light has to be on long enough to allow someone to cross the foyer in safety."
"They couldn't make it across 30 metres in a minute?" I ask.
"They could be carrying something..."
"You could drag a body wrapped in an awkwardly rolled carpet across the foyer inside a minute," I say. "I know that for a fact!"
"I... Yes. Well, they would want lights to get the lift."
"The lift buttons are always lit."
"What if the lights were out?"
"They could get the stairs to the next floor – the stairways are always lit."
"What if they're disabled?" The rep's coming to the end of his tether.
"So we need a system to ensure a disabled person dragging a body wrapped in carpet will be well lit the entire time they cross the foyer, and while they wait for a lift? You realise if they're dragging a body they probably actually want darkness?"
"Why the hell are we talking about bodies?" the H&S rep snaps.
"Well, it's a theoretical situation. Like yours." I'm being reasonable with him. For now.
"It's not theoretical. One of our accountants had a fall because the automatic lighting in the foyer turned off while he was wheeling his bike across the foyer."
"You could solve that problem with a bike free zone in the foyer," the PFY chips in.
"You could solve that problem with a roll of carpet," I counter.
"No, I think we should explore this pie system you were talking about..." the H&S guy says.
. . .
"Idiot!" I say to the PFY once he's gone off to report to his team of freaks that they have a solution to the foyer lighting problem.
"Why? I think it'll be great. I've been looking for a use for that Pi."
"I have no problem with you inventing a cool solution to an interesting problem and am all for you adopting the best of British technology to the task, but I feel you have overlooked one tiny flaw in your reasoning."
"Every year or so when someone has a brainwave about a new way of making our passwords even more secure, what do we tell them?"
"The system can't do that."
"When they want to share a particular folder with a certain number of people, securely – but not using Dropbox or any other commercial utility because the CIA might be reading it – what do we say?"
"The system can't do that,” nods the PFY.
"And can it actually do that?"
"So why do we tell them it can't do that?"
"Because it's a pain in the arse."
"YES! It's a PAIN IN THE ARSE! Now, when 12 minutes gets optimised to 11 minutes 45 seconds, who will they turn to?"
"Yes. And when they realise that if it's triggered three times in one minute but that shouldn't mean 24 or 36 minutes but still only 12, who will they turn to?"
"Me," The PFY begins to slump in his seat.
"When they want the system to turn the lights on during a winter's day where ambient light isn't great, but they want the light to stay on until the ambient light is OK, but they don't want it turning on and off every 12, 24 or 36 minutes, who will they turn to?"
"And when they want this on EVERY FLOOR and ALL WITH DIFFERENT TIMINGS each requiring FINE TUNING, review and further fine tuning, who will they turn to?"
"...me..." sighs the PFY.
"And who will you turn to?"
"You," the PFY sighs once more.
"And what will I turn to?"
"The roll of carpet."
"Exactly. So I think someone needs to either make a phone call to the H&S guy to tell him that it's not possible, OR call the rug sale guy asking if he does discount for bulk orders..."