Compare commits
3 commits
aef438e4d6
...
3e188e7054
Author | SHA1 | Date | |
---|---|---|---|
Martin Giger | 3e188e7054 | ||
Martin Giger | 671ea3fd6e | ||
Martin Giger | f2785c52b8 |
9
index.js
9
index.js
|
@ -172,6 +172,7 @@ class IRUSBDevice extends Device {
|
|||
constructor(adapter, uuid, ip, port) {
|
||||
super(adapter, uuid);
|
||||
this.name = uuid;
|
||||
this['@type'] = [ 'OnOffSwitch' ];
|
||||
this.socket = new net.Socket();
|
||||
this.socket.setEncoding('ascii');
|
||||
this.addProperty(new IRUSBProperty(this, 'power', {
|
||||
|
@ -317,13 +318,13 @@ class IRUSBDevice extends Device {
|
|||
* @param {Action} action
|
||||
*/
|
||||
async performAction(action) {
|
||||
switch(action.getName()) {
|
||||
switch(action.name) {
|
||||
case 'launch':
|
||||
return this.sendCommand(`LAUNCH ${action.getInput()}`);
|
||||
return this.sendCommand(`LAUNCH ${action.input}`);
|
||||
case 'remoteShort':
|
||||
return this.sendKey(action.getInput(), false);
|
||||
return this.sendKey(action.input, false);
|
||||
case 'remoteLong':
|
||||
return this.sendKey(action.getInput(), true);
|
||||
return this.sendKey(action.input, true);
|
||||
case 'cancelKeys':
|
||||
return this.sendCommand('HIDCODE0000000');
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"id": "irusb-adapter",
|
||||
"name": "IrUSB",
|
||||
"short_name": "IrUSB",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"description": "Adapter for Video Lan IrUSB devices (Android TV, nVidia Shield with an adapter)",
|
||||
"homepage_url": "https://git.humanoids.be/freaktechnik/irusb-adapter",
|
||||
"license": "MIT",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "irusb-adapter",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"description": "webthings.io gateway adapter for the Video Storm IrUSB device. Allows control of Android TV devices like nVidia Shield over Network.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
|
Loading…
Reference in a new issue