mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-01 20:20:10 +00:00
160 lines
5.4 KiB
Plaintext
160 lines
5.4 KiB
Plaintext
###########################################
|
|
# $Id$
|
|
#
|
|
# Comments start with #. Empty lines are ignored.
|
|
# Syntax of one entry: name: line, one optional filter: line, zero or more par: lines, FHEM-Commands
|
|
# filter:INTERNAL=VALUE (optional)
|
|
# par: name of the parameter; comment; perl_code (optional)
|
|
# perl_code returns a value for the parameter, or undef.
|
|
# If undef, the user has to specify them (the comment is shown to the user)
|
|
|
|
|
|
###########################################
|
|
# Example sketches from MySensors.org
|
|
# simple stateFormat versions
|
|
name:air_humidity_dht
|
|
filter:TYPE=MYSENSORS_DEVICE
|
|
desc:Applies to standard DHT sketch without battery reading<br>NOTE: Untested first template version
|
|
order:A_01a1
|
|
attr DEVICE stateFormat T: temperature1 H: humidity
|
|
attr DEVICE model air_humidity_dht
|
|
setreading DEVICE attrTemplateVersion 20200522 or prior
|
|
|
|
name:air_humidity_Si7021
|
|
filter:TYPE=MYSENSORS_DEVICE
|
|
desc:Applies to standard DHT sketch with battery reading<br>NOTE: Untested first template version
|
|
order:A_01a2
|
|
attr DEVICE stateFormat T: temperature1 H: humidity Bat: batteryLevel
|
|
attr DEVICE model air_humidity_Si7021
|
|
setreading DEVICE attrTemplateVersion 20200522 or prior
|
|
|
|
name:atmospheric_pressure
|
|
filter:TYPE=MYSENSORS_DEVICE
|
|
desc:Applies to standard Atmospheric Pressure sketch (BME280)NOTE: Untested first template version
|
|
order:A_02a
|
|
attr DEVICE stateFormat T: temperature H: humidity1 P: pressure2 Forecast: forecast2
|
|
attr DEVICE model atmospheric_pressure
|
|
setreading DEVICE attrTemplateVersion 20200522 or prior
|
|
|
|
name:bed_occupancy
|
|
filter:TYPE=MYSENSORS_DEVICE
|
|
desc:Applies to standard bed occupancy sketch (MPR121) <br>NOTE: Sketch is still in MySensors 1.x format and has to be changed for use with recent arduino libs.NOTE: Untested first template version
|
|
oder:A_03a
|
|
attr DEVICE stateFormat Left: motion Right: motion1
|
|
attr DEVICE model bed_occupancy
|
|
setreading DEVICE attrTemplateVersion 20200522 or prior
|
|
|
|
#A_04a_Dimmer - LED
|
|
#A_05a_Display and Time
|
|
#A_06a_Distance
|
|
#A_07a_Dollhouse
|
|
#A_08a_Door/Window/Button
|
|
#A_09a_Dust
|
|
#A_10a_Gas Detection
|
|
#A_11a_Gesture Controller
|
|
#A_12a_GPS Sensor
|
|
#A_13a_Heatpump Control
|
|
#A_14a_IR Sender/Receiver
|
|
#A_15a_Irrigation Controller
|
|
#A_16a1_Light Level - BH1750
|
|
#A_16a2_Light Level - LM393
|
|
|
|
name:Motion
|
|
filter:TYPE=MYSENSORS_DEVICE
|
|
desc:Applies to standard motion sketch
|
|
order:A_17a
|
|
attr DEVICE stateFormat Motion: motion1
|
|
attr DEVICE model Motion
|
|
setreading DEVICE attrTemplateVersion 20200522 or prior
|
|
|
|
#A_18a_Orientation Actuator
|
|
#A_19a_Orientation Sensor
|
|
#A_20a_Parking Sensor
|
|
#A_21a_Pulse Power Meter
|
|
#A_22a_Pulse Water Meter
|
|
#A_23a_Rain Gauge
|
|
|
|
name:Relay_Actuator
|
|
filter:TYPE=MYSENSORS_DEVICE
|
|
desc:Applies to standard relay actuator sketch
|
|
order:A_24a
|
|
attr DEVICE setCommands on:status1:on off:status1:off
|
|
attr DEVICE setExtensionsEvent 1
|
|
attr DEVICE devStateIcon .*on:on .*off:off on.(for.timer|till.*):on-for-timer:off off.(for.timer|till.*):off-for-timer:on blink.*:light_toggle:off
|
|
set DEVICE attrTemplate speechcontrol_type_switch
|
|
attr DEVICE model Relay_Actuator
|
|
setreading DEVICE attrTemplateVersion 20200522 or prior
|
|
|
|
|
|
#A_25a_RFID
|
|
#A_26a_Scene Controller
|
|
#A_27a_Secret Knock
|
|
#A_28a_Servo
|
|
#A_29a_Smart Alarm Clock
|
|
#A_30a_Soil Moisture
|
|
#A_31a_Sonoff Relay
|
|
#A_32a_Starry Sky
|
|
|
|
|
|
name:temperature
|
|
filter:TYPE=MYSENSORS_DEVICE
|
|
desc:Applies to standard temperature sketch (DS18B20) NOTE: Untested first template version
|
|
order:A_33a
|
|
attr DEVICE stateFormat T0: temperature T1: temperature1 T2: temperature2
|
|
attr DEVICE model temperature
|
|
setreading DEVICE attrTemplateVersion 20200522 or prior
|
|
|
|
#A_34a_UV
|
|
#A_35a_Whole House Fan
|
|
|
|
###########################################
|
|
# Example sketches from MySensors.org
|
|
# Advanced stateFormat and devStateIcon versions
|
|
|
|
name:air_humidity_dht
|
|
filter:TYPE=MYSENSORS_DEVICE
|
|
desc:Applies to standard DHT sketch without battery reading<br>NOTE: Untested first template version
|
|
order:B_01a1
|
|
attr DEVICE stateFormat temp_temperature\
|
|
temperature1 \
|
|
humidity\
|
|
humidity
|
|
attr DEVICE model air_humidity_dht
|
|
setreading DEVICE attrTemplateVersion 20200522 or prior
|
|
|
|
name:atmospheric_pressure
|
|
filter:TYPE=MYSENSORS_DEVICE
|
|
desc:Applies to standard Atmospheric Pressure sketch (BME280)NOTE: Untested first template version
|
|
order:B_02a
|
|
attr DEVICE stateFormat temp_temperature\
|
|
temperature \
|
|
humidity\
|
|
humidity1 <br>
|
|
weather_barometric_pressure\
|
|
pressure2 Forecast: forecast2
|
|
attr DEVICE model atmospheric_pressure
|
|
setreading DEVICE attrTemplateVersion 20200522 or prior
|
|
|
|
###########################################
|
|
# Advanced sketches
|
|
|
|
#4 relay
|
|
name:4ch_unified_icon
|
|
filter:TYPE=MYSENSORS_DEVICE
|
|
desc:Device with 4 relays attached <br>NOTE: Clicking on icons will issue a corresponding toggle command
|
|
order:C_04
|
|
attr DEVICE devStateIcon {\
|
|
"<div><a href=\"/fhem?cmd.dummy=set ".$name." status1 toggle&XHR=1\">status1:"\
|
|
. FW_makeImage(lc ReadingsVal($name, "status1", "off"))\
|
|
. "</a> <a href=\"/fhem?cmd.dummy=set ".$name." status2 toggle&XHR=1\">status2:"\
|
|
. FW_makeImage(lc ReadingsVal($name, "status2", "off")) . "</a></div>"\
|
|
. "</a> <a href=\"/fhem?cmd.dummy=set ".$name." status3 toggle&XHR=1\">status3:"\
|
|
. FW_makeImage(lc ReadingsVal($name, "status3", "off")) . "</a></div>"\
|
|
. "</a> <a href=\"/fhem?cmd.dummy=set ".$name." status4 toggle&XHR=1\">status4:"\
|
|
. FW_makeImage(lc ReadingsVal($name, "status4", "off")) . "</a></div>"\
|
|
}
|
|
attr DEVICE stateFormat P1: status1 P2: status2 P3: status3 P4: status4 Status: state
|
|
attr DEVICE webCmd :
|
|
attr DEVICE model 4ch_unified_icon
|
|
setreading DEVICE attrTemplateVersion 20200522 or prior
|