Skip to content

Accept to specify a camera device with "-d /dev/v4l/*" in "/boot/octpi.txt"#597

Merged
guysoft merged 9 commits intoguysoft:develfrom
usk-johnny-s:issue-596
Jul 2, 2019
Merged

Accept to specify a camera device with "-d /dev/v4l/*" in "/boot/octpi.txt"#597
guysoft merged 9 commits intoguysoft:develfrom
usk-johnny-s:issue-596

Conversation

@usk-johnny-s
Copy link
Contributor

Changes for #596

@usk-johnny-s
Copy link
Contributor Author

I add new feature that Load multiple camera configuration files.

If you use multiple camera, store multiple configration files in "/boot/octpi.txt/*.txt".
configration file format is same as original "/boot/octpi.txt".

@guysoft
Copy link
Owner

guysoft commented Jun 26, 2019

Looks cool, have you tested this?

@guysoft
Copy link
Owner

guysoft commented Jun 26, 2019

Ok noted this will break current usage because you are turning octopi.txt in to a folder.
Usually if you want to have a configuration folder you should call it octopi.conf.d/
I can't find where its written in a spec, but this explains it:
http://blog.siphos.be/2013/05/the-linux-d-approach/

@usk-johnny-s
Copy link
Contributor Author

Looks cool, have you tested this?

I should say no, because I don't set-up a image building environment now.
I tested just my modified script, by overwrite '/root/bin/webcamd' on Raspberry Pi with OctoPi 0.16.0.

Ok noted this will break current usage because you are turning octopi.txt in to a folder.

My modified script checks that a type of '/boot/octopi.txt' is a file or not.
Then, load '/boot/octopi.txt' if file, otherwise try to load '/boot/octopi.txt/*.txt' .

if [ -f "${configs}" ]; then
cfg_files="${configs}"
else
cfg_files=`ls ${configs}/*.txt`
fi

Usually if you want to have a configuration folder you should call it octopi.conf.d/

Yes I know. My thought is compatibility on migration.
But, you indicated priority that a directory naming policy is higher than a compatibility. I will modify my script.

@guysoft
Copy link
Owner

guysoft commented Jun 27, 2019

Ok, once you change it to octopi.conf.d/ I'll merge it so we can test it.

@usk-johnny-s
Copy link
Contributor Author

usk-johnny-s commented Jun 28, 2019

I changed to "/boot/octopi.conf.d/" and built boot image on Ubuntu x64.
It can boot my Raspberry Pi 3B+. But it has something strange.
Even though I have not connected a video device, it is existed that /dev/video0,10, 11, 12. it is diffarent between octopi v0.16.0 .

@guysoft
Copy link
Owner

guysoft commented Jun 28, 2019

If you are building against the latest base image, they might have changed driver stuff. Its fairly new and we didn't enough tests yet.

@usk-johnny-s
Copy link
Contributor Author

usk-johnny-s commented Jun 28, 2019

'/dev/video10,11,12 and video0' issue is caused by raspbian (current 'https://downloads.raspberrypi.org/raspbian_lite_latest' is '2019-06-20-raspbian-buster-lite.zip')

I download previous raspbian ( 'https://downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2019-04-09/2019-04-08-raspbian-stretch-lite.zip' ) and build octopi boot image.
It looks same as octopi v0.16.0 with on my Raspberry Pi 3B+ . (nothing here is '/dev/video*', if not connected a video device, or only connect pi-camera.)

ref: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=232684&p=1466567#p1466567

@usk-johnny-s
Copy link
Contributor Author

camera="auto" for raspi-cam is not working. I will fix it.
And I plan to change webcamd startup mechanism from init.d to systemd.

Change webcamd startup mechanism to systemd from init.d.
@guysoft
Copy link
Owner

guysoft commented Jun 30, 2019

Ok, just ping me when you are ready for me to pull it

@usk-johnny-s
Copy link
Contributor Author

usk-johnny-s commented Jun 30, 2019

I was done fix issue of "auto" and change to sytemd.
New boot image works fine.

@guysoft
Copy link
Owner

guysoft commented Jun 30, 2019 via email

@usk-johnny-s
Copy link
Contributor Author

Yes please.

@guysoft guysoft merged commit 555b28b into guysoft:devel Jul 2, 2019
@guysoft
Copy link
Owner

guysoft commented Jul 2, 2019

Ok merged cc @foosel Note this moves octopi.txt in to conf.d/octopi.txt.
I am not sure I am happy with that, but I guess we could also just move it back.

@foosel
Copy link
Collaborator

foosel commented Jul 2, 2019

Note this moves octopi.txt in to conf.d/octopi.txt.

You are aware that that will wreak havoc with our userbase? I'm sure that I'm not happy with that.

guysoft added a commit that referenced this pull request Jul 2, 2019
@guysoft
Copy link
Owner

guysoft commented Jul 2, 2019

@foosel Ok, managed to have a look and fix it.

@usk-johnny-s if you want to have a look and confirm this works for you it would help.

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

Successfully merging this pull request may close these issues.

3 participants