IR Transmitter ?

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
buitermark
Normal user
Posts: 10
Joined: 28 Oct 2015, 16:41
Location: Rhenen

IR Transmitter ?

#1 Post by buitermark » 30 Nov 2015, 22:21

Any chance of supporting an IR Transmitter ?

I'd like to controll my Kalox CL200T electronic (IR) Curtains....

and i can think of very nice options for 'playing' with IR Tv's, etc. (https://www.remotecentral.com/cgi-bin/codes/) also....

highroller
Normal user
Posts: 31
Joined: 09 Feb 2016, 22:16

Re: IR Transmitter ?

#2 Post by highroller » 23 Feb 2016, 15:31

+1 for ir transmitter

User avatar
costo
Normal user
Posts: 500
Joined: 21 Nov 2015, 15:03
Location: NL, zw-NB

Re: IR Transmitter ?

#3 Post by costo » 23 Feb 2016, 16:13

Not much chance to get this implemented in ESPEasy.
It would need an huge library of devices and commands.
Memory limitations I'm afraid.

cherowley
Normal user
Posts: 125
Joined: 14 Jan 2016, 09:39

Re: IR Transmitter ?

#4 Post by cherowley » 23 Feb 2016, 22:34

I've just finished implementing a new plugin to send ir. Tested only for 5mins and only 2 different Samsung codes.

You have it pass it the hex code though so not sure any use for anyone. Also I only needed it for Samsung tv so doesn't handle raw codes..

Quite cool to have the lights and TV come on when I walk into the kitchen :D

Deennoo
Normal user
Posts: 158
Joined: 07 Sep 2015, 13:03

Re: IR Transmitter ?

#5 Post by Deennoo » 23 Feb 2016, 22:53

Can be usefull for amp without HDMI cec, who need to be set ON when TV plug is set on.

Best of this will be a MQTT payload with hex code on it, this way IR sender is just a sender all HEX code are on domoticz device.

Deennoo
Normal user
Posts: 158
Joined: 07 Sep 2015, 13:03

Re: IR Transmitter ?

#6 Post by Deennoo » 23 Feb 2016, 22:54

costo wrote:Not much chance to get this implemented in ESPEasy.
It would need an huge library of devices and commands.
Memory limitations I'm afraid.
IR lib is already on Esp Easy.

cherowley
Normal user
Posts: 125
Joined: 14 Jan 2016, 09:39

Re: IR Transmitter ?

#7 Post by cherowley » 23 Feb 2016, 23:03

I think he meant that having a database of all the ir codes in the firmware would be impossible. Also I think they are talking about it sending which is not in easyesp. Or at least it wasn't until I just gave it a bash :D

User avatar
costo
Normal user
Posts: 500
Joined: 21 Nov 2015, 15:03
Location: NL, zw-NB

Re: IR Transmitter ?

#8 Post by costo » 24 Feb 2016, 00:10

Topic starter gave a link with 100ths of brands and 1000's of devices.
I meant it is not realistic to put them all in a ESP plugin. :lol:

A IR plugin which can send most protocols can be made if code's are given in HEX. On Github I see a IR library which about 15 different protocols.
Even a learning part to copy the codes from your remote is realistic.
Maybe someone is going to write this plugin.

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: IR Transmitter ?

#9 Post by tozett » 24 Feb 2016, 07:22

maybe use already finished arduino libs on the prominiextender,
or a good dev could use this, maybe? :

https://github.com/sebastienwarin/IRremoteESP8266
This library enables you to send and receive infra-red signals on an ESP8266 using Arduino framework (https://github.com/esp8266/Arduino)

This library is based on Ken Shirriff's work (https://github.com/shirriff/Arduino-IRremote/)

Mark Szabo has updated the IRsend class to work on ESP8266 and Sebastien Warin the receiving & decoding part (IRrecv class).

Seb's notes : I also changed the pulse parameters for Samsung, update the Panasonic and Samsung decoders and remove the SANYO decoders. The IR decoder was successfully tested with Panasonic and Samsung remote controls.

cherowley
Normal user
Posts: 125
Joined: 14 Jan 2016, 09:39

Re: IR Transmitter ?

#10 Post by cherowley » 24 Feb 2016, 09:51

costo wrote:Topic starter gave a link with 100ths of brands and 1000's of devices.
I meant it is not realistic to put them all in a ESP plugin. :lol:

A IR plugin which can send most protocols can be made if code's are given in HEX. On Github I see a IR library which about 15 different protocols.
Even a learning part to copy the codes from your remote is realistic.
Maybe someone is going to write this plugin.
I have written the plugin and am using it. Only supports the named protocols, not raw mode at the moment..

Deennoo
Normal user
Posts: 158
Joined: 07 Sep 2015, 13:03

Re: IR Transmitter ?

#11 Post by Deennoo » 24 Feb 2016, 14:07

cherowley wrote:
I have written the plugin and am using it. Only supports the named protocols, not raw mode at the moment..
Panasonic & Samsung ?

cherowley
Normal user
Posts: 125
Joined: 14 Jan 2016, 09:39

Re: IR Transmitter ?

#12 Post by cherowley » 24 Feb 2016, 14:38

Deennoo wrote:
cherowley wrote:
I have written the plugin and am using it. Only supports the named protocols, not raw mode at the moment..
Panasonic & Samsung ?
Hiya, Just added Panasonic type. Update is on the playground :)

juppzupp
New user
Posts: 4
Joined: 25 Feb 2016, 10:38

Re: IR Transmitter ?

#13 Post by juppzupp » 25 Feb 2016, 10:53

Hiya,

good morning.

Is there a short how to available ? I would like to send RC5 f.e.
Also, what kind of IR LED did you connect how ? I am not sure wether or not I need a transistor because I dont know how much current the ESP can provide per pin.

thanks !
jupp

NietGiftig
Normal user
Posts: 103
Joined: 16 Sep 2015, 20:32

Re: IR Transmitter ?

#14 Post by NietGiftig » 25 Feb 2016, 13:32

juppzupp wrote:because I dont know how much current the ESP can provide per pin.
http://lmgtfy.com/?q=esp8266+current+on+pins

juppzupp
New user
Posts: 4
Joined: 25 Feb 2016, 10:38

Re: IR Transmitter ?

#15 Post by juppzupp » 25 Feb 2016, 13:59

NietGiftig wrote:
juppzupp wrote:because I dont know how much current the ESP can provide per pin.
http://lmgtfy.com/?q=esp8266+current+on+pins
not helpfull. boring.

NietGiftig
Normal user
Posts: 103
Joined: 16 Sep 2015, 20:32

Re: IR Transmitter ?

#16 Post by NietGiftig » 25 Feb 2016, 14:08

juppzupp wrote: not helpfull. boring.
I thought so, better let other people sort out your questions without a little research of your own
There are many parasites on the world.
Not see you again, your in the blacklist. :D

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: IR Transmitter ?

#17 Post by tozett » 26 Feb 2016, 08:20

cherowley wrote: Hiya, Just added Panasonic type. Update is on the playground :)
i found it on the playground and would play with it. would you be so kind to help a noob with getting started?
how do i use it? can i control it via MQTT? is there a HTTP-cmd syntax?

thanx alot.

cherowley
Normal user
Posts: 125
Joined: 14 Jan 2016, 09:39

Re: IR Transmitter ?

#18 Post by cherowley » 26 Feb 2016, 09:39

tozett wrote:
cherowley wrote: Hiya, Just added Panasonic type. Update is on the playground :)
i found it on the playground and would play with it. would you be so kind to help a noob with getting started?
how do i use it? can i control it via MQTT? is there a HTTP-cmd syntax?

thanx alot.
Hiya t!

I've only written it for Http commands sorry, not mqtt..

the http command is:

To turn samsung tv off:

http://192.168.2.165/control?cmd=IRSEND ... 0e019e6,32

to turn samsung tv on:

http://192.168.2.165/control?cmd=IRSEND ... 0e09966,32

Where "SAMSUNG" is the protocol - see the source code for which ones are supported.
The hex string is the ir code to send.
The no of bits in the code.

My plugin doesn't support raw codes at the moment, maybe someone could add that?

I bought some cheap IR diodes off ebay:

http://www.ebay.co.uk/itm/Kingbright-53 ... 33a02e0def

One of the reasons i picked that one was the seller gave a link to the spec sheet. Loads to choose from and prob some much cheaper!

Using that info, I went to this site: http://led.linear1.org/led.wiz

That allowed me to feed in the details and calculate the series resistor needed.

You'll also need an ir receiver probably to log the codes sent be your remote (using the ir receive plugin). (details of that part are in the wiki)
Or compile up one the the ir demo programs and temporarily flash that to the esp chip..

Has been working ok all week but just had it's first failure! It didnt' turn the tv off doh! Think it's because the chip was also processing commands to fade my rgb led strip and stuff at the same time to warn me there was someone at the front door!

Hmm, either I add some sort of queueing system (ouch) or more easily i add a no of repeats parameter to teh http command!

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: IR Transmitter ?

#19 Post by tozett » 26 Feb 2016, 09:43

thanx a lot, fast answer.
i already played with the receiver part. worked ok. i needed fresh batteries for the remote... :o
i'll try your transmitter. very cool, thanx :)

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: IR Transmitter ?

#20 Post by tozett » 26 Feb 2016, 19:13

Note: The transmission range of the LED might not be optimal. Output pins on the Arduino can only source up to about 30mA of current. This means the LED cannot be driven to its full power of 50mA. This will result in a loss of transmission distance. If you want to drive an IR LED properly, consider using the Max Power IR LED Kit. However, a 330Ω attached to your IR LED should give about 10 feet of range.
https://learn.sparkfun.com/tutorials/ir ... ir-example

there is more of explanation. think it can be used to do the transmitter similar on the esp...

edit2: good start, i think: https://learn.sparkfun.com/tutorials/ir ... okup-guide

did you also took a 330Ω ?

edit3: if anybody is going to build it, here a some instruction to test/debug:
http://www.righto.com/2010/11/testing-a ... brary.html

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: IR Transmitter ?

#21 Post by tozett » 26 Feb 2016, 20:31

cherowley wrote:I have written the plugin and am using it. Only supports the named protocols, not raw mode at the moment..
i found some blog-post from the dev of the source, about raw and unknown codes.
maybe of interest to expand the plugin? ;)

http://www.righto.com/2010/03/understan ... -lirc.html
http://www.righto.com/2010/01/using-arb ... duino.html

juppzupp
New user
Posts: 4
Joined: 25 Feb 2016, 10:38

Re: IR Transmitter ?

#22 Post by juppzupp » 09 Mar 2016, 12:33

I tried it but unfortunately not usable for the raw stuff.
went back to a blank 8266 (no espeasy) using the samples from https://github.com/markszabo/IRremoteESP8266

IRDumpv2 always show the same hex code (so no flipping or such)
but transmitting that hex code with a second esp gives a different result on the receiving esp.

Found some posts about increasing buffers or such, but nothing helped.

not sure where to go from here.

cherowley
Normal user
Posts: 125
Joined: 14 Jan 2016, 09:39

Re: IR Transmitter ?

#23 Post by cherowley » 09 Mar 2016, 13:01

Hi,

Haven't looked into the raw stuff so are you saying you can send a raw code using a single hex code?

I thought you had to provide an array of mark/space times?

Ger
Normal user
Posts: 71
Joined: 05 Sep 2015, 18:09

Re: IR Transmitter ?

#24 Post by Ger » 09 Mar 2016, 14:01

I have ordered the following:
http://www.aliexpress.com/item/5V-IR-In ... 09291.html
I hope I can use it with the ESP8266 to extend "RAW" IR via WIFI.

cherowley
Normal user
Posts: 125
Joined: 14 Jan 2016, 09:39

Re: IR Transmitter ?

#25 Post by cherowley » 09 Mar 2016, 15:22

Ger wrote:I have ordered the following:
http://www.aliexpress.com/item/5V-IR-In ... 09291.html
I hope I can use it with the ESP8266 to extend "RAW" IR via WIFI.
That looks an interesting device, 5v though so level shifters required?

Do you know what the input and output should be? Is it just high and low levels to create a signal train?

juppzupp
New user
Posts: 4
Joined: 25 Feb 2016, 10:38

Re: IR Transmitter ?

#26 Post by juppzupp » 09 Mar 2016, 16:49

cherowley wrote:Hi,

Haven't looked into the raw stuff so are you saying you can send a raw code using a single hex code?

I thought you had to provide an array of mark/space times?
yepp. created arrays and treid to send em. made buffers bigger, still no luck.

Ger
Normal user
Posts: 71
Joined: 05 Sep 2015, 18:09

Re: IR Transmitter ?

#27 Post by Ger » 09 Mar 2016, 17:19

Indeed I thin a level shifter is necessary.
According to me it gives serial output.
https://forum.arduino.cc/index.php?topic=359707.0

Ger
Normal user
Posts: 71
Joined: 05 Sep 2015, 18:09

Re: IR Transmitter ?

#28 Post by Ger » 21 Mar 2016, 00:28

I have tested it connected to a serial interface with my laptop and a terminal program.
It looks like most remote controls are working with this device.
My LG, Samsung, Toshiba, Humax and Mede8er, intense remotes looks to work.
My sony remote doesn't.
If a key is pressed the device gives three hex codes. to send this you have to prefix it with 0xA1 0xF1.
I think there are possibility's to use espeasy as an IR extender with these devices.
It is a pity you have to prefix the code when you want to send it.

Ger
Normal user
Posts: 71
Joined: 05 Sep 2015, 18:09

Re: IR Transmitter ?

#29 Post by Ger » 21 Mar 2016, 00:39

Does someone know if it is possible to use ser2net to send the hex codes from one unit to another unit

jmv_driver
New user
Posts: 2
Joined: 27 Apr 2016, 10:43

Re: IR Transmitter ?

#30 Post by jmv_driver » 27 Apr 2016, 18:23

Any update in this plugin?

inneet
New user
Posts: 8
Joined: 31 Jan 2016, 23:56

Re: IR Transmitter ?

#31 Post by inneet » 09 Jul 2016, 21:01

Hello everyone! Who can help me with this plugin https://github.com/ESP8266nu/ESPEasyPlu ... 6_IRTX.ino? I try to use NEC protocol, but still nothing not working. It's correct command for NEC: http://192.168.1.106/control?cmd=IRSEND,NEC,4FB40BF,32 ??? After send that command i recieve the message:
IR Code Sent NEC
and in logs this item
IR Code Sent
But IR LED just once blink and it's all.

I test the my ir led in the arduino uno with ir_remote library and everything is working.

Code: Select all

Code : 4FB40BF (32 bits)
Timing[67]: 
+8950, -4500 + 500, - 600 + 550, - 550 + 550, - 600
+ 550, - 550 + 550, - 550 + 600, -1650 + 550, - 600
+ 550, - 550 + 550, -1700 + 550, -1700 + 550, -1700
+ 500, -1700 + 600, -1650 + 550, - 600 + 550, -1650
+ 550, -1700 + 550, - 550 + 600, -1700 + 500, - 600
+ 550, - 550 + 550, - 600 + 550, - 550 + 550, - 550
+ 600, - 550 + 550, -1700 + 550, - 550 + 550, -1700
+ 550, -1650 + 600, -1700 + 500, -1700 + 550, -1700
+ 550, -1700 + 550
unsigned int rawData[67] = {8950,4500, 500,600, 550,550, 550,600, 550,550, 550,550, 600,1650, 550,600, 550,550, 550,1700, 550,1700, 550,1700, 500,1700, 600,1650, 550,600, 550,1650, 550,1700, 550,550, 600,1700, 500,600, 550,550, 550,600, 550,550, 550,550, 600,550, 550,1700, 550,550, 550,1700, 550,1650, 600,1700, 500,1700, 550,1700, 550,1700, 550}; // NEC 4FB40BF
unsigned int data = 0x4FB40BF;

highroller
Normal user
Posts: 31
Joined: 09 Feb 2016, 22:16

Re: IR Transmitter ?

#32 Post by highroller » 09 Jul 2016, 21:49

inneet wrote:Hello everyone! Who can help me with this plugin https://github.com/ESP8266nu/ESPEasyPlu ... 6_IRTX.ino? I try to use NEC protocol, but still nothing not working. It's correct command for NEC: http://192.168.1.106/control?cmd=IRSEND,NEC,4FB40BF,32 ??? After send that command i recieve the message:
IR Code Sent NEC
and in logs this item
IR Code Sent
But IR LED just once blink and it's all.

I test the my ir led in the arduino uno with ir_remote library and everything is working.

Code: Select all

Code : 4FB40BF (32 bits)
Timing[67]: 
+8950, -4500 + 500, - 600 + 550, - 550 + 550, - 600
+ 550, - 550 + 550, - 550 + 600, -1650 + 550, - 600
+ 550, - 550 + 550, -1700 + 550, -1700 + 550, -1700
+ 500, -1700 + 600, -1650 + 550, - 600 + 550, -1650
+ 550, -1700 + 550, - 550 + 600, -1700 + 500, - 600
+ 550, - 550 + 550, - 600 + 550, - 550 + 550, - 550
+ 600, - 550 + 550, -1700 + 550, - 550 + 550, -1700
+ 550, -1650 + 600, -1700 + 500, -1700 + 550, -1700
+ 550, -1700 + 550
unsigned int rawData[67] = {8950,4500, 500,600, 550,550, 550,600, 550,550, 550,550, 600,1650, 550,600, 550,550, 550,1700, 550,1700, 550,1700, 500,1700, 600,1650, 550,600, 550,1650, 550,1700, 550,550, 600,1700, 500,600, 550,550, 550,600, 550,550, 550,550, 600,550, 550,1700, 550,550, 550,1700, 550,1650, 600,1700, 500,1700, 550,1700, 550,1700, 550}; // NEC 4FB40BF
unsigned int data = 0x4FB40BF;
What is the value of the resistor you are using?

And ho long is distance you are trying to transmitt?

With the arduino that have about the double amount of current on each pin i have been able to transmitt around 4-6 meters with an IRled from a remote. Havent tried the ESP transmitter but the distance would be a bit shorter because of the 20ma(?) pr pin.

inneet
New user
Posts: 8
Joined: 31 Jan 2016, 23:56

Re: IR Transmitter ?

#33 Post by inneet » 10 Jul 2016, 04:46

highroller wrote: What is the value of the resistor you are using?
And ho long is distance you are trying to transmitt?
With the arduino that have about the double amount of current on each pin i have been able
to transmitt around 4-6 meters with an IRled from a remote. Havent tried the ESP transmitter
but the distance would be a bit shorter because of the 20ma(?) pr pin.
Tremendous thank you! You are right, a weak power. Output pins in ESP8266 is 12mA maximum.
Near everything worked. After many attempts to amplify the signal I have achieved the result of 2 meters.
A little, but this is the maximum that was possible to make out of components available to me. LED is connected
the under the new scheme. And i has made a calculator for calculating the resistance of the transistor :mrgreen:
Image
transistor_key_LED.xlsx
About the increase in the distance I think we must look in the direction of the code, but in this I am not sure yet.
I try how it will work with the Arduino circuit and at what distance.

Deennoo
Normal user
Posts: 158
Joined: 07 Sep 2015, 13:03

Re: IR Transmitter ?

#34 Post by Deennoo » 01 Aug 2016, 15:26

cherowley wrote:
the http command is:

To turn samsung tv off:

http://192.168.2.165/control?cmd=IRSEND ... 0e019e6,32

to turn samsung tv on:

http://192.168.2.165/control?cmd=IRSEND ... 0e09966,32

Where "SAMSUNG" is the protocol - see the source code for which ones are supported.
The hex string is the ir code to send.
The no of bits in the code
I will start to play with your plugin to just power on\off my samsung sound system.

Of course i have the original remote, is there a way to simple copy hex code ? (using IR reciver plugin ?)

cherowley
Normal user
Posts: 125
Joined: 14 Jan 2016, 09:39

Re: IR Transmitter ?

#35 Post by cherowley » 03 Aug 2016, 12:33

Hi!

The way I did it was to use an arduino IR library with an ir receiver to make a note of the codes...
Deennoo wrote:
cherowley wrote:
the http command is:

To turn samsung tv off:

http://192.168.2.165/control?cmd=IRSEND ... 0e019e6,32

to turn samsung tv on:

http://192.168.2.165/control?cmd=IRSEND ... 0e09966,32

Where "SAMSUNG" is the protocol - see the source code for which ones are supported.
The hex string is the ir code to send.
The no of bits in the code
I will start to play with your plugin to just power on\off my samsung sound system.

Of course i have the original remote, is there a way to simple copy hex code ? (using IR reciver plugin ?)

Deennoo
Normal user
Posts: 158
Joined: 07 Sep 2015, 13:03

Re: IR Transmitter ?

#36 Post by Deennoo » 03 Aug 2016, 13:33

OK thx the trick !

Will work on it now

cherowley
Normal user
Posts: 125
Joined: 14 Jan 2016, 09:39

Re: IR Transmitter ?

#37 Post by cherowley » 09 Aug 2016, 17:05

Deennoo wrote:OK thx the trick !

Will work on it now
Hmm I just remembered you could also use esp easy standard software too!

plugin 016 is an ir receiver/decoder, some details are on http://www.esp8266.nu/index.php/IR

User avatar
ThinkPad
New user
Posts: 5
Joined: 20 Jun 2016, 12:04

Re: IR Transmitter ?

#38 Post by ThinkPad » 11 Aug 2016, 22:16

Maybe some code from https://alexbloggt.com/universal-infrar ... r-esp8266/ can be used?
I tried that sketch on a ESP-01 and it worked fine. But having something plug and play in ESPEasy would be even more fun ;)

User avatar
ThinkPad
New user
Posts: 5
Joined: 20 Jun 2016, 12:04

Re: IR Transmitter ?

#39 Post by ThinkPad » 20 Aug 2016, 10:45

I got the _P106_IRTX.ino plugin working! It works really good!

How to do it:
- Download ESPEasy source (from .zip or from GitHub)
- Download the plugin and place it in the same folder as 'ESPEasy.ino' and the other *.ino files
- Download the IRremoteESP8266.h and also put in same folder as above
- Compile & upload to your device (i used a Wemos D1 Mini board)
- Then under 'Devices' in ESPEasy, select 'Infrared Transmit' and choose the GPIO pin that you have the IR Transmitter connected to. For Wemos D1 Mini i connected the transmitter to pin 'D1', which is GPIO5 in ESPEasy.

You should then be able to send commands by calling the ESP url like this: http://192.168.4.138/control?cmd=IRSEND,NEC,4bb620df,32 (this command turns my Onkyo 5.1 receiver on)

Finding out the codes (and protocol and bits) that your remote uses is quite easy. I used a separate Arduino Nano which i loaded a sample sketch of 'IRrecvDumpV2' on.
As a transmitter i use two IR leds, a 2N2222 transistor and a 470 Ohm resistor. The transistor is driven from the GPIO and gives the IR leds 5V, to create a powerful transmitter. The ready to use IR transmitter boards from China are very weak, because they draw their power from the GPIO.

To have a sort of remote, i created this webpage on my webserver:

Code: Select all

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>

<h1>ESP8266 IR Remote</h1>
<h2>Versterker</h2>
<button type="button" onclick="loadDoc('http://192.168.4.138/control?cmd=IRSEND,NEC,4bb620df,32')">Power on</button>
<button type="button" onclick="loadDoc('http://192.168.4.138/control?cmd=IRSEND,NEC,4b36e21d,32')">Power off</button><br><br>
<button type="button" onclick="loadDoc('http://192.168.4.138/control?cmd=IRSEND,NEC,4bb6d02f,32')">Input tuner</button>
<button type="button" onclick="loadDoc('http://192.168.4.138/control?cmd=IRSEND,NEC,4bb6f00f,32')">Input VIDEO1 (Laptop)</button>
<button type="button" onclick="loadDoc('http://192.168.4.138/control?cmd=IRSEND,NEC,4bb6906f,32')">Input CD (PC Coaxial)</button>
<button type="button" onclick="loadDoc('http://192.168.4.138/control?cmd=IRSEND,NEC,4bb6708f,32')">Input VIDEO2 (TV)</button><br><br>

<button type="button" onclick="loadDoc('http://192.168.4.138/control?cmd=IRSEND,NEC,4bb600ff,32')">Channel up</button>
<button type="button" onclick="loadDoc('http://192.168.4.138/control?cmd=IRSEND,NEC,4bb6807f,32')">Channel down</button><br><br>
<button type="button" onclick="loadDoc('http://192.168.4.138/control?cmd=IRSEND,NEC,4bb641be,32')">(Search) Up</button>
<button type="button" onclick="loadDoc('http://192.168.4.138/control?cmd=IRSEND,NEC,4bb6c13e,32')">(Search) Down</button><br><br>

<button type="button" onclick="loadDoc('http://192.168.4.138/control?cmd=IRSEND,NEC,4bb640bf,32')">Volume +</button>
<button type="button" onclick="loadDoc('http://192.168.4.138/control?cmd=IRSEND,NEC,4bb6c03f,32')">Volume -</button>
<button type="button" onclick="loadDoc('http://192.168.4.138/control?cmd=IRSEND,NEC,4bb6a05f,32')">Volume mute</button><br><br><br>
<button type="button" onclick="loadDoc('http://192.168.4.138/control?cmd=IRSEND,NEC,4bb632cd,32')">Listening mode up</button>
<button type="button" onclick="loadDoc('http://192.168.4.138/control?cmd=IRSEND,NEC,4b36a25d,32')">Listening mode down</button>
<hr>
<h2>TV</h2>
<button type="button" onclick="loadDoc('http://192.168.4.138/control?cmd=IRSEND,SAMSUNG,E0E09966,32')">Power on</button>
<button type="button" onclick="loadDoc('http://192.168.4.138/control?cmd=IRSEND,SAMSUNG,E0E019E6,32')">Power off</button><br><br>
Response: <b><p id="output"></p></b>

<script>
function loadDoc(url) {
  var xhttp = new XMLHttpRequest();
  xhttp.onreadystatechange = function() {
    if (xhttp.readyState == 4 && xhttp.status == 200) {
      document.getElementById("output").innerHTML = xhttp.responseText;
    }
  };
  xhttp.open("GET", url, true);
  xhttp.send();
}
</script>

</body>
</html>

But i am planning on using it with my home automation, 'Home Assistant'.

ambassadoro
Normal user
Posts: 40
Joined: 17 Nov 2015, 15:58

Re: IR Transmitter ?

#40 Post by ambassadoro » 20 Aug 2016, 11:59

Looks interesting, can it be accessed by MQTT, too? Would be more sophisticated.

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: IR Transmitter ?

#41 Post by tozett » 20 Aug 2016, 12:43

If you Look here,
http://www.esp8266.nu/index.php/ESPEasy ... _Reference

It seems that Command s could basically send via http or MQTT.
BUT there must be a reason , why this is not generraly working. Maybe the Plugin must Provider a Call for his cmds?

This is a Task for the developers, i guess..
I also would like to See all! Cmds functioning via MQTT, generraly.. :D

User avatar
ThinkPad
New user
Posts: 5
Joined: 20 Jun 2016, 12:04

Re: IR Transmitter ?

#42 Post by ThinkPad » 20 Aug 2016, 14:15

ambassadoro wrote:Looks interesting, can it be accessed by MQTT, too? Would be more sophisticated.
I don't know. I haven't done anything with MQTT (yet?).

I think tozett is right, and that the plugin should offer some kind of call for it. But i don't know enough about it to guarantee that.

Martinus

Re: IR Transmitter ?

#43 Post by Martinus » 20 Aug 2016, 17:47

It should also work with MQTT, just send the command to <template>/cmd topic.

And because we have the IR receive feature within the default ESP Easy for some time, it makes much sense to have transmit as well. At a certain time, we have had two IR transmit plugins and we were waiting for those to be merged. As nothing has happened since then, the current IR TX playground plugin will be renumbered and added to the default repository to complete the IR receive/send handling features of ESP Easy.

mtsukamoto
New user
Posts: 8
Joined: 22 Dec 2015, 11:28

Re: IR Transmitter ?

#44 Post by mtsukamoto » 25 Aug 2016, 19:38

Hello Guys....i wanna implement the IR TX on the my ESPEASY project but i no know connect the IR LED on my ESP :cry: Help me please

farhanito
New user
Posts: 9
Joined: 10 May 2016, 16:15

Re: IR Transmitter ?

#45 Post by farhanito » 29 Aug 2016, 18:27

cherowley wrote:
Deennoo wrote:OK thx the trick !

Will work on it now
Hmm I just remembered you could also use esp easy standard software too!

plugin 016 is an ir receiver/decoder, some details are on http://www.esp8266.nu/index.php/IR
It doesn't seems to provide complete dump info, like protocol used and bits

adrianmihalko
Normal user
Posts: 51
Joined: 15 Sep 2016, 00:20

Re: IR Transmitter ?

#46 Post by adrianmihalko » 15 Sep 2016, 00:26

Hi,

I am still waiting for my Wemos devices, but I have some questions:

0, The original IRRemote library for Arduino contains an irsend.sendRaw command to send RAW codes. It is available in ESP EASY IR library too?

1, I want to control my AC unit. AC unit's are usually using long ir codes. Anybody tried to capture/send command like this from ESP EASY?

2, I want to build a powerfull IR transmitter module from 3-4 IR LEDs. It is possible to power these LEDs from only the Wemos D1 mini? Can you help me with a wiring diagram?

User avatar
costo
Normal user
Posts: 500
Joined: 21 Nov 2015, 15:03
Location: NL, zw-NB

Re: IR Transmitter ?

#47 Post by costo » 15 Sep 2016, 01:41

Yes it is possible but,

The maximum current a ESP8266 output can source is about 12mA so you should limit the current with a currentlimit resistor. The value of this resistor should be 180 ohms to be on the safe side.
The Led with series resistor is connected between a GPIO and ground.

If you need a little more current than 12mA/Led you can connect the IR led between Vcc and a GPIO pin with a series resistor of 120 ohm because the ESP can sink 20mA/pin.

You can use more than one output at the same time to drive several IR Leds as long as the total current of all pins together is less than about 100mA.
Each output needs it's own series resistor.

Probably it is easier to use a good transistor if you want to drive a lot of IR Led's. Some type of IR Led's can be driven with 100mA which is way too high for a ESP8266 GPIO pin.

farhanito
New user
Posts: 9
Joined: 10 May 2016, 16:15

Re: IR Transmitter ?

#48 Post by farhanito » 15 Sep 2016, 04:50

hpapagaj wrote:Hi,


1, I want to control my AC unit. AC unit's are usually using long ir codes. Anybody tried to capture/send command like this from ESP EASY?
my question as well,

my AC units use Panasonic, 48bits code like this:

Code: Select all

Encoding  : PANASONIC
Code      : 555A:F3081384 (48 bits)
will it work?

adrianmihalko
Normal user
Posts: 51
Joined: 15 Sep 2016, 00:20

Re: IR Transmitter ?

#49 Post by adrianmihalko » 15 Sep 2016, 09:19

Hi costo,

I already bought some 2N3904 transistors, because I red that it is not good to directly wire IR LEDs to the pins (because of the mA/pin) - I tried direct connection too, but it worked only from few centimeters.

I have TSAL6100 IR LEDs with ratings 5V/100ma. It is possible to drive 3-4 leds with 2N3904 transistor at their full power? Do I need external power supply connected to the transistor? (If I am not wrong the transistor works like a switch, we give a signal to the BASE leg and it's opens the two other leg /E/C/)

Sorry for the dumb qeustions, but I am not an electro engineer, just a hobbyist. :)

User avatar
costo
Normal user
Posts: 500
Joined: 21 Nov 2015, 15:03
Location: NL, zw-NB

Re: IR Transmitter ?

#50 Post by costo » 15 Sep 2016, 14:26

@ hpapagaj
2N3904 is not a powerfull transistor but it can be used to drive a few LED's. Max current for a 3904 is 200mA. The TSAL6100 has a max current of 100mA.
It is not good practise to drive either of them at max current all of the time so I would either limit the current/Led to 40mA and use 4 of them parrallel on one transistor with a series resistor on each LED
Or I would use 2 transistors with each 2 LED's parrallel with seriesresistor @ 80mA each .

You can calculate the value of the series resistor yourself.
First calculate the voltage drop over the resistor, then divide the voltage drop by the LED current to get the ohms value.
Voltage drop over the transistor is 0.2V, over the IR LED = 1.2V, total 1.4V.
If you have 5V to feed the LED's the resistor needs 3.6V over it. So (3.6/0.04) 90 ohm@40mA or 45 ohm@80mA. So use 100 or 47 ohms resistors.
If you use 3.3V to feed the LED's the resistor drop must be (3.3-1.4)=1.9V which gives 47.5 ohms@40mA or 23.75 ohms@80mA. So use 47 ohm or 24 ohms resistor.
All calculated values may vary up to 20% when measured with a volt/current meter

See http://electronics.stackexchange.com/qu ... e-or-below for the schematic and some background.

Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests