You are on page 1of 8

DZ3 Scheduller

Bootstrap Configuration Guide

Not A Final Solution


Used until GUI based configuration is implemented Later, used as a bootstrap, background or fallback Current recommended solution: Google Calendar Integration, see Configuration Guide for details

Necessary Components
Existing thermostat definition (see Configuration Guide) Period definition Status definition Scheduler definition

Period Definition
<bean id="period-weekday-morning" class="net.sf.dz3.scheduler.Period"> <!-- Period name --> <constructor-arg index="0" type="java.lang.String" value="Morning"/> <!-- Start time* --> <constructor-arg index="1" type="java.lang.String" value="06:15"/> <!-- End time* --> <constructor-arg index="2" type="java.lang.String" value="10:00"/> <!-- Recurrence** --> <constructor-arg index="3" type="java.lang.String" value="MTWTF "/> </bean>

* Neither start nor end time can cross midnight yet. Latest end time is 23:59. Minimum period duration is 1 minute. ** Space denotes "not present", anything else "present". Examples: "..... ", "+++++ ", "MTWTF " - Weekdays "M W F S" - Monday, Wednesday, Friday, Sunday " XX" Weekends

Status Definition
<bean id="status-18c" class="net.sf.dz3.device.model.impl.ZoneStatusImpl"> <!-- Setpoint --> <constructor-arg index="0" value="18.0"/> <!-- Dump priority. Not used yet, value of 0 is recommended --> <constructor-arg index="1" value="0"/> <!-- Enabled --> <constructor-arg index="2" value="true"/> <!-- Voting --> <constructor-arg index="3" value="true"/> </bean>

Scheduler Definition
<!-- Put this right after thermostats definition --> <!-- Don't forget the init-method attribute! --> <bean id="scheduler" class="net.sf.dz3.scheduler.Scheduler" init-method="start"> <constructor-arg> <map> <entry> <!-- Reference to existing thermostat --> <key><ref bean="thermostat-office"/></key> <map> <entry> <!-- Reference to existing period --> <key><ref bean="period-weekday-morning"/></key> <!-- Reference to existing status --> <ref bean="status-18c"/> </entry> <!-- More period:status pairs here -> </map> </entry> <!-- More thermostat:schedule pairs here --> </map> </constructor-arg> </bean>

You're done
Your scheduler is now configured. You might want to add it to JMX instrumentation, just in case (there's not much to look at now, but will be later).

Trouble?
Option one: Source Code + Spring IoC Container documentation Option two: DZ mailing list

You might also like