Code Monkey home page Code Monkey logo

Comments (6)

neophob avatar neophob commented on August 23, 2024

Hi @isolationism

I tried to reproduce your issue using a modified simpleAccessory example (see https://github.com/NEEOInc/neeo-sdk-examples/tree/master/lib/device/simpleAccessory).

I changed the definition of the device:

const customLightDevice = neeoapi.buildDevice('Simple Accessory')
  .setManufacturer('NEEO')
  .addAdditionalSearchToken('foo')
  .setType('DVD')

  // Then we add the capabilities of the device
  .addButton({ name: 'button-a', label: 'Button A' })
  .addButton({ name: 'button-b', label: 'Button B' })
  .addButton({name: 'CURSOR ENTER'})
  .addButtonGroup('Color Buttons')
  .addButtonHandler(controller.onButtonPressed);

function startSdkExample(brain) {
  console.log('- Start server');
  neeoapi.startServer({
    brain,
    port: 6336,
    name: 'simple-accessory-one',
    devices: [customLightDevice]
  })
  .then(() => {
    console.log('# READY! use the NEEO app to search for "NEEO Accessory".');
  })
  .catch((error) => {
    //if there was any error, print message out to console
    console.error('ERROR!', error.message);
    process.exit(1);
  });
}

this works as it should. Can you provide a sample code that shows your issue?

How did you try to trigger the CURSOR ENTER? using the mobile app or the remote? using a shortcut?

thanks and BR
Michael

from neeo-sdk.

isolationism avatar isolationism commented on August 23, 2024

The defect is with the physical buttons; when I use the 'widget' button on screen the Enter/OK command works fine. I've just now discovered a very similar defect trying to get my SqueezeBox to work as a MEDIAPLAYER accessory, except with the "Channel Zapper" buttons. Again, no matter how I define them in the source code, the physical buttons never work. However, if I had a channel zapper widget, they work perfectly from the screen.

My code examples are real-world so they are an order of magnitude more complex than what you have here, but I can paste them if it helps.

from neeo-sdk.

isolationism avatar isolationism commented on August 23, 2024

I should also add that there was additionally some strange behaviour with the channel zapper buttons being mapped to FORWARD and REVERSE even though there was no such definition anywhere in my file. Debugging problems with the API is a real challenge because of the 'mystery' behaviour with special button names and inconsistent behaviours/restrictions (example: I can't for the life of me figure out why NEEO would care whether my device has a number pad or not. What business is it of yours to say that a music streamer โ€” which is not a TV, nor DVB, nor TUNER โ€” can't have number buttons?)

from neeo-sdk.

neophob avatar neophob commented on August 23, 2024

Thanks @isolationism. Ok I could reproduce your issue now. The keymapping for the DVD devicetype is in fact not optimal. I'll update the docs in the next release, in the meantime a workaround:

  • for DVD you need to define the buttons CURSOR ENTER, PREVIOUS and NEXT.
  • if you don't define PREVIOUS and NEXT then the remote is mapped to the ENTER macro name

Let me know if that fixed your issue and thanks for the hint about missing doc

from neeo-sdk.

neophob avatar neophob commented on August 23, 2024

@isolationism any feedback from you?

from neeo-sdk.

isolationism avatar isolationism commented on August 23, 2024

Sorry, I don't have time to play with this on a daily basis, but wouldn't it have been better to leave the ticket open until you actually addressed the documentation shortcoming?

from neeo-sdk.

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.