Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5
linknx sur OSX 10.6 serveur
#4
Moreover:

Petit script en perl:

#!/usr/bin/perl
use warnings;
use strict;
use IO::Socket::INET;


my $EOT = pack('C',4);
my $response;
my ($sock, $kidpid);

$sock = IO::Socket::INET->new(Proto => "tcp",
PeerAddr => "192.168.1.40",
PeerPort => 1028)
|| die "Failed : $!";

my $command ="<read><object id='Coin TV temperature'/></read>".$EOT;

#my $command ="<read><config><objects/></config></read>".$EOT;

$sock->autoflush();

$sock->write($command);

while ( $response = <$sock> ) {

print $response;
sleep(1);
$sock->write($command);

}
$sock->close;

Donne sur linknx OSX et Linux

jcoenen@Vubuntu:~$ readknx.pl
<read status='success'>20.68</read>
<read status='success'>20.68</read>
<read status='success'>20.68</read>
^C

Donc tout semble fonctionner.

Si je demande la liste des objets/config.

Linknx linux:

jcoenen@Vubuntu:~$ readknx.pl
<read status="success">
<config>
<objects>
<object type="13.xxx" id="Accumulated power" gad="4/0/4" log="true">Accumulated Power</object>
<object type="1.001" id="Alarme Activee" gad="1/3/6" init="persist" log="true">Alarme Active</object>
<object type="3.007" id="Bureau Light room switch" gad="1/0/29" flags="cwtus">Bureau Light room switch</object>
<object type="1.001" id="Bureau Plafond 39 switching" gad="1/1/170" log="true">Bureau Plafond 39 switching</object>
<object type="1.001" id="Bureau Rampe Neon Mezzanine 37 switching" gad="1/1/171" log="true">Bureau Rampe Neon Mezzanine 37 switching</object>
<object type="5.xxx" id="Chambre Alex Light room switch" gad="1/0/26" flags="cwtus">Chambre Alex Light room switch</object>
<object type="1.001" id="Chambre Alex Liseuse 50 switching" gad="1/1/150">Chambre Alex Liseuse 50 switching</object>
<object type="1.001" id="Chambre Alex Plafond 42 switching" gad="1/1/149">Chambre Alex Plafond 42 switching</object>
<object type="1.001" id="Chambre Ami Light room switch" gad="1/0/24" flags="cwtus">



Mais sous OSX rien ne revient


Alors que linknx recoit bien la demande et renvoit la réponse (

2012-10-17 15:02:29,873 [DEBUG] ClientConnection: PROCESSING MESSAGE:
2012-10-17 15:02:29,873 [DEBUG] ClientConnection: <read><config><objects/></config></read>
2012-10-17 15:02:29,873 [DEBUG] ClientConnection: END OF MESSAGE
2012-10-17 15:02:29,875 [DEBUG] ClientConnection: SENDING MESSAGE

2012-10-17 15:02:29,875 [DEBUG] ClientConnection: XMLSERVER sendmessage: size = 16140
message
<read st<config><objects<object type="1.001" id="Bureau Plafond 39 switching" gad="1/1/170" log="true">Bureau Plafond 39 switching</object> <object type="1.001" id="Bureau Rampe Neon Mezzanine 37 switching" gad="1/1/171" log="true">Bureau Rampe Neon Mezzanine 37 switching</obje<object type="5.xxx" id="Chambre Alex Light room switch" gad="1/0/26" flags="cwtus">Chambre Alex Light room switch</object> <object type="1.001" id="Chambre Alex Liseuse 50 switching" gad="1/1/150">Chambre Alex Liseuse 50 switching</object>

A priori, les commandes qui reçoivent une réponse d'une ligne semble fonctionner, par contre les commandes qui sont répondues par plusieurs lignes semblent coincer.

Je crains que le problème ne soit dans pthsem ...

Je continue les investigations.
Répondre


Messages dans ce sujet
linknx sur OSX 10.6 serveur - par jcoenen - 17/10/2012, 10:18:39
RE: linknx sur OSX 10.6 serveur - par fma38 - 17/10/2012, 11:13:39
RE: linknx sur OSX 10.6 serveur - par jcoenen - 17/10/2012, 11:55:27
RE: linknx sur OSX 10.6 serveur - par jcoenen - 17/10/2012, 14:16:17
RE: linknx sur OSX 10.6 serveur - par jcoenen - 18/10/2012, 10:04:53
RE: linknx sur OSX 10.6 serveur - par fma38 - 18/10/2012, 10:14:38
RE: linknx sur OSX 10.6 serveur - par jcoenen - 18/10/2012, 10:38:51

Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)