#
# Example configuration for modules HMCCU and HMCCUDEV
#

# Define device (hostname of CCU is "homematic")
define d_ccu HMCCU homematic

# Generate readings for values read from CCU
attr d_ccu ccureadings 1

# Parameterfile with channel/datapoints to be read from CCU
# by command get parfile
attr d_ccu parfile /opt/fhem/scripts/hmvalues.txt

# If CCU systemvariable name ends with a ":" this character 
# will be removed. Applies to command set devstate only.
# Helpful if CCU variable should be set as a reaction on an
# event.
attr d_ccu stripchar :

# Substitute values read from CCU before storing them in a 
# reading.
attr d_ccu substitute false:closed,true:open

# Subsitute values before setting them
attr d_ccu statevals on:true,off:false

# Define client device for door/window sensor
define d_hm_dw_window HMCCUDEV TF-WZ-Window readonly
attr d_hm_dw_window ccureadings 1
attr d_hm_dw_window substitute false:closed,true:open

# Define client device for subwoofer with state channel 1
define d_hm_st_sub HMCCUDEV ST-WZ-Sub 1
attr d_hm_st_sub ccureadings 1
attr d_hm_st_sub statevals on:true,off:false
attr d_hm_st_sub substitute true:on,false:off

# Update CCU readings and client devices every 10 minutes
define at_ccu at +*00:10:00 get d_ccu parfile
attr at_ccu alignTime 00:05

