Tabnine Logo
Device.getDeviceByUUID
Code IndexAdd Tabnine to your IDE (free)

How to use
getDeviceByUUID
method
in
ru.iris.common.database.model.devices.Device

Best Java code snippets using ru.iris.common.database.model.devices.Device.getDeviceByUUID (Showing top 2 results out of 315)

origin: MrNeuronix/IRISv2

private void setValue(String uuid, String label, Integer value) {
  Device device = Device.getDeviceByUUID(uuid);
  DeviceValue zv = device.getValue(label);
  if (zv != null) {
    if (!Manager.get().isValueReadOnly(gson.fromJson(zv.getValueId(), ValueId.class))) {
      setTypedValue(gson.fromJson(zv.getValueId(), ValueId.class), String.valueOf(value));
    } else {
      LOGGER.info("Value \"%s\" is read-only! Skip.", label);
    }
  }
}
origin: MrNeuronix/IRISv2

private void deviceSetLevel(GenericAdvertisement advertisement, Integer level) {
  String label = "Level";
  String uuid;
  if (level == null) {
    level = (Integer) advertisement.getValue("data");
    label = (String) advertisement.getValue("label");
    uuid = (String) advertisement.getValue();
  } else {
    uuid = (String) advertisement.getValue();
  }
  Device ZWaveDevice = Device.getDeviceByUUID(uuid);
  if (ZWaveDevice != null && !ZWaveDevice.getSource().equals("zwave")) {
    // not zwave
    return;
  }
  if (ZWaveDevice == null) {
    LOGGER.info("Cant find device with UUID " + uuid);
    return;
  }
  int node = ZWaveDevice.getNode();
  if (!ZWaveDevice.getStatus().equals("Dead")) {
    LOGGER.info("Setting value: " + level + " to label \"" + label + "\" on node " + node + " (UUID: " + uuid + ")");
    setValue(uuid, label, level);
  } else {
    LOGGER.info("Node: " + node + " Cant set empty value or node dead");
  }
}
ru.iris.common.database.model.devicesDevicegetDeviceByUUID

Popular methods of Device

  • getUuid
  • <init>
  • addValue
  • getSource
  • getValue
  • save
  • setInternalName
  • setInternalType
  • setManufName
  • setNode
  • setProductName
  • setSource
  • setProductName,
  • setSource,
  • setStatus,
  • setType,
  • setUuid,
  • getDeviceByNode,
  • getInternalName,
  • getNode,
  • getProductName

Popular in Java

  • Start an intent from android
  • findViewById (Activity)
  • onRequestPermissionsResult (Fragment)
  • getContentResolver (Context)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now