« Back to Product

Documentation

IPS_StopSearch

 bool IPS_StopSearch (int $InstanceID) 

Parameters

InstanceID

ID of the instance

Returns

If the function succeeds, it returns TRUE, otherwise FALSE.

Description

The function stops the search mode of the instance with the ID InstanceID that was started with IPS_StartSearch. If the instance is not in search mode, nothing happens.

Some device modules support a search mode, e.g. the instances for FS20, HMS, EnOcean or HomeMatic. In search mode, the instance reports every received device with its address, together with an existing instance for this address. The management console shows these results in the search dialog, so a device can be found by triggering it and then be assigned to the instance. The search mode ends automatically after 5 minutes.

Start and end of the search are reported with the messages IM_SEARCHSTART and IM_SEARCHSTOP.

If the module does not support a search mode, the function fails with "This module does not support searching", for an instance that does not exist with "Instance #... does not exist".

Example

if (IPS_IsSearching(12345)) {
    IPS_StopSearch(12345);
}
Any questions?