Hikvision developed ANPR plugin based on MIP SDK. After sql is full of recognised plates, we can't search the plate data from database of Milestone(which we could before). Also we can't receive alarm which we could before.

We have a project in Korea, after internal analysis, we think the issue may be caused by Milestone side.

There are two problems. First, we can’t receive real-time alarm on developed tab(which insert on Smart Client ourselves), because the plated is full of limited sql database of Milestone(about 10G). Second, we can’t search data.

We know Milestone provide about 10G database for free, if we need more storage, we should buy service from Milestone. The issue is when the 10g database if full of plate, wired problems happened.

The database is full now, then we can search nothing by API of MIP SDK.

The following are the details about MIP SDK development, hope it will be helpful, if further details needed, we are pleased to provide.

Also if remote access needed, we will try to provide.

1.We can’t receive, because the database is bigger than 10G.

We found there are two alarm information on Milestone original tab.

2. We can’t search history, because we get 0 after call corresponding API of MIP SDK. The following is the log.

The following is the code which used corresponding API:

code1

​Hi Fisher,

When the SQL database reaches maximum capacity, SQL queries begin to fail. It’s a bit like allowing your C: drive in Windows to fill completely. Eventually the OS becomes unstable. In this case, the Management Server is going to be unstable and I’m sure this isn’t the only thing failing on this installation right now.

Unless you are observing that Milestone is not freeing up space in the database when events reach the configured retention time, this sounds less like a bug and more like this system will need to have the SQL server upgraded to SQL Standard. SQL Express is ​included with the product, but Microsoft limit it to serving databases up to 10GB in size.

Since​ is probably not an SDK question/bug, I recommend you work with our technical support team if you need more assistance resolving this.

Cheers,

Josh​

Hi Milestone team,

We are still following this

case, now there is a new bug, we can’t get plate number data from Milestone

database via MIP API, but we are sure we can see plate number recognition alarm

on Milestone original tab “Alarm Manager”, I will show you the

details:

API of MIP and print log is here:

                             EventLine\[\] eventsAll = alarmClient._GetEventLines_(0, _Int32_._MaxValue_, new _VideoOS_._Platform_._Proxy_._Alarm_._EventFilter_()

                       {

                           _Conditions_ = new _Condition_\[\] {

                             new _Condition_() { _Operator_ = _Operator_._BeginsWith_, _Target_ = _Target_._Message_, _Value_ = "ANPR\_" },

                            new _Condition_() { _Operator_ = _Operator_._GreaterThan_, _Target_ = _Target_._Timestamp_, _Value_ = startTime1 },

                            new _Condition_() { _Operator_ = _Operator_._LessThan_, _Target_ = _Target_._Timestamp_, _Value_ = endTime1 }},

                           _Orders_ = new _OrderBy_\[\] { new _OrderBy_() { _Order_ = _Order_._Descending_, _Target_ = _Target_._Timestamp_ } }

                       });

                       _EnvironmentManager_._Instance_._Log_(false, "ANPR\_", "Start: " + startTime1 + "End: " + endTime1 + "Ret: " + eventsAll._Count_(), null);

 From the print log: we can see data of 5th August is empty, no date return from server. But in fact, we can see many alarms on Milestone original tab “Alarm Manager” in 5th August.

(picture 1)

At present, the missing data including (after 6:36:40 of 6th August), and all data before 6th August.

Above all, there is data in Milestone database, but we can’t search part data via MIP API.

picture 2: Hikvision plugin tab, data missing)

(picture3: Milestone original tab “Alarm Manager”, data exist)

Could you please tell me the possible reasons? Thank you!

(Please note: we confirmed Milestone database is not full)

Hi.

You are using GetEventLines. This means you are not reading alarms but events. Events will per default have a shorter retention. So maybe instead you should use GetAlarmLines (also VideoOS.Platform.Proxy.Alarm.AlarmFilter.)

Because Alarm per default has a retention of 30 days but Event one day.

If you can’t see the picture from last one, please check the following.

picture1: print log

picture2: Hikvision plugin tab

picture3: Milestone original tab “Alarm Maneger”

Sorry, one point should be clarified is: end user bought sql server to expand database. Also, we found similar bug before 10G limitation arrived.

Any update about the issue? If needed, we can provide remote access(teamviewer), thx.

We have new question: When acquire data from database, we should input filter, if we use the following filter: EventLine[] eventsAll = alarmClient.GetEventLines(0, Int32.MaxValue, new VideoOS.Platform.Proxy.Alarm.EventFilter()

                       {

                           _Conditions_ = new _Condition_\[\] {

                                 new _Condition_() { _Operator_ = _Operator_._BeginsWith_, _Target_ = _Target_._Message_, _Value_ = "ANPR\_"}},

                           _Orders_ = new _OrderBy_\[\] { new _OrderBy_() { _Order_ = _Order_._Descending_, _Target_ = _Target_._Timestamp_ } }

                       });

In theory, Milestone should return ANPR_xxx (xxx means suffix). But in fact we get ANPR Started,ANPR Stoped… You can see it from the following screenshot.screenshot

Could you please have a look on this issue. Our plugin is sold on customer’s side, but bug happen only on few customers’ environment, thx.

1.According to customer’s application scenario, we can’t use only GetAlarmLines.

In my opinion, GetEventLines can help to search alarm+event(for example, if my filter is ANPR_Nomatch, then the return data is alarm & event with the same name). If i use GetAlarmLines alone, then i can only search alarm.

I want to know if i misunderstand it or not, thx.

2.If i didn’t misunderstand the point 1 above. If i use GetEventLines, i should be able to get corresponding alarm with the same name.

According to the site in Korea, it’s not about 1 day & 30 days limitation.

For example, we can’t get events on 5th August, we couldn’t get it on 6th August.

On 8th August, we could get events of 6th & 7th of August.Still can’t get event of 5th August.

3.Our filter is start with “ANPR_”, should return event start with “ANPR_”.

  1. Events and Alarms have different retention setup. When you use alarm display in the Smart Client it does not say whether there is still an event. You can get the Smart Client to show events instead. Create a view with the Alarm List, in setup mode change the Properties -Data Source to Events.

  1. I suspect that the system (Event Server) have been down on the days when there are no events. The Event Server logs might tell you if it was down or something else happened.
  2. I might suspect that underscore is not correctly applied in the filter. Please test this theory by replacing “ANPR_” with “ANPRx” in your setup. Let me know what you find.

Thank you for your support. There are some points we want to clarify:

1.In our real scenario, all of them are alarm, not event.

2.We were using “ANPR_” not “ANPRx”(my mistake when writing). Milestone server return ”ANPR Stoped“ which is not we expected.

3.We can see alarms on “Alarm Manager” of smart client, which means event server is fine all the time.

Seems communication is a bit hard now. If teamviewer needed, we can arrange it.

Troubleshooting is hard by words communication, maybe we can show you the real environment.

We would like to make your situation and questions clear.

First, can you please create Support case on your MyMilestone login for the investigation? Because we don’t want to expose your teamviewer ID and password in public.

Second, can you please test by replacing “ANPR_” with “ANPRx” in your setup? And after the test, please let us know what you find.

Finally, We are wondering if you want to see old alarms that was registered when your database not working or new alarms while the database has been working. Please let us know.

Hi,

the underscore character in “ANPR_” is interpreted as a wildcard by the data store engine. Therefore, querying for “ANPR_” returns the same value as querying for “ANPR”.

You can use the wildcard pattern matching characters as literal characters. To use a wildcard character as a literal character, enclose the wildcard character in brackets. The table shows several examples of using the LIKE keyword and the [ ] wildcard characters.

So for this particular case the pattern used should be “ANPR[_]”.

Do not hesitate to get back for further questions.

Cheers.