Send Motion-user mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/motion-user
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Motion-user digest..."


Today's Topics:

   1. Re: Not writing to database (Mike Wilson)
   2. Re: Fwd: Re: Network Camera only Camera (Mike Wilson)


----------------------------------------------------------------------

Message: 1
Date: Fri, 9 Nov 2018 16:07:04 -0500
From: Mike Wilson <[email protected]>
To: Motion discussion list <[email protected]>
Subject: Re: [Motion-user] Not writing to database
Message-ID:
        <CAAVeUCp1bzhsjzgyJQpRJdusyA=c1uhm+qdc6w851p-svrx...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Well, that is good progress and good to know we don't need an issue over
it. Let us know what you find out.

On Fri, Nov 9, 2018 at 3:37 PM David Powell <[email protected]> wrote:

> I tried adding the *sql_query_start* but it didn't help.  It's as if
> Motion is ignoring any database directives.  I tried checking the logs in
> MySQL but can't seem to read them for some reason (I suppose they're
> encrypted, but the MySQL workbench is being persnickety about showing them
> to me. Cat-ing the MySQL log files shows only hieroglyphics).
>
> I'm sure the problem is not in MySQL because I can use that same query to
> insert rows into the database using SQuirreL without any problems.
>
> David
>
>
> On 11/9/18 1:56 PM, Mike Wilson wrote:
>
> The goal has always been to support that case, but there could be a bug
> related to the changes to support tying the events together for video and
> pictures. I use:
>
> sql_query insert into security_file(camera, event_id, filename, frame,
> file_type, time_stamp) values('%t', '%{dbeventid}', '%f', '%q', '%n',
> '%Y-%m-%d %T')
> sql_query_start insert into security_events (camera, event_time_stamp)
> values('%t', '%Y-%m-%d %T')
>
> This might help you. It is worth a try if nothing else. If this does work
> and the query alone doesn't, I would be sure to file a bug so we can sort
> that out.
>
> What I'm doing here with sql_query_start is generating an event in my
> security_events table and then using the ID that it generates to tag each
> video and picture so I don't have to guess later on my front-end.
>
> On Fri, Nov 9, 2018 at 2:49 PM David Powell <[email protected]> wrote:
>
>> This database issue is driving me nuts.  I'm using version
>> 4.1.1+git20181002-062a328 of Motion and everything seems to work OK,
>> except it won't write events to the MySQL database.  I'm sure it's
>> something I'm not doing right but I can't see it. There are no errors in
>> the log at any logging level. I have the config file set with:
>>
>> database_type mysql
>> database_dbname cameras
>> database_host localhost
>> database_port 3306
>> database_user root
>> database_password <redacted>
>> database_busy_timeout 0
>> sql_log_picture on
>> sql_log_snapshot off
>> sql_log_movie on
>> sql_log_timelapse off
>> sql_query INSERT INTO cameras.events
>> (server_number,camera_number,event_number,event_date,video_length,filename)
>>
>> VALUES (2,%t,%v,{ts '%C'},null,'%v-%Y%m%d%H%M%S');
>>
>> Nothing gets written to the database, and no errors are reported in the
>> log file.  What am I doing wrong?
>>
>> David
>>
>>
>>
>> _______________________________________________
>> Motion-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/motion-user
>> https://motion-project.github.io/
>>
>> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
>
>
>
> _______________________________________________
> Motion-user mailing 
> [email protected]https://lists.sourceforge.net/lists/listinfo/motion-userhttps://motion-project.github.io/
>
> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
>
> _______________________________________________
> Motion-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/motion-user
> https://motion-project.github.io/
>
> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 2
Date: Fri, 9 Nov 2018 16:08:29 -0500
From: Mike Wilson <[email protected]>
To: Motion discussion list <[email protected]>
Subject: Re: [Motion-user] Fwd: Re: Network Camera only Camera
Message-ID:
        <caaveucqis_yht-mzej9tg0awwefxbwglztf-0u3e31n6ony...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Root certainly should be able to write there, but motion isn't able to
according to the logs. How are you starting motion? Does it run long enough
to use `ps aux|grep motion` to find the user?

On Fri, Nov 9, 2018 at 3:19 PM John Rose <[email protected]> wrote:

> Mike,
>
> Thanks for your reply. The log file /var/log/motion/motion.log is owned by
> root as are its 'above' directories. I've never run motion (in Terminal) as
> anything other than root.
> -------- Forwarded Message --------
> Subject: Re: [Motion-user] Network Camera only Camera
> Date: Fri, 9 Nov 2018 13:10:07 -0500
> From: Mike Wilson <[email protected]> <[email protected]>
> Reply-To: Motion discussion list <[email protected]>
> <[email protected]>
> To: Motion discussion list <[email protected]>
> <[email protected]>
>
> I would say that nmap is telling you what ports are open and ffprobe is
> actually talking to the camera. So the port is open, but it isn't speaking
> a language that ffprobe can understand.
>
> Now, on to the problem. The user running motion is unable to write to the
> log file /var/log/motion/motion.log. You probably need to just change
> ownership of the file to the user that is running motion. My guess is that
> you initially ran motion as root and now it has another user.
>
> On Fri, Nov 9, 2018 at 7:32 AM John Rose <[email protected]>
> wrote:
>
>> I'm baffled by trying to use a Network Camera as only camera in motion.
>>
>> ffprobe -rtsp_transport udp
>> rtsp://1404332:[email protected]:554/onvif2 gives no problem
>> but
>> ffprobe -rtsp_transport tcp
>> rtsp://1404332:[email protected]:554/onvif2 gives:
>> [rtsp @ 0x5624d86b0080] Nonmatching transport in server reply
>> rtsp://1404332:[email protected]:554/onvif2: Invalid data found
>> when processing input
>>
>> However, nmap -p554 192.168.101.51 gives:
>> PORT    STATE SERVICE
>> 554/tcp open  rtsp
>> MAC Address: 4C:B0:08:8F:8D:7B (Shenzhen Gwelltimes Technology)
>> Nmap done: 1 IP address (1 host up) scanned in 0.70 seconds
>>
>> So ffprobe & nmap contradict each other re tcp & udp usage. Am I correct
>> instating that?
>>
>> Using "rtsp_uses_tcp off" line shows (whereas "rtsp_uses_tcp on" gives
>> the "non matching transport" line as in ffprobe):
>> ? motion.service - LSB: Start Motion detection
>>     Loaded: loaded (/etc/init.d/motion; generated)
>>     Active: active (exited) since Fri 2018-11-09 12:26:37 GMT; 15min left
>>       Docs: man:systemd-sysv-generator(8)
>>    Process: 900 ExecStart=/etc/init.d/motion start (code=exited,
>> status=0/SUCCESS)
>>
>> Nov 09 12:26:36 Laptop systemd[1]: Starting LSB: Start Motion detection...
>> Nov 09 12:26:37 Laptop motion[900]:  * Starting motion detection daemon
>> motion
>> Nov 09 12:26:37 Laptop motion[900]:    ...done.
>> Nov 09 12:26:37 Laptop systemd[1]: Started LSB: Start Motion detection.
>> Nov 09 12:26:37 Laptop motion[1023]: [-46028912:motion] [NTC] [ALL]
>> conf_load: Processing thread 0 - config file /etc/motion/motion.conf
>> Nov 09 12:26:37 Laptop motion[1023]: [-46028912:motion] [NTC] [ALL]
>> config_camera: Processing camera config file /etc/motion/camera1.conf
>> Nov 09 12:26:37 Laptop motion[1023]: [-46028912:motion] [NTC] [ALL]
>> motion_startup: Motion 4.0 Started
>> Nov 09 12:26:37 Laptop motion[1023]: [-46028912:motion] [ERR] [ALL]
>> myfopen: Error opening file /var/log/motion/motion.log with mode a: Permis
>> Nov 09 12:26:37 Laptop motion[1023]: [-46028912:motion] [EMG] [ALL]
>> motion_startup: Exit motion, cannot create log file /var/log/motion/motion
>>
>> Unfortunately, the penultimate line for the motion service doesn't show
>> all of the line. Any ideas?
>>
>> PS
>>
>>
>> --
>> John
>>
>>
>> _______________________________________________
>> Motion-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/motion-user
>> https://motion-project.github.io/
>>
>> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
>
> _______________________________________________
> Motion-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/motion-user
> https://motion-project.github.io/
>
> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------



------------------------------

Subject: Digest Footer

_______________________________________________
Motion-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/motion-user


------------------------------

End of Motion-user Digest, Vol 149, Issue 11
********************************************

Reply via email to