ESPEasy to control video projector and roller screen ?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
tparvais
Normal user
Posts: 27
Joined: 28 Oct 2015, 23:13

ESPEasy to control video projector and roller screen ?

#1 Post by tparvais » 04 Jun 2019, 15:13

Hello

I've an old samsung video projector I want to offer and install in a school for kids. This videoprojector can be remotely control via RS232C standard (jack 3.5mm).
manual: https://www.projectorcentral.com/pdf/pr ... l_5152.pdf

I don't have the cable.

different questions:

-any idea if this serial port if fully compatible with ESPEasy & Wemos D1 ? Or should I use level converter ? TTL 0-5V ok for ESP ? , Serial -15V ? ...
-is there a standard for jack 3.5mm serial interface ? gnd/TX/RX ?
-I need to remote control this projector from an ESPeasy with few buttons. how is it possible to send a set of bytes from ESPEasy in an easy way ? I think to create a rule reacting to each button press (on , off, vga , hdmi, ...) . the wiki is not clear for me on how to send bytes to serial interface. which GPIO's should I use for RX/TX ? Can we use 9600 8N1 ? do you have example on concrete example of commands sent via serial interface ?

Thank you very much

User avatar
ThomasB
Normal user
Posts: 336
Joined: 17 Jun 2018, 20:41
Location: USA

Re: ESPEasy to control video projector and roller screen ?

#2 Post by ThomasB » 04 Jun 2019, 21:56

any idea if this serial port if fully compatible with ESPEasy & Wemos D1 ?
RS232C will need to be converted to TTL. For example:
https://www.aliexpress.com/wholesale?ca ... X3232+mini

is there a standard for jack 3.5mm serial interface ? gnd/TX/RX ?
Not a global industry standard configuration. But perhaps there is a "standard" 3.5mm serial control for Samsung equipment. If you can't find that then roll up your sleeves. First ID the jack's ground pin with a continuity tester (ohm each pin to chassis ground). Then flip a coin to pick the projector's RxD pin, try it out, rinse & repeat if necessary.
I need to remote control this projector from an ESPeasy with few buttons. how is it possible to send a set of bytes from ESPEasy in an easy way ?
It appears your rules could send the data using the serialsend command. Check out mikeluyten's comments for some tips: https://github.com/letscontrolit/ESPEasy/issues/539

- Thomas

tparvais
Normal user
Posts: 27
Joined: 28 Oct 2015, 23:13

Re: ESPEasy to control video projector and roller screen ?

#3 Post by tparvais » 04 Jun 2019, 22:22

thanks, I appreciate your help

I've created a cable with a jack and GND/RX/TX connected to ESP

I've create a serial interface with 9600 8N1 parameters

with telnet session with Putty, I'm searching how to send following hexa:
0x08 0x22 0x00 0x00 0x00 0x16

as serialsend command accept onoy "textual" string

T.

User avatar
ThomasB
Normal user
Posts: 336
Joined: 17 Jun 2018, 20:41
Location: USA

Re: ESPEasy to control video projector and roller screen ?

#4 Post by ThomasB » 05 Jun 2019, 00:09

I've created a cable with a jack and GND/RX/TX connected to ESP
Great. Don't forget that the projector's RS232C uses bipolar signals that need some additional circuitry to safely interface to ESP's 3V TTL.
serialsend command accept only "textual" string
Drat. Too bad your projector doesn't accept textual commands. Hopefully someone else chimes-in with a workaround.

- Thomas

tparvais
Normal user
Posts: 27
Joined: 28 Oct 2015, 23:13

Re: ESPEasy to control video projector and roller screen ?

#5 Post by tparvais » 22 Jun 2019, 18:18

Hello

I changed my approach: I succeed to find a remote control compatible with the video projector.

I connected an IR photo transistor to the ESPEAsy firmware.

When I press a button, in the log, a lot of stuff in log window:

24515: NTP : NTP replied: delay 20 mSec Accuracy increased by 0.457 seconds
24515: Time adjusted by -1561220198964.54 msec. Wander: -433672277.49 msec/second
24517: Current Time Zone: DST time start: 2019-03-31 02:00:00 offset: 120 minSTD time start: 2019-10-27 03:00:00 offset: 60 min
24519: EVENT: Time#Initialized
24558: EVENT: Clock#Time=Sat,18:17
24622: IRSEND,RAW2,^22^2M8T898B698T*3898S89898S*4898^2N898889898T88888T8S89898T898S8S89898S8U698,38,69,52
24632: EVENT: IR#IR=2063832947
24803: IRSEND,RAW2,CS*3DSD^LH^30^2BBPD6C8C8DNC7D6C99R88B8CPC8*3B8B^2CC8*3B8BPB8B8DNBPB8C8BPB8BPBPB8C8BPBPB8E,38,48,59
24806: EVENT: IR#IR=2376540068
25110: IR: No replay solutions found! Press button again or try RAW encoding (timmings are in the serial output)
25130: EVENT: IR#IR=2479538304
27488: IRSEND,SAMSUNG36,889009966
27492: EVENT: IR#IR=2298517862
27700: IR: No replay solutions found! Press button again or try RAW encoding (timmings are in the serial output)
27714: EVENT: IR#IR=372137398
27905: IR: No replay solutions found! Press button again or try RAW encoding (timmings are in the serial output)
27921: EVENT: IR#IR=3243815870
29888: IRSEND,SAMSUNG36,889009966
29892: EVENT: IR#IR=2298517862
30211: IR: No replay solutions found! Press button again or try RAW encoding (timmings are in the serial output)
30234: EVENT: IR#IR=462562410
30382: IRSEND,NEC,189710EF
30386: EVENT: IR#IR=412553455
32048: WD : Uptime 1 ConnectFailures 0 FreeMem 12160 WiFiStatus 3

But I don't have any idea how to reuse that data for simulating the remote control with a IR Led

Any idea ?

Thank you

Thomas

Shardan
Normal user
Posts: 1091
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: ESPEasy to control video projector and roller screen ?

#6 Post by Shardan » 22 Jun 2019, 18:39

I've done that with some remotes using an Arduino sketch to get the exact codes.
The program is called IRrecvDump V2, I ran it on an Arduino Uno Rev.3 with a TSOP sensor.

I just took the code I got sending a HTTP request from my home automation.

See the description at https://letscontrolit.com/wiki/index.ph ... /IR-Remote

Please be aware that the ESPEasy Firmware used was rather old. Actual versions have
changed IR Libs so things might have changed.
Regards
Shardan

tparvais
Normal user
Posts: 27
Joined: 28 Oct 2015, 23:13

Re: ESPEasy to control video projector and roller screen ?

#7 Post by tparvais » 23 Jun 2019, 11:19

Hello

Thank you for the advise.

I compiled IRrecvDumpV2.ino with last lib for an Arduino Uno and plug a TSP 4838.

Here is the dump of the remote control (i need to simulate ON, OFF & SOURCE) I press twice for each button.

"ON"
Encoding : UNKNOWN
Code : 9B530587 (32 bits)
Timing[77]:
+4550, -4350 + 600, -1400 + 550, - 450 + 550, - 450
+ 550, - 450 + 550, -1450 + 550, - 400 + 600, - 400
+ 600, - 400 + 600, -1400 + 550, - 450 + 550, - 450
+ 550, -1400 + 600, - 400 + 600, - 400 + 600, - 400
+ 600, - 400 + 550, -4450 + 600, - 400 + 600, - 400
+ 550, - 450 + 550, - 450 + 550, -1450 + 550, - 450
+ 550, - 400 + 600, -1400 + 550, -1450 + 550, - 450
+ 550, - 450 + 550, -1400 + 600, - 400 + 600, -1400
+ 550, -1450 + 550, - 450 + 550, - 400 + 600, -1400
+ 600, -1400 + 550, - 450 + 550
unsigned int rawData[77] = {4550,4350, 600,1400, 550,450, 550,450, 550,450, 550,1450, 550,400, 600,400, 600,400, 600,1400, 550,450, 550,450, 550,1400, 600,400, 600,400, 600,400, 600,400, 550,4450, 600,400, 600,400, 550,450, 550,450, 550,1450, 550,450, 550,400, 600,1400, 550,1450, 550,450, 550,450, 550,1400, 600,400, 600,1400, 550,1450, 550,450, 550,400, 600,1400, 600,1400, 550,450, 550}; // UNKNOWN 9B530587

Encoding : UNKNOWN
Code : 9B530587 (32 bits)
Timing[77]:
+4550, -4400 + 550, -1400 + 600, - 400 + 600, - 400
+ 600, - 400 + 600, -1400 + 550, - 450 + 550, - 450
+ 550, - 450 + 550, -1400 + 600, - 400 + 600, - 400
+ 600, -1400 + 550, - 450 + 550, - 450 + 550, - 450
+ 550, - 450 + 550, -4450 + 550, - 450 + 550, - 450
+ 550, - 400 + 600, - 400 + 600, -1400 + 550, - 450
+ 550, - 450 + 550, -1450 + 550, -1400 + 600, - 400
+ 600, - 400 + 550, -1450 + 550, - 450 + 550, -1400
+ 600, -1400 + 600, - 400 + 600, - 400 + 550, -1450
+ 550, -1400 + 600, - 400 + 600
unsigned int rawData[77] = {4550,4400, 550,1400, 600,400, 600,400, 600,400, 600,1400, 550,450, 550,450, 550,450, 550,1400, 600,400, 600,400, 600,1400, 550,450, 550,450, 550,450, 550,450, 550,4450, 550,450, 550,450, 550,400, 600,400, 600,1400, 550,450, 550,450, 550,1450, 550,1400, 600,400, 600,400, 550,1450, 550,450, 550,1400, 600,1400, 600,400, 600,400, 550,1450, 550,1400, 600,400, 600}; // UNKNOWN 9B530587

"OFF"

Encoding : UNKNOWN
Code : 6A07CE83 (32 bits)
Timing[77]:
+4550, -4400 + 550, -1400 + 600, - 400 + 600, - 400
+ 600, - 400 + 600, -1400 + 550, - 450 + 550, - 450
+ 550, - 450 + 550, -1400 + 600, - 400 + 600, - 400
+ 600, -1400 + 550, - 450 + 550, - 450 + 550, - 450
+ 550, - 450 + 550, -4450 + 550, - 450 + 550, - 400
+ 600, - 400 + 600, - 400 + 600, - 400 + 600, - 400
+ 550, - 450 + 550, -1450 + 550, -1400 + 600, - 400
+ 600, - 400 + 600, -1400 + 550, -1450 + 550, -1400
+ 600, -1400 + 550, - 450 + 550, - 450 + 550, -1450
+ 550, -1400 + 600, - 400 + 600
unsigned int rawData[77] = {4550,4400, 550,1400, 600,400, 600,400, 600,400, 600,1400, 550,450, 550,450, 550,450, 550,1400, 600,400, 600,400, 600,1400, 550,450, 550,450, 550,450, 550,450, 550,4450, 550,450, 550,400, 600,400, 600,400, 600,400, 600,400, 550,450, 550,1450, 550,1400, 600,400, 600,400, 600,1400, 550,1450, 550,1400, 600,1400, 550,450, 550,450, 550,1450, 550,1400, 600,400, 600}; // UNKNOWN 6A07CE83

Encoding : UNKNOWN
Code : 6A07CE83 (32 bits)
Timing[77]:
+4500, -4400 + 550, -1450 + 550, - 400 + 600, - 400
+ 600, - 400 + 600, -1400 + 550, - 450 + 550, - 450
+ 550, - 450 + 550, -1400 + 600, - 400 + 600, - 400
+ 550, -1450 + 550, - 450 + 550, - 450 + 550, - 450
+ 550, - 450 + 550, -4450 + 550, - 450 + 550, - 450
+ 550, - 400 + 600, - 400 + 600, - 400 + 550, - 450
+ 550, - 450 + 550, -1450 + 550, -1400 + 600, - 400
+ 600, - 400 + 550, -1450 + 550, -1450 + 550, -1400
+ 600, -1400 + 550, - 450 + 550, - 450 + 550, -1450
+ 550, -1400 + 600, - 400 + 550
unsigned int rawData[77] = {4500,4400, 550,1450, 550,400, 600,400, 600,400, 600,1400, 550,450, 550,450, 550,450, 550,1400, 600,400, 600,400, 550,1450, 550,450, 550,450, 550,450, 550,450, 550,4450, 550,450, 550,450, 550,400, 600,400, 600,400, 550,450, 550,450, 550,1450, 550,1400, 600,400, 600,400, 550,1450, 550,1450, 550,1400, 600,1400, 550,450, 550,450, 550,1450, 550,1400, 600,400, 550}; // UNKNOWN 6A07CE83
"SOURCE"

Encoding : UNKNOWN
Code : 2820836B (32 bits)
Timing[77]:
+4500, -4400 + 600, -1400 + 550, - 450 + 550, - 450
+ 550, - 450 + 550, -1450 + 550, - 450 + 550, - 400
+ 600, - 400 + 600, -1400 + 550, - 450 + 550, - 450
+ 550, -1450 + 550, - 400 + 600, - 400 + 600, - 400
+ 600, - 400 + 550, -4450 + 600, - 400 + 600, - 400
+ 550, - 450 + 550, - 450 + 550, -1450 + 550, - 450
+ 550, - 400 + 600, -1400 + 550, - 450 + 550, -1450
+ 550, -1400 + 600, -1400 + 550, - 450 + 550, -1450
+ 550, -1400 + 600, - 400 + 600, -1400 + 550, - 450
+ 550, - 450 + 550, - 450 + 550
unsigned int rawData[77] = {4500,4400, 600,1400, 550,450, 550,450, 550,450, 550,1450, 550,450, 550,400, 600,400, 600,1400, 550,450, 550,450, 550,1450, 550,400, 600,400, 600,400, 600,400, 550,4450, 600,400, 600,400, 550,450, 550,450, 550,1450, 550,450, 550,400, 600,1400, 550,450, 550,1450, 550,1400, 600,1400, 550,450, 550,1450, 550,1400, 600,400, 600,1400, 550,450, 550,450, 550,450, 550}; // UNKNOWN 2820836B

Encoding : UNKNOWN
Code : 2820836B (32 bits)
Timing[77]:
+4500, -4400 + 550, -1450 + 550, - 450 + 550, - 400
+ 600, - 400 + 600, -1400 + 550, - 450 + 550, - 450
+ 550, - 450 + 550, -1400 + 600, - 400 + 600, - 400
+ 600, -1400 + 550, - 450 + 550, - 450 + 550, - 450
+ 550, - 450 + 550, -4450 + 550, - 450 + 550, - 450
+ 550, - 400 + 600, - 400 + 600, -1400 + 550, - 450
+ 550, - 450 + 550, -1450 + 550, - 450 + 550, -1400
+ 550, -1450 + 550, -1450 + 550, - 450 + 550, -1400
+ 550, -1450 + 550, - 450 + 550, -1450 + 550, - 450
+ 550, - 400 + 600, - 400 + 600
unsigned int rawData[77] = {4500,4400, 550,1450, 550,450, 550,400, 600,400, 600,1400, 550,450, 550,450, 550,450, 550,1400, 600,400, 600,400, 600,1400, 550,450, 550,450, 550,450, 550,450, 550,4450, 550,450, 550,450, 550,400, 600,400, 600,1400, 550,450, 550,450, 550,1450, 550,450, 550,1400, 550,1450, 550,1450, 550,450, 550,1400, 550,1450, 550,450, 550,1450, 550,450, 550,400, 600,400, 600}; // UNKNOWN 2820836B
With another remote control, I obtain a debug like this. I presume I can reuse the code 0xFF18E7 in sendcommand. But I don't have that code with my remote I need to simulate.
Encoding : NEC
Code : FF18E7 (32 bits)
Timing[67]:
+9100, -4450 + 600, - 500 + 650, - 500 + 600, - 500
+ 650, - 500 + 650, - 500 + 600, - 500 + 650, - 500
+ 600, - 500 + 650, -1600 + 650, -1600 + 600, -1600
+ 650, -1600 + 600, -1600 + 650, -1600 + 600, -1600
+ 650, -1600 + 650, - 500 + 600, - 500 + 650, - 500
+ 600, -1600 + 650, -1600 + 650, - 500 + 600, - 500
+ 650, - 500 + 600, -1600 + 650, -1600 + 600, -1600
+ 650, - 500 + 650, - 500 + 600, -1600 + 650, -1600
+ 600, -1600 + 650
unsigned int rawData[67] = {9100,4450, 600,500, 650,500, 600,500, 650,500, 650,500, 600,500, 650,500, 600,500, 650,1600, 650,1600, 600,1600, 650,1600, 600,1600, 650,1600, 600,1600, 650,1600, 650,500, 600,500, 650,500, 600,1600, 650,1600, 650,500, 600,500, 650,500, 600,1600, 650,1600, 600,1600, 650,500, 650,500, 600,1600, 650,1600, 600,1600, 650}; // NEC FF18E7
unsigned int data = 0xFF18E7;
It seems these Samsung codes are not recognised ?

Is there a trick to move forward ?

Thank you

tparvais
Normal user
Posts: 27
Joined: 28 Oct 2015, 23:13

Re: ESPEasy to control video projector and roller screen ?

#8 Post by tparvais » 23 Jun 2019, 12:56

I go forward with the tool https://docs.google.com/spreadsheets/d/ ... 1248364729
to evaluate timing

for action "ON", I press multiple times the key to get all the values and make an average

raw data 1 4550 4350 600 1400 550 450 550 450 550 450 550 1400 600 400 600 400 600 400 550 1450 550 450 550 450 550 1400 600 400 600 400 600 400 550 450 550 4450 600 400 550 450 550 450 550 450 550 1450 550 450 550 400 600 1400 550 1450 550 450 550 450 550 1400 550 450 600 1400 550 1450 550 450 550 450 550 1400 550 1450 550 450 550
raw data 2 4500 4400 550 1450 500 450 550 450 550 450 550 1450 550 450 550 450 550 450 550 1400 550 450 550 450 550 1450 550 450 550 450 550 450 500 500 500 4500 550 450 500 500 500 450 550 450 550 1450 550 450 550 450 550 1450 500 1450 550 450 550 450 550 1450 550 450 500 1450 550 1450 550 450 550 450 550 1450 500 1450 550 450 550
raw data 3 4500 4400 550 1450 550 400 600 400 600 400 600 1400 550 450 550 450 550 450 550 1400 600 400 600 400 600 1400 550 450 550 450 550 450 550 450 550 4450 550 400 600 400 600 400 600 400 550 1450 550 450 550 450 550 1400 600 1400 550 450 550 450 550 1450 550 450 550 1400 600 1400 550 450 550 450 550 1400 600 1400 600 400 550
raw data 4 4550 4400 550 1400 600 400 600 400 550 450 550 1450 550 450 550 450 550 450 550 1400 550 450 550 450 550 1450 550 450 550 450 550 400 600 400 600 4400 600 400 600 400 600 400 600 400 550 1450 550 450 550 450 550 1400 600 1400 550 450 550 450 550 1450 550 400 600 1400 550 1450 550 450 550 450 550 1400 600 1400 550 450 550
raw data 5 4500 4400 550 1450 500 500 500 450 600 400 550 1450 550 450 550 450 550 450 550 1400 550 450 600 400 550 1450 550 450 550 450 550 450 550 450 550 4450 550 450 550 450 550 400 600 400 600 1400 550 450 550 450 550 1450 550 1400 600 400 600 400 550 1450 550 450 550 1400 600 1400 550 450 550 450 550 1450 550 1400 600 400 600
Raw data average 4520 4390 560 1430 540 440 560 430 570 430 560 1430 560 440 560 440 560 440 550 1410 560 440 570 430 560 1430 560 440 560 440 560 430 550 450 550 4450 570 420 560 440 560 420 580 420 560 1440 550 450 550 440 560 1420 560 1420 560 440 560 440 550 1440 550 440 560 1410 570 1430 550 450 550 450 550 1420 560 1420 570 430 560

Then with the average and the XL sheet above, I find that the pulse width that minimize the error is 560 and blank width is 475.
That gives in binary the code 1111111100000000010001010101000101010100010101000101010101000000000101010101000101010001000101010001010001000101010001000101

or in base32: FU025A5A58LA02L8L258K8L25

so now, I shall test http://192.168.1.180/control?cmd=IRSEND ... 38,560,475 as soon I find an IR led....

IS this the way to proceed ?

Shardan
Normal user
Posts: 1091
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: ESPEasy to control video projector and roller screen ?

#9 Post by Shardan » 23 Jun 2019, 13:16

Not sure about that, i never used the Excel sheet.

Sadly the codes from your remotes are not identified by IRrecvDump ("unknown")
so it can't give a code sequence directly.
With many remotes you get a code reading like "NEC, 32,ABCDEF" instead of "unknown"

Give it a try, bes way to find out.
Regards
Shardan

tparvais
Normal user
Posts: 27
Joined: 28 Oct 2015, 23:13

Re: ESPEasy to control video projector and roller screen ?

#10 Post by tparvais » 23 Jun 2019, 14:52

I found an IR led on an old Remote control and connected it to my ESP and using the raw data generated by my XL

This is working !

ON: http://192.168.0.51/control?cmd=IRSEND, ... 38,560,475
OFF: http://192.168.0.51/control?cmd=IRSEND, ... 38,560,475

I'm happy :-)

Thomas

my Excel file: https://1drv.ms/x/s!ArHE ... iuygh7apQ

Shardan
Normal user
Posts: 1091
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: ESPEasy to control video projector and roller screen ?

#11 Post by Shardan » 23 Jun 2019, 15:05

Congrats :)
Regards
Shardan

tparvais
Normal user
Posts: 27
Joined: 28 Oct 2015, 23:13

Re: ESPEasy to control video projector and roller screen ?

#12 Post by tparvais » 23 Jun 2019, 15:09

The only way to control the projector by using these commands is via rule and HTTP request then ?

example: I add two switches to Wemos.

if I press the switch 1 I send ON
switch 2 ::> OFF

with a rule.

No other possibility in standalone mode ?

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests