Tim Barker wrote:just over 12 hours later and it still seems to be working well, much better results than motion 'straight out of the box'. A couple of comments though. Having spent a fair amount of time installing software to the various Pi's around 2 houses the installation procedure 'is different'. Coupled with this the location of programmes and data directories is also unusual. Getting used to the software is going to take a bit of relearning or adaption and the odd note or two left in certain directories for later. I tend to agree with djako that the interface is a little 'clunky' and that skinning it might be the way to go but it works and does everything, and I suspect more, that is required, well done Billw.
My only constructive comments would be for an installation procedure that is more normal for a Pi (ie using a straight apt-get install command) and a directory structure that is similar to most Pi installations ie, with programmes in one of the more usual areas and config and control files hanging off /etc. Data could then be specified from the config file (as it is) with initial data structures off the users home directory rather than several layers below, perhaps even using an already installed web interface under /var/www. This is not to say that the installation is difficult as it isn't but it is unusual from what I have seen. It is also unusual to use /etc/rc.local to instruct the daemon to run, whilst not apparently a 'true' daemon it seems to run in much the same way. Perhaps it could be modified to run as a straight daemon with the normal control script in /etc/init.d and run from the usual 'service' or 'systemctrl' commands. If these are comments expressed before by others and already answered, I apologise but time hasn't allowed me to read all of the 23 pages of this thread.
Thanks for your input, I don't think these specific things have been
discussed previously in the thread.
I don't consider pikrellcam a daemon. The start/stop can be from the
web interface or a terminal and it runs as user pi so all the media files
can be owned by user pi. For that reason it doesn't reparent to init like
a true daemon would. And through the web interface it has a gui which
makes it rather undaemon like... So really, the start from rc.local is
just a convenience to get it running at startup whether you are headless
or run a gui. If you run a gui you could just as well have it a session
startup. Note the rc.local start is a start as user pi and not root.
Maybe pikrellcam can run forever after startup just like a daemon does,
and maybe it does provide a service for controlling camera hardware, but
structuring it like a true daemon and running not as the user pi while
managing user data files would cause the install and runtime to be much
more complicated and I have to tell you that I am grateful almost every
day that I did not do that!
Basically, since pikrellcam is a user program (back to the not a daemon
discussion) the config files should be under /home/pi and not under /etc
which would be for system wide configurations. Again maybe a gray area
since there's only one user and one camera, but I think the configs are
in the right place except maybe a case could be made for the configs to
be under ~/.config/pikrellcam instead of ~/.pikrellcam.
As for having a package apt install of pikrellcam, in principle I
absolutely agree with you. However, so far I have spent a great deal of
time developing the program and have not had the time to consider setting
up for packaging it.
So honestly, its current form is a convenience for me. But for the user,
I have put in (after a forum suggestion) a one button click upgrade path to
the latest version. Once you get past the initial install, upgrades are
actually quicker than with a package. What I haven't done yet is put in
an uninstall and I should do that. Maybe there will be a package someday.