[openwebnet] Fix messages flooding BUS on reboot (#10934)

* [openwebnet] changed ALL_DEVICES_REFRESH_INTERVAL to 60s
to avoid lights/shutters status updates flooding

Signed-off-by: Massimo Valla <mvcode00@gmail.com>

* [openwebnet] added UPnP discovery for MyHOME_Screen3,5.
Updated catalogue links in README

Signed-off-by: Massimo Valla <mvcode00@gmail.com>
This commit is contained in:
M Valla
2021-07-06 20:00:01 +02:00
committed by GitHub
parent e967dc28bc
commit cdb8d46fa8
4 changed files with 20 additions and 18 deletions

View File

@@ -60,8 +60,8 @@ public class OpenWebNetAutomationHandler extends OpenWebNetThingHandler {
private static final SimpleDateFormat DATE_FORMATTER = new SimpleDateFormat("ss.SSS");
private static long lastAllDevicesRefreshTS = -1; // timestamp when the last request for all device refresh was sent
protected static final int ALL_DEVICES_REFRESH_INTERVAL_MSEC = 2000; // interval in msec before sending another all
// devices refresh request
protected static final int ALL_DEVICES_REFRESH_INTERVAL_MSEC = 60000; // interval in msec before sending another all
// devices refresh request
public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES = OpenWebNetBindingConstants.AUTOMATION_SUPPORTED_THING_TYPES;

View File

@@ -72,8 +72,8 @@ public class OpenWebNetLightingHandler extends OpenWebNetThingHandler {
private static long lastAllDevicesRefreshTS = -1; // timestamp when the last request for all device refresh was sent
// for this handler
protected static final int ALL_DEVICES_REFRESH_INTERVAL_MSEC = 2000; // interval in msec before sending another all
// devices refresh request
protected static final int ALL_DEVICES_REFRESH_INTERVAL_MSEC = 60000; // interval in msec before sending another all
// devices refresh request
private long lastBrightnessChangeSentTS = 0; // timestamp when last brightness change was sent to the device

View File

@@ -54,18 +54,19 @@ public class BusGatewayUpnpDiscovery implements UpnpDiscoveryParticipant {
MH202("scheduler", "MH202"),
F454("webserver", "F454"),
MY_HOME_SERVER1("myhomeserver1", "MYHOMESERVER1"),
TOUCH_SCREEN_3_5("touchscreen", "TOUCHSCREEN3_5"),
TOUCH_SCREEN_10("ts10", "TOUCHSCREEN10"),
MH200N("lightingcontrolunit", "MH200N");
private final String value, thingId;
private final String discoveryString, thingId;
private BusGatewayId(String value, String thingId) {
this.value = value;
this.discoveryString = value;
this.thingId = thingId;
}
public static @Nullable BusGatewayId fromValue(String s) {
Optional<BusGatewayId> m = Arrays.stream(values()).filter(val -> s.equals(val.value)).findFirst();
Optional<BusGatewayId> m = Arrays.stream(values()).filter(val -> s.equals(val.discoveryString)).findFirst();
if (m.isPresent()) {
return m.get();
} else {