The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Device::USB::PX1674 - Perl CMD-Class for Revolt USB Dongle PX-1674-675

SYNOPSIS

  use Device::USB::PX1674;
  my $usb = Device::USB->new;
  
  my $px = Device::USB::PX1674->new(
    addr    => 0x1A85, # inhouse code
    verb    => 1,      # verbose output, shown as hex-dump
  ) || die $@;

  # Set Device 1 to state on
  $px->On(1);  

  # Switch off entire group
  $px->switch('Off');
  

DESCRIPTION

The instance of this class sends commands to USB-Dongle for switching on/off a certain RF power socket. The USB-device using this API must be configured for using libusb. This dongle has the vendor-id 0xFFFF and product-id 0x1122 by factory.

For a certain inhouse code it is possible to switch up to 6 RF power sockets in one group.

The Perl-Library Device::USB must be installed and the Revolt USB-dongle PX-1674-675 must be configured for using libusb.

CONSTRUCTOR

Available options are:

  addr => 0x1A1A,   # Hauscode
  verb => 0,        # Verbose 

METHODS

  On();
    If argument omitted, On() is switching entire group of devices.
      
  Off();
    Similar to On(); 
  
  switch('On',3);
    Same as On, Off but now 'On' or 'Off' are arguments. Group-switching similar to methods above.

PPM Packages for Win32

  ppm install http://rolfrost.de/Device-USB.ppd
  ppm install http://rolfrost.de/Device-USB-PX1674.ppd

SEE ALSO

  Device::USB
  LibUSB
  LibUSB-Win32

AUTHOR

Rolf Rost, < pilgrim@rolfrost.de >

COPYRIGHT AND LICENSE

Copyright (C) 2017 by Rolf Rost

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.16.3 or, at your option, any later version of Perl 5 you may have available.