mirror of
https://github.com/motioneye-project/motioneye.git
synced 2026-03-02 22:57:06 -05:00
Get access to Action buttons from external application #1711
Labels
No labels
Android app
Arch Linux
CI/CD
CSS
FreeBSD
HTML/HTTP
Home Assistant addon
JavaScript
Python
Raspberry Pi
Stale No Activity 60 Days
bug
code format
dependencies
dev branch
docker
documentation
duplicate
enhancement
feature
help wanted
i18n/l10n
invalid
legacy motionEye
meta
motion
motionEyeOS
notourproblem
python update
question
question
security
troubleshooting
wontfix
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/motioneye#1711
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @stefor9393 on GitHub (Jul 15, 2020).
Hi.
I have just discovered and install motioneyeOS on RPi 3B.
I have configured on my camera1 the preset1 action button to activate a relay to open / close my garage door remotely.
It works perfectly, but I would like to be able to call this action button directly from my domotic gateway.
I have tryed the following url
http://192.168.0.156/action/1/preset1/
but it answers "method not allowed".
I am pretty sure that this is an authentication issue, but I have no idea how to pass it.
Any Idea ?
@davebdb commented on GitHub (Jul 16, 2020):
You need to enable MOTION to accept non-local (127.0.0.1) connections:
Refer to the following:
Action buttons documentation here:
https://github.com/ccrisan/motioneye/wiki/Action-Buttons
Configuration file entry for "motion control"
https://github.com/ccrisan/motioneye/wiki/Configuration-File#motion_control_localhost....
Hope that helps. You can even set it up with ssh commands from your phone as well if you configure the hooks all correctly.
@stefor9393 commented on GitHub (Jul 17, 2020):
Thanks for your reply davedb 👍
I had the motion_control_localhost set to false in /data/etc/motion.conf but not in /etc/motioneye.conf.
This option was missing in motioneye.conf file, so I've add it at the end of the file, rebooted but still the "method not allowed" answer . And the action button still works fine on the web ui.
To be sure that it is not a remote restriction, I've tryied directly on the Rpi with SSH :
curl http://127.0.0.1/action/1/preset1/
but I've got the same "message not allowed" message. Is the Url correct ?
@stefor9393 commented on GitHub (Jul 17, 2020):
I had a look in debug mode in the browser and find this when I click on the action button
http://192.168.0.156/action/1/preset1/?_=1594831863711&_username=admin&_signature=xxxxxxxxxxx
Both first and signature parameters are changing every time I click on the button. I believe this is for security purpose to pass credentials to the server.
Is there a way to compute these parameters outside of the motioneye UI ?
@stefor9393 commented on GitHub (Jul 19, 2020):
Nobody has any idea ? :(