Skip to content

Examples

Tim edited this page Jul 17, 2017 · 6 revisions

Definition in .things:

// SensebenderMicro
humidity bathHum01 [ nodeId=101, childId=0 ]
temperature bathTemp01 [ nodeId=101, childId=1 ]
humidity bathBat01 [ nodeId=101, childId=255 ]

// Light / Relay
light childLight01 [ nodeId=107, childId=0 ]

// Motion
motion gardenMotion01 [ nodeId=110, childId=3 ]

// RollerShutter / Cover
cover kitchenShutter02 [ nodeId=0, childId=0 ]

// Power
power corridorLight01watt [ nodeId=0, childId=7 ]

// Text
text v_text_test [ nodeId=123, childId=123 ]

// IR Send & Receive
irSend          ir_test_send        [ nodeId=111, childId=112 ]
irReceive       ir_test_receive     [ nodeId=111, childId=111 ]

Definition in .items:

// SensebenderMicro
Number bathTemp01 "Temp. Bad [%.1f °C]" <temperature> (gTemp,gHumAndTemp,gBath)	{ channel="mysensors:temperature:MySGW:bathTemp01:temp" }
Number bathHum01 "Feucht. Bad [%.1f %%]" <humidity> (gHumidity,gHumAndTemp,gBath) { channel="mysensors:humidity:MySGW:bathHum01:hum" }
Number bathBat01 "Battery Bad [%.1f %%]" <battery> (gBattery,gBath) { channel="mysensors:humidity:MySGW:bathBat01:battery" }

// Light / Relay
Switch childLight01 "Deckenleuchte LED 1" (gChild) { channel="mysensors:light:MySGW:childLight01:status" }

// Motion
Contact gardenMotion01 "Bewegung Garten" (gGarden) { channel="mysensors:motion:MySGW:gardenMotion01:tripped" }

// RollerShutter / Cover
Rollershutter kitchenShutter02 "Rollade Küche Tür Ost" (gShutterGroup,gKitchen) { channel="mysensors:cover:MySGWKeller:kitchenShutter02:cover" }

// Power
Number corridorLight01watt "Power [%.1f Watt]" <status> (gCorridor,gPower) { channel="mysensors:power:MySGWKeller:corridorLight01watt:watt" }

// Last Update
DateTime   lastUpdate01	"Last Update" { channel="mysensors:baro:gateway:baro01:lastupdate" }

// Text
String v_text_test "v text test" { channel="mysensors:text:gateway:v_text_test:text" }

// IR Send & Receive
String ir_test_send "ir test send"          { channel="mysensors:irSend:gateway:ir_test_send:irSend" }
String ir_test_receive "ir test receive"    { channel="mysensors:irReceive:gateway:ir_test_receive:irReceive" }

Definition in .sitemap:

// Text
Switch item=v_text_test mappings=["text to send"="SEND"] // Send something to the MySensors network
Text   item=v_text_test // Read the current status/content

// IR Send & Receive
// both channels work in both directions in OH2!!
Switch item=ir_test_send mappings=["ir test send"="SEND"]
Text   item=ir_test_send
Switch item=ir_test_receive mappings=["ir test receive"="SEND"]
Text   item=ir_test_receive
You can’t perform that action at this time.