MagicMirror² v2.14.0 is available! For more information about this release, check out this topic.

Error Installing MMM-Keybindings

  • ’m trying to install but get an error with node-pre-gyp install --fallback-to-build

    node v8.10.0
    npm v3.5.2

    I can not go to node 10.x as I’m running in old Macbook Pro which although has 64bit processor runs in 32bit mode

    first warnings I see:
    node-pre-gyp WARN Using request for node-pre-gyp https download
    node-pre-gyp WARN Pre-built binaries not installable for udev@0.5.0 and node@8.16.0 (node-v57 ABI, glibc) (falling back to source compile with node-gyp)
    node-pre-gyp WARN Hit error Invalid URI “https:///node-v57-linux-ia32.tar.gz”

    Any help appreciated

  • @JcMarin I would look at the instructions in the MMM-Hotword readme same problems. Best I’ve seen

  • @sdetweil said in Error Installing MMM-Keybindings:


    Thanks @sdetweil

    I think I made some progress, the main error was referencing libudev so I installed libudev-dev and that seems to have worked.

    Another error I found is in the there is a version check of Electron but that was pointing to /home/pi/MagicMirror which is not my case as I’m not running on a Raspberry. I changed to my MM directory and that error cleared as well

    I will now check to see if the module is working and advice if its not

  • Well I think that the module installed now, at least I’m not getting any errors with “npm install” but it’s not working after adding and configuring on my MM

    I’m using an Apple IR remote that is working under ubuntu fine (in dev/input/event8)

    whats the best way to troubleshoot this? how do I know if MM is getting the input and if MM-Keybinds is truly installed and working?

  • @JcMarin ctrl-shift-i to open the developers window, select the console tab, and scroll up to find any errors, usually red text

    using the developers window and the source view, you can navigate thru the javascript, in the leftmost pane to see it and also put program stops on instructions so that you can investigate module execution

  • So MMM-Keybinding is working for me now with Keyboard but does not work with the Apple IR Remote

    The remote is linked to /dev/input/event6 and evtest sees all the keys which I have added to the Keymap in the config, but MMM-Keybindings does not see the event (I installed MMM-ViewNotifications to see what is detected)

    If I enable the keyboard MMM-Keybindings actually see some of the remotes keys but as keyboard input

    I also have tried to use ip-keytable to map other keyboard keys to the rremote but ip-keytable does NOT see the remote (/sys/class/rc/rc No such file or directory), looks like the remote is recognized as keyboard input but not actually an ir remote

    Anyonw has any experience with the Apple IR and how to use it in Magic Mirror?

  • @JcMarin said in Error Installing MMM-Keybindings:

    Apple IR Remote

    can u give more info on the remote? is this just a typical Apple tv remote?

  • Yes, this is an Apple Metalic Remote (model A-1294) and receiver is the embedded MacBook Pro IR Receiver (old MacBook Pro 15" Core 2 Duo 2.33 - late 2006)

    For now, I have worked around MMM-Keybindings not seeing the remote keys by installing lirc and using irxevent to send Keys to MMM-Keybindings

    This is the config I was trying:
    module: “MMM-KeyBindings”,
    config: {
    enabledKeyStates: [“KEY_PRESSED”, “KEY_LONGPRESSED”],
    evdev: { enabled: true, eventPath: “/dev/input/btremote”},
    enableKeyboard: true,
    KeyMap: {
    Home: “KEY_HOMEPAGE”,
    Enter: “KEY_ENTER”,
    ArrowLeft: “KEY_LEFT”,
    ArrowRight: “KEY_RIGHT”,
    ArrowUp: “KEY_VOLUMEUP”,
    ArrowDown: “KEY_VOLUMEDOWN”,
    Menu: “KEY_MENU”,
    MediaPlayPause: “KEY_PLAYPAUSE”,
    MediaNextTrack: “KEY_FORWARD”,
    MediaPreviousTrack: “KEY_BACK”,
    Return: “KEY_BACKS”
    actions: [{
    key: “ArrowUp”,
    state: “KEY_PRESSED”,
    instance: “SERVER”,
    mode: “DEFAULT”,
    notification: “REMOTE_ACTION”,
    payload: { action: “TOGGLE”, module: “module_2_clock”},

    btremote is pointing to /dev/input/event6 and as I said evtest does see the remote

    I also tried ir-keytables but although I can force it to look at the event6 dev there is no /dev/rc directory and it gives an error

    I guess lirc is not a bad solution while combining it with MMM_Keybindings, little more work and things to configure but I could not get it to work directly


    I finally figured out why MMM-Keybindings was not seeing the remote, after looking at some logs from pm2 I saw some errors reporting no permission to open /dev/input/btremote (which points to /dev/input/event6)

    After further troubleshooting, I saw that the MM process in PM2 for some reason was not running as root

    I recreated the pm2 startup script pm2 startup and that fixed the permissions and now MMM-Keybindings sees the remote clicks no problem.

    thought to post in case this could help someone with same problem

  • @JcMarin nice debugging!!!.. thanks for the update… others will find this useful.

Log in to reply