An app for multiple devices already exists
There is already an app out there that can control devices from different manufacturers, DemoControl. It allows you to setup whatever commands you like to be sent over TCP\IP and with additional interface hardware can control devices over RS-232 and IR as well (if they don't have TCP\IP control). Currently part way through setting it up, but it controls my Virgin TiVo and Denon amp quite happily over TCP\IP, including commands that aren't available on the standard remote.
The interface is fully configureable using free PC software and supports advanced functionality such as status flags and two-way communication.