IR Receiver data transformation to IR Sender

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
asuz
Normal user
Posts: 175
Joined: 31 Oct 2018, 18:22

IR Receiver data transformation to IR Sender

#1 Post by asuz » 03 Nov 2020, 22:01

Hello,

There is a ir receiver device (VS1338B similar TSOP4838) and a ir transmitter led in the nodemcu. I can shutdown my samsung smart tv with sending <esp ip>/control?cmd=IRSEND,SAMSUNG,e0e09966,32 code. e0e09966 is my tv shutdown hex format command. I need to open smart tv web browser with sending hex code but i could not find. If i open the web browser by sending command with my harmony hub(universal remote controller), nodemcu ir receiver show me the 3772816993 value, so how can i transform that value to the hex data to send it with my nodemcu's ir transmitter?
Attachments
IR_1.png
IR_1.png (13.62 KiB) Viewed 7790 times

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

Re: IR Receiver data transformation to IR Sender

#2 Post by ThomasB » 03 Nov 2020, 22:43

so how can i transform that value to the hex data to send it with my nodemcu's ir transmitter?
ESPeasy has a string transform function (strtol). But it converts any base value to decimal, not the other way around.

I suggest using an online decimal-to-hex convertor to determine the equivalent hex value for your IR command. For example: https://www.rapidtables.com/convert/num ... o-hex.html

- Thomas

asuz
Normal user
Posts: 175
Joined: 31 Oct 2018, 18:22

Re: IR Receiver data transformation to IR Sender

#3 Post by asuz » 03 Nov 2020, 23:04

ThomasB wrote: 03 Nov 2020, 22:43
so how can i transform that value to the hex data to send it with my nodemcu's ir transmitter?
ESPeasy has a string transform function (strtol). But it converts any base value to decimal, not the other way around.

I suggest using an online decimal-to-hex convertor to determine the equivalent hex value for your IR command. For example: https://www.rapidtables.com/convert/num ... o-hex.html

- Thomas
Ohh thank your reply but it seems no need any transformation. I notice that at the log page esp easy already convert it to the hex code for us. I attach the log page maybe future reference for somebody.
Attachments
IR_2_1.png
IR_2_1.png (52.4 KiB) Viewed 7777 times

TD-er
Core team member
Posts: 8644
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: IR Receiver data transformation to IR Sender

#4 Post by TD-er » 03 Nov 2020, 23:04

@Thomas: See the system variables page: To HEX: %c_2hex%(100000)

And there is even very extensive documentation about it :) https://espeasy.readthedocs.io/en/lates ... onversions

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

Re: IR Receiver data transformation to IR Sender

#5 Post by ThomasB » 04 Nov 2020, 00:02

@asuz: Good to know you found what you needed. BTW, the log message you show is for IR SEND's data, whereas you were asking about converting the data from IR RECV.

@TD-er: Oh, new feature. Appears to be hot and fresh out of the oven. Thanks for adding it (and for documenting it too).

- Thomas

asuz
Normal user
Posts: 175
Joined: 31 Oct 2018, 18:22

Re: IR Receiver data transformation to IR Sender

#6 Post by asuz » 04 Nov 2020, 13:46

ThomasB wrote: 04 Nov 2020, 00:02 @asuz: Good to know you found what you needed. BTW, the log message you show is for IR SEND's data, whereas you were asking about converting the data from IR RECV.

@TD-er: Oh, new feature. Appears to be hot and fresh out of the oven. Thanks for adding it (and for documenting it too).

- Thomas
Maybe there is a misunderstanding. I was trying to find the command of opening smart tv web browser ir command. My harmony hub can open the web browser but i want to do it without harmony hub. As i told you i need it is hex code to send it by ir led of ESP Easy . When i send to open web browser command with harmony hub, ir receiver in the ESP Easy box returns with the data of 3772816993 value but i cannot use it because i need hex code then i notice that ESP Easy already convert it to hex code at the log page so i use that hex code at the log page.

Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 34 guests