• Join/Login
  • Business Software
  • Open Source Software
  • For Vendors
  • Blog
  • About
  • More
    • Articles
    • Create
    • SourceForge Podcast
    • Site Documentation
    • Subscribe to our Newsletter
    • Support Request
SourceForge logo
For Vendors Help Create Join Login
SourceForge logo
Business Software
Open Source Software
SourceForge Podcast
Resources
  • Articles
  • Case Studies
  • Blog
Menu
  • Help
  • Create
  • Join
  • Login
  • Home
  • Browse
  • AMX Duet PJLink Module
  • Code

AMX Duet PJLink Module Code

Control PJLink projectors over IP with AMX Duet or NetLinx.

Brought to you by: amclain
  • Summary
  • Files
  • Reviews
  • Support
  • Documentation
  • Code
Menu ▾ ▴
 
  • Browse Commits
  • Fork
  • Merge Requests 0

Branches

  • default

Tags

  • v0.1.0
  • v0.1.1
  • tip

Tree [ff2980] default tip /
 History

Read Only access


File Date Author Commit
 META-INF 2013-05-02 Alex McLain Alex McLain [3a826e] Added license boilerplate.
 com 2013-05-02 Alex McLain Alex McLain [3a826e] Added license boilerplate.
 dist 2013-05-02 Alex McLain Alex McLain [3a826e] Added license boilerplate.
 doc 2013-05-02 Alex McLain Alex McLain [3a826e] Added license boilerplate.
 .classpath 2013-05-02 Alex McLain Alex McLain [0ca20c] Packaged v0.1.1.
 .duetproperties 2013-05-02 Alex McLain Alex McLain [3a826e] Added license boilerplate.
 .hgignore 2012-11-01 Alex McLain Alex McLain [0cfd57] Added disconnect timer if connection stalls.
 .hgtags 2013-05-02 Alex McLain Alex McLain [5a20ed] Moved tag v0.1.1 to changeset 3a826ef7b3a2 (fro...
 .project 2012-11-01 Alex McLain Alex McLain [66766a] Initial import.
 README.md 2014-09-22 Alex McLain Alex McLain [ff2980] Updated readme with example code and repo boile...
 duet-lib-pjlink_dr0_1_1.axs 2013-05-02 Alex McLain Alex McLain [0ca20c] Packaged v0.1.1.
 duet-lib-pjlink_dr0_1_1.tkn 2013-05-02 Alex McLain Alex McLain [3a826e] Added license boilerplate.
 duet-lib-pjlink_dr0_1_1.tko 2013-05-02 Alex McLain Alex McLain [3a826e] Added license boilerplate.
 license.txt 2013-05-02 Alex McLain Alex McLain [3a826e] Added license boilerplate.

Read Me

AMX DUET PJLINK MODULE

duet-lib-pjlink

This library contains the code for NetLinx or Duet projects to interface with video projectors that implement the PJLink protocol over TCP/IP. This class adheres to the Java 1.4ME API to maintain compatibility with AMX Duet devices.

Overview

  • AMX DUET PJLINK MODULE
    • Overview
    • Download
    • Issues, Bugs, Feature Requests
    • Known Issues
    • Examples
      • Channel Numbers
      • Setting Up The Module
      • Triggering Projector Actions

Download

Git Users:

https://github.com/amclain/duet-lib-pjlink

Mercurial Users:

https://bitbucket.org/amclain/duet-lib-pjlink

Zip File:

Both sites above offer a feature to download the source code as a zip file.
Any stable release, as well as the current development snapshot can be downloaded.

Issues, Bugs, Feature Requests

Any bugs and feature requests should be reported on the GitHub issue tracker:

https://github.com/amclain/duet-lib-pjlink/issues

Pull requests are preferred via GitHub.

Mercurial users can use Hg-Git to interact with
GitHub repositories.

Known Issues

  • The NetLinx pulse keyword can trigger the on/off channel events in a way that
    doesn't get passed to the Duet module. Therefore on and off should be used.
    Wrapping the call to off in a 1 second wait time seems to be a valid workaround.

  • Error status channels may not work correctly.

Examples

Channel Numbers

The full list of channel numbers can be found in the file PJLinkModule.java

Setting Up The Module

(***********************************************************)
(*           DEVICE NUMBER DEFINITIONS GO BELOW            *)
(***********************************************************)
DEFINE_DEVICE

dvPROJ            = 41001:1:0;

(***********************************************************)
(*              CONSTANT DEFINITIONS GO BELOW              *)
(***********************************************************)
DEFINE_CONSTANT

// Duet Device Channels
PROJ_POWER_ON           = 27;
PROJ_POWER_OFF          = 28;

PROJ_PICTURE_MUTE       = 211;

PROJ_WARMING            = 253;
PROJ_COOLING            = 254;
PROJ_LAMP_ON            = 255;

// Projector Sources
PROJ_SOURCE_VGA_1       = 311;
PROJ_SOURCE_HDMI_1      = 332;

(***********************************************************)
(*                 STARTUP CODE GOES BELOW                 *)
(***********************************************************)
DEFINE_START

define_module 'duet-lib-pjlink_dr0_1_1' pj1(dvPROJ);

(***********************************************************)
(*                   THE EVENTS GO BELOW                   *)
(***********************************************************)
DEFINE_EVENT

data_event[dvPROJ]
{
    online:
    {
        set_virtual_channel_count(data.device, 512);

        // Set projector IP address.
        send_command data.device, 'IPADDR=192.168.1.12';
    }

    command:
    {
        if (find_string(data.text, 'LAMPTIME-', 1) > 0)
        {
            lampHours = atoi(right_string(data.text, length_string(data.text) - 9));
        }
    }
}

// Switch to input after warmup.
channel_event[dvPROJ, PROJ_LAMP_ON]
{
    on:
    {
        wait 600
        {
            cancel_wait 'input_select_proj'
            on[dvPROJ, PROJ_SOURCE_HDMI_1];
            wait 10 'input_select_proj' off[dvPROJ, PROJ_SOURCE_HDMI_1];
        }
    }

    off: {}
}

Triggering Projector Actions

// Projector Controls
button_event[vdvTP, BTN_PROJECTOR_ON]
{
    push:
    {
        on[dvPROJ, PROJ_POWER_ON];
        wait 10 { off[dvPROJ, PROJ_POWER_ON]; }
    }

    release: {}
}

button_event[vdvTP, BTN_PROJECTOR_OFF]
{
    push:
    {
        on[dvPROJ, PROJ_POWER_OFF];
        wait 10 { off[dvPROJ, PROJ_POWER_OFF]; }
    }

    release: {}
}
SourceForge
  • Create a Project
  • Open Source Software
  • Business Software
  • Top Downloaded Projects
Company
  • About
  • Team
  • SourceForge Headquarters
    1320 Columbia Street Suite 310
    San Diego, CA 92101
    +1 (858) 422-6466
Resources
  • Support
  • Site Documentation
  • Site Status
  • SourceForge Reviews
SourceForge logo
© 2025 Slashdot Media. All Rights Reserved.
Terms Privacy Opt Out Advertise
×