private synchronized void updateTimeoutCondition() {
    if (isTimeout() != isTimeoutCondition()) {
      this.timeout = isTimeoutCondition();
      onTimeout(isTimeout());
    }

    // always update timeout to show initial data
    this.timeoutItem.updateData(Variant.valueOf(isTimeout()), null, null);
  }
  /**
   * set a new connection state
   *
   * @param state the new connection state
   */
  protected synchronized void setConnectionState(final ConnectionState state) {
    logger.debug("Setting state to: {}", state);

    onPreStateChange(this.state, state);

    this.state = state;

    this.connectionStateItem.updateData(Variant.valueOf(state.name()), null, null);

    onPostStateChange();
  }
 /** Update the state items from the current device state */
 private void updateDeviceState() {
   this.stateItem.updateData(Variant.valueOf(isDeviceOk()), null, null);
 }