Send command in HEX

Data are received from Telegram token in HEX format. The problem is that the function  that.device.Send sends data in ASCII, not in HEX and then a wrong message is sent.

       that.Msg = IR.GetVariable("Drivers."+that.DriverName+".Telegram"); 
       //Msg string will be "7F F2 FA 00 01 00 BD 67 FA FF FE 06 87 0D"
       IR.Log("Driver: Msg = "+ that.Msg);
You can use something like
var value = parseInt("FF", 16);
to convert a hex string to a hex number
for(var cnt=0;cnt               
	partTel = parseInt(partMSG, 16);

This article was helpful for 1 person. Is this article helpful for you?