Configuring Device Settings with Sensgreen API
Configuration via downlink commands are not available on the platform currently, although Sensgreen provides a robust API that allows you to configure device settings for your IoT sensors. This feature provides flexibility and control over your devices, enabling you to send custom commands and instructions to tailor their behavior. To get started with device configuration, follow the steps outlined below:
Step 1: Access the Sensgreen API Endpoint
To configure your device settings, you'll need to access the Sensgreen API endpoint. The endpoint URL for device configuration is
Replace {device_eui} in the URL with the Device EUI of the specific device you want to configure. Ensure that all characters in the Device EUI are in lowercase.
Step 2: Prepare the Request Body
You'll need to craft a JSON request body that contains the following parameters:
"data": This parameter should contain the specific command or configuration you want to send to the device. Update this field with the desired command.
"fPort": Set the "fPort" parameter to 85. Please note that for different types of sensors, you may need to use a different fPort. Ensure that fPort is greater than 0.
Here's an example of a request body:
{
"data": "{your-command}",
"fPort": 85
}
Step 3: Set the Authorization Header
To authenticate your request, you must include an Authorization header with your Bearer token. Replace {TOKEN} in the header with your actual Bearer token.
-H 'Authorization: Bearer {TOKEN}'
Step 4: Make the API Request
You can use a tool like cURL to make the API request. Here's an example cURL command:
curl -X 'POST' \
'https://prod.api.sensgreen.com/controller/{device_eui}/downlink/' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {TOKEN}' \
-H 'Content-Type: application/json' \
-d '{
"data": "{YOUR-COMMAND}",
"fPort": 85
}'
Replace {device_eui} with your device's EUI, and {TOKEN} with your Bearer token.
Step 5: Execute the Request
After crafting your API request with the necessary endpoint URL, request body, and authorization header, execute the request. The device will receive the specified command or configuration.
Step 6: Verify Device Configuration
You can verify that the device has been successfully configured by checking its behavior and data output.
This API functionality allows you to customize and fine-tune the settings of your IoT devices efficiently. By sending commands through the Sensgreen API, you can adapt your devices to meet specific requirements, ensuring they operate optimally within your smart building ecosystem.
Health Checks on Devices
Ensuring the health and reliability of your IoT devices is crucial for maintaining the optimal performance of your smart building systems. The Sensgreen Smart Building Platform provides a convenient way to monitor the status of your devices. Here's how to perform health checks on your devices:
Step 1: Access the Device Management Page
1.1. Navigate to Device Management:
Log in to your Sensgreen Smart Building Platform account and access the Device Management page. You can typically find this in the platform's main menu or dashboard.
Step 2: Check Device Status
2.1. Status Indicator:
On the Device Management page, you'll notice a "Status" column on the left side of the device list. This column provides a real-time status indicator for each device.
2.2. Healthy Device:
A green indicator typically signifies that the device is healthy and actively sending data at regular intervals. This is a positive sign that the device is functioning correctly.
2.3. Alert - Red Indicator:
If the status indicator for a device turns red, it indicates a potential issue. Specifically, it means that the device has stopped sending data for at least an hour. This could be due to various factors, such as a connectivity problem or device malfunction.
Step 3: Investigate Red Indicators
3.1. Red Indicator Implications:
When you encounter a device with a red status indicator, it's important to investigate the issue promptly.
3.2. Possible Causes:
Some common reasons for a red indicator include:
Connectivity Issues: The device may have lost its connection to the network or the Sensgreen platform.
Device Malfunction: There could be a hardware or software issue with the device itself, preventing it from sending data.
Power Problems: Devices may stop sending data if they run out of power or experience power-related problems.
3.3. Troubleshooting:
To resolve the issue, consider the following steps:
Check Connectivity: Ensure that the device is still connected to the network and has access to the internet.
Inspect Hardware: Physically inspect the device to look for any visible hardware issues or connectivity problems.
Review Device Logs: Access any logs or diagnostic information provided by the device to identify potential errors.
Restart or Reset: In some cases, restarting or resetting the device may resolve connectivity or software-related issues.
Monitoring Battery Status
Battery-powered devices play a crucial role in many IoT applications, including smart building systems. To ensure these devices continue to operate optimally, it's essential to monitor their battery status. The Sensgreen Smart Building Platform provides a user-friendly way to keep tabs on the battery levels of your devices. Here's how to do it:
Step 1: Access the Device Management Page
1.1. Navigate to Device Management:
You can typically find this in the platform's main menu or dashboard.
Step 2: Check Battery Status
2.1. Battery Tab:
Once on the Device Management page, look for the "Battery" tab. This tab provides valuable information about the battery status of your devices.
2.2. Battery Levels:
In this section, you'll see a list of your devices along with their corresponding battery levels. These levels are presented on a normalized scale ranging from 0 to 100. Normalizing battery levels to a 0-100 scale provides a standardized way to assess battery health across various device types, simplifying maintenance and management.
Step 3: Interpret Battery Levels
3.1. Normalized Scale:
The battery levels displayed in the Sensgreen system are normalized to a scale of 0 to 100. This scale allows for consistent and standardized reporting of battery status across different types of devices.
Step 4: Monitor Battery Health
4.1. Regular Checkups:
It's important to regularly monitor the battery status of your devices, especially if they are critical to your smart building operations.
4.2. Set Alerts:
You can set up alerts or notifications within the Sensgreen platform to receive warnings when a device's battery level drops below a certain threshold. This proactive approach helps you address battery issues promptly.
Step 5: Take Appropriate Action
5.1. Replace or Recharge:
When a device's battery level falls to a critical point (usually below 10-20), it's time to take action. Depending on the device type, this might involve replacing the battery or recharging it.
5.2. Investigate:
Additionally, investigate why the battery level dropped to prevent future occurrences. Factors such as increased device activity or excessive power consumption may contribute to faster battery drain.