Pixlite4 - Linux support

Discussion in 'Advatek Lights' started by cjd, Aug 31, 2015.

  1. cjd

    cjd New Elf

    Joined:
    Nov 17, 2012
    Messages:
    42
    Likes Received:
    1
    Location:
    Gosford, Australia
    Find Me On:
    G'day,
    I'm just wondering if you have documented anywhere how to get temperature information from a pixlite4 directly?
    I know that I can use the Advatek assistant tool - but that only runs on windows (not linux)
    I'd like to be able to monitor the temperature of the controller from my linux box (and perhaps even integrate the monitoring into FPP running on a Raspberry Pi)
     
  2. ltay13

    ltay13 Full Time Elf Community Project Designer

    Joined:
    Jan 2, 2012
    Messages:
    121
    Likes Received:
    1
    Location:
    Eastern Melbourne
    There isn't any native software for Linux to read back the temperature. The Advatek Assistant software will run on Windows or OSX but not Linux. If you're looking to integrate the feedback into the FPP code however it's possible you can do this with some basic UDP packets. If you're interested, contact us at support@advateklights.com so we can talk about the details.
     
  3. OP
    OP
    cjd

    cjd New Elf

    Joined:
    Nov 17, 2012
    Messages:
    42
    Likes Received:
    1
    Location:
    Gosford, Australia
    Find Me On:
    Re: Pixlite4 - Temperature information from linux

    In case anyone is interested - I've written a quick perl script (with assistance from advatek) to query the temperature from a Pixlite controller.
    There isn't much to it - you only need to change the IP address to whatever the controller is on.
    It's handy for monitoring temperature.
    Code:
    #!/usr/bin/perl
    use IO::Socket;
    use strict;
    
    my $response = IO::Socket::INET->new(Proto=>"udp",LocalPort=>49150)
      or die "Can't make UDP server: $@";
    
    my $message = IO::Socket::INET->new(Proto=>"udp",PeerPort=>49150,PeerAddr=>"192.168.0.50")
      or die "Can't make UDP socket: $@";
    $message->send("\x41\x64\x76\x61\x74\x65\x63\x68\x00\x00\x01\x02");
    
    my ($datagram,$flags);
    $response->recv($datagram,1024,$flags);
    my $temp = ((ord(substr($datagram,104,1))*265) + ord(substr($datagram,105,1)))/10;
    print "Temperature: ".$temp."\n";
    
     

Share This Page