Sensor (Batch)
ActionBatchSensor
ActionBatchSensor class.
create_device_sensor_command
Sends a command to a sensor.
API documentation: createDeviceSensorCommand
Parameters:
-
serial(str) –Serial.
-
operation(CreateDeviceSensorCommandOperation) –Operation to run on the sensor. 'enableDownstreamPower', 'disableDownstreamPower', and 'cycleDownstreamPower' turn power on/off to the device that is connected downstream of an MT40 power monitor. 'refreshData' causes an MT15 or MT40 device to upload its latest readings so that they are immediately available in the Dashboard API.
create_network_sensor_alerts_profile
Creates a sensor alert profile for a network.
API documentation: createNetworkSensorAlertsProfile
Parameters:
-
network_id(str) –Network ID.
-
name(str) –Name of the sensor alert profile.
-
schedule(CreateNetworkSensorAlertsProfileSchedule | None, default:None) –The sensor schedule to use with the alert profile.
-
conditions(list[CreateNetworkSensorAlertsProfileConditionsItem]) –List of conditions that will cause the profile to send an alert.
-
recipients(CreateNetworkSensorAlertsProfileRecipients | None, default:None) –List of recipients that will receive the alert.
-
serials(list[str] | None, default:None) –List of device serials assigned to this sensor alert profile.
-
include_sensor_url(bool | None, default:None) –Include dashboard link to sensor in messages (default: true).
-
message(str | None, default:None) –A custom message that will appear in email and text message alerts.
delete_network_sensor_alerts_profile
Deletes a sensor alert profile from a network.
API documentation: deleteNetworkSensorAlertsProfile
Parameters:
-
network_id(str) –Network ID.
-
id(str) –ID.
update_device_sensor_relationships
Assign one or more sensor roles to a given sensor or camera device.
API documentation: updateDeviceSensorRelationships
Parameters:
-
serial(str) –Serial.
-
livestream(UpdateDeviceSensorRelationshipsLivestream | None, default:None) –A role defined between an MT sensor and an MV camera that adds the camera's livestream to the sensor's details page. Snapshots from the camera will also appear in alert notifications that the sensor triggers.
update_network_sensor_alerts_profile
Updates a sensor alert profile for a network.
API documentation: updateNetworkSensorAlertsProfile
Parameters:
-
network_id(str) –Network ID.
-
id(str) –ID.
-
name(str | None, default:None) –Name of the sensor alert profile.
-
schedule(UpdateNetworkSensorAlertsProfileSchedule | None, default:None) –The sensor schedule to use with the alert profile.
-
conditions(list[UpdateNetworkSensorAlertsProfileConditionsItem] | None, default:None) –List of conditions that will cause the profile to send an alert.
-
recipients(UpdateNetworkSensorAlertsProfileRecipients | None, default:None) –List of recipients that will receive the alert.
-
serials(list[str] | None, default:None) –List of device serials assigned to this sensor alert profile.
-
include_sensor_url(bool | None, default:None) –Include dashboard link to sensor in messages (default: true).
-
message(str | None, default:None) –A custom message that will appear in email and text message alerts.
update_network_sensor_mqtt_broker
Update the sensor settings of an MQTT broker.
API documentation: updateNetworkSensorMqttBroker
Parameters:
-
network_id(str) –Network ID.
-
mqtt_broker_id(str) –Mqtt broker ID.
-
enabled(bool) –Set to true to enable MQTT broker for sensor network.