hello
I was trying to trace the ip of my card info
for states 0 and 1 is good
by cons how to make up the state is 0 if dn?
and
up gives 1
I tried many things but nothing works
thank you
edit :
The application allows ipx800 tcp on port 9470
it supports CONTROLS bit set and a relay to switch on or off and can also get commands to read the state of inputs and relays GetOut or getin for outputs or inputs
I saw on the post that Vera could read I’d like to read tcp states and assigned to a virtual module
taking up a code on the forum I saw it but what is the line:
“c: send (string.char (0,0,0,0,0,6,1,4,0,0,0,8))” what should I put this in place of string.char
local socket = require(“socket”)
host = “192.168.1.55”
c = assert(socket.connect(host, 9470))
c:send(string.char(0,0,0,0,0,6,1,4,0,0,0,8))
data = c:receive(25)
luup.log (data)
c:close()
php the script is
<?php
$fp = fsockopen($IP, $port, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)
\n";
} else {
$out = "GetOut1\r\n";
fwrite($fp, $out);
while (!feof($fp)) {
echo fgets($fp, 128);
}
fclose($fp);
}
?>
but in lua ?*thanks David