Noise Sensors
Devices that send alerts when noise levels exceed a threshold.
Manage Noise Thresholds
List Noise Thresholds
This endpoint enables you to generate a list of currently available noise thresholds for a specific device. For example, to generate the list of thresholds for a device with the id, 123e4567-e89b-12d3-a456-426614174000, you would make the following call:
seam.noise_sensors.noise_thresholds.list("123e4567-e89b-12d3-a456-426614174000")Then, you would receive a response like this:
{
"noise_thresholds": [
{
"noise_threshold_id": "792263f8-1660-4cf9-a6c6-054d23b78d86",
"device_id": "123e4567-e89b-12d3-a456-426614174000",
"name": "builtin_quiet_hours",
"noise_threshold_decibels": 70,
"starts_daily_at": "22:00:00[America/Los_Angeles]",
"ends_daily_at": "06:00:00[America/Los_Angeles]"
},
{
"noise_threshold_id": "678ccd98-7036-402f-a42c-e66f55575566",
"device_id": "123e4567-e89b-12d3-a456-426614174000",
"name": "builtin_normal_hours",
"noise_threshold_decibels": 75,
"starts_daily_at": "06:00:00[America/Los_Angeles]",
"ends_daily_at": "22:00:00[America/Los_Angeles]"
}
]
}Here, we can see the device has two thresholds- one during the night and one during the day.
Create Noise Thresholds
If your device has no default thresholds, or you wish to create custom ones, you can create a noise threshold with the Create Noise Threshold endpoint. For example, you can create an endpoint like this:
This creates a threshold creates a noise threshold of 70 decibels from 20:00-06:00 PST called builtin_quiet_hours, and will return this JSON response:
Update Noise Thresholds
You can change the thresholds youβve already created. For example, if we wanted to change the builtin_quiet_hours threshold we saw above, we can do something like this:
This increases the noise threshold from 70 to 75 decibels. The above returns the edited threshold:
Delete Noise Thresholds
Finally, you can delete a threshold. Youβll need to know the device and threshold id to delete the threshold. For example:
This permanently deletes the built_in_normal threshold from the device. Youβll see something like this as a return:
Events
noise_sensor.noise_threshold_triggered
noise_sensor.noise_threshold_triggeredThe noise detected from a noise sensor exceeded a predefined threshold or duration.
Next Steps
For more details on each endpoint, see our API references:
Last updated
Was this helpful?

