Is the file named keymaps or you put file keyboard.xml to that folder?
Enable Kodi debug log and press Ctrl-F12 (and also up/down). You should see the action in the log file.
Is the file named keymaps or you put file keyboard.xml to that folder?
Enable Kodi debug log and press Ctrl-F12 (and also up/down). You should see the action in the log file.
The file is in the folder “/storage/.kodi/userdata/keymaps” and is named “remote.xml”.
The guide I followed, that works on my chromeboxes with libreELEC:
What I see in /storage/.kodi/temp/kodi.log when pressing power-button:
type or past2021-09-05 18:12:07.420 T:4940 DEBUG <general>: Keyboard: scancode: 0x1d, sym: 0x0132, unicode: 0x0000, modifier: 0xc0
2021-09-05 18:12:07.420 T:4940 DEBUG <general>: HandleKey: ctrl-leftctrl (0x1f0d0) pressed, action is
2021-09-05 18:12:07.477 T:4965 DEBUG <general>: CLibInputKeyboard::ProcessKey - using delay: 250ms repeat: 33ms
2021-09-05 18:12:07.477 T:5299 DEBUG <general>: Thread Timer start, auto delete: false
2021-09-05 18:12:07.486 T:4940 DEBUG <general>: Keyboard: scancode: 0x58, sym: 0x0125, unicode: 0x0000, modifier: 0xc0
2021-09-05 18:12:07.487 T:4940 DEBUG <general>: HandleKey: ctrl-f12 (0x1f09b) pressed, action is
2021-09-05 18:12:07.736 T:4940 DEBUG <general>: Keyboard: scancode: 0x58, sym: 0x0125, unicode: 0x0000, modifier: 0xc0
2021-09-05 18:12:07.737 T:4940 DEBUG <general>: HandleKey: ctrl-f12 (0x1f09b) pressed, action is
2021-09-05 18:12:07.770 T:4940 DEBUG <general>: Keyboard: scancode: 0x58, sym: 0x0125, unicode: 0x0000, modifier: 0xc0
2021-09-05 18:12:07.770 T:4940 DEBUG <general>: HandleKey: ctrl-long-f12 (0x101f09b) pressed, action is
2021-09-05 18:12:07.803 T:4940 DEBUG <general>: Keyboard: scancode: 0x58, sym: 0x0125, unicode: 0x0000, modifier: 0xc0
2021-09-05 18:12:07.803 T:4940 DEBUG <general>: HandleKey: ctrl-long-f12 (0x101f09b) pressed, action is
2021-09-05 18:12:07.836 T:4940 DEBUG <general>: Keyboard: scancode: 0x58, sym: 0x0125, unicode: 0x0000, modifier: 0xc0
2021-09-05 18:12:07.837 T:4940 DEBUG <general>: HandleKey: ctrl-long-f12 (0x101f09b) pressed, action is
2021-09-05 18:12:07.870 T:4940 DEBUG <general>: Keyboard: scancode: 0x58, sym: 0x0125, unicode: 0x0000, modifier: 0xc0
2021-09-05 18:12:07.870 T:4940 DEBUG <general>: HandleKey: ctrl-long-f12 (0x101f09b) pressed, action is
2021-09-05 18:12:07.903 T:4940 DEBUG <general>: Keyboard: scancode: 0x58, sym: 0x0125, unicode: 0x0000, modifier: 0xc0
2021-09-05 18:12:07.903 T:4940 DEBUG <general>: HandleKey: ctrl-long-f12 (0x101f09b) pressed, action is
2021-09-05 18:12:07.936 T:4940 DEBUG <general>: Keyboard: scancode: 0x58, sym: 0x0125, unicode: 0x0000, modifier: 0xc0
2021-09-05 18:12:07.937 T:4940 DEBUG <general>: HandleKey: ctrl-long-f12 (0x101f09b) pressed, action is
2021-09-05 18:12:07.957 T:5299 DEBUG <general>: Thread Timer 3636916864 terminating
2021-09-05 18:12:07.970 T:4940 DEBUG <general>: Keyboard: scancode: 0x58, sym: 0x0125, unicode: 0x0000, modifier: 0xc0
2021-09-05 18:12:08.036 T:4940 DEBUG <general>: Keyboard: scancode: 0x1d, sym: 0x0132, unicode: 0x0000, modifier: 0x0e code here
Bump, no response?
I am running from eMMC if that matters.
Any other way of doing suspend/resume via IR (Logitech harmony and/or FLIRC)?
Edit:
Saw that in “/flash/config.ini” I have:
#------------------------------------------------------------------------------------------------------
#
# IR setup
# Setup a custom keycode to wake the N2/C4 from suspend or poweroff
# You can stop kodi and eventlircd and use "ir-keytable -u" to obtain a compatible u-boot
# IR keycode
# This setting will require a injected bl301 blob.
#
remotewakeup='0x23dc4db2'
#
# decode_type can be one of the following:
# NEC='0x0', DUOKAN='0x1', TOSHIBA='0x2', RCA='0x3', RC5='0x4', RC6A='0x5', NEC_TOSHIBA_2IN1='0x6',
# NEC_RCA_2IN1='0x7', RCMM='0x8', NEC_RC5_2IN1='0x9', NEC_RC5_2IN1='0xa', RC6='0xb'
# This setting will require a injected bl301 blob.
#
decode_type='0x0'
#
# remote power key mask:
# Some IR protocols implement a toggle bit, this can be ignored by the "and" mask:
# RC5='0x37ff', RC6='0x1effff', RC6A='0xffff7fff'
# This setting will require a injected bl301 blob.
#
remotewakeupmask='0xffffffff'
#
#------------------------------------------------------------------------------------------------------
Is that something that I might need to change, and if so, to what?
You can see
HandleKey: ctrl-leftctrl (0x1f0d0) pressed, action is
which means the action is not known.
Enable Kodi debug log, reboot and run this two commands and post the url you get.
ce-debug
paste /storage/.kodi/temp/kodi.log
Tried redoing it (after clearing “/storage/.kodi/temp/” folder):
% ssh root@192.168.1.84
root@192.168.1.84's password:
##############################################
# CoreELEC #
# https://coreelec.org #
##############################################
CoreELEC (official): 19.3-Matrix (Amlogic-ng.arm)
CoreELEC:~ # ce-debug
http://ix.io/3H6Q
CoreELEC:~ # paste /storage/.kodi/temp/kodi.log
http://ix.io/3H6R
CoreELEC:~ #
also noticed that the “/storage/.config/modprobe.d/blacklist.conf” is gone, maybe removed during earlier upgrade?
The remote file is still there though:
CoreELEC:~ # cat /storage/.kodi/userdata/keymaps/remote.xml
<keymap>
<global>
<keyboard>
<f12 mod="ctrl">XBMC.Suspend()</f12>
</keyboard>
</global>
</keymap>
CoreELEC:~ #
ERROR : Keymapping error: no such action ‘xbmc.suspend()’ defined
Seems this action is unknown. I’m not sure what is the right one. Try with just Suspend()?
Yup, that seem to have solved the first issue!
% ssh root@192.168.1.84
root@192.168.1.84's password:
##############################################
# CoreELEC #
# https://coreelec.org #
##############################################
CoreELEC (official): 19.3-Matrix (Amlogic-ng.arm)
CoreELEC:~ # ce-debug
http://ix.io/3H7c
CoreELEC:~ # paste /storage/.kodi/temp/kodi.log
http://ix.io/3H7d
CoreELEC:~ #
This is the updated file:
CoreELEC:~ # cat /storage/.kodi/userdata/keymaps/remote.xml
<keymap>
<global>
<keyboard>
<f12 mod="ctrl">Suspend()</f12>
</keyboard>
</global>
</keymap>
CoreELEC:~ #
It is now going to suspend when hitting the power button on the remote!
It is however not waking up?
Any ideas on what I need to do to get it to wake up?
Tried this, but does not seem to work!
Stopped the services:
CoreELEC:~ # systemctl stop kodi
CoreELEC:~ # systemctl stop eventlircd
● kodi.service - Kodi Media Center
Loaded: loaded (/usr/lib/systemd/system/kodi.service; disabled; vendor preset: disabled)
Active: inactive (dead) since Sun 2021-12-05 12:34:50 CST; 1min 4s ago
Process: 4852 ExecStartPre=/usr/lib/kodi/aml-wait-for-dispcap.sh (code=exited, status=0/SUCCESS)
Process: 4875 ExecStartPre=/usr/lib/kodi/kodi-config (code=exited, status=0/SUCCESS)
Process: 4901 ExecStart=/usr/lib/kodi/kodi.sh --standalone -fs $KODI_ARGS $KODI_DEBUG (code=exited, status=0/SUCCESS)
Process: 5165 ExecStop=/bin/kill -TERM $MAINPID (code=exited, status=0/SUCCESS)
Process: 5168 ExecStopPost=/usr/lib/kodi/kodi-safe-mode (code=exited, status=0/SUCCESS)
Main PID: 4901 (code=exited, status=0/SUCCESS)
Dec 05 12:34:46 CoreELEC kodi.sh[4925]: Exception ignored in: <generator object path at 0xccd6bd50>
Dec 05 12:34:46 CoreELEC kodi.sh[4925]: Traceback (most recent call last):
Dec 05 12:34:46 CoreELEC kodi.sh[4925]: File "/usr/lib/python3.8/importlib/resources.py", line 190, in path
Dec 05 12:34:46 CoreELEC kodi.sh[4925]: NameError: name 'FileNotFoundError' is not defined
Dec 05 12:34:47 CoreELEC kodi.sh[4925]: Exception ignored in: <generator object path at 0xcb7ba778>
Dec 05 12:34:47 CoreELEC kodi.sh[4925]: Traceback (most recent call last):
Dec 05 12:34:47 CoreELEC kodi.sh[4925]: File "/usr/lib/python3.8/importlib/resources.py", line 190, in path
Dec 05 12:34:47 CoreELEC kodi.sh[4925]: NameError: name 'FileNotFoundError' is not defined
Dec 05 12:34:50 CoreELEC systemd[1]: kodi.service: Succeeded.
Dec 05 12:34:50 CoreELEC systemd[1]: Stopped Kodi Media Center.
● eventlircd.service - Eventlirc server daemon
Loaded: loaded (/usr/lib/systemd/system/eventlircd.service; disabled; vendor preset: disabled)
Active: inactive (dead) since Sun 2021-12-05 12:34:53 CST; 1min 22s ago
Process: 3805 ExecStart=/usr/sbin/eventlircd -f --evmap=/etc/eventlircd.d --socket=/run/lirc/lircd (code=killed, signal=TERM)
Main PID: 3805 (code=killed, signal=TERM)
Aug 06 09:43:08 CoreELEC systemd[1]: Started Eventlirc server daemon.
Dec 05 12:34:53 CoreELEC systemd[1]: Stopping Eventlirc server daemon...
Dec 05 12:34:53 CoreELEC systemd[1]: eventlircd.service: Succeeded.
Dec 05 12:34:53 CoreELEC systemd[1]: Stopped Eventlirc server daemon.
Got an error:
CoreELEC:~ # find / -iname ir-keytable
/usr/bin/ir-keytable
CoreELEC:~ # /usr/bin/ir-keytable -u
/sys/class/rc/: No such file or directory
No devices found
CoreELEC:~ #
Followed the “if you get a error”:
CoreELEC:~ # touch /storage/.config/remote.force_meson_ir
CoreELEC:~ # reboot
Stopped the services again:
CoreELEC:~ # systemctl stop kodi
CoreELEC:~ # systemctl stop eventlircd
CoreELEC:~ # /usr/bin/ir-keytable -u
/sys/class/rc/: No such file or directory
No devices found
CoreELEC:~ #
Still getting that error!
IR receiver for waking up is used from N2 and not Flirc. And you have file /storage/.config/remote.disable. Remove it, reboot and repeat all the steps. Later create this file again to disable build-in ir receiver.
Hmm, still not waking up!
Removed the 2 files and rebooted:
CoreELEC:~ # ls -all /storage/.config/remote.disable
-rw-r--r-- 1 root root 0 Aug 27 23:01 /storage/.config/remote.disable
CoreELEC:~ # rm -rf /storage/.config/remote.disable
CoreELEC:~ # ls -all /storage/.config/remote.disable
ls: /storage/.config/remote.disable: No such file or directory
CoreELEC:~ # ls -all /storage/.config/remote.force_meson_ir
-rw-r--r-- 1 root root 0 Dec 5 12:38 /storage/.config/remote.force_meson_ir
CoreELEC:~ # rm -rf /storage/.config/remote.force_meson_ir
CoreELEC:~ # ls -all /storage/.config/remote.force_meson_ir
ls: /storage/.config/remote.force_meson_ir: No such file or directory
CoreELEC:~ # reboot
Then I stopped the services again:
CoreELEC:~ # systemctl stop kodi
CoreELEC:~ # systemctl stop eventlircd
● kodi.service - Kodi Media Center
Loaded: loaded (/usr/lib/systemd/system/kodi.service; disabled; vendor preset: disabled)
Active: inactive (dead) since Sun 2021-12-05 13:09:55 CST; 21s ago
Process: 4905 ExecStartPre=/usr/lib/kodi/aml-wait-for-dispcap.sh (code=exited, status=0/SUCCESS)
Process: 4926 ExecStartPre=/usr/lib/kodi/kodi-config (code=exited, status=0/SUCCESS)
Process: 4939 ExecStart=/usr/lib/kodi/kodi.sh --standalone -fs $KODI_ARGS $KODI_DEBUG (code=exited, status=0/SUCCESS)
Process: 5326 ExecStop=/bin/kill -TERM $MAINPID (code=exited, status=0/SUCCESS)
Process: 5328 ExecStopPost=/usr/lib/kodi/kodi-safe-mode (code=exited, status=0/SUCCESS)
Main PID: 4939 (code=exited, status=0/SUCCESS)
Dec 05 13:09:53 CoreELEC kodi.sh[4962]: Exception ignored in: <generator object path at 0xcdf20040>
Dec 05 13:09:53 CoreELEC kodi.sh[4962]: Traceback (most recent call last):
Dec 05 13:09:53 CoreELEC kodi.sh[4962]: File "/usr/lib/python3.8/importlib/resources.py", line 190, in path
Dec 05 13:09:53 CoreELEC kodi.sh[4962]: NameError: name 'FileNotFoundError' is not defined
Dec 05 13:09:53 CoreELEC kodi.sh[4962]: Exception ignored in: <generator object path at 0xcbaaa428>
Dec 05 13:09:53 CoreELEC kodi.sh[4962]: Traceback (most recent call last):
Dec 05 13:09:53 CoreELEC kodi.sh[4962]: File "/usr/lib/python3.8/importlib/resources.py", line 190, in path
Dec 05 13:09:53 CoreELEC kodi.sh[4962]: NameError: name 'FileNotFoundError' is not defined
Dec 05 13:09:55 CoreELEC systemd[1]: kodi.service: Succeeded.
Dec 05 13:09:55 CoreELEC systemd[1]: Stopped Kodi Media Center.
● eventlircd.service - Eventlirc server daemon
Loaded: loaded (/usr/lib/systemd/system/eventlircd.service; disabled; vendor preset: disabled)
Active: inactive (dead) since Sun 2021-12-05 13:10:00 CST; 44s ago
Process: 3799 ExecStart=/usr/sbin/eventlircd -f --evmap=/etc/eventlircd.d --socket=/run/lirc/lircd (code=killed, signal=TERM)
Main PID: 3799 (code=killed, signal=TERM)
Dec 05 13:08:57 CoreELEC systemd[1]: Started Eventlirc server daemon.
Dec 05 13:10:00 CoreELEC systemd[1]: Stopping Eventlirc server daemon...
Dec 05 13:10:00 CoreELEC systemd[1]: eventlircd.service: Succeeded.
Dec 05 13:10:00 CoreELEC systemd[1]: Stopped Eventlirc server daemon.
There is a python-error in the kodi-service-log, can that be ignored?
This time, I can see the code from the remote (hit it 3 times):
CoreELEC:~ # /usr/bin/ir-keytable -u
Protocols changed to irmp
Waiting for IRMP decode event. Please, press CTRL-C to abort.
Received IRMP code: remotewakeup='0x00003bfa', decode_type='0x4', remotewakeupmask='0x000037ff'
Received IRMP code: remotewakeup='0x00003bfa', decode_type='0x4', remotewakeupmask='0x000037ff'
Received IRMP code: remotewakeup='0x00003bfa', decode_type='0x4', remotewakeupmask='0x000037ff'
^C
CoreELEC:~ #
So, I recreated the “remote-disable” file, and created a “/storage/.config/flirc.remotewakeup” file with the directed input and rebooted:
CoreELEC:~ # cat /storage/.config/flirc.remotewakeup
remotewakeup='0x00003bfa'
decode_type='0x4'
remotewakeupmask='0x000037ff'
CoreELEC:~ # reboot
Chose Flirc in the “IR Remote Power Code” settings, and rebooted.
But as stated, still no go! It is not waking up!
New debug-logs:
CoreELEC:~ # ce-debug
http://ix.io/3H7z
CoreELEC:~ # paste /storage/.kodi/temp/kodi.log
http://ix.io/3H7A
CoreELEC:~ #
I can see that “/flash/config.ini” now has my values:
#------------------------------------------------------------------------------------------------------
#
# IR setup
# Setup a custom keycode to wake the N2/C4 from suspend or poweroff
# You can stop kodi and eventlircd and use "ir-keytable -u" to obtain a compatible u-boot
# IR keycode
# This setting will require a injected bl301 blob.
#
remotewakeup='0x00003bfa'
#
# decode_type can be one of the following:
# NEC='0x0', DUOKAN='0x1', TOSHIBA='0x2', RCA='0x3', RC5='0x4', RC6A='0x5', NEC_TOSHIBA_2IN1='0x6',
# NEC_RCA_2IN1='0x7', RCMM='0x8', NEC_RC5_2IN1='0x9', NEC_RC5_2IN1='0xa', RC6='0xb'
# This setting will require a injected bl301 blob.
#
decode_type='0x4'
#
# remote power key mask:
# Some IR protocols implement a toggle bit, this can be ignored by the "and" mask:
# RC5='0x37ff', RC6='0x1effff', RC6A='0xffff7fff'
# This setting will require a injected bl301 blob.
#
remotewakeupmask='0x000037ff'
#
#------------------------------------------------------------------------------------------------------
Try to reboot once more just in case?
Tried 2 more reboots, no luck! Could it be that there is no power to the usb once in suspend?
I think someone else will have to help here.
And as I wrote for wake up build-in IR receiver is used and not the Flirc one.
Ah! That is probably it then!
I re-added the remote.disable file!
So went ahead and removed it again, and re-ran ir-keytable, pressed the button first with the Flirc, then without it inserted, just to make sure it was seeing the code:
CoreELEC:~ # ls -all /storage/.config/remote.disable
ls: /storage/.config/remote.disable: No such file or directory
CoreELEC:~ # systemctl stop kodi
CoreELEC:~ # systemctl stop eventlircd
CoreELEC:~ # /usr/bin/ir-keytable -u
Protocols changed to irmp
Waiting for IRMP decode event. Please, press CTRL-C to abort.
Received IRMP code: remotewakeup='0x00003bfa', decode_type='0x4', remotewakeupmask='0x000037ff'
Received IRMP code: remotewakeup='0x00003bfa', decode_type='0x4', remotewakeupmask='0x000037ff'
Received IRMP code: remotewakeup='0x00003bfa', decode_type='0x4', remotewakeupmask='0x000037ff'
Received IRMP code: remotewakeup='0x00003bfa', decode_type='0x4', remotewakeupmask='0x000037ff'
Received IRMP code: remotewakeup='0x00003bfa', decode_type='0x4', remotewakeupmask='0x000037ff'
Received IRMP code: remotewakeup='0x00003bfa', decode_type='0x4', remotewakeupmask='0x000037ff'
^C
CoreELEC:~ #
So this confirms my IR on the N2plus is working!
Then I left the Flirc out, and used an old MCE-remote, and re-ran the power-button test:
CoreELEC:~ # ls -all /storage/.config/remote.disable
ls: /storage/.config/remote.disable: No such file or directory
CoreELEC:~ # systemctl stop kodi
CoreELEC:~ # systemctl stop eventlircd
CoreELEC:~ # /usr/bin/ir-keytable -u
Protocols changed to irmp
Waiting for IRMP decode event. Please, press CTRL-C to abort.
Received IRMP code: remotewakeup='0x800f040c', decode_type='0x5', remotewakeupmask='0xffff7fff'
Received IRMP code: remotewakeup='0x800f040c', decode_type='0x5', remotewakeupmask='0xffff7fff'
Received IRMP code: remotewakeup='0x800f040c', decode_type='0x5', remotewakeupmask='0xffff7fff'
Received IRMP code: remotewakeup='0x800f040c', decode_type='0x5', remotewakeupmask='0xffff7fff'
Received IRMP code: remotewakeup='0x800f040c', decode_type='0x5', remotewakeupmask='0xffff7fff'
Received IRMP code: remotewakeup='0x800f040c', decode_type='0x5', remotewakeupmask='0xffff7fff'
^C
CoreELEC:~ #
I can then see here that the wake-code is different (as assumed). Then I chose MCE in the “IR Remote Power Code” settings, and rebooted.
Then I checked “/flash/config.ini”, and it now has the same code:
#------------------------------------------------------------------------------------------------------
#
# IR setup
# Setup a custom keycode to wake the N2/C4 from suspend or poweroff
# You can stop kodi and eventlircd and use "ir-keytable -u" to obtain a compatible u-boot
# IR keycode
# This setting will require a injected bl301 blob.
#
remotewakeup='0x800f040c'
#
# decode_type can be one of the following:
# NEC='0x0', DUOKAN='0x1', TOSHIBA='0x2', RCA='0x3', RC5='0x4', RC6A='0x5', NEC_TOSHIBA_2IN1='0x6',
# NEC_RCA_2IN1='0x7', RCMM='0x8', NEC_RC5_2IN1='0x9', NEC_RC5_2IN1='0xa', RC6='0xb'
# This setting will require a injected bl301 blob.
#
decode_type='0x5'
#
# remote power key mask:
# Some IR protocols implement a toggle bit, this can be ignored by the "and" mask:
# RC5='0x37ff', RC6='0x1effff', RC6A='0xffff7fff'
# This setting will require a injected bl301 blob.
#
remotewakeupmask='0xffff7fff'
#
#------------------------------------------------------------------------------------------------------
Removed the 2 other files (cleanup) and rebooted:
CoreELEC:~/.config # ls -all /storage/.config/ |grep Flirc
CoreELEC:~/.config #
CoreELEC:~ # ls -all /storage/.kodi/userdata/keymaps
total 8
drwxr-xr-x 2 root root 4096 Dec 5 15:11 .
drwxr-xr-x 10 root root 4096 Aug 15 16:38 ..
CoreELEC:~ # reboot
Suspend and wake now works with the MCE-remote!
Will leave the Flirc out of the N2plus, and re-program my harmony to the MCE remote For CoreELEC!
Thanks for all your help in troubleshooting this, and sorry for taking you down this rabbit-hole with Flirc! Should have ditched it to start with!
Coming from the chromebox with LibreELEC, the Flirc was the workaround I used there, guess it is no longer needed, at least not on the N2plus with CoreELEC!
Have a nice day!
I think wake up should work with build-in receiver even if Flirc is actually used.
But probably you are right: I also used Flirc on x86 device but not anymore on SBC board with IR receiver attached.
But anyway: Firc is really amazing device!
Well, I could not get it to work with the Flirc, maybe we missed something! Yes, it is an amazing device!
Got my Harmony to work with the MCE-device-setup, and all now works as it should!
Not so happy with the ugly plastic case on the N2plus, I like the aluminum case I use on my HomeAssistant (also N2plus) better!
Again, appreciate the help!
I hope we understand each other: Flirc device has nothing to do with the wake up process.
Wake up IR signal is received by build-in IR receiver on N2+.
Absolutely! This statement is what made me remove the Flirc to see if it would work (suspend/wakeup) without the Flic inserted, and that solved the issue for me!
Once I realized the built-in IR was required for suspend/wakeup, I was able to better solve it!
My requirement was to get suspend/wakeup to work, while using my Harmony remote. The Flirc was not a requirement, but a “good-to-have”, and is not needed to solve the requirement.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
About | FAQ | Terms of Service | Privacy Policy | Legal Notice