installing to orangepi zero

Anything about the Open Source code, downloads, documentation. Suggestions welcome.
jim321
Posts: 11
Joined: Fri Dec 02, 2016 5:11 pm

installing to orangepi zero

Post by jim321 » Thu Jan 26, 2017 11:57 pm

hi
i am having a few problems installing

pg 39 of pdf getting going "404 error "

jim@orangepizero:/mnt/ramdisk$ wget http://www.skippersmate.co.uk/skippersm ... /sm.tar.gz

--2017-01-27 00:28:56-- http://www.skippersmate.co.uk/skippersm ... /sm.tar.gz
Resolving http://www.skippersmate.co.uk (http://www.skippersmate.co.uk)... **.**.***.***
Connecting to http://www.skippersmate.co.uk (http://www.skippersmate.co.uk)|**.**.***.***|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-01-27 00:28:58 ERROR 404: Not Found.

i took out your ip.

and pg 33 i cant find this line.

Set webcam_motion to 1 (i.e. on). (This is not a typo – the options are off, 1, 2 etc.) (about line
407) :
i did not see any line with "webcam"
i did see one that said stream_motion.

pg 38 this is an empty file
sudo nano /etc/postgresql/9.1/main/pg_hba.conf
i did install postgresql.

**UPDATE***i have postgresql v.9.4 so i changed that in the line above and edited with no problems.

running armbian jessie, orange pi zero

Thanks
Jim

jim321
Posts: 11
Joined: Fri Dec 02, 2016 5:11 pm

Re: installing to orangepi zero

Post by jim321 » Sun Jan 29, 2017 1:29 pm

the image will not boot on opi-zero.so i am trying to build from Source .
i am stuck here.

Change directory to the RAM disk :
cd /mnt/ramdisk
Download the compressed tar file from the Skipper's Mate web site :
wget http://www.skippersmate.co.uk/skippersm ... /sm.tar.gz
Unpack tar file. You should be in the root (/) of /mnt/ramdisk.
tar -zxvf sm.tar.gz
This should leave you with the following files and directories - if you list the contents using ls :
etc sm.tar.gz usr var
Now copy the unzipped/untarred directories to their homes on the Raspberry.
Copy the usr directory tree to /usr
sudo cp -r -v usr/lib/* /usr/lib
sudo cp -r usr /usr
Copy etc directory tree to /etc
sudo cp -r etc /etc
Copy www directory tree to /var
sudo cp -r www /var
You will need to change ownership and permissions under the /var directory tree as follows.
Change ownership of all files and directories under /var/www to owner pi and group pcl
***changed pi to jim****
sudo chown -R jim:pcl /var/www
Now change to the /var/www/cgi-bin directory :
cd /var/www/cgi-bin
Change permissions on the following cgi files which need to be executable. You need to cut and
paste as two statements as the command line does not accept a line break :
sudo chmod 4755 apconnect.cgi driverupd.cgi pclcmd.cgi reboot.cgi
sudo chmod 4755 smdownload.cgi wireless.cgi writehostapd.cgi

i have the download of the sources i don't know where to put the file's in the sm folder i have the www/http stuff in there dir's.
i ran the scrips in the db's but got errors.

i did not install or edit network as i am using a router with ddwrt duckDNS to do the networking.

Thanks
Jim
Last edited by jim321 on Sun Jan 29, 2017 2:01 pm, edited 1 time in total.

penny
Posts: 84
Joined: Mon Oct 10, 2016 2:02 pm

Re: installing to orangepi zero

Post by penny » Sun Jan 29, 2017 1:52 pm

Hi Jim

As Colin says, apologies - will try harder not to confuse who is doing what !

In order to help I need a bit of info. The documentation is not totally up to date (sorry but is Open Source :shock: ). There are 2 software versions for download from the web site :

* Download sources - skippersmatesources0.9.2.2.tgz
and
* ISO image - skippersmate0.9.2.2.tgz

These replace the reference to sm.tar.gz.

So firstly, which is it you're trying to use ? The latter saves a lot of work - don't think it was available when the Getting Going documentation was written.

I think from what you're quoting that you are using sources ? And how far have you got ?

Page 33 - webcam_motion - this is an earlier version of Motion. We now use the later version, to which you are, I think referring. There is a list somewhere on the Motion web site showing the changed field names. There is also a conversion table in the Postgres pcl database called pcl_configfields which lists old and new field names which are used by Skipper's Mate (note that we only use a smallish subset of Motion features).

Page 38 - What version of postgres have you got installed ? We're currently running Skipper's Mate on 9.4. Do you have a pg_hba.conf under the path for that - i.e. /etc/postgresql/9.4/main ?

Look forward to hearing more from you.

Penny

penny
Posts: 84
Joined: Mon Oct 10, 2016 2:02 pm

Re: installing to orangepi zero

Post by penny » Sun Jan 29, 2017 2:06 pm

Jim

Sorry, we seem to have crossed with our posts. So replied to yours of 2:29 Sun.

Thanks re the ISO - altho' compatibility is claimed we did wonder - which is why we are waiting for one to test.

Re the source compilation - recommend (as per my other msg) that you download the latest 0.9.2.2 from the downloads page. The sm directory is usually stored under the user's home path for the purposes of compilation e.g. /home/jim/sm. To compile and build these there should be a script called smbuildall.sh which it appears has been omitted in the 0.9.2.2 release so I have kicked the programmer and will email this to you ASAP. Put it under /home/jim/sm and then run ./smbuildall.sh. There is also a version called smbuildone.sh which allows compilation and build programs individually. The script will copy the executables to the appropriate directories and give them the correct rights.

Please can you list the errors you got in the database build scripts /var/www/html/pcl/db/pcldoitall.sh and /var/www/html/pcl/sm/db/smdoitall.sh ?

Cheers
Penny

jim321
Posts: 11
Joined: Fri Dec 02, 2016 5:11 pm

Re: installing to orangepi zero

Post by jim321 » Sun Jan 29, 2017 2:35 pm

ok i think i get it now
Thanks
jim

penny
Posts: 84
Joined: Mon Oct 10, 2016 2:02 pm

Re: installing to orangepi zero

Post by penny » Sun Jan 29, 2017 2:53 pm

Jim

Scripts emailed to you - we will be updating the download.

Don't forget to tell me what database issues you've been having.

Cheers
Penny

penny
Posts: 84
Joined: Mon Oct 10, 2016 2:02 pm

Database errors

Post by penny » Sun Jan 29, 2017 4:43 pm

Jim

Thanks for the text file with the database errors. The first set look as though you have run the database creation/insert twice, or the database pre-existed. Could you please :

1) from /var/www/html/pcl/db/ - sh pclundoitall.sh
then from the same directory
2) sh pcldoitall.sh

and post the results here ?

TIA
Penny

jim321
Posts: 11
Joined: Fri Dec 02, 2016 5:11 pm

Re: installing to orangepi zero

Post by jim321 » Sun Jan 29, 2017 5:32 pm

jim@orangepizero:/var/www/html/pcl/db$ sh pclundoitall.sh
DROP DATABASE
jim@orangepizero:/var/www/html/pcl/db$ clear
jim@orangepizero:/var/www/html/pcl/db$ sh pclundoitall.sh
psql:pcldrop_db.sql:7: ERROR: database "pcl" does not exist
jim@orangepizero:/var/www/html/pcl/db$ sh pclundoitall.sh
psql:pcldrop_db.sql:7: ERROR: database "pcl" does not exist
jim@orangepizero:/var/www/html/pcl/db$ sh pcldoitall.sh
psql:pclcreaterole.sql:5: ERROR: role "pcl" already exists
CREATE DATABASE
psql:createroles.sql:6: ERROR: role "pcl_user" already exists
CREATE TABLE
CREATE TABLE
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
CREATE TABLE
INSERT 0 1
INSERT 0 1
CREATE TABLE
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
CREATE TABLE
CREATE TABLE
CREATE TABLE
psql:pclcreatestdtables.sql:126: ERROR: insert or update on table "pcl_systems" violates foreign key constraint

"pcl_systems_curruserid_fkey"
DETAIL: Key (curruserid)=(1) is not present in table "pcl_user".
CREATE TABLE
CREATE TABLE
CREATE TABLE
psql:pclcreatestdtables.sql:170: ERROR: insert or update on table "pcl_en_errormsg" violates foreign key constraint

"pcl_en_errormsg_curruserid_fkey"
DETAIL: Key (curruserid)=(1) is not present in table "pcl_user".
psql:pclcreatestdtables.sql:172: ERROR: insert or update on table "pcl_en_errormsg" violates foreign key constraint

"pcl_en_errormsg_curruserid_fkey"
DETAIL: Key (curruserid)=(1) is not present in table "pcl_user".
psql:pclcreatestdtables.sql:174: ERROR: insert or update on table "pcl_en_errormsg" violates foreign key constraint

"pcl_en_errormsg_curruserid_fkey"
DETAIL: Key (curruserid)=(1) is not present in table "pcl_user".
psql:pclcreatestdtables.sql:176: ERROR: insert or update on table "pcl_en_errormsg" violates foreign key constraint

"pcl_en_errormsg_curruserid_fkey"
DETAIL: Key (curruserid)=(1) is not present in table "pcl_user".
psql:pclcreatestdtables.sql:178: ERROR: insert or update on table "pcl_en_errormsg" violates foreign key constraint

"pcl_en_errormsg_curruserid_fkey"
DETAIL: Key (curruserid)=(1) is not present in table "pcl_user".
psql:pclcreatestdtables.sql:180: ERROR: insert or update on table "p.ect.to big to post it allcl_en_errormsg" violates foreign key constraint

"pcl_en_errormsg_curruserid_fkey"
DETAIL: Key (curruserid)=(1) is not present in table "pcl_user".

ect.ect to big to post all

jim

penny
Posts: 84
Joined: Mon Oct 10, 2016 2:02 pm

Re: installing to orangepi zero

Post by penny » Sun Jan 29, 2017 5:46 pm

OK Jim - thks for that - looks like an incompatible version of the script. I will check it out and get back to you shortly.

Penny

jim321
Posts: 11
Joined: Fri Dec 02, 2016 5:11 pm

Re: installing to orangepi zero

Post by jim321 » Sun Jan 29, 2017 6:40 pm

the smbuildall script returns

jim@orangepizero:~/sm$ bash smbuildall.sh
-------------- pclprocs compiled ok ---------------
-------------- pclprocs linked ok ---------------

[sudo] password for jim:
In file included from /home/jim/sm/pcldb/main.cpp:25:0:
/home/jim/sm/pcldb/pcldb.h:42:22: fatal error: pqxx/pqxx: No such file or directory
#include <pqxx/pqxx>
^
compilation terminated.
.............. pcldb compile failed..............

thank you very much
Jim

Post Reply