New PR candidate

Java doc and possible mdns discovery.

Signed-off-by: Bob Eckhoff <katmandodo@yahoo.com>
This commit is contained in:
Bob Eckhoff 2024-11-15 09:34:07 -05:00
parent 2a73de9d06
commit 32c2665811
4 changed files with 53 additions and 2 deletions

View File

@ -23,28 +23,64 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
@NonNullByDefault
public class MideaACConfiguration {
/**
* IP Address
*/
public String ipAddress = "";
/**
* IP Port
*/
public int ipPort = 6444;
/**
* Device ID
*/
public String deviceId = "0";
/**
* Cloud Account email
*/
public String email = "";
/**
* Cloud Account Password
*/
public String password = "";
/**
* Cloud Provider
*/
public String cloud = "";
/**
* Token
*/
public String token = "";
/**
* Key
*/
public String key = "";
/**
* Poll Frequency
*/
public int pollingTime = 60;
/**
* Socket Timeout
*/
public int timeout = 4;
/**
* Prompt tone from indoor unit with a Set Command
*/
public boolean promptTone = false;
/**
* AC Version
*/
public int version = 0;
/**

View File

@ -140,6 +140,7 @@ public class ConnectionManager {
}
retry = false;
try {
socket.close();
socket = new Socket();
socket.setSoTimeout(timeout * 1000);
socket.connect(new InetSocketAddress(ipAddress, ipPort), timeout * 1000);

View File

@ -21,6 +21,10 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
*/
@NonNullByDefault
public interface Callback {
/**
* Updates channels with the response
*
* @param response Byte response from the device used to update channels
*/
void updateChannels(Response response);
}

View File

@ -7,5 +7,15 @@
<name>MideaAC Binding</name>
<description>This is the binding for MideaAC.</description>
<connection>local</connection>
<discovery-methods>
<discovery-method>
<service-type>mdns</service-type>
<discovery-parameters>
<discovery-parameter>
<name>mdnsServiceType</name>
<value>_mideaair._tcp.local.</value>
</discovery-parameter>
</discovery-parameters>
</discovery-method>
</discovery-methods>
</addon:addon>