Comments (10)
@Ganime422 I didn't try as only TV controls interest me.
from androidtv-remote.
Concernant la v1.0.6 j'ai réussi à "faire fonctionner" mais j'obtiens la même erreur que précédemment :
code: 'ERR_UNHANDLED_ERROR',
context: {
error: RemoteError {
value: true,
message: RemoteMessage {
remoteKeyInject: RemoteKeyInject { keyCode: 91, direction: 3 }
}
}
}
from androidtv-remote.
À noter qu'avec Assistant Cloud j'ai aussi une erreur (en bytes) qui est :
[26,9,8,2,18,5,18,3,8,238,4]
Et je ne comprends pas d'où ça vient :-(
from androidtv-remote.
Après avoir installé FreeTelec puis avoir constaté que ça marchait avec l'appli, tout s'est débloqué pour une raison inconnue…
Maintenant je n'ai plus d'erreur sur ton programme ni avec Assistant Cloud… Par contre androidtv-remote
ne semble pas exécuter la commande (j'ai essayé avec du volume up/down, avec mute, avec du RemoteDirection.SHORT
et du RemoteDirection.START_LONG
/RemoteDirection.END_LONG
:
Start Remote Connect
192.168.0.47 Remote secureConnect
192.168.0.47 Receive in Bytes : 5,10,3,8,255,4
192.168.0.47 Receive : {"remoteConfigure":{"code1":639}}
Create Remote {"remoteConfigure":{"code1":622,"deviceInfo":{"unknown1":1,"unknown2":"1","packageName":"androitv-remote","appVersion":"1.0.0"}}}
Sending in Bytes 36,10,34,8,238,4,18,29,24,1,34,1,49,42,15,97,110,100,114,111,105,116,118,45,114,101,109,111,116,101,50,5,49,46,48,46,48
Sending {"remoteConfigure":{"code1":622,"deviceInfo":{"unknown1":1,"unknown2":"1","packageName":"androitv-remote","appVersion":"1.0.0"}}}
Create Remote {"remoteKeyInject":{"keyCode":91,"direction":3}}
Sending in Bytes 6,82,4,8,91,16,3
Sending {"remoteKeyInject":{"keyCode":"KEYCODE_MUTE","direction":"SHORT"}}
192.168.0.47 Receive in Bytes : 2,18,0
192.168.0.47 Receive : {"remoteSetActive":{}}
Create Remote {"remoteSetActive":{"active":622}}
Sending in Bytes 5,18,3,8,238,4
Sending {"remoteSetActive":{"active":622}}
192.168.0.47 Receive in Bytes : 5,194,2,2,8,1
192.168.0.47 Receive : {"remoteStart":{"started":true}}
Powered : true
192.168.0.47 Receive in Bytes : 18,146,3,15,8,9,16,10,26,7,84,80,77,49,55,49,69,32,1
192.168.0.47 Receive : {"remoteSetVolumeLevel":{"unknown1":9,"unknown2":10,"playerModel":"TPM171E","unknown4":1}}
Volume : 0/0 | Muted : false
192.168.0.47 Receive in Bytes : 25,162,1,22,10,20,98,18,111,114,103,46,100,114,111,105,100,116,118,46,112,108,97,121,116,118
192.168.0.47 Receive : {"remoteImeKeyInject":{"appInfo":{"appPackage":"org.droidtv.playtv"}}}
Current App : org.droidtv.playtv
192.168.0.47 Receive in Bytes : 9,66,7,8,1,16,207,242,176,2
Sending in Bytes 4,74,2,8,1
192.168.0.47 Receive in Bytes : 9,66,7,8,2,16,239,153,177,2
Sending in Bytes 4,74,2,8,2
La commande est envoyée trop tôt, du coup je rajoute un délai:
androidRemote.on('ready', async function (){
// délai nécessaire sinon la commande est envoyée trop tôt
await new Promise(resolve => setTimeout(resolve, 2000));
androidRemote.sendKey(RemoteKeyCode.KEYCODE_MUTE, RemoteDirection.SHORT)
}.bind(this))
En faisant ça, le MUTE est bien activé sur la TV !
from androidtv-remote.
Oui j’avais remarqué qu’on pouvait rencontrer des erreurs si on envoyait tout de suite des commandes juste après le ready : mettre 2s d’attente est un bon workaround
from androidtv-remote.
Je vais corriger l’exemple qui effectivement contenait une erreur
from androidtv-remote.
Corrigé dans la V1.0.7
from androidtv-remote.
@Aymkdn What is the use case u r working on.
from androidtv-remote.
It's for controlling a French set-top box with Google and Alexa, and also to build a documentation https://github.com/Aymkdn/assistant-freebox-cloud/wiki/Google-TV-(aka-Android-TV)-Remote-Control-(v2)
from androidtv-remote.
@Aymkdn have you managed to get keyboards keys to work? such as KEYCODE_A, KEYCODE_F etc. ?
from androidtv-remote.
Related Issues (20)
- Setup Help - Hostname HOT 3
- keyboard keys are not working HOT 1
- get mac address
- send more data to TV with the app deep link
- Remote installation of app?
- Suggested improvements HOT 1
- can you write a swift version HOT 14
- How I can run this library in my react native project. I need to create a mobile app HOT 6
- Unhandled 'error' event in TLSSocket HOT 1
- How to send text HOT 2
- Method to send voice and send text HOT 4
- Send text, analog adb command: "shell input text" HOT 1
- Andoird TV: send mouse movement / get the installed app HOT 1
- Error: connect ECONNREFUSED HOT 2
- Ping message issue and resulted closed connection HOT 2
- Android TV (v2) 1st Configuration Message get error from TV
- Unhandled error (at TLSSocket.<anonymous> (/.../RemoteManager.js:107:21))
- setting the volume is not working
- HI! Is it possible to integrate it with React Native? HOT 1
- How to save the auth token to keep connected?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from androidtv-remote.