Your comments
In documentation are:
"bytes 12-15 basically reserved by Get Parameter Header."
Sometimes byte 12 are 0, sometimes 20, 30, 100, 101 but i need rest of bytes not that.
Im receive data but sometimes some part of syntax in the middle (byte 12-15) are different. How can I skip it?
{
IR.Log(data);
if ((data) == "143,143,143,143,0,20,170,1,243,27,1,2,0,0,2,3,0,5,1,255") {
IR.Log("WC1mute");
}
I make it. Its possible to make easier?
IR.AddListener(IR.EVENT_RECEIVE_DATA, IR.GetDevice("ASHLY"), function(data)
{
IR.Log(data);
if ((data) == "143,143,143,143,0,20,170,1,243,27,1,2,0,0,2,3,0,5,1,255") {
IR.Log("WC1mute");
}
if ((data) == "143,143,143,143,0,20,170,1,243,27,1,2,0,0,2,3,0,5,0,255") {
IR.Log("WC1unmute");
}
});
Im try to receive data from ASHLY.
IR.AddListener(IR.EVENT_RECEIVE_DATA, IR.GetDevice("ASHLY"), function(data)
{
IR.Log(data);
});
receive in ASCI, could I receive in HEX? Or convert to HEX?
How can I change status if receive:
0x8F,0x8F,0x8F,0x8F,0x00,0x14,0xAA,0x01,0xF3,0x1B,0x01,0x00,0x00,0x00,0x02,0x03,0x00,0x05,0x00,0xFF |
and change if receive:
0x8F,0x8F,0x8F,0x8F,0x00,0x14,0xAA,0x01,0xF3,0x1B,0x01,0x00,0x00,0x00,0x02,0x03,0x00,0x05,0x01,0xFF |
YES! :)
If I use your script its work correct. After check - in my script is ' ' before and after syntax.
IR.GetDevice("ASHLY").Send(['0xAA,0xAA,0xAA,0xAA,0x00,0x14,0xAA,0x01,0xF3,0x1B,0x64,0x65,0x66,0x61,0x75,0x6C,0x74,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x0A,0x04,0x00,0x05,0x01,0x03,0xFF', '\r\n']);
UDP connection is correct because if I copy these syntax to command in driver tree and its works
0xAA,0xAA,0xAA,0xAA,0x00,0x14,0xAA,0x01,0xF3,0x1B,0x64,0x65,0x66,0x61,0x75,0x6C,0x74,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x0A,0x04,0x00,0x05,0x01,0x03,0xFF
Im try timeout 500, 1000, 1500 but doesn't work :(
what is correct syntax?
0xaa,0xaa,0xaa,0xaa,0x00
0xaa 0xaa 0xaa 0xaa 0x00 0x14 0xAA
AA AA AA AA 00 14 AA 01 F3 1B 64 65
Im try tu use Send method (need to use hexToDec and DecToHex) but its doesn't work. What am I doing wrong?
IR.AddListener(IR.EVENT_ITEM_PRESS, IR.GetItem("Page 1").GetItem("buttonJS"), function()
{
IR.GetDevice("ASHLY").Send(['0xaa,0xaa,0xaa,0xaa,0x00,0x14,0xAA,0x01,0xf3,0x1b,0x64,0x65,0x66,0x61,0x75,0x6C,0x74,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x0A,0x04,0x00,0x05,0x00,0x03,0xFF', '\r\n']);
//IR.GetDevice("ASHLY").Send(['AA AA AA AA 00 14 AA 01 F3 1B 64 65 66 61 75 6C 74 00 00 00 00 00 00 00 00 00 00 01 00 00 0A 04 00 05 00 03 FF', '\r\n']);
//IR.GetDevice("ASHLY").Send(['0xaa 0xaa 0xaa 0xaa 0x00 0x14 0xAA 0x01 0xf3 0x1b 0x64 0x65 0x66 0x61 0x75 0x6C 0x74 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x0A 0x04 0x00 0x05 0x00 0x03 0xFF', '\r\n']);
IR.ShowPopup("Popup 1");
});
Customer support service by UserEcho
Ethernet-Communications-v5_3.pdf