Subscriber Discussion

## CHALLENGE OF THE WEEK ## - Set Up An Axis PTZ To Run Events

UI
Undisclosed Integrator #1
Dec 01, 2015

Each week at IPVM we will be featuring a short challenge for members! The challenge will be based on a topic that is outside of the skill level of regular manufacturer Tier 2 technical support. Can you solve the challenge??

This week's challenge is : Set up an Axis PTZ camera to do the following :

1. Reposition the camera using a PTZ preset.

2. Wait one minute, then take a snapshot and upload it to an FTP site.

3. Wait one minute, reposition the camera to a different PTZ preset

4. Wait one minute, take another snapshot and upload it to the same FTP site (different folder)

Requirements :

1. Event must run each day of the week except Sundays. (ie - taking two snapshots per day)

2. Snapshots must always be in the exact same position so that a time-lapse video could be created.

*** This sounds simple enough, yes? Axis Tier 2 technical support has been unable to produce this working or troubleshoot a non-working setup for over 3 months now, despite repeated calls to various levels of support including corporate trainers during Axis Certified Professional training. The real sticking point is #2 - Snapshots in the same position.

*** Keep track of the time you spend on this from starting to the point where you truly have it working.

*** Bonus points - explain when and why you would use "Recurrence" vs "Schedule" and why one should matter over the other.

*** Double bonus points - Explain how "while rule is active", "pre" and "post" apply to taking a snapshot, and what the "X times per X" setting makes any sense for taking a snapshot, and what you think "Send only X images" means and why it doesn't really work.

*** Triple bonus points - Write an explanation of why you think Axis has decided to make something that should be so, so simple to be so convoluted and confusing to the extreme that even their own technical support can't explain it or even figure it out for that matter.

*** This is not an actual IPVM feature, but actually a frustrated last-ditch effort to get something working after Axis technical support has failed again and again and again and again. :)

**** If you suggest that a firmware update might fix this problem, congratulations, Axis would like to hire you for Tier 3 tech support!

(6)
U
Undisclosed #2
Dec 01, 2015
IPVMU Certified

Can you explain more about what the problem is with getting the snapshots in the same location?

Do you mean they are just slightly off, or off by a lot or on the wrong preset altogether?

Can we use VAPIX directly?

UI
Undisclosed Integrator #1
Dec 01, 2015
You would think having an action rule that moves to a preset position that each snapshot would be the same position. Ie pretend you're trying to make a time lapse video. But the camera position is never in the same place with no explanation as to why. The site is closed and this happens after hours so nobody is using the camera. Using vapix directly would add a lot of complexity, ie now it's dependant on another computer somewhere being online and having remote access to send commands to the camera. We would prefer to simply use the cameras own action rules to accomplish this seemingly simple set of tasks.
U
Undisclosed #2
Dec 01, 2015
IPVMU Certified

Using vapix directly would add a lot of complexity, ie now it's dependant on another computer somewhere being online and having remote access to send commands to the camera.

Not the way I roll. I would just schedule and run it on the camera. Give me a call if you reset to factory defaults...

But the camera position is never in the same place with no explanation as to why.

Ok, but what happens when you use the interface interactively and go back and forth between presets, is it dead on?

And when you say it's off, is it off enough that it just ruins the time lapse effect or is off enough that someone using the preset in general would notice and care about?

U
Undisclosed #2
Dec 02, 2015
IPVMU Certified

The site is closed and this happens after hours so nobody is using the camera.

Plus assumedly you have the video of the PTZ moving to the preset at the designated time. So does it just miss?

UI
Undisclosed Integrator #1
Dec 02, 2015

Yes, here is the exact setup :

Action Rules

1. Go to PS1 at 12:30
Trigger : Time, Recurrence, Daily
Schedule : Go to PS1 at 12:30
Type : PTZ Control
Control : Preset position
Go to : Time Lapse 1
not checked
2. Take Shot1 at 12:31
Trigger : Time, Recurrence, Daily
Schedule : Take Shot1 at 12:31
Type : Send Images
Stream Profile : JPEG
Image frequency : 1 frame per second
Pre : not checked
While Rule is Active : not checked
Post : not checked
Send only the first 1 image
Recipient : xxxx.dnsalias.com2
Create Folder : Time_Lapse_Preset_1
Base File Name : P1_%Y-%m-%d_%H-%M-%S.jpg
Overwrite/Use Own Format
3. Go to PS2 at 12:32
Trigger : Time, Recurrence, Daily
Schedule : Go to PS2 at 12:32
Type : PTZ Control
Control : Preset position
Go to : Time Lapse 2
not checked
4. Take Shot2 at 12:33
Trigger : Time, Recurrence, Daily
Schedule : Take Shot2 at 12:33
Type : Send Images
Stream Profile : JPEG
Image frequency : 1 frame per second
Pre : not checked
While Rule is Active : not checked
Post : not checked
Send only the first 1 image
Recipient : xxxx.dnsalias.com2
Create Folder : Time_Lapse_Preset_2
Base File Name : P2_%Y-%m-%d_%H-%M-%S.jpg
Overwrite/Use Own Format
5. Go to PS3 at 12:34
Trigger : Time, Recurrence, Daily
Schedule : Go to PS3 at 12:34
Type : PTZ Control
Control : Preset position
Go to : Time Lapse 3
not checked
4. Take Shot3 at 12:35
Trigger : Time, Recurrence, Daily
Schedule : Take Shot3 at 12:35
Type : Send Images
Stream Profile : JPEG
Image frequency : 1 frame per second
Pre : not checked
While Rule is Active : not checked
Post : not checked
Send only the first 1 image
Recipient : xxxx.dnsalias.com2
Create Folder : Time_Lapse_Preset_3
Base File Name : P3_%Y-%m-%d_%H-%M-%S.jpg
Overwrite/Use Own Format
#####
Using the above, DOES NOT WORK AT ALL. No events occur, nothing is triggered. Yes, restarted camera, yes unchecked and rechecked rule, yes upgraded firmware.
Tried doing all the above with Trigger : Time, Schedule instead of Trigger : Time, Recurrence, Schedul but it doesn't guarantee that the camera is in the same position each time. Absolutely maddening. Hours and hours spent on this both on my own and with Axis tech support. Axis tech support has no clue. I swear it's just buggy software. Axis's own most recent firmware upgrade cites "improved reliability with events" so they must be trying to fix these bugs.
Getting harder and harder to justify the price tag on Axis PTZ cameras when HIKVision is 1/3 the price and actually works.
U
Undisclosed #2
Dec 03, 2015
IPVMU Certified

Ok, here's my solution. It's only tested as far as one can without an actual Axis PTZ and ftp server. For simplicity and brevity I am just showing one cameras snapshot.

Create a new schedule #1, weekly style, start time Monday at 12:30 AM, end time Saturday 12:31 AM.

Create a daily reccurance item, to run once a day when triggered by action below.

Create another schedule #2, daily style, start time 12:30 AM, end time 12:40 AM

Create an action rule that will trigger on Time, Daily Reccurance on Weekly schedule #1 with action of Move PTZ to preset.

Create another action rule that triggers on PTZ Preset Reached and Daily Schedule, no recurrence. Action take snapshot and ftp snapshot to recipient. No pre, no post, no rule remain active. Send first only.

Can't test the PTZ stuff but the events seem to work. Let me know what happens when you try it.

*** Keep track of the time you spend on this from starting to the point where you truly have it working.

< 1hr so far (excluding this email)

***Bonus points - explain when and why you would use "Recurrence" vs "Schedule" and why one should matter over the other.

I believe that theoretically one could do every thing with Schedule alone, but it would become an absolute chore to have to put in a schedule for every minute of the day, for instance.

Reccurance just simplifies the event triggering based on interval. So it depends on the use case. Recording continuous video is probably best with schedule, snapshots every second might be better served by Reccurance. In this case, I'm using both.

***Double bonus points - Explain how "while rule is active", "pre" and "post" apply to taking a snapshot, and what the "X times per X" setting makes any sense for taking a snapshot, and what you think "Send only X images" means and why it doesn't really work.

'While Rule is active' refers to what happens when you have specified a post time in a image capture action. If it's checked and the same event gets triggered again during the post time, it will extend the post time, if it's not checked it will end normally.

Pre and post time refer to snapshots taken before and after the trigger. Typically you would use the pre time when motion is detected to get a few snaps of what happened right before the motion became big enough to trigger.

X times per X means at what frame rate should the snapshots be captured. In this case we only want one snap so it shouldn't matter.

'Send only X images' allows you to set a max number of snapshots to ftp regardless of pre and post processing and frame rate considerations. In our case we want just one.

*** Triple bonus points - Write an explanation of why you think Axis has decided to make something that should be so, so simple to be so convoluted and confusing to the extreme that even their own technical support can't explain it or even figure it out for that matter.

The reason that these type of features inevitably end up convoluted is simply because they are initially written for a specific purpose, e.g. Motion Detection. Over time people request various extensions to allow them to do more conditional processing. They add these in one by one without much thought.

Before you know it they have some sort of home grown scheduler/event processor built, with its own peculiar, if powerful, syntax. At that point they might consider overhauling the whole deal from scratch, but it turns out that the people who really know it, love it and so rather than alienate the power users they opt to confuse the new users.

*** This is not an actual IPVM feature, but actually a frustrated last-ditch effort to get something working after Axis technical support has failed again and again and again and again. :)

Now you tell me!

**** If you suggest that a firmware update might fix this problem, congratulations, Axis would like to hire you for Tier 3 tech support!

Actually this IS the kind of thing that would get fixed in firmware updates. Something where the camera is working fine and you go to use a feature you have never tried before and it doesn't work in the old firmware. That said, I didn't find any bugs on my non-PTZ Axis 5.62 firmware camera.

(2)
UI
Undisclosed Integrator #1
Dec 03, 2015

Thanks for the huge effort, but this doesn't work at all. I went meticulously through the steps to create the action rules and schedules exactly as you described and even added two more preset locations and times. The PTZ preset does not move at the scheduled time and the event to upload via FTP doesn't run either.

It seems like as soon as you involve Recurrence, events don't work. And according to Axis tech support you absolutely need either the pre, during event active or post, so maybe that explains the failure to upload.

Additional time wasted on ridiculous Axis event system : 45 minutes.

Also, I agree that this whole event system was set up by Axis geared towards Motion Triggered events. I just have to say I find it unbelievably frustrating that even the Axis technical support can't figure out their event system or offer any kind of instructions or assistance. I don't care how complicated something is, there should be documentation that can explain it. So frustrating.

(1)
SS
Scott Sheldrake
Dec 03, 2015

Here is the correct solution - tested and working :

Solution

Step 1. Create 3 PTZ presets :
#1 - Name : Timelapse1
#2 - Name : Timelapse2
#3 - Name : Timelapse3
Step 2. Create 3 schedules.
#1 - name : “at 12:31”, start time :12:31 end time 12:31
#2 - name : "at 12:32", start time : 12:32, en time 12:32
#3 - name : "at 12:33", start time : 12:33, en time 12:33
Step 3 : Create 3 action rules to Move the camera to the 3 Preset Locations each one minute apart.
#1 - Name : Go to PS1
Trigger : Time, Use Schedule "at 12:31"
Actions : Type, PTZ Control
Control : PTZ Position
Go to : Timelapse1
#2 - Name : Go to PS2
Trigger : Time, Use Schedule "at 12:32"
Actions : Type, PTZ Control
Control : PTZ Position
Go to : Timelapse2
#3 - Name : Go to PS3
Trigger : Time, Use Schedule "at 12:33"
Actions : Type, PTZ Control
Control : PTZ Position
Go to : Timelapse3
Step 4 : Create 3 action rules to Take a Snapshot when the PTZ preset location is reached after 3 second safety delay.
#1 - Name : Take Shot1
Trigger : PTZ, Preset Reached, Timelapse1, Preset Reached : YES
Schedule : Always (no schedule)
Actions : Send images
Stream profile : JPEG
Image Frequency : 1 image per second
Post-Trigger Time : 3 seconds
Send only the first 1 image
Recipient : (FTP site selected, make sure it's tested)
Create Folder : (Subfolder you want - ex : Timelape 1 Shots)
Base File Name : PRESET1-%Y-%m-%d_%H-%M-%S.jpg
Overwrite/Use own file format selected
#2 - Name : Take Shot2
Trigger : PTZ, Preset Reached, Timelapse2, Preset Reached : YES
Schedule : Always (no schedule)
Actions : Send images
Stream profile : JPEG
Image Frequency : 1 image per second
Post-Trigger Time : 3 seconds
Send only the first 1 image
Recipient : (FTP site selected, make sure it's tested)
Create Folder : (Subfolder you want - ex : Timelape 1 Shots)
Base File Name : PRESET2-%Y-%m-%d_%H-%M-%S.jpg
Overwrite/Use own file format selected
#3 - Name : Take Shot2
Trigger : PTZ, Preset Reached, Timelapse3, Preset Reached : YES
Schedule : Always (no schedule)
Actions : Send images
Stream profile : JPEG
Image Frequency : 1 image per second
Post-Trigger Time : 3 seconds
Send only the first 1 image
Recipient : (FTP site selected, make sure it's tested)
Create Folder : (Subfolder you want - ex : Timelape 1 Shots)
Base File Name : PRESET3-%Y-%m-%d_%H-%M-%S.jpg
Overwrite/Use own file format selected
####
Works flawlessly.
(1)
TC
Trisha (Chris' wife) Dearing
Dec 06, 2015
IPVMU Certified

Nice job Scott!

Once Undisclosed Integrator #1 can validate your solution, I would expect you can collect your bonus point booty!

U
Undisclosed #2
Dec 03, 2015
IPVMU Certified

Good News! I remembered that Axis lets you setup view areas as digital PTZs. So you can do all the preset stuff and events even on a non mechanical PTZ. Yeah!

And I got an FTP server.

And I put the following rules/schedules as I write above*

Then I ran it and it worked! Here's the moment when the event triggered. (I had to set it up for 01:30 instead of 12:30 because it was too late.) you can see the time flip to 1:30, then the PTZ moves and then the file shows up in the directory.

*One question I have to ask, you said

I went meticulously through the steps to create the action rules and schedules exactly as you described...

Yet that's not quite possible, because unbeknownst to me when I wrote the ftp rule (cuz I didn't have an ftp server then), you HAVE to have either a pre or post time, but I said to use neither.

So when you tried my solution what value did you use?

Maybe that was the problem. In any event you need to make it a post of 1 sec, no other changes.

Fwiw, You might want to see if you can get the recurring stuff working, since the elegant way to do it is by using the Preset Reached trigger.

For three cameras it's even more elegant as you can make a guard tour of the three presets and trigger that to run, and it will trigger the FTP action after every position.

And it only takes 2 rules and 2 schedules, with no waiting. You could even get it down to one schedule by making presets that only your guard tour uses, then you don't need the daily schedule.

if your reccurance still doesn't work, maybe you could export your config and I'll try it here..

(2)
UI
Undisclosed Integrator #1
Dec 03, 2015

Thanks for doing all this work! To answer your question, I was also surprised that Axis didn't popup an error saying that you need to select a Pre or Post. I also wish I had taken a video of myself doing all the setup to prove it. Honestly I think the Axis cameras are just full of logic bugs because a lot of this doesn't make any sense. It's working now, but with much, much pain and suffering. Now the real test - after a week or two will it keep working and not take stills when the camera is moving!

U
Undisclosed #2
Dec 03, 2015
IPVMU Certified

I'm glad it's finally working! I had missed that you started using the Preset Reached trigger. I think that's the way to go. I'm surprised no one at Axis had suggested that one.

I know you don't want to mess with it, but if ever you do, try to make a guard tour of the three presets and you can have just one schedule and one rule.

good luck.

SP
Sean Patton
Dec 04, 2015

Just hold your breath that it doesnt lose power...

(1)
New discussion

Ask questions and get answers to your physical security questions from IPVM team members and fellow subscribers.

Newest discussions