Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This tutorial explains how to set up a simple Car Counter project from scratch and get occupancy data via REST API.

...

  • configuration of entrances, exits, transitions

  • configuration of groups capacity

  • setting up current group occupancy

Note

Temporary all operations described above can be done only by Nwave Team. Please, contact us if you need to complete car counter parking project registrationPlease note that full car counters support is currently under construction. Nwave currently offers user support for configuring car counters only for single-group zones. If you have the need to split a zone into multiple groups or use car counters to obtain occupancy information for each floor in a multi-level car parking facility, we kindly request that you reach out to Nwave Support for further assistance.

Nwave is committed to providing comprehensive support and solutions to meet your specific requirements.

Configuration of entrances, exists, transitions and group capacity is a one-off operation in most cases. You should provide us with information in the format presented below:

...

Also, we can correct current group occupancy operatively if you notify us about your need for this action at least 24h before.

Configuration using parking analytics site

The parking analytics site provides an interface for simple configuration of car counter zone capacity and occupancy. If the zone contains more than one car counter group, you should configure each group using API. Configuration using API is described in the next chapter.

Preliminary steps

Before setting up your car counter zone occupancy and capacity you should follow a few steps:

  1. Go to site analytics.nwave.io

  2. Click on the main menu button

    Image Added

  3. Select the Car Counter page

    Image Added

  4. Open the FILTERS panel

    Image Added

  5. Select Project and Zone to be configured and press button SAVE

    Image Added

Capacity configuration

After doing the preliminary steps, you are able to set up the capacity of your car counter zone. To do that, you need to click on the pen icon on the right of “CAPACITY”:

...

Fill in the capacity value and press the button SAVE:

...

Now you can see, that capacity is successfully set

...

Occupancy configuration

After doing the preliminary steps, you can set up the capacity of your car counter zone. To do that, you need to click on the pen icon on the right of “OCCUPANCY”:

...

If you are going to set the current occupancy, it is enough to fill in the occupancy value and press the button SAVE

...

If you noticed that occupancy has been changed after counting or you want to correct occupancy in the past, you can choose the time of occupancy correction:

  1. Fill in the occupancy value

  2. Enable occupancy correction in the past

  3. Select the date and time of occupancy counting
    Please, select the date and time carefully. Corrections for the time earlier than the last made correction are prohibited.

  4. Press the button SAVE

...

Check occupancy changes applied

...

Configuration using API

Capacity Configuration

Capacity can be configured only for groups. You should go to the page of the group you created earlier and find the group ID

...

Code Block
languagebash
curl --location --request GET 'https://api.nwave.io/car_counters/v1/group/1234/capacity' --header 'X-Auth-Token: XXXXXXXXXXX'
Code Block
languagebash
curl --location --request PUT 'https://api.nwave.io/car_counters/v1/group/1234/capacity' --header 'X-Auth-Token: XXXXXXXXXXX' --header 'Content-Type: application/json' --data-raw '{"capacity":99}'

Occupancy Correction

Occupancy correction is needed periodically or after technical maintenance. The Nwave cloud calculates occupancy for all levels of the hierarchy based on group occupancy, so all occupancy correction operations are possible only with groups.

...

Code Block
languagebash
curl --location --request GET 'https://api.nwave.io/car_counters/v1/group/1234/occupancy' --header 'X-Auth-Token: XXXXXXXXXXX'
Code Block
languagebash
curl --location --request PUT 'https://api.nwave.io/car_counters/v1/group/2923/occupancy' --header 'X-Auth-Token: XXXXXXXXXXX' --header 'Content-Type: application/json' --data-raw '{"occupied":3}'

Entrances and Exits Configuration

You have to mark a position by label IN or OUT to make it entrance or exit for car counter group.

  1. Go to a car counter group page

  2. Click on the tab POSITIONS

    Image Added
  3. Click on Device ID positioned on Exit

    Image Added
  4. Click on “EDIT LABELS”

    Image Added
  5. Mark label OUT in the list and press the button SAVE

    Image Added

Done, the position is configured as the exit from the group. Now repeat the same actions with device 1FD02 and set the label IN for setting it as the entrance to the group.

Manual Testing

Virtual Car Counters

...

The next step is getting data. You can read about API here: https://nwaveio.atlassian.net/wiki/spaces/ND/pages/30180966573125968913/Car+Counters#AnalyticsCounters+Analytics+API#Realtime-Occupancy-Summary-API

In this tutorial, we show only how to get the zone’s current occupancy. Use the following snippet. You should replace zone_id and X-Auth-Token values before running.

...

🎆 Done! You have just created Car Counters Parking Project and got data about its occupancy. You can find more data about analytics API features on the special documentation page