Live Camera stream

Forum about hardware/software for the Philips Pronto TSU9600 and other remotes.

Moderator: hvxl

Bwired
Administrator
Administrator
Posts: 4704
Joined: Sat Mar 25, 2006 1:07 am
Location: Netherlands
Contact:

Live Camera stream

Post by Bwired »

Well it should work because like 5 members use this script!
Did you change all the settings like IPnr and Port etc.

Code: Select all

912  actionSocket.connect(cameraList[currentCameraNr].IP,cameraList[currentCameraNr].port, CONNECT
       actionSocket.connect("192.168.10.6", 8000, CONNECTION_TIMEOUT);
User avatar
TANE
Forum Moderator
Forum Moderator
Posts: 4806
Joined: Fri Apr 06, 2007 9:46 pm
Location: Netherlands
Contact:

Live Camera stream

Post by TANE »

Ik heb een Axis 207w
net nog even een test gedaan camera is gewoon te bereiken via
http://192.168.1.115/axis-cgi/jpg/image.cgi
Er is geen verschil met de voorbeeld scripts hier.
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Live Camera stream

Post by Digit »

This evening Chak and i finished testing a XCF that can handle password-protected cameras like the Y-cam. We started off with the Panasonic camera XCF originating from Philips. Actually it was easier then expected; all that was needed was replace a single line of code:

Code: Select all

var bitmapHTTPGet = "GET /snapshot.jpg HTTP/1.1\r\nAuthorization: Basic cm9iZXJ0Omhla2tlcnM=\n\n";
I was anticipating more problems, but it all worked right away. Since this also works for my Aviosys 9100A videoserver, i expect more hardware will.
Bwired
Administrator
Administrator
Posts: 4704
Joined: Sat Mar 25, 2006 1:07 am
Location: Netherlands
Contact:

Live Camera stream

Post by Bwired »

Thanks, that sure is handy to know!
Is the format username password after : ":" ?
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Live Camera stream

Post by Digit »

What you have to do is the following. Suppose you want to use a userid "johnny" and password "begood". Concatenate those 2 with a colon, this will give you the string "johnny:begood". Now Base64 encode this string. That would be "am9obm55OmJlZ29vZA==". So now the line of code would become

Code: Select all

var bitmapHTTPGet = "GET /snapshot.jpg HTTP/1.1\r\nAuthorization: Basic am9obm55OmJlZ29vZA==\n\n";
that's all.
Bwired
Administrator
Administrator
Posts: 4704
Joined: Sat Mar 25, 2006 1:07 am
Location: Netherlands
Contact:

Live Camera stream

Post by Bwired »

Got it!
Exactly the same way I send Username & Password to www.twitter.com from my home automation system
tmpuserpass = Base64.EncodeStr64(Username & ":" & Password)
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Live Camera stream

Post by Digit »

It's in some RFC, so pretty standard.
User avatar
TANE
Forum Moderator
Forum Moderator
Posts: 4806
Joined: Fri Apr 06, 2007 9:46 pm
Location: Netherlands
Contact:

Live Camera stream

Post by TANE »

Robert,
where do i have to place the code for this?

Code: Select all

var IP = "192.168.1.100"
var URL = "/tenHSServer/tenHSserver.aspx?t=33&f=DeviceValue&d=^31.^2.^4.^6.^7.^9.^10.^12.^13.^15.^16.^18.^19.^21.^22.^24.^25.^26.^28";

var socket = new TCPSocket(false);

socket.onConnect = function()
{
  socket.write("GET "+URL+" HTTP/1.0\r\n");
  socket.write("Accept: */*\r\n");
  socket.write("Host: "+IP+"\r\n");
  socket.write("\r\n");
};
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Live Camera stream

Post by Digit »

Adding an extra line like this:
...
socket.write("Accept: */*\r\n");
socket.write("Authorization: Basic blabla\r\n");
socket.write("Host: "+IP+"\r\n");
...
should do it.
User avatar
TANE
Forum Moderator
Forum Moderator
Posts: 4806
Joined: Fri Apr 06, 2007 9:46 pm
Location: Netherlands
Contact:

Live Camera stream

Post by TANE »

WOW..it's working...:)
this is for my weather station on the Pronto...you know that part..:)

Know I can access homeseer also with username password to get the info.

thanks
ddgiel
Starting Member
Starting Member
Posts: 25
Joined: Fri Dec 05, 2008 4:20 pm
Location: Belgium

Live Camera stream

Post by ddgiel »

Hallo
I trying to get image of my mobotix D12 on my pronto 9400.
Using following code.

socket.onConnect = function() {
CameraText.label = "Camera - Get On Socket";
socket.write("GET /cgi-bin/image.jpg?size=320x240&camera=live HTTP/1.0\r\n ");
socket.write("Accept: */*\r\n");
socket.write("Authorization: Basic cHJvbnRvOTQwMDprYXNrZQ==\r\n");
socket.write("Host: 192.168.1.55\r\n");
};

but it hangs on this step. Can you please advise me?
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Live Camera stream

Post by Digit »

Actually, i can't see anything being wrong about it...
User avatar
TANE
Forum Moderator
Forum Moderator
Posts: 4806
Joined: Fri Apr 06, 2007 9:46 pm
Location: Netherlands
Contact:

Live Camera stream

Post by TANE »

ddgiel
Starting Member
Starting Member
Posts: 25
Joined: Fri Dec 05, 2008 4:20 pm
Location: Belgium

Live Camera stream

Post by ddgiel »

Following line is working in a browser

http://192.168.1.55/cgi-bin/image.jpg?s ... amera=live
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Live Camera stream

Post by Digit »

And do you need to enter a userid/password?
Post Reply

Return to “Philips Pronto (TSU9600), IRtrans and other remotes”