Ir transmitter

Posted on
Sun Jan 27, 2019 10:07 am
kennybroh offline
Posts: 531
Joined: Dec 13, 2009
Location: Baltimore

Ir transmitter

I searched the forum and couldn't find anything obvious on this. I have a couple of pi's but have not yet experimented with them, so I don't yet understand a lot of this discussion.

My questions are these: 1. How easy is it to use a pi as an IR transmitter or blaster to control various devices, and 2. since I do not see any other pi plugin, could yours be the link to Indigo?

I've found at least one add on board for the pi (https://www.amazon.com/IR-Remote-Control-Transceiver-Raspberry/dp/B0713SK7RJ/ref=sr_1_1?ie=UTF8&qid=1548602499&sr=8-1&keywords=raspberry+pi+ir+blaster), and I imagine there are others. This would be a great way to get me into the pi world, and I have lots of other ideas, but this is an immediate need.

Thanks

Posted on
Sun Jan 27, 2019 10:18 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Ir transmitter

The hardware and sending ir signals are the easy part . Management of it is the challenge

Mapping of commands to signals is one of the biggest hurdles.


If you have a mapping available I could add that quickly.

[edit] to be more specific: what do you want to do with it?
1. sends device specific codes eg LG TV vol up
2. some bytes and YOU give the sequence from your own command data, thats just GPIO on/off.s thats easy

1. requires install and config of "lirc" , thats the easy part.. and besides defining the GPIO for I/O >> setup / definition/ selection of codes from the MANY options available, or you cod use LRIC to learn the codes from pointing you remote at it.. ONLY then does it make sense to use indigo to send / receive codes, that mapping part is somewhat easy, b=ut the M<ANY different codes for the many different remote makes the management difficult to say the least.
All of that requires a lot of manual config and selection ON the RPI

what I can add is
1. define a IR device in plugin ( select RPI & which GPIO used)
2. action: send command to LIRC device (any thing you like ,eg "irsend SEND_ONCE LG_TV KEY_POWER"
3. mange start and stop of LIRC on the RPI,
==> but NOT the config management, activation of the many codes.

by the way you can do "irsend SEND_ONCE LG_TV KEY_POWER" now with send any unix command action in pibeacon,
Screen Shot 2019-01-27 at 12.03.29.png
Screen Shot 2019-01-27 at 12.03.29.png (23.35 KiB) Viewed 4435 times

but you need to setup all of LIRC.

Karl

Sent from my iPhone using Tapatalk

Posted on
Sun Jan 27, 2019 11:54 am
kennybroh offline
Posts: 531
Joined: Dec 13, 2009
Location: Baltimore

Re: Ir transmitter

So here's what I know. Apparently the underlying software to make this happen in a pi is LIRC (Linux Infrared Remote Control), an open source driver that is designed to transmit infrared signals from a pi. See http://www.lirc.org/. As you can see they already have commands for over 2500 remotes.

The add-in board I referred to in my prior post has both an ir input and output. The input can "learn" any code not already available in the LIRC database. You simply press a button on a physical remote and that signal is translated into the hex value that LIRC can transmit. This is very similar to the iRed software I started using in Indigo scripts many years ago, which drives an "IRTrans" device, which is the counterpart of the pi. A particular remote, is set up the same way as I just deacribed, with the iiTrans sending signals from each button press to iRed, which does the translation into the hex just like LIRC does.

An action was then created in Indigo using an Applescript to cause the particular IRtrans to send the particular IR signal. Here's an example:
Code: Select all
 --RemoteControl("Panasonic/Plasma", "channel up")
tell application "iRed2" to perform action Code "channel up" of Device "Panasonic/Plasma" using module "IRTrans LAN 43988" using led "all"


I don't use that setup anymore, but it seems completely analogous to what I hope we can accomplish with pi's and LIRC..

So if I understand your question, this is a somewhat longwinded way of saying I think the mapping of the commands is done by LIRC. Here is another articla, translated from Chinese which discusses the board itself. https://translate.google.com/translate?sl=auto&tl=en&js=y&prev=_t&hl=en&ie=UTF-8&u=http%3A%2F%2Fukonline2000.com%2F%3Fp%3D296&edit-text=&act=url. Hopefully I've addressed what you were talking about.

Posted on
Sun Jan 27, 2019 12:17 pm
kennybroh offline
Posts: 531
Joined: Dec 13, 2009
Location: Baltimore

Re: Ir transmitter

My pi's are fairly old. Maybe even the 1st gen. I've attached a picture.
raspberry.jpeg
raspberry.jpeg (73.99 KiB) Viewed 4435 times


Should I get a newer model, and if so, what starter kit do you recommend?

Posted on
Sun Jan 27, 2019 12:28 pm
kennybroh offline
Posts: 531
Joined: Dec 13, 2009
Location: Baltimore

Re: Ir transmitter

Apparently, I posted my reply about LIRC while you were editing your post. I'm fine with configuring the IR commands. Done that before. And the integration you suggest is fine.

I need to know what hardware I need and hopefully I can struggle through the first time of setting up LIRC .

Question: you referred to the current ability to use irsend to send the ir signal. Can you tell me what sensor I would need to install to do that? I assume it isn't a part of the board itself.

If I understand what you are saying, assuming the codes I want to send are already in LIRC's database, or I can generate the hex codes myself, which I think I can, I would only need the add-in board. if I needed it to "learn" the codes for me., and I could make this work with just an IR LED sensor to send the signal. Yes?

Posted on
Sun Jan 27, 2019 12:31 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Ir transmitter

as long as it is an RPI 1or higher everything should work fine. ( still have an RPI1 running and it has no hick-ups and everything works fine - actually better that the RPi3 sometimes. )

get a copy of the recent SSD from my download dropbox. burn the SSD..c heck out the piBeacon: 1... pages
ie piBeacon: 2- creating the SSD and configuring the rPi

setup the RPI as sensor (#10-19)

then you need to manually install LIRC configure it add GPIO lines to config.txt ...

then you can use the "send any unix command" action in pibeacon to tell LIRC to whatever you want.

let me know how it works.

Karl

Posted on
Sun Jan 27, 2019 12:40 pm
kennybroh offline
Posts: 531
Joined: Dec 13, 2009
Location: Baltimore

Re: Ir transmitter

Where is the LED to send the signal? Is there someplace I can plug an IR blaster into?

Posted on
Sun Jan 27, 2019 12:42 pm
kennybroh offline
Posts: 531
Joined: Dec 13, 2009
Location: Baltimore

Re: Ir transmitter

And this is the ultimate stupid question, but can I power the pi from that usb port or do I need a different power supply? And can I use the HDMI port to hook it to a monitor?

Sorry to be so dense.

Posted on
Sun Jan 27, 2019 12:42 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Ir transmitter

I guess we are crossing our posts.

there are many examples of how to connect the IR receiver/ sender to api. if you ca solder you need:
one NPN transistor
two resistors: 10KOhm from GPIO to transistor basis, one (100 ohm )from transistor collector to IR did cathode
one or 2 IR diodes
emitter of transistor goes to ground, anode of IR transmitter goes to +5V

if you are not up to soldering, yes any of the amazon IR should work "Icstation 38KHz IR Infrared Remote Control Transceiver Shield "
the setup is essentially the one described in the soldering solution


so in summary
1. download ssd from my dropbox: and burn ..
2. order IR board / hat .. install
3. install LIRC
4. learn configure codes with LIRC
.. figure out the commands on unix prompt you like to use.
5. add indigo action piBeacon/ send any unix command .. and put the command string from # 4 in there and then you can make the RPI send those commands from indigo.

Karl
you can use %%v:varname% or %%v:varID% in the action field

Posted on
Sun Jan 27, 2019 12:46 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Ir transmitter

Q; Where is the LED to send the signal? Is there someplace I can plug an IR blaster into? ==> the RPI does not have any, YOU need to buy and add
Q:can I power the pi from that usb port or do I need a different power supply? And can I use the HDMI port to hook it to a monitor? ==> yes power comes from the USB INPUT port, not the output ports
and yes you can use the HDMI port to connect monitor, and the USB to connect keyboard and mouse..


Karl

no stupid q only stupid answers.

Posted on
Sun Jan 27, 2019 12:53 pm
kennybroh offline
Posts: 531
Joined: Dec 13, 2009
Location: Baltimore

Re: Ir transmitter

Thanks.

I don't mind soldering, but for this first try I'm going to spend $!0 to get the board. I'm sure I have a 2.5 volt usb power supply around here, so I'll set the pi up in the meantime. The board will be here Tuesday and I'll let you know!

Posted on
Sun Jan 27, 2019 1:54 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Ir transmitter

You dont need any power supply besides the 5 v usb


Sent from my iPhone using Tapatalk

Posted on
Tue Jan 29, 2019 1:02 pm
kennybroh offline
Posts: 531
Joined: Dec 13, 2009
Location: Baltimore

Re: Ir transmitter

OK, got my rpi 3. I'm fairly savvy but I must confess I was a bit confused by the setup instructions. Your instructions seemed clear enough, except when I downloaded and unzipped what appeared to be the most recent files I did not get an image file. Instead I got a cpgz file. By this time it was late and I was dozing off, so I didn't do what I just did now, and googled that extension and saw that it was another compressed file which needed to be expanded, presumably producing the image file. Duh.

In the meantime, however, I sort of threw up my hands and downloaded and unzipped the latest NOOB file and copied it to the ssd. When I powered up the pi it took me to the screen to choose the OS, where it is now because I was able to find a usb keyboard, but need do dig up a usb mouse before I can go any further. I have a bunch of them but they are in another building and I haven't gotten over there yet.

But my immediate question is whether I should continue with the NOOB install or now that I know what the cpgz file is, clear the NOOB files from the SSD and roceed with your setup instructions?

I knew this would be a struggle at first, but now I'm really stoked about getting into the pi world. I can think of a ton of things I want to use them for.

Once they are up and running Is it possible to "share" the screen. I thought I saw some talk about VNC. Is there a version of Google Chrome that runs on that OS? Would Chrome's remote desktop app work?

Sorry for the elementary questions. And thanks for providing the platform to integrate these things into Indigo and for being so responsive.

Posted on
Tue Jan 29, 2019 1:20 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Ir transmitter

The SSD files:

pibeacon-2018-12-09.img.zip ~ 2.31 GB
pibeacon-2018-04-12.img.zip ~ 2.11 GB <== recommended right now as the RPI3+ has some issues with bluetooth with the new version

should expand to 8GB just double click in filer

ONE of THOSE expanded files need to be burned on the SSD.
I\i DO NOT recommend NOOB as some things are missing AND you will need to setup ALL libs your self. I tried to keep those steps (on the how to page) up to date, but no guarantee.


as for VNC:
1. install/ enable vnc on RPI.
https://www.raspberrypi.org/documentati ... ccess/vnc/

I use " VNC viewer" on the mac. don't remember any more If I had to install it or it came with OSX. just works.

then on the RPI you need to do
ssh pi@..

sudo xstart &

to launch the Graphics interface. THEN you can VNC from your mac to the RPi.

I have not seen the need to use the graphics interface, may be only to setup Wifi parameters. otherwise i just use command line.

Posted on
Tue Jan 29, 2019 1:44 pm
kennybroh offline
Posts: 531
Joined: Dec 13, 2009
Location: Baltimore

Re: Ir transmitter

Do you set up port forwarding to access them from outside?

So here's something I've been wanting to do for a couple of years, and why I bought the first couple of pi's which I haven't used until now. The walls in my kitchen and family room are literally covered with family pictures, and I have many more than that I'd like to display but it's a bit of a pain. So I've always imagined a network of rpi driving slide shows on screens interspersed among the paper pictures, which would be framed just like the other pictures, Each screen would display its own set of pictures, sized and oriented for that screen. Among other things, this would be a good use for monitors I've replaced with newer ones. And I also imagine some of the little $20 screens would be fine for the really small pictures.

All that seems fairly easy to do. I would be very surprised if there aren't lots of ways to get a pi to cycle through a folder of pictures at certain intervals. Of course I'd use Pibeacon to turn on the screens when someone is nearby....

Since the 3 has 4 USB ports, however, my greedy self wonders whether one pi can control multiple displays? That would be even sweeter, but at $30 a pop it isn't the end of the world.

Who is online

Users browsing this forum: No registered users and 3 guests