[Tapocontrol] Restore child device querying (#14788)
Signed-off-by: Gael L'hopital <gael@lhopital.org>
This commit is contained in:
parent
cc626de89a
commit
aee454850b
@ -11,5 +11,7 @@
|
|||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>org.openhab.binding.tapocontrol</artifactId>
|
<artifactId>org.openhab.binding.tapocontrol</artifactId>
|
||||||
|
|
||||||
<name>openHAB Add-ons :: Bundles :: TapoControl Binding</name>
|
<name>openHAB Add-ons :: Bundles :: TapoControl Binding</name>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@ -214,11 +214,11 @@ public class TapoDeviceConnector extends TapoDeviceHttpApi {
|
|||||||
/**
|
/**
|
||||||
* Query Info from Device and refresh deviceInfo
|
* Query Info from Device and refresh deviceInfo
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @param ignoreGap ignore gap to last query. query anyway
|
* @param ignoreGap ignore gap to last query. query anyway
|
||||||
*/
|
*/
|
||||||
public void queryInfo(boolean ignoreGap) {
|
public void queryInfo(boolean ignoreGap) {
|
||||||
logger.trace("({}) DeviceConnetor_queryInfo from '{}'", uid, deviceURL);
|
logger.trace("({}) DeviceConnector_queryInfo from '{}'", uid, deviceURL);
|
||||||
queryCommand(DEVICE_CMD_GETINFO, ignoreGap);
|
queryCommand(DEVICE_CMD_GETINFO, ignoreGap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -227,8 +227,8 @@ public class TapoDeviceConnector extends TapoDeviceHttpApi {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void queryChildDevices() {
|
public void queryChildDevices() {
|
||||||
logger.trace("({}) DeviceConnetor_queryChildDevices from '{}'", uid, deviceURL);
|
logger.trace("({}) DeviceConnector_queryChildDevices from '{}'", uid, deviceURL);
|
||||||
queryCommand(DEVICE_CMD_CHILD_DEVICE_LIST, false);
|
queryCommand(DEVICE_CMD_CHILD_DEVICE_LIST, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -240,12 +240,12 @@ public class TapoDeviceConnector extends TapoDeviceHttpApi {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Send Custom DeviceQuery
|
* Send Custom DeviceQuery
|
||||||
*
|
*
|
||||||
* @param queryCommand Command to be queried
|
* @param queryCommand Command to be queried
|
||||||
* @param ignoreGap ignore gap to last query. query anyway
|
* @param ignoreGap ignore gap to last query. query anyway
|
||||||
*/
|
*/
|
||||||
public void queryCommand(String queryCommand, boolean ignoreGap) {
|
public void queryCommand(String queryCommand, boolean ignoreGap) {
|
||||||
logger.trace("({}) DeviceConnetor_queryCommand '{}' from '{}'", uid, queryCommand, deviceURL);
|
logger.trace("({}) DeviceConnector_queryCommand '{}' from '{}'", uid, queryCommand, deviceURL);
|
||||||
long now = System.currentTimeMillis();
|
long now = System.currentTimeMillis();
|
||||||
if (ignoreGap || now > this.lastQuery + TAPO_SEND_MIN_GAP_MS) {
|
if (ignoreGap || now > this.lastQuery + TAPO_SEND_MIN_GAP_MS) {
|
||||||
this.lastQuery = now;
|
this.lastQuery = now;
|
||||||
|
|||||||
@ -5,4 +5,6 @@
|
|||||||
<type>binding</type>
|
<type>binding</type>
|
||||||
<name>TapoControl Binding</name>
|
<name>TapoControl Binding</name>
|
||||||
<description>Control your TAPO-SmartHome Devices</description>
|
<description>Control your TAPO-SmartHome Devices</description>
|
||||||
|
<connection>cloud</connection>
|
||||||
|
|
||||||
</addon:addon>
|
</addon:addon>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user