Documentation
IPS_StartSearch
bool IPS_StartSearch (int $InstanceID)
Parameters
| InstanceID | ID of the instance |
Returns
If the function succeeds, it returns TRUE, otherwise FALSE.
Description
The function starts the search mode of the instance with the ID InstanceID for 5 minutes. If the instance is already in search mode, the search is extended to 5 minutes from now.
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. IPS_StopSearch ends the search early.
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". IPS_SupportsSearching checks whether an instance supports the search mode.
Example
if (IPS_SupportsSearching(12345)) {
IPS_StartSearch(12345);
}