Havent figured out the streaming part yet... not to hopeful about that. I have played around with the new Get Images function on the Pronto TSU9600. It's possible to get an image directly of the IP camera in my case the Axis 241Q Videoserver. So if my frontdoor bel is ringing, I can look on my remote who's there [:)]
Code: Select all
var socket = new TCPSocket();
var receivedData = "";
socket.onConnect = function() {
System.print ("TCP-IP Connected");
socket.write("GET /axis-cgi/jpg/image.cgi?resolution=CIF&camera=3&compression=10&clock=0&date=0&text=0" + " HTTP/1.1\r\n\r\n");
};
socket.onData = function() {
receivedData += socket.read();
System.print ("Tcpip Data Received:"+ receivedData);
};
socket.onIOError = function (x) {
GUI.widget("panel").label = "IOError " + x;
System.print ("Tcp Error:"+ x);
};
socket.onClose = function () {
// remove the HTTP info from received data
var imageStartIndex = receivedData.indexOf("\r\n\r\n");
var bitmapData = receivedData.substring(imageStartIndex+4);
// display the image
var MyImage = new Image(bitmapData);
GUI.widget("panel").setImage(MyImage);
};
socket.connect("82.160.83.25", 80, 6000);
www.bwired.nl Online House in the netherlands. Domotica, Home Automation.