User Tools

Site Tools


openhab-examples

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revisionBoth sides next revision
openhab-examples [2015/06/28 19:45] – created GoHoHaopenhab-examples [2015/06/28 19:46] – [A flood detection sensor] GoHoHa
Line 14: Line 14:
  
 The item definition on OpenHAB (the contacts are mapped in e2p to the third port): The item definition on OpenHAB (the contacts are mapped in e2p to the third port):
-''Switch Water_Basement "Water sensor basement [MAP(water.map):%s]" (gBasement,gSensorWater,gSensor) {smarthomatic="<[deviceId=123, messageGroupId=1, messageId=1, messagePart=2]"}''+ 
 +<code>Switch Water_Basement "Water sensor basement [MAP(water.map):%s]" (gBasement,gSensorWater,gSensor) {smarthomatic="<[deviceId=123, messageGroupId=1, messageId=1, messagePart=2]"}</code>
  
 The water.map file: The water.map file:
-''ON=dry+<code>ON=dry
 OFF=wet OFF=wet
--=??''+-=??</code>
  
 The rule to send a mail if a short between the pins is connected: The rule to send a mail if a short between the pins is connected:
-''val String mailTo = mymail@server.com+<code>val String mailTo = mymail@server.com
  
 rule "water detection" rule "water detection"
Line 44: Line 45:
    sendMail(mailTo, "WATER ALARM!!", message )    sendMail(mailTo, "WATER ALARM!!", message )
  
-  end'' +  end</code>
openhab-examples.txt · Last modified: 2015/06/29 00:17 by breaker27