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 by via REST API.

For example and simplicity let’s assume our Car Counter project contains has only one parking zone lot with one entrance and one exit. We will need to create the following object “tree” (hierarchy):

  • Project: Example Project

    • Zone: Example Zone

      • Group: Example Group

        • Position 1: Entrance

        • Position 2: Exit

Table of Contents

Parking Hierarchy registration

...

Go to Settings → Projects page

...

Press (plus) button

...

Enter the new Project Name, Timezone, and press ADD

...

Zone registration

...

Go to Device Management → Zones page

...

Press (plus) button

...

Enter the Zone name, select Project, and press SAVE

...

Group registration

After zone registration, you can see the Zone page. Go to the GROUPS tab

...

Press (plus) button

...

Enter Group Name, select Group Type → Standalone Car Counters, optionally enter Custom ID and press SAVE

...

(thumbs up) You have registered the parking project structure. The next step is device positioning.

Optional: Virtual sensors creating

Since we explaining how to start using Car Counters, we decided, that it would be correct to explain how to start using Car Counters while you do not have Car Counters yetFor API testing purposes it is always easier to start with virtual sensors.

Open Main Menu

...

Go to Device Management → Virtual Devices page

...

Enter Firmware → CC basic UK B1/1.11.5, Number of devices → 2, turn on Active switcherand press ADD.

...

Device positioning

...

Positioning in Splace. Direction configuration in d.nwave.io

Positioning

Sign in https://splace.nwave.io with login and possword password for https://d.nwave.io.

Info

You can use mobile application Splace instead of https://splace.nwave.io

Press the Action button and click on the top button in the dropped-out list

...

On the tab GROUP OF DEVICES select Project, Zone, Group and enter number the number of positioning devices, then press the button SET POSITIONS

...

Locate the central marker on your parking position, then press OK

...

Now you can see green text START POINT in the bottom left. You can just press on OK in the second time to proceed

...

Now you can see that the text FINISH POINT hase became has become green too. Press the OK button to proceed

Info

If you see an error and FINISH POINT still has red color, try to go to the application settings page and disable option “Interval placing”.

...

Enter positioning devices device IDs and press the button CREATE AND BIND. If you followed the instructions in the previous chapter, you should insert the IDs of created virtual devices. If you are positioning real devices, enter their IDs.

...

(thumbs up) You has finished Car Counter hierarhy hierarchy registration if you see the following message

...

Direction configuration

Sign in https://d.nwave.io.

Open the main menu and go to page Device Management → Positions.

Open the filter panel in the right top

...

Select filters by Project/Zone/Group to filter your installed devices

...

Click on the position ID of one of the positioned devices

...

Scroll down the Position page and click on the button “EDIT LABELS”

...

Select the label IN or OUT for position on the entrance or exit from parking.

...

...

Configure labels for all installed devices.

The first counter message after the label configuration will not change zone/group occupancy because it will be interpreted as starting point.

Device positioning and direction configuration in Splace

You can do both actions in the Splace app, but only in the case of positioning sensors one by one.

Go to https://splace.nwave.io

Open the drop-down button list and click on the top button:

...

Go to tab BIND DEVICE

...

Select Project, Zone, and Group; enter Device ID; select label IN for entrance or OUT for exit from the zone.

...

Click on the BIND button.

Choose the device location on the map and press the OK button

...

After that, you will see the message Device has been bound successfully. Now your device is ready to use.

The first counter message after the label configuration will not change zone/group occupancy because it will be interpreted as starting point.

Car Counter area configuration

Parking equipped by Car Counter require requires some specific operations:

  • configuration of entracesentrances, 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 registration.

...

Please 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 fomat the format presented below:

Project: “Example Project”

Zone: “Example Zone”

Group “Example Group” capacity: 300

Sensor 1FD02, Group “Example Group”, Direction: IN

Sensor 1FDCA, Group “Example Group”, Direction: OUT

After receiving this data, we will make nedded the needed configuration in the next 24h.

Also, we can correct current group occupancy operatively if you notify us about you your need in 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

...

Now you are able to get and set the group capacity. The following examples get the capacity of the group with ID 1234 and set capacity to 99 spaces:

Code Block
languagebash
curl --location --request GET 'https://api.nwave.io/car_counters/v1/group/1234/capacity' --header 'X-Auth-Token: XXXXXXXXXXX'

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.

You can find how to get a group ID in the previous chapter.

The following examples show how to get current occupancy for group 1234 and how to set it:

Code Block
languagebash
curl --location --request GET 'https://api.nwave.io/car_counters/v1/group/1234/occupancy' --header 'X-Auth-Token: XXXXXXXXXXX'

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

Virtual Car Counters allows you to set counter value that you want and when you whantwant.

For doung To do this, got go to Device Management → Virtual Devices page, find the virtual device in the list, and press the button SEND MESSAGE

...

Enter a new counter value and press SEND

...

Message The message has been sendsent, you can check this by pressing on button VIEW MESSAGES

...

First of all, you have to create Authorization Token for getting to get access to Nwave API.

This document completely describes the process of Authorization Tokens creation: Generating Authorization Tokens

Now, you should get to know the ID of the created zone. For this you have to go to Device Management → Zones, find your zone in the list, and press ont on the zone name.

Zone ID is demonstrated on the top of the Zone page

...

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

In this tutorial, we show only how to get zone 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 it’s its occupancy. You can find more data about analytics API features on the special documentation page