[Tapocontrol] Restore child device querying (#14788)

Signed-off-by: Gael L'hopital <gael@lhopital.org>
This commit is contained in:
Gaël L'hopital 2023-04-12 09:58:08 +02:00 committed by GitHub
parent cc626de89a
commit aee454850b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 6 deletions

View File

@ -11,5 +11,7 @@
</parent>
<artifactId>org.openhab.binding.tapocontrol</artifactId>
<name>openHAB Add-ons :: Bundles :: TapoControl Binding</name>
</project>

View File

@ -218,7 +218,7 @@ public class TapoDeviceConnector extends TapoDeviceHttpApi {
* @param ignoreGap ignore gap to last query. query anyway
*/
public void queryInfo(boolean ignoreGap) {
logger.trace("({}) DeviceConnetor_queryInfo from '{}'", uid, deviceURL);
logger.trace("({}) DeviceConnector_queryInfo from '{}'", uid, deviceURL);
queryCommand(DEVICE_CMD_GETINFO, ignoreGap);
}
@ -227,8 +227,8 @@ public class TapoDeviceConnector extends TapoDeviceHttpApi {
*/
@Override
public void queryChildDevices() {
logger.trace("({}) DeviceConnetor_queryChildDevices from '{}'", uid, deviceURL);
queryCommand(DEVICE_CMD_CHILD_DEVICE_LIST, false);
logger.trace("({}) DeviceConnector_queryChildDevices from '{}'", uid, deviceURL);
queryCommand(DEVICE_CMD_CHILD_DEVICE_LIST, true);
}
/**
@ -245,7 +245,7 @@ public class TapoDeviceConnector extends TapoDeviceHttpApi {
* @param ignoreGap ignore gap to last query. query anyway
*/
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();
if (ignoreGap || now > this.lastQuery + TAPO_SEND_MIN_GAP_MS) {
this.lastQuery = now;

View File

@ -5,4 +5,6 @@
<type>binding</type>
<name>TapoControl Binding</name>
<description>Control your TAPO-SmartHome Devices</description>
<connection>cloud</connection>
</addon:addon>