Schlagwort: slack

  • Remote teams ring office bell with Raspberry Pi and Slack

    Remote teams ring office bell with Raspberry Pi and Slack

    Reading Time: 3 minutes

    Bustling offices… remember those? It feels like we’ve all been working from home forever, and it’s going to be a while yet before everyone is back at their desks in the same place. And when that does happen, if your workplace is anything like Raspberry Pi Towers, there will still be lots of people in your team who are based in different countries or have always worked from home.

    This office bell, built by a person called Alex, is powered by a Raspberry Pi 3B+ and is linked to Slack, so when a milestone or achievement is announced on the chat platform by a remote team member, they get to experience ringing the office bell for themselves, no matter where in the world they are working from.

    Kit list:

    Close-up of the servo wired to the Raspberry Pi pins

    Integrating with Slack

    To get the Raspberry Pi talking to Slack, Alex used the slackclient module (Python 3.6+ only), which makes use of the Slack Real Time Messaging (RTM) API. This is a websocket-based API that allows you to receive events from Slack in real time and send messages as users.

    With the Slack RTM API, you create an RTM client and register a callback function that the client executes every time a specific Slack event occurs. When staff tell the @pibot on Slack it’s ‘belltime’, the Raspberry Pi tells the servo to ring the bell in the office.

    Alex also configured it to always respond with an emoji reaction when someone successfully rings the bell, so remote employees get some actual feedback that it worked. Here’s the script for that bit.

    Alex also figured out how to get around WiFi connectivity drops: they created a cronjob that runs a bash script every 15 minutes to check if the bell ringer is running. If it isn’t running, the bash script starts it.

    At the end of Alex’s original post, they’ve concluded that using a HAT would allow for more control of the servo and avoid frying the Raspberry Pi. They also cleaned up their set-up recently and switched the Raspberry Pi 3B+ out for a Raspberry Pi Zero, which is perfectly capable of this simple job.

    Website: LINK

  • Tired of queuing for the office toilet? Meet Occu-Pi

    Tired of queuing for the office toilet? Meet Occu-Pi

    Reading Time: 2 minutes

    This is the story of Occu-Pi, or how a magnet, a Raspberry Pi, and a barrel bolt saved an office team from queuing for the toilet.

    Occu Pi Raspberry Pi toilet signal

    The toil of toilet queuing

    When Brian W. Wolter’s employer moved premises, the staff’s main concern as the dearth of toilets at the new office, and the increased queuing time this would lead to:

    Our previous office had long been plagued by unreasonably long bathroom lines. At several high-demand periods throughout the day we’d be forced to wait three, four, five people deep while complaining bitterly to each other until our turn to use the facilities arrived. With even fewer bathrooms in our new office, concern about timely access was naturally high.

    Faced with this problem, the in-house engineers decided to find a technological solution.

    Occu-Pi

    The main thing the engineers had to figure out was just how to determine the difference between a closed door and an occupied stall. Brian explains in his write-up:

    There is one notable wrinkle: it’s not enough to know the door is closed, you need to know if the bathroom is actually in use — that is, locked from the inside. After considering and discarding a variety of ‘creative’ solutions (no thank you, motion sensors and facial recognition), we landed on a straightforward and reliable approach.

    The team ended up using a magnet attached to the door’s barrel bolt to trigger a notification. Simply shutting the door doesn’t act as a trigger — the bolt needs to lock the door to set off a magnetic switch. That switch then triggers both LED notifications and updates to a dedicated Slack channel.

    Occu-Pi Raspberry Pi toilet signal

    For the technically-minded, Occu-Pi is a pretty straightforward build. And those wanting to learn more about it can find a full write-up in Brian’s Medium post.

    We’ve seen a few different toilet notification projects over the years, for example this project from DIY Tryin’ using a similar trigger plus a website. What’s nice about Occu-Pi, however, is the simplicity of its design and the subtle use of Slack — Pi Tower’s favoured platform for office shenanigans.

    Website: LINK