Giter Site home page Giter Site logo

xboxpoweron.js's Introduction

XboxPowerOn.JS

Xbox One power control via CLI / Node.JS based app (can be run in-browser without downloads too, for example using Eruda to get access to DevTools on mobile browsers using the Chromium engine (Google Chrome / Edge / FreeAdBlockBrowser etc...)

Installation

to use as CLI program

npm install -g xbox-on

or to use as a module

npm install xbox-on

Usage (CLI)

xbox-on --help

  Usage: cli --ip=<ip_address> --live_device_id=<live_device_id>

  Options:

    -h, --help                             output usage information
    -i, --ip <ip>                          Xbox One IP Address
    -l, --live_device_id <live_device_id>  Xbox One Live Device ID
    -t, --tries <tries>                    Number of times to send power on packet
    -d, --delay <delay_between_tries>      Delay between power packets

Usage (Module)

var Xbox = require('xbox-on');                // Require module
var xbox = new Xbox(ipAddress, liveDeviceId); // Create new xbox

// Optional, defaults shown
var options = {
    tries: 5,
    delay: 1000,
    waitForCallback: false
};

xbox.powerOn(options);                        // Issue power on command

Getting your Xbox One's IP address

On your Xbox, go to Settings > Network > Network Settings > Advanced Settings

Getting your Live ID

On your Xbox, go to Settings > System > Console info & updates and look under "Xbox Live device ID"

Caveats

Since dgrams are effectively synchronous and don't rely on a response, we can usually just fire them off and not worry about the callbacks. However, there are cases where you might want to wait until the final packet is sent before proceeding. In this case, you might want to pass the waitForCallback option to the powerOn call to ensure that all requests are sent before continuing. The CLI is an obvious use case for this, as terminating prior to callback wouldn't send any packets at all!

xboxpoweron.js's People

Contributors

arcreative avatar skyn9ne avatar djekl avatar

Stargazers

 avatar

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.