Knowledge Base Article
Article Type: How To
Product: Embedded People Counter
Product Version: 2.0
Component: SDK
Device Brands:
Created: 10-Oct-2018 10:19:46 AM
Last Updated:

Collect data remotely from Senstar People Counter

You can use Wget and HTTP requests to collect counter data from the Senstar People Counter.

wget http://camera_ip/local/VE170/rep.csv?query

Where camera_ip is the IP address of the camera and query is the list of parameters that define the time from which to collect counter data.

The query follows the standard rules for HTTP queries and supports the following fields:

  • StartYear
  • EndYear
  • StartMonth
  • EndMonth
  • StartDay
  • EndDay
  • StartHour
  • EndHour
  • DetailLevel

All date and time field values are inclusive. For example, StartDay=2&EndDay=4 includes days 2, 3, and 4. The month field values use 1 to 12 (January =1, February =2, ..., and December =12). The hour field values use 0 to 23 (12 AM = 0, 1 AM = 1, ..., and 11 PM = 23).

The DetailLevel field values use the following values:

  • S - The detail level is minutes
  • H - The detail level is hours
  • D - The detail level is days
  • M - The detail level is months
  • Y - The detail level is years

Sample script

@rem Pull counter data from the Embedded People Counter

@if "%1" == "" goto LbUsage

@set VE170_IP=%1

@if "%2" == "" goto LbUsage

@set VE170_User=%2

@if "%3" == "" goto LbUsage

@set VE170_Pass=%3

@if "%4" == "" goto LbUsage

@set VE170_Year=%4

@if "%5" == "" goto LbUsage

@set VE170_MonthStart=%5

@if "%6" == "" goto LbUsage

@set VE170_MonthEnd=%6

@if "%7" == "" goto LbUsage

@set VE170_DayStart=%7

@if "%8" == "" goto LbUsage

@set VE170_DayEnd=%8

@if "%9" == "" goto LbUsage

@set VE170_HourStart=%9

@shift

@if "%9" == "" goto LbUsage

@set VE170_HourEnd=%9

@shift

@if "%9" == "" goto LbUsage

@set VE170_DetailLevel=%9

@shift

@if %9 == "" goto LbUsage

@set VE170_OutCSV=%9

@rem Initialize some more vars

@set VE170_OutLog=PullData.log

@rem Put together the HTTP request URL

@set

VE170_URL="http://%VE170_IP%/local/VE170/rep.csv?StartYear=%VE170_Year%&EndYear=%VE170_Year%&StartMonth=%VE170_MonthStart%&EndMonth=%VE170_MonthEnd%&StartDay=%VE170_DayStart%&EndDay=%VE170_DayEnd%&StartHour=%VE170_HourStart%&EndHour=%VE170_HourEnd%&DetailLevel=%VE170_DetailLevel%"

@echo.

@echo Download data from the Aimetis Embedded People Counter

@echo Camera IP: %VE170_IP%

@echo Start date-time:%VE170_Year%-%VE170_MonthStart%-%VE170_DayStart%-%VE170_HourStart%:00

@echo End date-time:%VE170_Year%-%VE170_MonthEnd%-%VE170_DayEnd%-%VE170_HourEnd%:00

@echo Detail level: %VE170_DetailLevel%

@echo file: %VE170_OutCSV%

@echo.

@rem Send request to the camera

@wget --http-user=%VE170_User% --http-passwd=%VE170_Pass% --output-document=%VE170_OutCSV% --append-output=%VE170_OutLog%%VE170_URL%

@rem Check result

@if errorlevel 1 goto LbFailed

@echo.

@echo Download Successful; Counter data downloaded to %VE170_OutCSV%

@echo.

@goto LbEnd

:LbFailed

@echo.

@echo Download FAILED; please check %VE170_OutLog%

@echo.

@goto LbEnd

:LbUsage

@echo.

@echo Usage:

@echo.

@echo PullData CamIP User Password Year MonthStart MonthEnd DayStart DayEnd HourStart HourEnd DetailLevel OutputCSV@rem % 1 %2 %3 %4 %5 %6 %7 %8 %9 %10 %11 %12

@echo.

@goto LbEnd

:LbEnd

To extract data from 11 November 2015 at 11 AM to 11 November 2015 2015 at 2 PM with minute resolution, type the following command:

PullData 192.168.1.10 user pass 2015 11 11 11 11 11 14 S "2015-11-11 11am-2pm.csv"

 

Average rating:
Please log in to rate.
Rated by 0, Viewed by 1264