private @Nullable SCPDUtil scpdUtil;
private SOAPConnector soapConnector;
- private String endpointBaseURL = "http://fritz.box:49000";
+ private String endpointBaseURL = "";
private final Map<ChannelUID, Tr064ChannelConfig> channels = new HashMap<>();
// caching is used to prevent excessive calls to the same action
private @Nullable ScheduledFuture<?> pollFuture;
private @Nullable ScheduledFuture<?> phonebookFuture;
+ private boolean communicationEstablished = false;
+
Tr064RootHandler(Bridge bridge, HttpClient httpClient) {
super(bridge);
this.httpClient = httpClient;
- soapConnector = new SOAPConnector(httpClient, endpointBaseURL);
+ this.soapConnector = new SOAPConnector(httpClient, endpointBaseURL);
}
@Override
public void handleCommand(ChannelUID channelUID, Command command) {
+ if (!communicationEstablished) {
+ logger.debug("Tried to process command, but thing is not yet ready: {} to {}", channelUID, command);
+ }
Tr064ChannelConfig channelConfig = channels.get(channelUID);
if (channelConfig == null) {
logger.trace("Channel {} not supported.", channelUID);
updateThing(thingBuilder.build());
}
+ communicationEstablished = true;
installPolling();
updateStatus(ThingStatus.ONLINE, ThingStatusDetail.NONE);
}
@Override
public void dispose() {
+ communicationEstablished = false;
removeConnectScheduler();
uninstallPolling();
stateCache.clear();