mirror of
https://github.com/motioneye-project/motioneye.git
synced 2026-03-02 22:57:06 -05:00
Update dockerfile (necessary add support pantilthat library) #2135
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#2135
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 @Govraskirill on GitHub (Feb 22, 2022).
Hello, dear friends. I have the next problem, namely:
I wanna using action buttons for ptz pro 2 camera. I found information, that i should:
#!/bin/bash
/usr/bin/python3 /etc/motioneye/left.py
#!/usr/bin/python
import time
import pantilthat
currentPos = pantilthat.get_servo_one()
newPos = currentPos +20
if newPos >= 80: newPos = 80
pantilthat.servo_one(newPos)
time.sleep(1)
But when i try to use pan tilt control i received the next message:
WARNING: left_1: command has finished with non-zero exit status: 1
WARNING: left_1: Traceback (most recent call last):
WARNING: left_1: File "/etc/motioneye/left.py", line 4, in
WARNING: left_1: import pantilthat
WARNING: left_1: ImportError: No module named 'pantilthat'
I assume that problem can be fix if I rebuild motioneye server image and put in dockerfile information about support pantilthat python lybrary.
Please, give me advice how can i rebuild image so that fix this problem or other tips how to fix this problem
@Govraskirill commented on GitHub (Feb 22, 2022):
I tried to add next command in Dockerfile:
RUN python -m pip install pantilthat
But this step can't help me and when i tried rebuild my image i received mistake (i did it on webstorm)
@starbasessd commented on GitHub (Feb 22, 2022):
You would need to add the proper lines in extra/Dockerfile if you are building a custom motionEye docker container, to include other python libraries. I updated the instructions in here.
I don't know if that command set will work for your camera, they appear to be for the Pan Tilt Hat, not for an ONVIF or similar network camera, though.
@starbasessd commented on GitHub (Feb 22, 2022):
BTW, you would also need to be sure that both python3 is installed in your docker container as the first section of code looks for python3, and you need to figure out if the second section of code can use python2 or python3, and fix the "#!/usr/bin/python" section to point to the correct python.
If you were to use the updated extra/Dockerfile listed in the instructions here (at the bottom) find the line:
pip install /tmp/motioneye && \
and insert just below that as the next line:
pip install pantilthat &&
then try to rebuild the container. I don't guarantee it to work, but I've added other python libraries there like that.
@starbasessd commented on GitHub (Feb 22, 2022):
BTW, python-pantilthat library is built in to the motionEyeOS builder.