All Projects → buntine → wrestlers-adapter

buntine / wrestlers-adapter

Licence: GPL-3.0 license
TCP -> HTTP adapter for alerting on wifi events.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to wrestlers-adapter

retired comedy phrases
A Casual Spreadsheets resource
Stars: ✭ 13 (-18.75%)
Mutual labels:  comedy
dadjoke-cli
A simple CLI to bring you the freshest dad jokes straight to your terminal 😂
Stars: ✭ 80 (+400%)
Mutual labels:  comedy

Wrestling Theme Music TCP Adapter

This program will:

  • Listen for rsyslog streams on a given TCP port
  • Attempt to parse out a MAC address and action from the stream
  • Build HTTP POST request to web service, forwarding on details

It runs as a system daemon. So, you can think of it like a proxy that translates ugly syslog messages into web service requests.

This blog post provides an explanation and video demonstration.

Process

The configured web service will receive POST requests in the format:

https://some.api/<action>/<mac-address>

For example:

https://my-wifi.com.au/join/12:d4:ab:bd:64:f9
https://my-wifi.com.au/leave/03:ff:cb:34:9a:00

Why?

This allows us to trigger things like:

  • Songs on the Sonos
  • Slack messages on entrance
  • Standup attendance / lateness logging
  • Slack bot to determine if someone is currently in the office

Mapping of MAC address to Human is left to the web service.

Usage

The binary can be run as:

$ wrestlers-adapter [listen_host=127.0.0.1] [listen_port=10514] [forward_host=127.0.0.1] [forward_port=80]
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].