24.10.2016, 12:50
Hello,
I want prepare the integration with Satel alarm system via ETHM-1 module. Normally it should work when I send the command via TCP.
Result is sometimes 'nill' and sometimes "Busy". I know that this should work because I've checked a communication with ETM-1 via some program which was prepared according with this documentation.
According to the documentation to read armed partitions I must send:
Ethm-1 should answer with
but the answer is 'nil' or 'Busy'(this command I can understand)
I want prepare the integration with Satel alarm system via ETHM-1 module. Normally it should work when I send the command via TCP.
Code:
host, port = '192.168.0.15', 7094
socket = require("socket")
client = socket.tcp()
client:settimeout(1)
client:connect(host, port)
cmd = string.char(0xFE,0xFE,0x7E,0xD8,0x60,0xFE,0x0D)
client:send(cmd)
result = client:receive()
log(result)
Result is sometimes 'nill' and sometimes "Busy". I know that this should work because I've checked a communication with ETM-1 via some program which was prepared according with this documentation.
According to the documentation to read armed partitions I must send:
Code:
cmd = string.char(0xFE,0xFE,0x09,0xD7,0xEB,0xFE,0x0D)
Ethm-1 should answer with
Code:
0xFE, 0xFE, 0x09, DATA1, DATA2, DATA3, DATA4, CRC_HIGH, CRC_LOW, 0xFE, 0x0D
but the answer is 'nil' or 'Busy'(this command I can understand)