Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOTION_NOTIFICATION_URL #179

Open
theflarenet opened this issue May 21, 2017 · 2 comments
Open

MOTION_NOTIFICATION_URL #179

theflarenet opened this issue May 21, 2017 · 2 comments

Comments

@theflarenet
Copy link

Apparently it's not working for me. I've changed it from:

MOTION_NOTIFICATION_URL=
to
MOTION_NOTIFICATION_URL=http://www.myaddress.com/webpage_to_accept_json.php

It doesn't seem to execute at all and using wget to that address worked fine.

Any ideas?

@theflarenet
Copy link
Author

theflarenet commented May 21, 2017

Ok. I found out it was an issue due to the host blocking the request:

{"armed": true, "motion": true, "last_motion_check": 1495355441, "host": "(none)"}
<html><head><title>Error 406 - Not Acceptable</title><head><body><h1>Error 406 - Not Acceptable</h1><p>Generally a 406 error is caused because a request has been blocked by Mod Security. If you believe that your request has been blocked by mistake please contact the web site owner.</p></body></html

Is it possible to use something else instead of curl? Perhaps wget as a workaround? My server error logs reported: [21/May/2017:04:37:08 -0400] "POST /test.php HTTP/1.1" 406 300 "-" "curl/7.37.1"

@Clem-
Copy link

Clem- commented Oct 10, 2017

It's because your webpage_to_accept_json is not receiving a JSON request.

You may want to change your notification script with something else or try to add parameter -H "Content-type: application/json" to the CURL call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants