First, thanks for the great XML API to get Data from the eid.
In the current Release 0.0.1.28 you implement the Notification API. So I can receive notify informations after an component changed the value. Maybe a Component named "test01" at gad 0/0/2 switched the value from on to off. So the XML Server should send an notify on port 1028 (default port).
But it doesn't work. Here a simple linknx.xml file:
So I have a Component called schalter02. I can change the value with <write><object id="schalter02" value="on" /></write> and read with <read>…</read>. Everything works fine.
So if I try so register a notification for the element. <admin><notification><register id=\"schalter02\"/></notification></admin> I get <admin status="success"/>. So it should work. After changing the value with the write command. The logs of the linKNX shows:
2011-05-31 12:35:28 KnxConnection: write(gad=0/0/2, buf, len=2)
2011-05-31 12:35:28 Object: New value on for object schalter02 (type: 1.001)
2011-05-31 12:35:28 Object: New value off for object schalter02 (type: 1.001)
2011-05-31 12:35:28 Object: New value on for object schalter02 (type: 1.001)
The value would be changed, but no notify. I connect with telnet to listen at the port. No result.
The notifications come on the same socket on which you send the "<admin><notification><register id="schalter02"/></notification></admin>" command.
If you use a telnet session on port 1028 to send "<admin><notification><register id="schalter02"/></notification></admin>", just keep the session open and switch the group address on and off. You should see the notification.
For the java example, I guess you just have to get an output stream from the socket and send "<admin><notification><register id="schalter02"/></notification></admin>" on it, followed by special character 0x04 before you enter the while loop
Jean-François
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello!
First, thanks for the great XML API to get Data from the eid.
In the current Release 0.0.1.28 you implement the Notification API. So I can receive notify informations after an component changed the value. Maybe a Component named "test01" at gad 0/0/2 switched the value from on to off. So the XML Server should send an notify on port 1028 (default port).
But it doesn't work. Here a simple linknx.xml file:
So I have a Component called schalter02. I can change the value with <write><object id="schalter02" value="on" /></write> and read with <read>…</read>. Everything works fine.
So if I try so register a notification for the element. <admin><notification><register id=\"schalter02\"/></notification></admin> I get <admin status="success"/>. So it should work. After changing the value with the write command. The logs of the linKNX shows:
2011-05-31 12:35:28 KnxConnection: write(gad=0/0/2, buf, len=2)
2011-05-31 12:35:28 Object: New value on for object schalter02 (type: 1.001)
2011-05-31 12:35:28 Object: New value off for object schalter02 (type: 1.001)
2011-05-31 12:35:28 Object: New value on for object schalter02 (type: 1.001)
The value would be changed, but no notify. I connect with telnet to listen at the port. No result.
I try to listen with java:
No receiving anything. It the Feature not finale or I just had an error in my work flow?
Regards, Markus
Hi,
The notifications come on the same socket on which you send the "<admin><notification><register id="schalter02"/></notification></admin>" command.
If you use a telnet session on port 1028 to send "<admin><notification><register id="schalter02"/></notification></admin>", just keep the session open and switch the group address on and off. You should see the notification.
For the java example, I guess you just have to get an output stream from the socket and send "<admin><notification><register id="schalter02"/></notification></admin>" on it, followed by special character 0x04 before you enter the while loop
Jean-François
Thank you!
Now I send the notification command and listen at the same port. I received every change <notify id='schalter02>off</notify>.
Regards, Markus
Is there a way to do something similar in JavaScript, not Java?
Every languages that supports sockets is possible.
Javascript Socket http://code.google.com/p/jsocket/