Coder Social home page Coder Social logo

wwe-entrance's Introduction

WWE Entrance Music

Everyone deserves to enter a room with their favourite tune playing; just like the WWE wrestlers.

This project attempts to replicate that behaviour by polling the WiFi network to check if a pre-configured device connects to the Home/Office Wifi network.

When a known device is seen to connect to the WiFi network, a pre-configured music file will be played on the system. This will allow devices to play the music before the user enters the room.

The configurations for the devices and sound files are placed in config.json.

Requirements

  • Currently only the DLink router DIR-800 is supported. Ideally, you should have a router which should be able to

    • Open a telnet session with the client
    • Ask for username & password in the beginning
    • Switch to a shell once the login succeeds
  • A music player that can be invoked from the command line. The default is /usr/local/bin/vlc

How To Run

You can run the program by executing the following command:

$ go run main.go -default-audio=/usr/local/bin/vlc -username=router_admin -password=router_password

Options

You can print the options by typing the command

$ go run main.go --help
  • -default-audio: Default audio player command (default "/usr/local/bin/vlc")
  • -delay: The delay (in seconds) with which the program will attempt to poll the router for connected devices (default 5)
  • -password: The password for your router login (default "Password")
  • -property-file: The location of the property file (default "config.json")
  • -username: The username for your router login (default "Admin")

TODOs:

  • Get the broadcast IP from the system instead of hardcoding it
  • Support for multiple clients connecting at the same time. It should enqueue the music files and play one after another
  • Manage statuses for devices instead of iterating over all the devices on the network
  • Currently only DLink DIR-800 router is supported. I don't have knowledge of how other routers work

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.