Cannot query the list of cameras though the motion web interface #1829
-
I am trying to integrate motion into my own web environment. I did not set a motion username or password. I can access the motion's web UI from a browser and stream the cameras, but all my "manual" requests (using firefox, targeting the motion control port 8080) for config information fail. I searched through the motion code, and I found that URLs are decoded using the format /camid/cmd1/cmd2... I did find a supported URL with cmd1 = "config" and cmd2 = "list", but no matter what I tried for camid returns "Bad request". I also found a reference to request "cameras.json", either as camid or cmd1, but that returns "Bad request" as well. What exact HTTP request should I use? (It would be nice to add a MD file that gives an overview of the Motion's web API, BTW.) |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
Are you referring to Motion or Motionplus? (Motion does not provide any json pages and this discussion is in the Motion repro) Edit: Additional Reference for Motion: |
Beta Was this translation helpful? Give feedback.
-
Motion, at https://github.com/Motion-Project/motion.git.
I retrieved the reference to cameras.json in function
webu_answer_strm_type(). I also found the /config/list URI referenced in
many places in webu.c, webu_text.c and webu_html.c
I also looked at MotionEye, and it seems to make use of the /config/list
URI.
Thanks.
Pascal.
…On Wed, Dec 4, 2024 at 12:51 PM Mr-Dave ***@***.***> wrote:
Are you referring to Motion or Motionplus? (Motion does not provide any
json pages and this discussion is in the Motion repro)
—
Reply to this email directly, view it on GitHub
<#1829 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABLW3LJKQP3H6ZZM5GMETDD2D5TORAVCNFSM6AAAAABTBAK4AWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCNBWGU4DSOA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
One Additional note so you are not surprised. Although all the parameters may be listed, many of them really can't be effectively changed via the web control. Hence, this is reason that Motioneye rewrites the configuration files and shuts down/restarts the Motion application. If you need something that does process all the configuration parameters, I'd suggest Motionplus. |
Beta Was this translation helpful? Give feedback.
-
I noticed the webcontrol_parms item, which was left to 0. I set it to 2, as mentioned in the configuration documentation. Not sure what level I really need, but /config/list now works. /cameras.json worked with the 8081 port (stream). I got confused by this last detail.. Sorry for bothering you. |
Beta Was this translation helpful? Give feedback.
I noticed the webcontrol_parms item, which was left to 0. I set it to 2, as mentioned in the configuration documentation. Not sure what level I really need, but /config/list now works. /cameras.json worked with the 8081 port (stream). I got confused by this last detail..
Sorry for bothering you.