isAutoOn — device automation status.

Description
u8 isAutoOn(SUBID);

Returns information whether SUBID device automation is activated.

List of parameters
SUBID
Device address located on unit where the script is.

Return values:

  • Returns value 0 if the device automation is disactivated.
  • Returns value not 0 if the device automation is activated.

Example

<item id="512" LAMP="512:8" name="IsAutoOn" type="script">
V-ID/V-ADDR{
 
        	if(opt0()){      	                                          	
                    	u8 strForMess[50]; 
                    	u8 sttOfAuto = isAutoOn(8); 
                    	if(sttOfAuto != 0) {
                               		setStatus(@exciterId():32, {1, "Automation is activated"});
                    	} else {
                               		setStatus(@exciterId():32, {4, "Automation is disactivated"});
                    	}
                    	setAutoState(8, 10);
                    	sttOfAuto = isAutoOn(8); 
                    	if(sttOfAuto != 0) {
                               		setStatus(@exciterId():32, {1, "Automation is activated"});
                    	} else {
                               		setStatus(@exciterId():32, {4, "Automation is disactivated"});
                    	}
        	}
}
</item>

The result of performing this example:
When clicking the element script in the interface the following message will appear:
“Automation is activated!”
“Automation is disactivated!”

Note:
The function maps only the devices automation status which are located at the same module as script.