![]() |
IR blaster functionality - Printable Version +- Snakeoil Forums (https://forums.snakeoil-os.net) +-- Forum: Snakeoil Topics (https://forums.snakeoil-os.net/Forum-Snakeoil-Topics) +--- Forum: Support & Troubleshooting (https://forums.snakeoil-os.net/Forum-Support-Troubleshooting) +--- Thread: IR blaster functionality (/Thread-IR-blaster-functionality) Pages:
1
2
|
RE: IR blaster functionality - Bromf - 24-Oct-2020 (24-Oct-2020, 02:34 PM)davem Wrote:(23-Oct-2020, 01:08 PM)agent_kith Wrote:(23-Oct-2020, 12:49 PM)davem Wrote:That's not going to work I think, go to https://www.lirc.org/, and under supported hardware, look for anything that says transmitter. say the serial transmitter (If your computer has a serial port). Lirc is so under-documented and lags several releases behind any current OS...users generally have to experiment with major breakage before one stumbles upon a working recipe...only to find an update kills it all. Elsewhere I use Flirc... but some mapping and keycodes would be needed for Snakeoil. Triggerhappy is the go-to currently for Flirc. Maybe AK could add it to the todo list...but you or I could do some research too... ![]() https://packages.debian.org/buster/triggerhappy http://manpages.ubuntu.com/manpages/precise/man1/thd.1.html RE: IR blaster functionality - davem - 26-Oct-2020 (24-Oct-2020, 04:40 PM)Bromf Wrote:Thanks Bromf,(24-Oct-2020, 02:34 PM)davem Wrote:(23-Oct-2020, 01:08 PM)agent_kith Wrote:(23-Oct-2020, 12:49 PM)davem Wrote: I will do some reading when I get a chance. I only need 2 codes (vol up/down) and I have them already. RE: IR blaster functionality - davem - 29-Oct-2020 (26-Oct-2020, 07:00 AM)davem Wrote:I am getting a bit stuck and would love some suggestions. (luckily work has been quietish the last couple of days..) I bought the jaycar emitter plugged in the headphone jack of my NUC. Eventually worked out the right config details. When I do an IRSend, I cant see any signal when viewing with my phone camera.[edit: just confirmed that the camera does not pick up output from the emitter, so ignore that point] In the log its misleading - the earlier part suggests an issue unable to connect to a socket but later it seems to go through without error ! I mean it wouldnt be able to deinit the headphone jack if it couldnt connect ??? Am I reading this correctly ?(24-Oct-2020, 04:40 PM)Bromf Wrote:Thanks Bromf,(24-Oct-2020, 02:34 PM)davem Wrote:(23-Oct-2020, 01:08 PM)agent_kith Wrote:(23-Oct-2020, 12:49 PM)davem Wrote: Oct 29 10:27:28 NUC lircd-0.10.0[8995]: Info: Initializing ALSA:HDA Intel PCH: ALC283 Analog (hw:0,0)... Oct 29 10:27:28 NUC irsend: lirc_command_run: Sending: SEND_ONCE amp KEY_VOLUMEUP Oct 29 10:27:28 NUC lircd[8995]: Cannot connect to server socket err = No such file or directory Oct 29 10:27:28 NUC lircd[8995]: Cannot connect to server request channel Oct 29 10:27:28 NUC lircd[8995]: jack server is not running or cannot be started . . Oct 29 10:27:28 NUC lircd-0.10.0[8995]: Info: Using custom output device 0: ALSA:HDA Intel PCH: ALC283 Analog (hw:0,0) with default high output latency 0.034830 Oct 29 10:27:28 NUC lircd[8995]: lircd-0.10.0[8995]: Info: Using carrier frequency 32000 Oct 29 10:27:28 NUC lircd-0.10.0[8995]: Info: Using carrier frequency 32000 Oct 29 10:27:28 NUC irsend: lirc_command_run, state: 0, input: "BEGIN" Oct 29 10:27:28 NUC irsend: lirc_command_run, state: 1, input: "SEND_ONCE amp KEY_VOLUMEUP" Oct 29 10:27:28 NUC irsend: lirc_command_run, state: 2, input: "SUCCESS" Oct 29 10:27:28 NUC irsend: lirc_command_run, state: 3, input: "END" Oct 29 10:27:28 NUC irsend: lirc_command_run: data:END, status:0 Oct 29 10:27:28 NUC lircd[8995]: lircd-0.10.0[8995]: Info: removed client Oct 29 10:27:28 NUC lircd-0.10.0[8995]: Info: removed client Oct 29 10:27:28 NUC lircd[8995]: lircd-0.10.0[8995]: Info: Deinitializing ALSA:HDA Intel PCH: ALC283 Analog (hw:0,0)... done some more testing (mixing up devices etc) and am now confident that I am not getting anything out of the emitter. ![]() More trial and error and numerous reloads of lircd and the errors have disappeared. but nothing in irw (not really sure yet if I should see anything in irw...) RE: IR blaster functionality - agent_kith - 29-Oct-2020 (29-Oct-2020, 07:42 AM)davem Wrote: More trial and error and numerous reloads of lircd and the errors have disappeared. but nothing in irw (not really sure yet if I should see anything in irw...)Which reference do you follow to use the input audio as a emitter? I'm only aware of using it as a receiver (See here: https://www.lirc.org/audio-alsa.html)... irw is checking the data received by an IR receiver, so you can't use that ![]() RE: IR blaster functionality - davem - 29-Oct-2020 (29-Oct-2020, 01:12 PM)agent_kith Wrote:(29-Oct-2020, 07:42 AM)davem Wrote: More trial and error and numerous reloads of lircd and the errors have disappeared. but nothing in irw (not really sure yet if I should see anything in irw...)Which reference do you follow to use the input audio as a emitter? I'm only aware of using it as a receiver (See here: https://www.lirc.org/audio-alsa.html)... audio driver for xmitting - https://www.lirc.org/html/audio.html Thanks for the tip re irw. I *thought* that I saw reference to it in posts that I found for blasting. The description says that 'irw will connect to any Unix domain socket and print the received data to stdout.' and I understood that you still needed to connect to a socket to blast ?? anyway, like I said earlier, I have limited linux. RE: IR blaster functionality - agent_kith - 29-Oct-2020 (29-Oct-2020, 03:53 PM)davem Wrote: audio driver for xmitting - https://www.lirc.org/html/audio.htmlCan you try run this and see what happens? Code: sudo lircd -d ALSA:default@48000 What phone are you using? My android phones don't have a IR filter, so am unaware of any phone with this built in.. Must be a high end phone? ![]() (29-Oct-2020, 03:53 PM)davem Wrote: Thanks for the tip re irw. I *thought* that I saw reference to it in posts that I found for blasting. The description says that 'irw will connect to any Unix domain socket and print the received data to stdout.' and I understood that you still needed to connect to a socket to blast ?? anyway, like I said earlier, I have limited linux.Do you mean this? Quote:It takes some time to set up (50 ms or so) so when no clients are connected to lircd the first transmission will have some higher latency.If I'm reading this correctly it just means always keep the lirc connection alive.. So when you're ready to transmit, lircd is always read to transmit... Otherwise, the first transmission will take 50ms, but the later commands will be quicker... I did a quick research, home assistant does have logitech squeezebox support.. But it tracks volume numerically (from 0.0 to 1.0), so it doesn't track VOL_UP or VOL_DOWN events.. If only, using HA will simplify everything for you (and it can do way more). RE: IR blaster functionality - davem - 29-Oct-2020 (29-Oct-2020, 04:15 PM)agent_kith Wrote:really appreciate your help AK.(29-Oct-2020, 03:53 PM)davem Wrote: audio driver for xmitting - https://www.lirc.org/html/audio.htmlCan you try run this and see what happens? I will test with that tomorrow some time. I am pretty sure that I tried that before but that would probably have been before I realised that you need a *valid* blasting remote config to work... so far I have had best success in the lirc config defining the device as ALSA:HDA Intel PCH: ALC283 Analog (hw:0,0) and driver as 'audio' I am a bit of a squeezebox shop here. Running LMS with a few SB's and squeezelite on this snakeoil. Up until relatively recently, I was using a SB3 with the IRblaster plugin. I use iPeng (over wifi in case you are not familiar) for remote control of each SB/sqeezelite which gives full control + the ability to adjust the volume and coupled with the IRBlaster LMS plugin, changes in vol are blasted to my amp. There is no IR on the phone and this is what I am trying to replicate here. My plan is to a) get lirc blasting working. Then, b) I have found https://github.com/mundschenk-at/squeezebox-ir-events/releases/tag/v0.2 - this is a daemon that allows you to specify scripts to run on LMS events. ie power on/off, vol up/down. Theory is to define in this daemon to run irsend xyz whenever it sees a volUp request/event. Not too complex on the surface but.... This *should* replicate the functionality I had with the SB3 - adjust volume on iPeng (or web i/f) and the dial on the amp automagically turns. btw - my SB3 still works but the caps are gone so it crashes every 5-10 mins, otherwise I would still be using it. RE: IR blaster functionality - davem - 30-Oct-2020 a fresh day brings some progress. I tried using lircd w/the default device but no change. Randomly I then tried irsend with SEND_START instead of SEND_ONCE and BINGO!! Seems that a single code pulse was not enough to do anything. Optimum command seems to be send once with a count of 3.... So happy that is sorted. Such a time sink. RE: IR blaster functionality - agent_kith - 30-Oct-2020 (30-Oct-2020, 06:17 AM)davem Wrote: a fresh day brings some progress. I tried using lircd w/the default device but no change. Randomly I then tried irsend with SEND_START instead of SEND_ONCE and BINGO!! Seems that a single code pulse was not enough to do anything. Optimum command seems to be send once with a count of 3.... So happy that is sorted. Such a time sink.Nicely done! May be a good idea to document all the steps you took to get this working in the Walkthroughs forum here. You'll be helping the community out, and also can return here and look at your notes if you need to do this again. ![]() RE: IR blaster functionality - davem - 30-Oct-2020 sure - I have documented everything and will do a walkthrough once I get this all sorted. Really really really appreciate your comments AK. A fresh set of eyes makes a big difference. |