bool SetEventSettings (EventType, ThreshType, int, bool, int, int, string)

Use this function to configure thresholds for each sensor event.


Trust Level Required: Full Trust


Name Description
eventType EventType
The event type for which to set parameters
threshType ThreshType
The desired threshold type
thresIndex int
Upper/Rise 1/2, Lower/Fall 1/2
enable bool
Represents which events are enabled/disabled
thresValue (Optional) int
The threshold value to set for the specified event. The event will trigger when the sensor data is greater than or equal to the upper/rise threshold, or less than or equal to the lower/fall threshold.
count (Optional) int
The number of times the threshold is exceeded before the event is triggered.
devName (Optional) string
The name of the device. If not supplied, the first matching configured device of this type will be used


True in the event that the given values were set succesfully. False otherwise.



function setEventSettings() {
	var eventType = document.getElementById('eventType').selectedIndex;
	var thresType = document.getElementById('thresType').selectedIndex;
	var thresIndex = parseInt(document.getElementById('thresIndex').value);
	var enable = document.getElementById('eventEnable').checked;
	var thresValue = parseInt(document.getElementById('thresValue').value);
	var count = parseInt(document.getElementById('thresCount').value);
	if (isNaN(thresValue)) thresValue = -1;
	if (isNaN(count)) count = -1;
	alert('Success: ' + KioOmronEnviroSensor.SetEventSettings(eventType, thresType, thresIndex, enable, thresValue, count));


KioWare for Windows version 8.16 or greater.