Giter Club home page Giter Club logo

Comments (10)

Aymkdn avatar Aymkdn commented on August 15, 2024 1

@Ganime422 I didn't try as only TV controls interest me.

from androidtv-remote.

Aymkdn avatar Aymkdn commented on August 15, 2024

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.

Aymkdn avatar Aymkdn commented on August 15, 2024

À 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.

Aymkdn avatar Aymkdn commented on August 15, 2024

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.

louis49 avatar louis49 commented on August 15, 2024

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.

louis49 avatar louis49 commented on August 15, 2024

Je vais corriger l’exemple qui effectivement contenait une erreur

from androidtv-remote.

louis49 avatar louis49 commented on August 15, 2024

Corrigé dans la V1.0.7

from androidtv-remote.

piyush2greedy avatar piyush2greedy commented on August 15, 2024

@Aymkdn What is the use case u r working on.

from androidtv-remote.

Aymkdn avatar Aymkdn commented on August 15, 2024

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.

Ganime422 avatar Ganime422 commented on August 15, 2024

@Aymkdn have you managed to get keyboards keys to work? such as KEYCODE_A, KEYCODE_F etc. ?

from androidtv-remote.

Related Issues (20)

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.