![]() ![]() If you love this project and want to donate to support it, donate your money somewhere else! If you don't have a charity in mind, food banks are always in dire need of your support, consider donating to your local regional food bank. If you add new novel functionality that others might make use of, please submit a PR! Donations There are some various examples of the luna-send endpoints and payloads here (scroll down a bit): įor documentation on each endpoint, see the WebOS developer docs: "variable_passed_to_function": "value_for_variable", I will eventually add support for different actions based on short vs long press. ![]() Note that long presses (longer than 1s) are ignored. Just run magic_mapper.py manually and it will list all button codes it sees. Not all remote buttons are on this list, but if needed, you can modify magic_mapper.py to add other button codes. Due to the way this works there could be erratic behavior, please report any problems by opening an issue. Note that this does not disable the mouse inside the remote, but it prevents WebOS from seeing that it has been activated. This will prevent WebOS from seeing that the remote has activated its mouse. To disable the mouse, edit the script and change BLOCK_MOUSE = True near the top. code (integer, default: none) The code to send.In the interim, you could use send_button_press assigned to another key to send the normal home button command, or just map send_cec_button to any other button. Functionality would be improved if we had support for long button presses, so you could still use the TVs home menu with a long press. I personally have assigned this to the "." button, but you could override the magic remote's home button if you wanted.This will allow you to map a magic remote button to that home command, replicating what happens when you use the "." menu and click "Home". Normally, the magic remote can control a device such as a FireTV or NVidia Shield, but there's no way to send the Home command without using the TV menus. You would use this when controlling another device over HDMI-CEC to send the Home command. This should be considered experimental and has not been well tested. Sends a CEC button code to the current input device.Once your TV is rooted, run the following to download the Magic Mapper scripts (or just vi the files and copy and paste, or just use scp on the C9/CX, but the C2 doesn't support scp).The above instructions work fine for a C9, but a C2 requires additional steps for SSH to work, outlined here.Instead, follow this guide (C2 and probably C1 have issues, see next bullet):.Note the above link is likely to fail on the newest firmware.Root your TV using and install the Home Brew app.To use with both the magic remote and IR remote, run two copies of this script with different INPUT_DEVICE settings. To use with an IR remote, change INPUT_DEVICE = "/dev/input/event1".Note that with exclusive mode disabled, a button's default behavior will not be blocked, which means you will not be able to ovveride app buttons or buttons such as "guide". If weird things start happening, edit the script and set EXCLUSIVE_MODE = False near the top. This script attempts to take exclusive control of the remote's input device this could have unknown unintended consequences.If a button has a long press function (ie 0-9), and it's configured in magic_mapper_config.json, long pressing the button will no longer work.Some buttons automatically activate the mouse, you can disable the mouse to avoid this, but this will disable the mouse completely.TV Models supported (Likely any LG TV after 2018 are supported until this stops working with unknown future models) Disable the Magic Remote mouse (EXPERIMENTAL).Send hdmi-cec key presses (EXPERIMENTAL).Simulate a button press (useful to send play and pause commands on remotes without these buttons, ie use "green" for play and "red" for pause).Curl a URL (ie call a HomeAssistant webhook trigger URL with a payload).Send IR commands to a device configured by the Device Connector (ie have a shortcut key to toggle power on for an optical connected soundbar).Launch an app (not configured by default).Toggle the Eye Comfort Mode (also known as Reduce Blue Light) (blue button).Turn the screen off - press any button but power to turn it back on (9 button).Cycle the energy savings modes (yellow button).Set a specific OLED light value (not configured by default).The script has support to do the the following (default config button): ![]() The script itself runs on your rooted LG TV, detects button presses, and allows you to control anything available via the luna-send api. Magic Mapper is a script that will let you remap unused buttons on the LG Magic Remote. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |