Probe given address for bulb.
14777
def probe(self, ipaddr=None):
        
        if ipaddr is None:
            # no address so use broadcast
            ipaddr = self._broadcast_addr

        cmd = {"payloadtype": PayloadType.GET,
               "target": ipaddr}

        self._send_command(cmd)
902993
@UiHandler("m_addressField")
    void onAddressSelection(SelectionEvent<SuggestOracle.Suggestion> event) {

        m_controller.onAddressChange(event.getSelectedItem());
    }
578386
def request_b

      # 2F 3F 12 Bytes Address 30 31 21 0D 0A
      # /?00000000012301! then a CRLF
      request = "/?" + meter_number + "01!\r\n"
      read_bytes = 255
      @logger.debug "Socket write #{request}" unless logger.nil?
      response = get_remote_meter_data(request, read_bytes)
      if response.nil?
        @logger.error "No response to request_a from meter #{meter_number}"
        raise EkmOmnimeter, "No response from meter."
      end

      # Split the response string into an array and prepare a hash to store the values
      a = response.split('')
      d = {}

      # Return (255 Bytes total) :
      a.shift(1)                               # 02
      d[:meter_type] = a.shift(2)              # 2 Byte Meter Type
      d[:meter_firmware] = a.shift(1)          # 1 Byte Meter Firmware
      d[:address] = a.shift(12)                # 12 Bytes Address

      # Diff from request A start
      #d[:t1_t2_t3_t4_kwh] = a.shift(32)        # 32 Bytes T1, T2, T3, T4 kwh
      d[:total_kwh_t1] = a.shift(8)
      d[:total_kwh_t2] = a.shift(8)
      d[:total_kwh_t3] = a.shift(8)
      d[:total_kwh_t4] = a.shift(8)

      #d[:t1_t2_t3_t4_rev_kwh] = a.shift(32)    # 32 Bytes T1, T2, T3, T4 Rev kWh
      d[:reverse_kwh_t1] = a.shift(8)
      d[:reverse_kwh_t2] = a.shift(8)
      d[:reverse_kwh_t3] = a.shift(8)
      d[:reverse_kwh_t4] = a.shift(8)

      # Diff from request A end
      d[:volts_l1] = a.shift(4)                # 4 Bytes Volts L1
      d[:volts_l2] = a.shift(4)                # 4 Bytes Volts L2
      d[:volts_l3] = a.shift(4)                # 4 Bytes Volts L3
      d[:amps_l1] = a.shift(5)                 # 5 Bytes Amps L1
      d[:amps_l2] = a.shift(5)                 # 5 Bytes Amps L2
      d[:amps_l3] = a.shift(5)                 # 5 Bytes Amps L3
      d[:watts_l1] = a.shift(7)                # 7 Bytes Watts L1
      d[:watts_l2] = a.shift(7)                # 7 Bytes Watts L2
      d[:watts_l3] = a.shift(7)                # 7 Bytes Watts L3
      d[:watts_total] = a.shift(7)             # 7 Bytes Watts Total
      d[:power_factor_1] = a.shift(4)          # 4 Bytes Cosϴ L1
      d[:power_factor_2] = a.shift(4)          # 4 Bytes Cosϴ L2
      d[:power_factor_3] = a.shift(4)          # 4 Bytes Cosϴ L3
      # Diff from request A start
      d[:maximum_demand] = a.shift(8)                # 8 Bytes Maximum Demand
      d[:maximum_demand_period] = a.shift(1)         # 1 Byte Maximum Demand Time
      d[:pulse_1_ratio] = a.shift(4)                 # 4 Bytes Pulse Ratio 1
      d[:pulse_2_ratio] = a.shift(4)                 # 4 Bytes Pulse Ratio 2
      d[:pulse_3_ratio] = a.shift(4)                 # 4 Bytes Pulse Ratio 3
      d[:ct_ratio] = a.shift(4)                      # 4 Bytes CT Ratio
      d[:auto_reset_max_demand] = a.shift(1)         # 1 Bytes Auto Reset MD
      d[:settable_pulse_per_kwh_ratio] = a.shift(4)  # 4 Bytes Settable Imp/kWh Constant
      # Diff from request A end
      a.shift(56)                              # 56 Bytes Reserved
      meter_timestamp = a.shift(14).join('')   # 14 Bytes Current Time
      a.shift(6)                               # 30 30 21 0D 0A 03
      d[:checksum] = a.shift(2)                   # 2 Bytes CRC16

      # Smash arrays into strungs
      d.each {|k,v| d[k] = v.join('')}

      # Verify that the checksum is correct
      verify_checksum(response, d[:checksum])

      # Cast types
      d[:meter_type] = d[:meter_type].unpack('H*')[0]
      d[:meter_firmware] = d[:meter_firmware].unpack('H*')[0]
      d[:power_factor_1] = cast_power_factor(d[:power_factor_1])
      d[:power_factor_2] = cast_power_factor(d[:power_factor_2])
      d[:power_factor_3] = cast_power_factor(d[:power_factor_3])
      d[:meter_timestamp] = as_datetime(meter_timestamp)
      cast_response_to_correct_types(d)

      # Lookup mapped values
      d[:meter_type] = METER_TYPE_MAP[d[:meter_type]]
      d[:maximum_demand_period] = DEMAND_PERIOD_TIME_MAP[d[:maximum_demand_period]]
      d[:auto_reset_max_demand] = AUTO_RESET_MAX_DEMAND_MAP[d[:auto_reset_max_demand]]

      # Merge to values and reset time
      @values.merge!(d)
      @last_read_timestamp = Time.now

      # Calculate totals based on wiring configuration
      @values[:volts] = calculate_measurement(volts_l1, volts_l2, volts_l3)
      @values[:amps]  = calculate_measurement(amps_l1, amps_l2, amps_l3)
      @values[:watts] = calculate_measurement(watts_l1, watts_l2, watts_l3)

      # Return the values returned by just this call (different than values)
      return d

    end
423577
def led(host, seq, anim, f, d):
    
    at(host, 'LED', seq, [anim, float(f), d])
1187070
def lights(self):
        """"""
        return [Light(self._device, i) for i in range(len(self.raw))]
875273
def probe(self, params, lazy=True):
        """"""
        if lazy:
            self._queue.add(params)
        else:
            self._space.probe(params)
            self.dispatch(Events.OPTMIZATION_STEP)
1205962
def colour_hsv(self):
        """"""
        hexvalue = self.status()[self.DPS][self.DPS_INDEX_COLOUR]
        return BulbDevice._hexvalue_to_hsv(hexvalue)
1297566
def __find_new(self, hueobjecttype):
        '''
        
        '''
        assert hueobjecttype in ['lights', 'sensors'], \
            'Unsupported object type {}'.format(hueobjecttype)
        url = '{}/{}'.format(self.API, hueobjecttype)
        return self._request(
            method='POST',
            url=url
        )
181003
def on(self, group):
        """"""
        asyncio.ensure_future(self._send_led_on_off_request(group, 1),
                              loop=self._loop)
917075
def probe_plate(self) -> str:
        '''
        
        '''
        self.run_flag.wait()

        try:
            self._send_command(GCODES['PROBE_PLATE'])
        except (MagDeckError, SerialException, SerialNoResponse) as e:
            return str(e)
        return ''
1098051
def load_probe(name):
    """"""
    if op.exists(name):
        # The argument can be either a path to a PRB file.
        path = name
    else:
        # Or the name of a built-in probe.
        curdir = op.realpath(op.dirname(__file__))
        path = op.join(curdir, 'probes/{}.prb'.format(name))
    if not op.exists(path):
        raise IOError("The probe `{}` cannot be found.".format(name))
    return MEA(probe=_read_python(path))
650593
def light_on(self, button: Button):
        """"""
        self.outport.send(mido.Message('polytouch', note=button.light, value=1))
619260
def on_hid_pnp(self, hid_event = None):
        """"""
        # keep old reference for UI updates
        old_device = self.device

        if hid_event:
            print("Hey, a hid device just %s!" % hid_event)

        if hid_event == "connected":
            # test if our device is available
            if self.device:
                # see, at this point we could detect multiple devices!
                # but... we only want just one
                pass
            else:
                self.test_for_connection()
        elif hid_event == "disconnected":
            # the hid object is automatically closed on disconnection we just
            # test if still is plugged (important as the object might be
            # closing)
            if self.device and not self.device.is_plugged():
                self.device = None
                print("you removed my hid device!")
        else:
            # poll for devices
            self.test_for_connection()

        if old_device != self.device:
            # update ui
            pass
758606
def get_bulb_state(self):
        """"""
        self.get_status()
        try:
            self.state = self.data['on']
        except TypeError:
            self.state = False

        return bool(self.state)
701508
def update(self):
        """"""
        if not self._continuous_sampling \
                or self._light_level < 0 \
                or self._operation_mode != self._mode:
            self._reset()
            self._set_mode(self._operation_mode)
            self._wait_for_result()
        self._light_level = self._get_result()
        if not self._continuous_sampling:
            self._power_down()
534300
function Probe(collector) {
    this.fuse();

    //
    // Name of the probe, the registries the probe should run against
    // and how often it should run.
    //
    this.readable('name', name);
    this.readable('collector', collector);
    this.readable('list', Object.keys(require('../registries')));

    //
    // How often should the probe run.
    //
    this.readable('interval', interval);
  }
1208712
def __do_query_state(self):
    """"""
    self._lutron.send(Lutron.OP_QUERY, Keypad._CMD_TYPE, self._keypad.id,
            self.component_number, Led._ACTION_LED_STATE)