Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- The Item:
- Switch extTest2 "execute Test2"
- The Rule:
- import org.openhab.core.library.types.*
- rule Exec2
- when
- Item extTest2 received command
- then
- logInfo("extTest2", "extTest2 switch was turned " + receivedCommand.toString)
- if (extTest2.state == ON) {
- executeCommandLine("/home/pi/bin/MCRemote start")
- }
- else {
- executeCommandLine("/home/pi/bin/MCRemote stop")
- }
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement