Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chaosdorf/spacebell
Chaosdorf hackspace doorbell service using mqtt and PulseAudio
https://github.com/chaosdorf/spacebell
Last synced: about 10 hours ago
JSON representation
Chaosdorf hackspace doorbell service using mqtt and PulseAudio
- Host: GitHub
- URL: https://github.com/chaosdorf/spacebell
- Owner: chaosdorf
- License: mit
- Created: 2020-01-11T16:35:51.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-12-15T08:52:33.000Z (11 months ago)
- Last Synced: 2024-04-09T22:10:39.514Z (7 months ago)
- Language: Python
- Size: 5.86 KB
- Stars: 0
- Watchers: 24
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SpaceBell
## Description
This is a tiny service with the purpose to ring a bell when someone is at the door.
The bell button emits a message on mqtt, which is subscribed by the service. At every occurrence, the service plays a prepared audio sample on the PulseAudio server. This call is rate limited, to stop annoyance.
## Requirements/Usage
You need running mqtt and PulseAudio (PA) servers.
If the PA server runs on another machine, set an environment variable similar to this:
```
export PULSE_SERVER=pulseserver
```SpaceBell uses Python 3 and some libraries. Install them like this:
```
pip3 install --user -r requirements.txt
```Run the service with the following options:
```
usage: spacebell.py [-h] [--server SERVER] [--topic TOPIC] [--sample SAMPLE]The Chaosdorf doorbell service
optional arguments:
-h, --help show this help message and exit
--server SERVER The mqtt server to connect to
--topic TOPIC The mqtt topic to subscribe to
--sample SAMPLE The PulseAudio sample to play
```## Deployment
At the hackspace, we use [Docker Stacks](https://github.com/chaosdorf/docker-stacks) to deploy the service. When changing the code, make sure to update the Dockerfile as well, if needed!