rule "Living Room Control" when Item livingroomav received command then if (livingroomav.state=="select"){ if (HarmonyHub_CurrentActivity.state=="Shield"){ sendCommand(NVIDIAShield_, "Select")} if (HarmonyHub_CurrentActivity.state=="TV"){ sendCommand(HumaxDVR_, "OK")} if (HarmonyHub_CurrentActivity.state=="Blu Ray"){ sendCommand(SamsungDVD_, "OK")} } if (livingroomav.state=="left"){ if (HarmonyHub_CurrentActivity.state=="Shield"){ sendCommand(NVIDIAShield_, "DirectionLeft")} if (HarmonyHub_CurrentActivity.state=="TV"){ sendCommand(HumaxDVR_, "DirectionLeft")} if (HarmonyHub_CurrentActivity.state=="Blu Ray"){ sendCommand(SamsungDVD_, "DirectionLeft")} } if (livingroomav.state=="right"){ if (HarmonyHub_CurrentActivity.state=="Shield"){ sendCommand(NVIDIAShield_, "DirectionRight")} if (HarmonyHub_CurrentActivity.state=="TV"){ sendCommand(HumaxDVR_, "DirectionRight")} if (HarmonyHub_CurrentActivity.state=="Blu Ray"){ sendCommand(SamsungDVD_, "DirectionRight")} } if (livingroomav.state=="up"){ if (HarmonyHub_CurrentActivity.state=="Shield"){ sendCommand(NVIDIAShield_, "DirectionUp")} if (HarmonyHub_CurrentActivity.state=="TV"){ sendCommand(HumaxDVR_, "DirectionUp")} if (HarmonyHub_CurrentActivity.state=="Blu Ray"){ sendCommand(SamsungDVD_, "DirectionUp")} } if (livingroomav.state=="down"){ if (HarmonyHub_CurrentActivity.state=="Shield"){ sendCommand(NVIDIAShield_, "DirectionDown")} if (HarmonyHub_CurrentActivity.state=="TV"){ sendCommand(HumaxDVR_, "DirectionDown")} if (HarmonyHub_CurrentActivity.state=="Blu Ray"){ sendCommand(SamsungDVD_, "DirectionDown")} } if (livingroomav.state=="back"){ if (HarmonyHub_CurrentActivity.state=="Shield"){ sendCommand(NVIDIAShield_, "Back")} if (HarmonyHub_CurrentActivity.state=="TV"){ sendCommand(HumaxDVR_, "Back")} if (HarmonyHub_CurrentActivity.state=="Blu Ray"){ sendCommand(SamsungDVD_, "Return")} } if (livingroomav.state=="home"){ if (HarmonyHub_CurrentActivity.state=="Shield"){ sendCommand(NVIDIAShield_, "Home")} if (HarmonyHub_CurrentActivity.state=="TV"){ sendCommand(HumaxDVR_, "Home")} if (HarmonyHub_CurrentActivity.state=="Blu Ray"){ sendCommand(SamsungDVD_, "Home")} } if (livingroomav.state=="play"){ if (HarmonyHub_CurrentActivity.state=="Shield"){ sendCommand(NVIDIAShield_, "Play")} if (HarmonyHub_CurrentActivity.state=="TV"){ sendCommand(HumaxDVR_, "Play")} if (HarmonyHub_CurrentActivity.state=="Blu Ray"){ sendCommand(SamsungDVD_, "Play")} } if (livingroomav.state=="pause"){ if (HarmonyHub_CurrentActivity.state=="Shield"){ sendCommand(NVIDIAShield_, "Pause")} if (HarmonyHub_CurrentActivity.state=="TV"){ sendCommand(HumaxDVR_, "Pause")} if (HarmonyHub_CurrentActivity.state=="Blu Ray"){ sendCommand(SamsungDVD_, "Pause")} } if (livingroomav.state=="stop"){ if (HarmonyHub_CurrentActivity.state=="Shield"){ sendCommand(NVIDIAShield_, "Stop")} if (HarmonyHub_CurrentActivity.state=="TV"){ sendCommand(HumaxDVR_, "Stop")} if (HarmonyHub_CurrentActivity.state=="Blu Ray"){ sendCommand(SamsungDVD_, "Stop")} } if (livingroomav.state=="menu"){ if (HarmonyHub_CurrentActivity.state=="Shield"){ sendCommand(NVIDIAShield_, "Menu")} if (HarmonyHub_CurrentActivity.state=="TV"){ sendCommand(HumaxDVR_, "Guide")} if (HarmonyHub_CurrentActivity.state=="Blu Ray"){ sendCommand(SamsungDVD_, "DiskMenu")} } if (livingroomav.state=="rw"){ if (HarmonyHub_CurrentActivity.state=="Shield"){ sendCommand(NVIDIAShield_, "Rewind")} if (HarmonyHub_CurrentActivity.state=="TV"){ sendCommand(HumaxDVR_, "Rewind")} if (HarmonyHub_CurrentActivity.state=="Blu Ray"){ sendCommand(SamsungDVD_, "Rewind")} } if (livingroomav.state=="ff"){ if (HarmonyHub_CurrentActivity.state=="Shield"){ sendCommand(NVIDIAShield_, "Fastforward")} if (HarmonyHub_CurrentActivity.state=="TV"){ sendCommand(HumaxDVR_, "FastForward")} if (HarmonyHub_CurrentActivity.state=="Blu Ray"){ sendCommand(SamsungDVD_, "FastForward")} } end