How to configure HTTP Request command?

Fredrik Hänninen shared this problem 7 months ago
Known

I try to activate motion detection in an IP-camera when the alarm i armed.

I found out that this URL works fine:

192.168.X.X/motion.cgi?MotionDetectionEnable=1&ConfigReboot=No&user=XXXXX&pwd=XXXXX

When I write it in the webbrowser and press enter it works fine. I can turn motion detection on and off.

I tried to use it with a HTTP Request command but it wont work.

I guess the problem is that I don't know how to send http-request from Zipatile.

Can someone help me, please. Explain how to use it or give an example.

Best Answer
photo

I managed to solve it now, by using GET and this url: http://admin:password@192.168.1.X/motion.cgi?MotionDetectionEnable=1&ConfigReboot=No

Comments (11)

photo
1

This is how the rule works.

photo
1

I figured out the problem but not how to solve it.

After I restarted the computer the URL did not work if I did not enter the username and password.

After I enter the user name and password this URL work

http://192.168.X.XX/motion.cgi?MotionDetectionEnable=0&ConfigReboot=No


Obviesly I don't get access to the camera.

How am I supposed to write the url to get the auktorisation?

photo
1

Hello Fredrik,

I tell you how I use this feature. In my case the camera is able to send a http request when an event happens. So I've created a rule on my camera that calls to a certain URL when motion is detected. But which URL?

In Zipato I have created a virtual sensor and I use that URL to make the sensor, which I've called "Movement".

My problem was that the camera only calls once each time it detects movement. And doesn't call to set moment = no. So in zipato I've created a rule with a timmer to make "Movement" = NO.

photo
1

I This is not the solution I'm lockning for. My camera cant send http requests. I just want to turn of motion detection so the camera stops sending mail when I'm at home.

I'm still interested in you example, how did you write the code in the camera and in the rule creator? Can you post some snapshots?

photo
1

Did you try "Post" rather than "Put"? Just a thought.

photo
1

I did try both.

Thank you. It could be the smallest mistake.

photo
1

Fredrik, in my case the camera detects the movement and activates a rule into the camera. That rule into the camera calls to a url (Zipato virtual sensor). In my case I am not allowed to access to this property of the camera with nor without a password.

photo
1

Fredrik, where you able to solve this?

I have Dlink camera and this url works fine in browser. But wont work with Zipato.

http://192.168.1.X/motion.cgi?MotionDetectionEnable=1&ConfigReboot=No&user=admin&pwd=password

photo
2

I managed to solve it now, by using GET and this url: http://admin:password@192.168.1.X/motion.cgi?MotionDetectionEnable=1&ConfigReboot=No

photo
1

Ja Mattias det fungerar.

It works

The trouble was that, the http command that needed separat login did only work with internet explorer. For that reason I did all tests with explorer.

I tried you code in chrome. It worked fine without separat login. And it works with zipatile and my dlink.

Thank you very much.

photo
photo
1

Solution is this format

http://admin:password@192.168.1.X/motion.cgi?MotionDetectionEnable=1&ConfigReboot=No

It works with chrome and Zipato http command but not with internet explorer.