The PlacePod cloud offers an asynchronous MQTT API for notifications. Additionally, a REST API is available for syncronous based web services.
The Rest API may be invoked at any time retrieve sensor status, and history values for parking spaces and lots. Also, downlink communication to the sensor is done via the REST Api.
- Login into your PNI cloud account with admin permission.
- Navigate to Settings > Rest API
- Click the Generate API Key button.
- Every request must include the api key header.
- See the Swagger Rest API docs for more details.
- Example:
curl -X GET
--header 'Accept: application/json' \ --header 'X-API-KEY: YOUR-API-KEY' \ 'https://api.pnicloud.com/api/parking-lots'
Whenever a Placepod communicates, an event is published to the MQTT defined in your account.
- Login into your PNI cloud account with admin permission.
- Navigate to Settings > MQTT API
- Click the Generate Credentials button.
- Copy Username, password and topic into MQTT Client.
- MQTT Connection is on port 8883 and requires TLS configuration.
- Client library may require trusted CA certificate.
- Download Starfield Services Root Certificate Authority - G2 .
- For example, use the MQTTfx client to test connection.
- Check "Enable TLS" under SSL/TLS flag
- Enter username/password under "User credentials"
- Click Generate Client ID
- See Security Fundamentals for more details.
- MQTT topic is hierarchical and can include the wildcards +, # and ?
- Example Topics
- #
- recieve all notifications from ALL sensors.
- placepod/uplink/+/0080000004000675
- Single sensor
- #
- See MQTT Topics for more information.
- Example Topics
- Note: To issue commands (Recalibrate, BISTest, SetWakeupInterval) please use the REST API.
Mqtt packet format is a JSON object defined as follows:
sensorId:16 Digit Hex ID. Ex`: '0080000004000675'parkingSpace:Space PlacePod is assigned to. Ex`: 'Space #54'network: Network this sensor is asigned to. Ex`: 'PNI' or 'SENET'location: Not used.installationDate: Not usedlat: Location of Sensor Ex`: 38.42074876336795lon: Location of Sensor Ex:-122.75509041539759createdAt: Date of Sensor Creation. Ex`: '2017-05-03T21:12:52.974Z'hostFirmware: Host Firmware Revision. Ex`: '0.3.39'sensorFirmware: Sentral Firmware Revision. Ex`: '1.3.0.0.284'parkingName: Name of Parking Lot. Ex`: 'Electric Vehicle Parking Lot'validationInProcess: Internal QA Validation Flag.GatewayTime: Event Timestamp from Gateway. Subject to clock drift and misconfigured gateways. Ex`: '2017-06-06T17:23:57.834Z'SENtralTime: Internal 36 bit timestamp in ticks. Ex`: 309467131ServerTime: Canonical Event Timestemp from Server. '2017-06-06T17:17:08.977Z'CarPresence: State of sensor 0 = Initialization/startup (never published) 1 = No Car Present 2 = Car Entering Space 3 = Parked Car Detected 4 = Car Leaving SpaceConfidence: Not Used.Temperature: Temperature in celcius. Ex`: 23Battery: Battery Voltage ex`: 3.6482174396514893status: Human readable Placepod status`: occupied, vacant, car entering, car leaving