User Tools

Site Tools


giraffplus:context-recognition

Context Recognition API

XML Format

Sample rule for test site SE2

<?xml version='1.0' encoding='UTF-8' ?>
<rules xsi:noNamespaceSchemaLocation='rule_schema.xsd' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>

<preproc name='TunstallTrueFalse' in='Bed - Bedroom @ testsite_se_2' out='_in_bed' args=''/>
<preproc name='TunstallPIRSimple' in='PIR - TV Room @ testsite_se_2' out='_motion_bed' args=''/>
<preproc name='TunstallTrueFalse' in='TV - TV Room @ testsite_se_2' out='_tv_on' args=''/>
<preproc name='TunstallPIRSimple' in='PIR - TV Room @ testsite_se_2' out='_in_tv_room' args=''/>

<rule out="_watching_tv">
	<constraint from="_watching_tv" type="during" args="" to="_tv_on" />
	<constraint from="_watching_tv" type="during" args="" to="_in_tv_room" />
</rule>

<extractor name='max' in='_in_bed' out='in_bed' />
<extractor name='max' in='_motion_bed' out='motion_bed' />
<extractor name='max' in='_tv_on' out='tv_on' />
<extractor name='max' in='_watching_tv' out='watching_tv' />

</rules>
giraffplus/context-recognition.txt · Last modified: 2013-11-20 15:55 by jonas