Documentation
IPS_CreateCategory
int IPS_CreateCategory ()
Returns
ID of the newly created category
Description
This function creates a new category. No parameters are required. After the function has been executed, a new category appears in the category tree of IP-Symcon. The category is initially named "Unnamed Object (ID: 12345)" or similar, depending on its ID. The function IPS_SetName can be used to give the new category a meaningful name. The name should not be used for identification. The ID is responsible for that.
If the category is meant to be a subcategory, it can be moved to its designated parent by using the function IPS_SetParent.
The function returns an ID that uniquely identifies the created category.
Example
// Create a new category called "Rain sensing"
$CatID = IPS_CreateCategory(); // Create the category
IPS_SetName($CatID, "Rain sensing"); // Name the category
IPS_SetParent($CatID, 12345); // Move the category below the object with the ID "12345"