1. A method for transmitting data in a wireless system, wherein the wireless system comprises a first server, a second server, a relay device, and at least one appliance, wherein the first server and the relay device are connected to a network respectively; the second server communicates with the first server; the relay device is wirelessly connected to the at least one appliance, and is adapted to receive and store a state information of the at least one appliance; the method comprising the steps of:A. connecting to the first server by the relay device through the network, which is adapted for the relay device and the first server to transmit data to each other;
B. determining with the relay device whether the relay device is stored with the state information sent from the at least one appliance;
if the relay device stores the state information sent from the at least one appliance, then sending the state information to the first server by the relay device;
otherwise, sending a first interactive command to the first server by the relay device, wherein the first interactive command corresponds to a situation that the relay device is not stored with any state information of the at least one appliance; and
C. receiving a data sent from the relay device by the first server, and transmitting the data sent from the relay device to the second server for subsequent process; sending a second interactive command to the first server with the relay device, and then interrupting a connection with the first server, wherein the second interactive command requests the first server to interrupt a connection with the relay device.