Surveillance Station not picking up motion events from Jooan IP Camera
-
- Starting out
- Posts: 14
- Joined: Tue Apr 12, 2016 8:00 pm
Surveillance Station not picking up motion events from Jooan IP Camera
Hello, I'm just after a bit of a sanity check to see if there's anything I've overlooked in my setup before I give up on my current rig.
I have the following installed:
- TS-419P II running 4.2.0
- Surveillance Station 5.1.0.4
- Cheap Onvif RTSP IP cam (Jooan JA-703KRA-t)
The support on this forum has been instrumental in the success I've had so far. With your guidance I have the camera installed and largely working in SS with the following setup:
- Camera configured as "Onvif ProfileS Cameras"
- Scheduled recording is enabled and works fine
- Alarm Recording options are enabled and I have both the "Traditional Mode" alarm recording enabled and recording and buzzer actions set up in "Advanced Mode"
- QMon works well for live viewing, manual recording and viewing of recorded video
- Android Vmobile works well for live viewing and viewing of recorded video
So far so good. Whilst a bit dodgy and a lot confusing, the software that came with the Jooan camera has allowed me to set region based motion detecting on the camera itself and the vendor supplied software shows motion events in its log. However SS does not appear to receive these events. I have attempted to set up the FTP method (as described in this forum) but it doesn't seem to work either. This may be an issue with the camera as I could not get it to write a screenshot to a "real" FTP location.
In order to do some troubleshooting I downloaded Onvif Device Manager which found the camera automatically and listed it as an Onvif 2.4 (on one screen, 2.04 on another) device. ODM also receives motion events, so it seems that the camera is broadcasting them correctly. The odd thing with ODM is that it is unable to broadcast a live stream from the camera. The RTSP address it resolves (presumably from the Onvif data on the camera) derives an incorrect password, and, if I update the admin password on the camera to that value, will derive a new one next time I try to connect with ODM. A well-formed RTSP address for the camera (which works in VLC) is:
rtsp://<ip>/user=admin_password=_channel=1_stream=1.sdp
ODM trys to connect with the following path which does not work in ODM or in VLC.:
rtsp://<ip>/user=admin_password=<8 char password>_channel=1_stream=1.sdp?real_stream
I've tried everything I can think of to get this working, and am close to giving up on getting motion detection working on the assumption that I have a camera with a flaky or incomplete implementation of the Onvif standard. Can anyone think of anything else I can try?
PS: Camera is otherwise excellent for less than AU $50
I have the following installed:
- TS-419P II running 4.2.0
- Surveillance Station 5.1.0.4
- Cheap Onvif RTSP IP cam (Jooan JA-703KRA-t)
The support on this forum has been instrumental in the success I've had so far. With your guidance I have the camera installed and largely working in SS with the following setup:
- Camera configured as "Onvif ProfileS Cameras"
- Scheduled recording is enabled and works fine
- Alarm Recording options are enabled and I have both the "Traditional Mode" alarm recording enabled and recording and buzzer actions set up in "Advanced Mode"
- QMon works well for live viewing, manual recording and viewing of recorded video
- Android Vmobile works well for live viewing and viewing of recorded video
So far so good. Whilst a bit dodgy and a lot confusing, the software that came with the Jooan camera has allowed me to set region based motion detecting on the camera itself and the vendor supplied software shows motion events in its log. However SS does not appear to receive these events. I have attempted to set up the FTP method (as described in this forum) but it doesn't seem to work either. This may be an issue with the camera as I could not get it to write a screenshot to a "real" FTP location.
In order to do some troubleshooting I downloaded Onvif Device Manager which found the camera automatically and listed it as an Onvif 2.4 (on one screen, 2.04 on another) device. ODM also receives motion events, so it seems that the camera is broadcasting them correctly. The odd thing with ODM is that it is unable to broadcast a live stream from the camera. The RTSP address it resolves (presumably from the Onvif data on the camera) derives an incorrect password, and, if I update the admin password on the camera to that value, will derive a new one next time I try to connect with ODM. A well-formed RTSP address for the camera (which works in VLC) is:
rtsp://<ip>/user=admin_password=_channel=1_stream=1.sdp
ODM trys to connect with the following path which does not work in ODM or in VLC.:
rtsp://<ip>/user=admin_password=<8 char password>_channel=1_stream=1.sdp?real_stream
I've tried everything I can think of to get this working, and am close to giving up on getting motion detection working on the assumption that I have a camera with a flaky or incomplete implementation of the Onvif standard. Can anyone think of anything else I can try?
PS: Camera is otherwise excellent for less than AU $50
-
- Starting out
- Posts: 14
- Joined: Tue Apr 12, 2016 8:00 pm
Re: Surveillance Station not picking up motion events from Jooan IP Camera
Update:
The connection string that was failing in ODM (rtsp://<ip>/user=admin_password=<8 char password>_channel=1_stream=1.sdp?real_stream) actually does work when SS is disabled. So it seems the camera only supports one client at a time (is this a feature of RTSP). So it seems that streaming and motion all work fine in ODM, but only streaming works in SS
The connection string that was failing in ODM (rtsp://<ip>/user=admin_password=<8 char password>_channel=1_stream=1.sdp?real_stream) actually does work when SS is disabled. So it seems the camera only supports one client at a time (is this a feature of RTSP). So it seems that streaming and motion all work fine in ODM, but only streaming works in SS
-
- Experience counts
- Posts: 2415
- Joined: Wed Jan 08, 2014 10:34 pm
Re: Surveillance Station not picking up motion events from Jooan IP Camera
On the variety of cameras I have seen, it's possible to pull multiple RTSP streams to different destinations.
It does sound like there is a limitation in the camera firmware.
ONVIF is as much about discovering and being able to update the camera capabilities and configuration, the video streaming in ODM is done via the RTSP strings the ONVIF dialogues have supplied.
Something that may be worth a short time exp0loring - if the camera motion alerting can trigger an FTP event, with the ability to specify a destination folder, it may be possible to get motion detection in SS working using the SS 'Event notification account'. This is a dummy FTP account that should be able to trigger motion events under ONVIF / ONVIF ProfileS
Search the forum for 'event notification account' and wade through the recursive matches.
It does sound like there is a limitation in the camera firmware.
ONVIF is as much about discovering and being able to update the camera capabilities and configuration, the video streaming in ODM is done via the RTSP strings the ONVIF dialogues have supplied.
Something that may be worth a short time exp0loring - if the camera motion alerting can trigger an FTP event, with the ability to specify a destination folder, it may be possible to get motion detection in SS working using the SS 'Event notification account'. This is a dummy FTP account that should be able to trigger motion events under ONVIF / ONVIF ProfileS
Search the forum for 'event notification account' and wade through the recursive matches.
TS-431+ for storage and media and a bunch of IP cams under Surveillance Station. TVS-473 as files backup and QVR Pro.
-
- Starting out
- Posts: 14
- Joined: Tue Apr 12, 2016 8:00 pm
Re: Surveillance Station not picking up motion events from Jooan IP Camera
Thanks for your reply Alastair. I can access both the HD and SD streams from the camera simultaneously, but that's it so it looks like a "feature" of the camera. I've had a play with the on-camera FTP feature but have no evidence (or confidence) that it is actually working. Wireshark shows no FTP activity on my network when FTP is enabled on the camera for motion capture and ODM is showing motion events being broadcast.
Oh well. I can settle for full time recording or purchase another camera - though will have to go back to the finance committee for that one
Oh well. I can settle for full time recording or purchase another camera - though will have to go back to the finance committee for that one
-
- Starting out
- Posts: 14
- Joined: Tue Apr 12, 2016 8:00 pm
Re: Surveillance Station not picking up motion events from Jooan IP Camera
I re-tested the FTP function of the camera (I had not switched port mirroring on ). The good news is that I was wrong - the camera is doing exactly as expected. See below for a Wireshark dump of a motion event (192.168.100.250 is the QNAP and 192.168.100.15 is the camera).
Given that ODM indicates event broadcasting seems to happen on event detection and it also looks like the FTP option also works, should I be raising a ticket with the QNAP helpdesk?
Given that ODM indicates event broadcasting seems to happen on event detection and it also looks like the FTP option also works, should I be raising a ticket with the QNAP helpdesk?
Code: Select all
No. Time Source Destination Protocol Length Info
2163 16.822312000 192.168.100.250 192.168.100.15 FTP 135 Response: 220 NASFTPD Turbo station 1.3.5a Server (ProFTPD) [192.168.100.250]
2352 17.338070000 192.168.100.15 192.168.100.250 FTP 88 Request: USER _nvrevtrpt00000
2354 17.375025000 192.168.100.250 192.168.100.15 FTP 110 Response: 331 Password required for _nvrevtrpt00000.
2538 17.887524000 192.168.100.15 192.168.100.250 FTP 81 Request: PASS xxxxxxxx
2633 18.164926000 192.168.100.250 192.168.100.15 FTP 103 Response: 230 User _nvrevtrpt00000 logged in.
2781 18.677133000 192.168.100.15 192.168.100.250 FTP 71 Request: PWD
2806 18.775041000 192.168.100.250 192.168.100.15 FTP 99 Response: 257 "" is the current directory
2938 19.286815000 192.168.100.15 192.168.100.250 FTP 72 Request: CWD
2940 19.287265000 192.168.100.250 192.168.100.15 FTP 95 Response: 250 CWD command successful.
3098 19.797093000 192.168.100.15 192.168.100.250 FTP 131 Request: CWD event00000001/192.168.100.15_001214196f3e/2016-04-27/01/pic
3099 19.797602000 192.168.100.250 192.168.100.15 FTP 95 Response: 250 CWD command successful.
3240 20.307700000 192.168.100.15 192.168.100.250 FTP 87 Request: size 2152173208.jpg
3241 20.308123000 192.168.100.250 192.168.100.15 FTP 86 Response: 550 FILE not exist
3374 20.817348000 192.168.100.15 192.168.100.250 FTP 74 Request: TYPE I
3394 20.915058000 192.168.100.250 192.168.100.15 FTP 85 Response: 200 Type set to I
3531 21.432222000 192.168.100.15 192.168.100.250 FTP 72 Request: PASV
3551 21.526045000 192.168.100.250 192.168.100.15 FTP 119 Response: 227 Entering Passive Mode (192,168,100,250,219,58).
3700 22.038629000 192.168.100.15 192.168.100.250 FTP 87 Request: appe 2152173208.jpg
3701 22.039063000 192.168.100.250 192.168.100.15 FTP 117 Response: 550 Event Notificaton Only!(cmd APPE not allowed)
3705 22.044392000 192.168.100.15 192.168.100.250 FTP 72 Request: QUIT
-
- Experience counts
- Posts: 2415
- Joined: Wed Jan 08, 2014 10:34 pm
Re: Surveillance Station not picking up motion events from Jooan IP Camera
Interesting! You managed to plough your way though the cryptic search results, well done!
"Response: 550 Event Notificaton Only!(cmd APPE not allowed)"
That network capture shows that the FTP notification method is almost working - the login to the dummy account for channel 1 works OK, and the CWD to the dummy folder that indicates the event type (the 1 on the end says motion) works OK.
And then the camera tries the file upload, which the NAS objects to.
Given that most camera FTP notifications include a file upload - I wonder how the NAS normally deals with that?
But check the Surveillance Station logs to see if you really did get a motion detection event.
And if nothing there, it would certainly be worth raising a HelpDesk ticket to find out why the ONVIF event notification isn't working as it should.
"Response: 550 Event Notificaton Only!(cmd APPE not allowed)"
That network capture shows that the FTP notification method is almost working - the login to the dummy account for channel 1 works OK, and the CWD to the dummy folder that indicates the event type (the 1 on the end says motion) works OK.
And then the camera tries the file upload, which the NAS objects to.
Given that most camera FTP notifications include a file upload - I wonder how the NAS normally deals with that?
But check the Surveillance Station logs to see if you really did get a motion detection event.
And if nothing there, it would certainly be worth raising a HelpDesk ticket to find out why the ONVIF event notification isn't working as it should.
TS-431+ for storage and media and a bunch of IP cams under Surveillance Station. TVS-473 as files backup and QVR Pro.
-
- Starting out
- Posts: 14
- Joined: Tue Apr 12, 2016 8:00 pm
Re: Surveillance Station not picking up motion events from Jooan IP Camera
Thanks Alastair, you've had to give out the same advice a lot of times! It must be like having a global family of surly teenagers - "I've told you before - event notification account!!!!". A pity someone can't sticky the post with the instructions at the top of this section of the forum.
I've checked and there is nothing in the logs. I'll go ahead and raise a ticket. Thanks for your help.
I've checked and there is nothing in the logs. I'll go ahead and raise a ticket. Thanks for your help.
-
- Experience counts
- Posts: 2415
- Joined: Wed Jan 08, 2014 10:34 pm
Re: Surveillance Station not picking up motion events from Jooan IP Camera
If you haven't already done so - you could usefully reference this thread, it has useful background info, especially from your network capture.
The 'event notification account' isn't documented. Even when it's automatically configured in the cameras that use it by SS, I suspect most people will have no idea that it's a feature.
The 'event notification account' isn't documented. Even when it's automatically configured in the cameras that use it by SS, I suspect most people will have no idea that it's a feature.
TS-431+ for storage and media and a bunch of IP cams under Surveillance Station. TVS-473 as files backup and QVR Pro.
-
- Starting out
- Posts: 14
- Joined: Tue Apr 12, 2016 8:00 pm
Re: Surveillance Station not picking up motion events from Jooan IP Camera
I will do so, Alastair.
In the meantime I have implemented a hack using a python based file watcher (https://github.com/splitbrain/Watcher) on a Raspberry Pi which uses cURL to execute a user defined event recording action whenever the camera writes a motion detection image to the RPi. It works quite well when viewing the events through the SS logs or QVR monitor app.
Basically I have:
- installed an FTP server on my Raspberry Pi
- updated my camera to FTP an image to the RPi when motion is detected
- created a user defined event in SS to execute a record action
- written a shell script to use cURL to send a user defined event to the QNAP
- installed and configured watcher.py to monitor the inbound FTP directory and execute the cURL script when a new file is written.
In fact, for my use case this might be a preferable model for executing motion capture, as my wife would like to disable motion capture on the interior cameras when people are home during the day. It will be easier to integrate this with my home-brew RPi based home automation setup than SS.
If anyone would like more details let me know.
In the meantime I have implemented a hack using a python based file watcher (https://github.com/splitbrain/Watcher) on a Raspberry Pi which uses cURL to execute a user defined event recording action whenever the camera writes a motion detection image to the RPi. It works quite well when viewing the events through the SS logs or QVR monitor app.
Basically I have:
- installed an FTP server on my Raspberry Pi
- updated my camera to FTP an image to the RPi when motion is detected
- created a user defined event in SS to execute a record action
- written a shell script to use cURL to send a user defined event to the QNAP
- installed and configured watcher.py to monitor the inbound FTP directory and execute the cURL script when a new file is written.
In fact, for my use case this might be a preferable model for executing motion capture, as my wife would like to disable motion capture on the interior cameras when people are home during the day. It will be easier to integrate this with my home-brew RPi based home automation setup than SS.
If anyone would like more details let me know.
-
- Experience counts
- Posts: 2415
- Joined: Wed Jan 08, 2014 10:34 pm
Re: Surveillance Station not picking up motion events from Jooan IP Camera
Well that's above and beyond being inventive and creative!
And thanks for sharing the idea.
The Pi is such a versatile building block - it's amazing what people have done with them.
Last year, I started, but didn't fully finish, a small project aimed at learning Python, a program to analyse and exercise rechargeable batteries.
I did struggle quite a bit with the GUI though.
And thanks for sharing the idea.
The Pi is such a versatile building block - it's amazing what people have done with them.
Last year, I started, but didn't fully finish, a small project aimed at learning Python, a program to analyse and exercise rechargeable batteries.
I did struggle quite a bit with the GUI though.
TS-431+ for storage and media and a bunch of IP cams under Surveillance Station. TVS-473 as files backup and QVR Pro.
-
- Starting out
- Posts: 14
- Joined: Tue Apr 12, 2016 8:00 pm
Re: Surveillance Station not picking up motion events from Jooan IP Camera
Just an update on my situation. Tech support has responded to my ticket and I have followed their instructions to ensure SS and the camera are set up properly. Unfortunately there are still no motion detection events in SS. From the context of their advice it looks like they are expecting the FTP method to work rather than the Onvif event method.
I'm hoping someone with an Onvif camera which broadcasts motion events that do work with SS could do me the favor of confirming what data values ODM receives from their camera? See below for a screenshot of the two events my camera broadcasts. It would be interesting to see if my camera provides an appropriate value: i.e. does "IsMotion:true" and "IsMotion:false" comply to the Onvif spec.
I think the upshot of my experience with Jooan cameras (this particular Jooan camera at least) is despite being advertised as Onvif compliant they don't work with SS for motion detection. I'm not complaining - it's fair enough from QNAPs perspective as they provide a list of compatible cameras and this isn't on it - just making a note for anyone else with a Jooan camera or contemplating buying one.
Having said all that, my workaround is working really well, and I would recommend it to anyone else who has a camera which is unable to trigger a motion event in SS but which can FTP an image on a motion event. The Raspberry Pi is not critical to the process (I just use one to log temperature and humidity around my house every 15 mins, so it happened to be a low power computer that is on all the time), you just need a device that can run Python and an FTP server. It sounds like I know even less Python than you, Alastair, as I just cut 'n pasted a script from the internets and configured it to point at the correct FTP directory. I don't know how it works! If I knew more about running custom processes on the QNAP I would run it there as I suspect that the workaround could be easily implemented on the NAS, as it supports FTP and Python.
Cheers
I'm hoping someone with an Onvif camera which broadcasts motion events that do work with SS could do me the favor of confirming what data values ODM receives from their camera? See below for a screenshot of the two events my camera broadcasts. It would be interesting to see if my camera provides an appropriate value: i.e. does "IsMotion:true" and "IsMotion:false" comply to the Onvif spec.
I think the upshot of my experience with Jooan cameras (this particular Jooan camera at least) is despite being advertised as Onvif compliant they don't work with SS for motion detection. I'm not complaining - it's fair enough from QNAPs perspective as they provide a list of compatible cameras and this isn't on it - just making a note for anyone else with a Jooan camera or contemplating buying one.
Having said all that, my workaround is working really well, and I would recommend it to anyone else who has a camera which is unable to trigger a motion event in SS but which can FTP an image on a motion event. The Raspberry Pi is not critical to the process (I just use one to log temperature and humidity around my house every 15 mins, so it happened to be a low power computer that is on all the time), you just need a device that can run Python and an FTP server. It sounds like I know even less Python than you, Alastair, as I just cut 'n pasted a script from the internets and configured it to point at the correct FTP directory. I don't know how it works! If I knew more about running custom processes on the QNAP I would run it there as I suspect that the workaround could be easily implemented on the NAS, as it supports FTP and Python.
Cheers
You do not have the required permissions to view the files attached to this post.
- scottdavidcarter
- Getting the hang of things
- Posts: 85
- Joined: Fri Mar 11, 2016 12:03 am
Re: Surveillance Station not picking up motion events from Jooan IP Camera
I've just now read up on what the Pi can do and noting my background all the way back to DOS and Basic programming, I thought I ought to see if this old dog could learn some new tricks... But after looking thru some of what I would need to learn, I am not sure I have the patience to take an a project like learning a new language. I think I "need" to learn Linux since I am now in this QNAP group, but don't know where to start other than read a Dummies book which I have.AlastairStevenson wrote:Well that's above and beyond being inventive and creative!
And thanks for sharing the idea.
The Pi is such a versatile building block - it's amazing what people have done with them.
Last year, I started, but didn't fully finish, a small project aimed at learning Python, a program to analyse and exercise rechargeable batteries.
I did struggle quite a bit with the GUI though.
Is there a simple way to start in? Wikipedia has me scared off!
Two each QNAP TS-251 with 8GB (Firmware 5.0.1.2277)
- Media/File Server, QVRPro with 7x ReoLink-410 5mp wired security cams, PC & Mac backups
- Media/File Server, QVRPro with 7x ReoLink-410 5mp wired security cams, PC & Mac backups
-
- Starting out
- Posts: 14
- Joined: Tue Apr 12, 2016 8:00 pm
Re: Surveillance Station not picking up motion events from Jooan IP Camera
Hi Scott, despite all the hype (which I think is well deserved), the Raspberry Pi is really no more than a Linux computer which is different to "normal" pc hardware in the following ways:
- its really small
- its cheap to buy
- it consumes very little power so is ideal for always-on use that doesn't require lots of processing power
- it is easy to interface with the physical world due to its hardware (general-purpose input/output pins) and software (lots of community support)
On the downside it effectively runs on a mobile phone CPU so is not particularly powerful compared to a fully fledged computer.
If you have no need for any of the above features, or you need more grunt, then you don't need a RPi to become proficient in Linux. Its easy to re-purpose an old PC or make one of your current PCs dual-boot with a Linux live disk, or use the terminal on your Mac. You could even log into your QNAP through a remote session - though I have found it best to have a completely throw-away environment to learn on so that you don't break an everyday computer when making mistakes.
In my experience the best way to learn this stuff is to take an outcomes-based approach - set a target and work out how to do it. I think Alastairs' idea for learning Python is a great one - both for a useful outcome and as a way of making learning more engaging.
In my case, I started mucking about with Linux when I needed to share a printer on a network (back in the 90's when dot matrix printers plugged into parallel ports). That taught me how to install and configure Linux, create users and install software via the command line. I now run my HTPC, a multi-tuner live TV server, an eBook server (so the family can access their ebooks from any browser - including the Kindle one), the start of an environment control system (currently just logging temperature data from 8 points in the house) all on a variety of Linux devices and now a motion detection event server. And very little of it required programming knowledge, just lots of googling .
So I'd recommend you think of a function you'd like at home and use that to guide your learning.
Cheers
- its really small
- its cheap to buy
- it consumes very little power so is ideal for always-on use that doesn't require lots of processing power
- it is easy to interface with the physical world due to its hardware (general-purpose input/output pins) and software (lots of community support)
On the downside it effectively runs on a mobile phone CPU so is not particularly powerful compared to a fully fledged computer.
If you have no need for any of the above features, or you need more grunt, then you don't need a RPi to become proficient in Linux. Its easy to re-purpose an old PC or make one of your current PCs dual-boot with a Linux live disk, or use the terminal on your Mac. You could even log into your QNAP through a remote session - though I have found it best to have a completely throw-away environment to learn on so that you don't break an everyday computer when making mistakes.
In my experience the best way to learn this stuff is to take an outcomes-based approach - set a target and work out how to do it. I think Alastairs' idea for learning Python is a great one - both for a useful outcome and as a way of making learning more engaging.
In my case, I started mucking about with Linux when I needed to share a printer on a network (back in the 90's when dot matrix printers plugged into parallel ports). That taught me how to install and configure Linux, create users and install software via the command line. I now run my HTPC, a multi-tuner live TV server, an eBook server (so the family can access their ebooks from any browser - including the Kindle one), the start of an environment control system (currently just logging temperature data from 8 points in the house) all on a variety of Linux devices and now a motion detection event server. And very little of it required programming knowledge, just lots of googling .
So I'd recommend you think of a function you'd like at home and use that to guide your learning.
Cheers
-
- Experience counts
- Posts: 2415
- Joined: Wed Jan 08, 2014 10:34 pm
Re: Surveillance Station not picking up motion events from Jooan IP Camera
That's really helpful - thanks for sharing your experience and thoughts and encouragement.
On performance - the new version of the Pi is no slouch, it matches both of my QNAP NAS boxes, and Hikvision NVRs.
On performance - the new version of the Pi is no slouch, it matches both of my QNAP NAS boxes, and Hikvision NVRs.
TS-431+ for storage and media and a bunch of IP cams under Surveillance Station. TVS-473 as files backup and QVR Pro.
- scottdavidcarter
- Getting the hang of things
- Posts: 85
- Joined: Fri Mar 11, 2016 12:03 am
Re: Surveillance Station not picking up motion events from Jooan IP Camera
Great info. OK, I'm not too scared any more! Since I got my 251 I have developed 2 goals. 1) get my Nas and 3 cameras working recording motion alarms and 2) to add a Vera automation unit to expand on the security aspects like triggering a wireless siren if a certain motion event happens at one of my gates. If I can get there, I think it will expand on it's own.
S
S
Two each QNAP TS-251 with 8GB (Firmware 5.0.1.2277)
- Media/File Server, QVRPro with 7x ReoLink-410 5mp wired security cams, PC & Mac backups
- Media/File Server, QVRPro with 7x ReoLink-410 5mp wired security cams, PC & Mac backups