Wake up from power off on IR remote

Hi,
I’m trying to manage to be able to wake-up Vero 4K+ from power off state. I tried to look around and read through the topic Shutdown Vero 4K via Kodi Shutdown - but how to turn on?. There are few bits from @sam_nazarko:

So I began to be curious how could I manage to customize/compile/whatever… the Vero’s bootloader to be compatible with IR remote key of my choice.

It seems, that CoreELEC is good in support of choosing the desired wake-up key

and also provides a wake-up “tweak” for AMLogic devices

Is it possible to customize the Vero’s bootloader by average user and use it on particular device?

Can you, please, share the steps needed to customize Vero’s bootloader (especially the logic around IR wake-up) and use it?

Can there be somehow reused the work done by CoreELEC team?

Thank you.

Hi

I believe it’s possible if the remote you plan to use supports the NEC protocol.

It’s possible to implement this functionality in the bootloader, but we haven’t implemented suspend support in the kernel itself. There might be some unexpected behaviour as a result: Ethernet, CEC etc may not be in the right state.

I’m looking at supporting WoL support in the future and will take a look then. The CE BL301 injection method isn’t ideal and won’t work for signed / encrypted bootloaders.

If you give me your remote wake up code I can do a test build

Looking at this further - we can use SCPI calls from the kernel to make options like WoL and Wake with IR configurable by configuring the AO power domain tasks.

Then changes wouldn’t require a user to rebuild to make customisations. There are other issues to fix first to handle resume properly and there are some bugs with CEC resume where it has random wakeups. This needs to be fixed so we can provide a consistent wake up / suspend experience.

Hi.

I’m not much familiar with the IR remotes, protocols etc., but the remote, I’m currently using, is the remote from some rather old LG TV. This is a snippet from the lircd.conf for it:

begin remote

  name  LG_AKB73715603
  bits           16
  flags SPACE_ENC
  eps            30
  aeps          100

  header       9009  4498
  one           541  1684
  zero          541   553
  ptrail        539
  pre_data_bits   16
  pre_data       0x20DF
  gap          40180
  toggle_bit_mask 0x0

      begin codes
          KEY_POWER                0x10EF

@sam_nazarko Would this be enough information for you? Is it even compatible with the requirements, you’ve posted?

Thanks.

This is great news. I know, there must be tons of things on you plate… but what ETA do you expect this to deliver, weeks/months/years?

I’m not sure that would be enough to go on. I’ll see what I can do with an Xbox Remote, but it’s low priority for now.

Sam

I see… Is there any way I could move forward just by my own?

Yes - if you know the remote codes and the remote supports NEC.

Hi,
after some searching and reading information on web I concluded, my IR controler is NEC compatible:

  • disabling kodi/lirc to get raw access to RC
osmc@stb-living-room:~$ sudo systemctl stop eventlircd lircd_helper@lirc0 mediacenter

osmc@stb-living-room:~$ sudo bash -c 'echo "+nec" >> /sys/class/rc/rc0/protocols'

osmc@stb-living-room:~$ ir-keytable
Found /sys/class/rc/rc0/ with:
        Driver: meson-ir
        Default keymap: rc-empty
        Input device: /dev/input/event6
        LIRC device: /dev/lirc0
        Attached BPF protocols: Operation not supported
        Supported kernel protocols: unknown other lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp cec 
        Enabled kernel protocols: lirc nec 
        Name: meson-ir
        bus: 25, vendor/product: 0000:0000, version: 0x0000
        Repeat delay = 500 ms, repeat period = 125 ms
  • NEC code for the POWER key of the remote
osmc@stb-living-room:~$ sudo ir-keytable -t -p nec
Protocols changed to nec
Testing events. Please, press CTRL-C to abort.
1952.661600: event type EV_MSC(0x04): scancode = 0x408
1952.661600: event type EV_SYN(0x00).
^C

@sam_nazarko I suppose, this is the information, you requested. Can we now get a bit further?

Thanks.

It’s on the to do list and I can make the IR wake up code configurable.

I don’t have an ETA on this however.

Is there a specific reason that the current suspend and wake up mode that’s implemented isn’t suitable for you?

Not much else than many users said before, meaning: power consumption, running all services 24/7 (using network bandwidth or other resources), etc.

What did you mean by this? I thought, by providing you the code, you’ll try to hardcode it into bootloader and provide such image to test it.

I can look in to this at a later date and will implement a more flexible way of adjusting the wake up code so it can be used for a variety of remotes.

I, for one, have never found the shutdown/suspend to be very reliable. I’ve had a Vero4k (not plus) for five years and in all that time I’ve never succeeded in getting the suspend to work reliably - or rather the wake up after suspend. More often than not the Vero is totally unresponsive when trying to wake it up after more than a few hours and I have to pull the plug anyway.

It may have something to do with having an AppleTV and the Vero4K both going into a HDFury Diva but AFAIR the suspend never worked reliably even before I got the Diva.

I don’t use my Vero as often as I used to so I now just use ‘shut down’ and pull the plug when ending a session. I’d really prefer a physical on/off button on the device itself …

Well I know this doesn’t help you but it is super stable and reliable here with the TV Off triggering the suspend mode and a click on the RF Remote waking it up.

I don’t doubt it. However I prefer to have CEC turned off on all my devices – I find it causes more problems than it solves. Also, I am often not turning off the TV when suspending the Vero. Usually I’m switching to another device, typically AppleTV.

It’s not a big issue for me as I’m not using the Vero that much. With energy prices what they are nowadays just turning everything off is the best solution anyway … :wink: