midea air conditioning smart network device remote control (without m-smart cloud)
an attempt to reverse engineer the air conditioning control protocol of the manufacturer midea (potentially of other brands. it is possible to identify such a device by using "NetHome" software). allows you to control the air conditioning smart device without using a m-smart cloud.
./ac.pl --ip 192.168.1.2 --set --power on --mode cool --temp 20
--help brief help message
--ip device IP address or host name
--get fetch device settings
--set update device settings
--discover searches for compatible devices
--power turn power state: [on|off]
--temp set target temperature: [16..30]
--mode set operational mode: [auto|cool|dry|heat|fan]
--fan set fan speed: [auto|high|medium|low|silent]
--turbo turn turbo mode: [on|off]
--swing set swing mode: [off|vertical|horizontal|both]
--eco turn eco mode: [on|off]
--buzzer turn audible feedback: [on|off]
--value output of values alone
--begin beginning of the output string [default: none]
--end end of the output string [default: "\n"]
--quote use quotes [default: none]
__--unquote_num__ do not use quotes for numbers
--separator field separator [default: ":"]
--delimiter fields delimiter [default: "\n"]
--exit exit code 0 if value ON, else exit code 1 [eco|led|error|turbo|buzzer|unit|power]
Print a brief help message and exits.
IP address or host name of the device
The operation of reading device parameters By default, all fields will be displayed
For example, you can display only one field (name with value) using the following arguments:
...--get --temp
Or display only the requested fields using the following arguments:
...--get --temp --mode --power
Or display only the value of the desired field, using the following arguments:
...--get --power --value
The operation of writing device parameters
For example, you can turn on the device using the following arguments and their values:
...--set --power on
Or turn off the device using the following arguments and their values:
...--set --power off
Or at the same time as the device is turned on, set the parameters and modes of its operation, using the following arguments and their values:
...--set --power on --mode cool --swing off --fan auto --temp 20
Or simply change one of the parameters using the following arguments and their values:
...--set --temp 17
The parameter controls the power state of the device
It can take one of the following values: [on|off]
The parameter controls the target temperature that the device will try to reach
It can take positive integer values from this range: [16..30]
The parameter controls the operation mode of the device
It can take one of the following values: [auto|cool|dry|heat|fan]
The parameter controls the operation mode of the device blower fan
It can take one of the following values: [auto|high|medium|low|silent]
The parameter controls the turbo mode of the device
It can take one of the following values: [on|off]
The parameter controls the operation mode of the blinds of the device
It can take one of the following values: [off|vertical|horizontal|both]
The parameter controls the eco mode of the device
It can take one of the following values: [on|off]
The parameter controls the sound response mode of the device
It can take one of the following values: [on|off]
Enables output of values alone, without field names
To output a simple array of values in JSON notation, use the following combination of arguments and their values:
...--begin "[" --end "]" --delimiter "," --quote "\"" --unquote_num --value
The string to be put at the beginning of the output
The string to be put at the end of the output
Specifies the string that will be used at the beginning and at the end of each field name and the value itself individually
Cancels the string that will be used at the beginning and at the end of each value if the value itself is a number
To display the output as formatted JSON, use the following combination of arguments and their values:
...--begin "{\n\t" --end "\n}\n" --delimiter ",\n\t" --quote "\"" --unquote_num
For unformatted JSON output, use the following combination of arguments and their values:
...--begin "{" --end "}" --delimiter "," --quote "\"" --unquote_num
The separator to be used between the name of the field and its value (tupple)
Separator to be used between tuples
The exit code will be used: if the specified parameter is set to ON, then the exit code will be 0, otherwise, the exit code will be 1
It can take one of the following values: [eco|led|error|turbo|buzzer|unit|power]
To check the power status of a device when used in third party scripts, use the following combination of arguments and their values:
...--exit power && echo "ac is on"
or
...--exit power || echo "ac is off"
Searches for compatible devices on the specified network
The network can take values in the form of:
single IP address:
...--discover --ip 192.168.1.1
network with mask:
...--discover --ip 192.168.1.0/255.255.255.0
network with mask length:
...--discover --ip 192.168.1.0/24
range of IP addresses:
...--discover --ip 192.168.1.1-192.168.1.8
For fast UDP broadcast searches, use the following parameters and their values:
...--discover --ip 255.255.255.255
openssl
binary - selection will be made automatically depending on the availability of one of the options