IR blaster functionality
#11
(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).

If you are lucky, you might be able to find one of the HP USB receiver/transmitter dongle, and then you can plug in your IR transmitter into it. But I havn't try this myself

Thanks AK. thats not what I really wanted to hear.... there seems to be a disconnect between the LIRC page of compatible devices and whats available locally. I see Jaycar have something to try https://www.jaycar.com.au/single-ir-emit...4/p/AR1811

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... Wink
https://packages.debian.org/buster/triggerhappy
http://manpages.ubuntu.com/manpages/prec...thd.1.html
[-] The following 1 user Likes Bromf's post:
  • agent_kith
Reply

#12
(24-Oct-2020, 04:40 PM)Bromf Wrote:
(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:  

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... Wink
https://packages.debian.org/buster/triggerhappy
http://manpages.ubuntu.com/manpages/prec...thd.1.html
Thanks Bromf,

I will do some reading when I get a chance. I only need 2 codes (vol up/down) and I have them already.
Reply

#13
(26-Oct-2020, 07:00 AM)davem Wrote:
(24-Oct-2020, 04:40 PM)Bromf Wrote:
(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:  

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... Wink
https://packages.debian.org/buster/triggerhappy
http://manpages.ubuntu.com/manpages/prec...thd.1.html
Thanks Bromf,

I will do some reading when I get a chance. I only need 2 codes (vol up/down) and I have them already.
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 ?

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.  Sad

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...)
Reply

#14
(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 Tongue
Snakeoil Operating System - Music, your way!
Reply

#15
(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)...

irw is checking the data received by an IR receiver, so you can't use that Tongue

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.
Reply

#16
(29-Oct-2020, 03:53 PM)davem Wrote: audio driver for xmitting - https://www.lirc.org/html/audio.html
Can 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? $ tongue

(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.

A workaround for this is to keep irw running with a bash script like this:
#!/bin/sh
while [ true ]; do
irw || true
sleep 1
done
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).
Snakeoil Operating System - Music, your way!
Reply

#17
(29-Oct-2020, 04:15 PM)agent_kith Wrote:
(29-Oct-2020, 03:53 PM)davem Wrote: audio driver for xmitting - https://www.lirc.org/html/audio.html
Can 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? $ tongue
(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.

A workaround for this is to keep irw running with a bash script like this:
#!/bin/sh
while [ true ]; do
irw || true
sleep 1
done
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).
really appreciate your help AK.
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/squeeze...s/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.
Reply

#18
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.
[-] The following 1 user Likes davem's post:
  • agent_kith
Reply

#19
(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. Smile
Snakeoil Operating System - Music, your way!
Reply

#20
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.
[-] The following 1 user Likes davem's post:
  • agent_kith
Reply



Bookmarks

Possibly Related Threads…
Thread Author Replies Views Last Post
  New setup, query about output and adding functionality shaitan667 4 2,223 26-Jan-2020, 12:49 PM
Last Post: Bromf



Users browsing this thread:
6 Guest(s)

[-]
Our Sponsors

[-]
Welcome
You have to register before you can post on our site.

Username/Email:


Password:





[-]
Latest Threads
Howto setup resampling in Logitech Media...
Last Post: Coacharnold
18-Nov-2024 12:06 AM
» Replies: 7
» Views: 5800
Dropping Measurements, Hello High-End.
Last Post: agent_kith
26-Oct-2024 09:02 AM
» Replies: 12
» Views: 445
Very happy to have Sankeoil......! mpd w...
Last Post: run51
24-Oct-2024 05:35 AM
» Replies: 9
» Views: 1678
SO no soundcard detected - RPI Pi4 snake...
Last Post: run51
21-Oct-2024 10:55 PM
» Replies: 4
» Views: 105
download
Last Post: Snoopy8
19-Oct-2024 05:52 AM
» Replies: 1
» Views: 105
Full proces to instal snakeiol 100% work...
Last Post: audioluthier
11-Oct-2024 02:32 AM
» Replies: 9
» Views: 336
A network protocol designed for CAS
Last Post: hkphantomgtr
10-Oct-2024 09:48 PM
» Replies: 0
» Views: 85
CAS with "Single Core"
Last Post: hkphantomgtr
06-Oct-2024 08:32 AM
» Replies: 2
» Views: 116
MPD player not working
Last Post: Snoopy8
27-Sep-2024 11:54 AM
» Replies: 7
» Views: 218
LMS playing DFF files sampling rate
Last Post: Snoopy8
16-Sep-2024 07:45 PM
» Replies: 5
» Views: 155

[-]
SnakeoilOS Mission Statement

Our mission is to create a free to use computer OS that is easy to install, intuitive to operate and play music that will connect and engage with you emotionally.

SnakeoilOS gives you the freedom to spend more time on listening, enjoying and exploring music. Wasting time on computers is now a thing of the past! Everything is constantly evolving/improving. Please check back often for updates.

If you like this project, do show your support with a small token donation. All donations collected will be used to run this website, and for purchasing new equipment for the project.


Powered By MyBB, © 2002-2024. Theme © Melroy van den Berg.