Skip to content

Commit

Permalink
Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
unknownskl committed Jun 15, 2018
1 parent 2423310 commit 4161af1
Showing 1 changed file with 27 additions and 20 deletions.
47 changes: 27 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,41 @@ NodeJS smartglass library for controlling a Xbox

- NodeJS 9 (X509 package is not compatible with Node 10 yet)
- NPM
-

## How to install

```npm install xbox-smartglass-core-node --save```

## How to use

### Boot the Xbox console

Smartglass.power_on({
live_id: 'FD000000000000', // Put your console's live id here (Required)
tries: 4, // Number of packets too issue the boot command (Optional)
ip: '127.0.0.1' // Your consoles ip address (Optional)
}, function(result){
if(result)
console.log('Device booted successfully');
else
console.log('Failed to boot device');
});
```
Smartglass.power_on({
live_id: 'FD000000000000', // Put your console's live id here (Required)
tries: 4, // Number of packets too issue the boot command (Optional)
ip: '127.0.0.1' // Your consoles ip address (Optional)
}, function(result){
if(result)
console.log('Device booted successfully');
else
console.log('Failed to boot device');
});
```

### Discover consoles on network

Smartglass.discovery({
ip: '127.0.0.1' // Your consoles ip address (Optional)
}, function(device, address){
console.log('- Device found: ' + device.device_name);
console.log('Address: '+ address.address + ':' + address.port);
console.log('LiveID: ' + device.device_certificate.subject.commonName);
console.log('Certificate valid: ' + device.device_certificate.notBefore + ' - ' + device.device_certificate.notAfter);
console.log('Certificate fingerprint: ' + device.device_certificate.fingerPrint);
});
```
Smartglass.discovery({
ip: '127.0.0.1' // Your consoles ip address (Optional)
}, function(device, address){
console.log('- Device found: ' + device.device_name);
console.log('Address: '+ address.address + ':' + address.port);
console.log('LiveID: ' + device.device_certificate.subject.commonName);
console.log('Certificate valid: ' + device.device_certificate.notBefore + ' - ' + device.device_certificate.notAfter);
console.log('Certificate fingerprint: ' + device.device_certificate.fingerPrint);
});
```

## Known Issues

Expand Down

0 comments on commit 4161af1

Please sign in to comment.