There are solutions available but they generally use a third party control system like AMX, Crestron, Control4 or others. In these setups the iPhone just comunicates to the third party controller via the wireless computer network. Then the controller sends the commands to the connected equipment (via IR, RS232, TCPIP, relays, etc.)