Local web request

verified

#20

Good shout… I had the same problem with my old Blue Iris password… removing special characters solved the issue!


#21

FYI it looks like port 80 will be added automatically if there is no port specified, but since the browser will do the same it’s probably not an issue here.


#22

there is only 1 special character in the password and it’s an ! would that be an issue? URL in browser after request doesn’t change it.

I have BlueIris also and this piston is attempting to move the PTZ preset to positions based on actions (doors/etc)… I’m trying to trigger the PTZ in the camera directly from the camera’s web api.

still not working. POST/JSON?

added the port…no bueno

and I really don’t want to port forward…so if this is a no go locally, I’ll find another way.


#23

Also based on the limited logs from the camera…it doesn’t even look like the attempt is made to login…aka URL not hitting it at all.


#24

I’ll set up a quick local server here with the same parameters to test whether there is something strange going on with local requests. Will post a sample piston whether it works or not.


#25

perhaps try sending the PTZ commands via BI instead:

/cam/{cam-short-name}?pos=x Performs a PTZ command on the specified
camera, where x= 0=left, 1=right, 2=up, 3=down,
4=home, 5=zoom in, 6=zoom out
/cam/{cam-short-name}?pos=100 Causes a snapshot image to be captured from
the specified camera.

http://www.warf.com/download/5982_1816_Blue-Iris-Chm-Help-File-03-30-2013.v3.pdf (page 78)


#26

Ok, just went through that PDF…unfortunately there is no preset or PTZ coordinates commands. Only a command to go up/down/left/right. I’m going to play with triggering SOMETHING however just to see if I can get a local request to work.


#27

?pos=100

Try playing with this value (avoiding 0-6 which a reserved for direction)… maybe the 100 is just an example position?


#28

I didn’t have any trouble with the particulars of this request, the following all came through to http-echo-server as requested:

This one uses the Authorization header with value Basic bXlVc2VyOm15UGFzc3dvcmQh corresponding to the same username and password, it’s just not shown in the screenshot.

However, the user:password@ format did not work for me. Would you be able to share a green screenshot of your piston after editing the username and password to alternate values so that I can try out exactly what you have?


#29

only the password was changed

I also added logging the response and I’m seeing nothing in the log.


#30

and…SOOOO odd. I was able to setup a test to change modes on the blue iris server…worked fine!!!

So why does this other URL that works fine in a browser not working in webcore? I’m confused.


#31

What url did you use for the BI request? Scramble the password of course.


#32

192.168.13.60:81/admin?profile=1&user=user&pw=pw


#33

Very odd… you’re right, if that works the other one should???

Take it you tested your URL with the port included via a browser?


#34

Yes with port…of course after I hit enter the browser removes it. It really is port 80 NOT 81 like my screen cap above…I fixed it. That was holdover from when I tested the BI server as that port is 81. Maybe I should see if I can force the camera’s http port to 81… i’m stretching at this point. And I can take that URL in my browser and make this camera go back and forth to presets all day long


#35

download

Ok so it looks like there is a large delay trying to make that request… the 10:58:30 is when I hit the test button.


#36

As long as you are quoting the correct port, it shouldn’t matter so changing the port (if possible which is unlikely) will achieve nothing.

As Ian said, webCoRE defaults to port 80 if not told otherwise so for port 80 you don’t even need to state the port at all.


#37

I’d say that delay is just in the reponse… not the sending.

Response shouldn’t matter for this type of command anyway.


#38

http://192.168.13.69/cgi-bin/ptz.cgi?action=start&channel=0&code=GotoPreset&arg1=0&arg2=7&arg3=0&user=admin&pw={password}

This is actual URL I’m sending (except password) using GET and JSON. Copied right out of webcore. I even eliminated the variables…


#39

Looks like that particular request may have timed out… I don’t really know where to go from here since you’ve already confirmed that both the camera and hub are on the same subnet. It is possible to block host-to-host communication on your network but you would know if you had done it.