I would like to use a spare IR remote with my Argon One M.2. I already got this working apart from the power button to turn on the device. I know that I have to use
to program the extra Argone One MCU with a fitting powerdata byte sequence. That’s where the problems start. Apparently there are fundamental differences in how lirc and ir-keytable interprete the IR data send by the IR remote. Furthermore irrecord (lirc) seems to not adequately interpret the signals of unknown remotes. At least I have seen fundamental differences between the lircd.conf provided by Argon and what people read with irrecord. So the problem is that I don’t know how the MCU interpretes the IR signals and how this relates to what I can read either using irrecord or ir-keytable. The codes for the power button of my remote are
Could someone who owns a Argon remote please post what codes ir-keytable and irrecord read for the argon remote power button? Maybe someone has a tip how to construct the correct powerdata sequence?
Thanks for trying to help. This is the power code for the original Argon remote. Did you read this with ir-keytable or irrecord or did you google it?
What I want to know is the relation between this code and the code that is read by ir-keytable and irrecord because I might then be able to infer which code is needed for my own remote. There is some ambiguity in the interpretation of the raw IR pulses send by an IR remote http://www.righto.com/2010/03/understanding-sony-ir-remote-codes-lirc.html and I basically try to find out how the pulses are interpreted by the MCU that turns on the raspberry pi.
Sorry, my bad. I just found out that the script argonone_ir has an option to learn and program the power button of a different IR remote. I configured it all by myself and never executed the script by now. The script fails with an error though (No module named ‘_client’) but that’s a different story. I will post here, when I resorted this issue.
I got it working now. The lirc fallback in argonone_ir did not work and generated the error above because _client.so was missing in /usr/lib/python3/dist-packages/lirc/ . When you have a fresh install _client.so is there but the first invocation with sudo deletes it (despite my attempts to prevent this with chmod 544 and chattr -i). This has to do with this bug in lirc https://sourceforge.net/p/lirc/tickets/341/. The reason why the fallback was activated in first place was that I had already activated the driver for the IR sensor (dtoverlay in /boot/config.txt). This blocked the GPIO pin and made GPIO.wait_for_edge fail with “Error waiting for edge”. To resolve this, I deactivated the driver, restarted the raspberry, executed argonone_ir and activated the driver again.
I just noticed that the dtoverlay is automatically added to /boot/config.txt . So there is nothing todo except reboot after successful configuration. But you will have to remove the entry manually if you want to repeat the configuration or else you get the error
Traceback (most recent call last):
File "/usr/bin/argonirdecoder", line 334, in <module>
pulsedata = getGPIOPulseData()
File "/usr/bin/argonirdecoder", line 46, in getGPIOPulseData
channel = GPIO.wait_for_edge(irreceiver_pin, GPIO.FALLING, timeout=PULSETIMEOUTMS);
RuntimeError: Error waiting for edge
To add a new remote you basically need to create a toml file to add to the (linux) system configuration with
sudo ir-keytable -c -w [your remote].toml
The scan codes can be read from
sudo ir-keytable -c -p all -t
The key codes relate to
include/uapi/linux/input-event-codes.h
After you imported the toml file, the remote behaves like an input device firing linux input events. These can be linked to application functionality. For kodi (which is my use case) this can be done in your user home in