iRidi for SNMP
Tools for creating a visualization interface
The driver is designed to control equipment using the SNMP v1 protocol.
**Example: *iRidi SNMP Driver
Description
iRidi for SNMP is a set of tools for creating a home or office control interface based on equipment using the SNMP v.1 protocol. It implements SNMP protocol commands to change device settings
SNMP lets you receive event notifications from various devices, such as:
- sensors;
- video cameras;
- routers.
This driver does not support the "Get Next" command. If feedback contains multiple OIDs, specify the required one in the "OID" field.
To identify the required OID for device parameters, use iReasoning MIB Browser.
Find the device manufacturer's MIB table for the browser, or use Trap Receiver to monitor incoming OIDs.
Use cases
-
Configure an event when a device joins the network. When someone enters the Wi-Fi network's coverage area, their device joins the network, and a preconfigured router sends an SNMP notification to iRidium, where a routine runs. This routine helps detect a device joining the network when you cannot ping it (for example, an iOS device).
-
When a video camera (or any other sensor) detects motion, it sends a message to iRidium. You can then configure the project to send an "Intruder in the room" push notification to a phone.
-
Analyze changes in outdoor temperature or a device's temperature sensor readings. Create your own database of readings from a sensor that sends temperature over SNMP, and plot a trend (detailed instructions are available here). Monitor changes or create a notification event.
Connection
Equipment setup
- Open your equipment settings and select the SNMP v1 protocol. 2. Specify SNMP Port (161 by default), which is required to receive requests.
- Specify the trap-port (162 by default), which the device uses to send SNMP traps.
- Specify the read community (public by default).
- Specify the write community (private by default).
- Specify the trap address: the IP address of the device running the driver, to which traps will be sent upon a request or an event on the device (sensor, router, or camera).
Warning! For security, change the "Community" parameter from public to a more complex value in both the project and the devices.
Activecam camera setup example
- Configure SNMP on the Activecam camera.

- Configure trap packet generation: the event that triggers sending a packet to our driver.

You can add the SNMP driver by importing a CSV file or entering the data manually.
Importing a CSV file (*.csv)
Universal import from CSV File lets you import drivers from a table in CSV format.
For detailed instructions on creating a CSV file and importing it into iRidi Studio, follow this link.
Adding the driver manually
Add the SNMP driver to the project from the iRidi database:
- Start iRidi Studio and create a new iRidi project
- Open the Devices side panel and select the SNMP driver.

Specify the controller address in the iRidi project; otherwise, it will not work.
Configuring connection parameters
Configure connection settings after adding the driver.

- Host - the device's IP address.
- Port - the device connection port for sending data (161 by default; the driver sends requests to the agent).
- Local Port - the device connection port for receiving data (162 by default; the agent sends a response to the driver).
Two drivers in one project must have different Local Port values.
- Request tags at start - poll at startup (true/false).
- Interval between tag polls - the interval between tag polls. After an unsuccessful poll, the driver switches to polling another tag.
- Maximum number of tag polls - the number of attempts to poll each tag.
Commands & Feedbacks
Bind commands and feedback channels to graphical items to control the equipment:
- Bind a command to a graphical item.
- Bind a feedback channel to a graphical item to display the variable's state
To link a command or channel to a graphic item, use drag&drop - dragging an object onto another.
To send a command, drag it onto a graphical item. To display feedback, drag the channel onto a graphical item and specify where to display its Value:

Configuring Commands and Feedbacks
To configure a command, set the following fields:
- OID - the numeric object identifier;
- Type - the command/feedback type;
- Value Type - the value type;
- Community - a string specifying community membership, similar to a password.
To configure feedback, set the following fields:
- OID - the numeric object identifier.
- Get - a command to request data from the device:
- Value - feedback that returns the requested value;
- Trap - event feedback, triggered when something happens.
- Community - a string specifying community membership, similar to a password.
Example of requesting values:
var device = IR.GetDevice("SNMP");
function get_feedback() // отправка единицы в команду с типом Get (запросить значение).
{
device.Set("getsysUpTime", 1);
IR.Log("request value after 32");
}
IR.SetTimeout(32000, get_feedback); // выполнить функцию через 32 секунды.
The command and feedback must use the same OID, with command type Get and feedback type Value.
Example of subscribing to tag value changes:
IR.AddListener(IR.EVENT_TAG_CHANGE, device, function (n,v) {
IR.Log("EVENT_TAG_CHANGE " + n + " " + v);
});
Feedback type: Trap.
Value Types
| Type | Description |
|---|---|
| Integer | Integer |
| String | String |
| Null | A variable with no value (zero) |
| OID | Object identifier |
| IP4 | IP address |
| Counter | A counter: a nonnegative integer that increases monotonically from 0 to 2^32-1, then returns to 0 |
| Time | A counter that measures time in hundredths of a second from a starting point |