MMM-KeyBindings: Control your mirror with Amazon Fire Stick Remote and Generic Keyboard Inputs
hey i remake all process but nothing new . i am alone in this case ?
just my log when all looks ok
MagicMirror git:(master) ✗ npm start > email@example.com start /home/pi/MagicMirror > sh run-start.sh Starting MagicMirror: v2.4.1 Loading config ... Loading module helpers ... No helper found for module: alert. Initializing new module helper ... Module helper loaded: updatenotification No helper found for module: clock. No helper found for module: compliments. Initializing new module helper ... Module helper loaded: newsfeed No helper found for module: MMM-EyeCandy. Initializing new module helper ... Module helper loaded: Print_text_from_txt Initializing new module helper ... Module helper loaded: MMM-kalliope Initializing new module helper ... Module helper loaded: MMM-KeyBindings No helper found for module: MMM-pages. All module helpers loaded. Starting server on port 8080 ... Server started ... Connecting socket for: updatenotification Connecting socket for: newsfeed Starting module: newsfeed Connecting socket for: Print_text_from_txt Starting module helper: Print_text_from_txt Connecting socket for: MMM-kalliope MMM-kalliope is started Connecting socket for: MMM-KeyBindings MMM-KeyBindings helper has started... Sockets connected & modules started ... Launching application. Create new news fetcher for url: https://www.tdg.ch/rss_ticker.html - Interval: 300000 MMM-kalliope received a socket notification: CONNECT - Payload: null
I cant get the remote connected to the R3B+. I stuck. Searching the web like cracy since yetserday evening with no result.
It seems the pairing fails bc of the message “ServicesResolved: no”
Any clue whats missing?
$ sudo bluetoothctl [NEW] Controller B8:27:EB:DF:FF:D1 raspberrypi [default] [bluetooth]# agent on Agent registered [bluetooth]# scan on Discovery started [CHG] Controller B8:27:EB:DF:FF:D1 Discovering: yes [NEW] Device C4:95:00:6F:19:8A Amazon Fire TV Remote [CHG] Device C4:95:00:6F:19:8A RSSI: -66 [CHG] Device C4:95:00:6F:19:8A RSSI: -74 [CHG] Device C4:95:00:6F:19:8A RSSI: -62 [bluetooth]# scan off Discovery stopped [bluetooth]# pair C4:95:00:6F:19:8A Attempting to pair with C4:95:00:6F:19:8A [CHG] Device C4:95:00:6F:19:8A Connected: yes Request confirmation [agent] Confirm passkey 301420 (yes/no): yes [CHG] Device C4:95:00:6F:19:8A Modalias: usb:v1949p0410d0304 [CHG] Device C4:95:00:6F:19:8A UUIDs: 00001101-0000-1000-8000-00805f9b34fb [CHG] Device C4:95:00:6F:19:8A UUIDs: 00001124-0000-1000-8000-00805f9b34fb [CHG] Device C4:95:00:6F:19:8A UUIDs: 00001200-0000-1000-8000-00805f9b34fb [CHG] Device C4:95:00:6F:19:8A ServicesResolved: yes [CHG] Device C4:95:00:6F:19:8A Paired: yes Pairing successful [CHG] Device C4:95:00:6F:19:8A ServicesResolved: no <<<<< THIS sounds strange to me [CHG] Device C4:95:00:6F:19:8A Connected: no [bluetooth]# trust C4:95:00:6F:19:8A [CHG] Device C4:95:00:6F:19:8A Trusted: yes Changing C4:95:00:6F:19:8A trust succeeded [bluetooth]# devices Device 4F:8A:AE:69:E9:71 4F-8A-AE-69-E9-71 Device 6A:79:D3:6A:17:13 6A-79-D3-6A-17-13 Device C4:95:00:6F:19:8A Amazon Fire TV Remote Device 61:A4:04:D0:5D:66 61-A4-04-D0-5D-66 Device 6E:91:C7:B3:7A:C8 6E-91-C7-B3-7A-C8 [bluetooth]# trust C4:95:00:6F:19:8A Changing C4:95:00:6F:19:8A trust succeeded [bluetooth]# pair C4:95:00:6F:19:8A Attempting to pair with C4:95:00:6F:19:8A Failed to pair: org.bluez.Error.AlreadyExists [bluetooth]# conntect C4:95:00:6F:19:8A Invalid command [bluetooth]# connect C4:95:00:6F:19:8A Attempting to connect to C4:95:00:6F:19:8A [CHG] Device C4:95:00:6F:19:8A Connected: yes Failed to connect: org.bluez.Error.Failed [CHG] Device C4:95:00:6F:19:8A Connected: no [bluetooth]#
@rak Have you tried pairing the remote using the Bluetooth menu/GUI on the desktop?
@jchenaud I am away right now and will take a closer look at your issue when I am back in town.
@shbatm Thanks. Much appreciated. No urgent need. Looking forward to your reply.
I tried both. GUI and command line. Both gave the same error message. I even tried a 2nd remote without success. Same error message.
@shbatm, did you had a chance to look into this? Thanks for an update.
I added “pairable on” to the mix. After that it worked.
Works like a charm. Only thingis that after restarting MagicMirror (pm2 restart MagicMirror) the evdev service ist typically stopped and needs a restart as well (pm2 start evdev).
Not sure whats missing here.
Another thing. The evdev “process” stopps working every now and than. A pm2 start evdev, gets it going again. Any clue how I could troubleshoot this?
first of all: Great module. You’ve just got a quite major issue in your documentation In your wiki (https://github.com/shbatm/MMM-KeyBindings/wiki/Integration-into-Other-Modules) you talk about “KeyCode” being a part of the payload.
I wanted to use that in my module to determine which keyboard key has been pressed and react accordingly. More specificly I was intrested in the arrow-keys.
First there was no reaction at all on any of the key presses. I could see that the press itself was recognized but when logging the payload “KeyCode” was always set to “undefined”. It cost me about 3hrs of my life only to find out that in your code you use “KeyName” but in the documentation you refer to “KeyCode”. I was surprised to be the first one to notice it but obiously I am as otherwise somebody else would have flagged it up already
ANNOUNCEMENT: Version 1.3.0 - Updated 3-Jan-2019 - [BREAKING CHANGES] Remove server controls in favor of External Modules, Remove Python script in favor of Native Node.JS modules
Here are the highlights from this major change:
- This update had the overall goal of simplifying this module. I made a major philosophy change with this update, shifting from the original goal of this module performing a lot of its own sever-side functions and also relying on other modules to implement listeners to handle key presses-to this module being focused on listening to keys and letting other modules handle the heavy lifting.
- Removed all server-side controls from this module (monitor toggle, external interupts) in favor of declaring actions and sending notifications to other modules instead.
- Instead of this module trying to figure out if it should do something like turn on the screen, before it sent the action out–now it just gets the action and sends it. If you want to control the screen, use a module made to do that, like MMM-Remote-Control.
- Removed Notify Server in favor of extensible REST API being developed for MMM-Remote-Control
- The “notify” server was cumbersome and difficult to properly format. It was only really required as a way for the python script to send notifications back. The new REST API is much simpler and the bluetooth monitoring is now done within Node, so that makes this redundant.
- Added Actions to send notifications on a keypress rather than rely on other modules to actively listen for them.
- Instead of requiring other modules to listen for specific “KEY_PRESSED” notifications, you can now translate key presses to notifications that other modules already understand.
- The module is still extensible by other modules, and in fact, it has been made easier now. Rather than incorporate all of the code into your module, you can get a KeyHandler instance and add a few small functions to handle the key press notifications. The heavy lifting to validate a key press is done in the background. See this wiki page for updated instructions.