Skip to content

PJLink Binding ​

This binding allows you to control devices with PJLink support. PJLink is a protocol that was developed to standardize IP control of digital projectors, but can also be used by other device types.

Aspects that can be controlled via PJLink include power on/off, input source selection, and volume/mute.

Supported Things ​

This binding supports devices which implement the PJLink protocol (Class 1).

Limitations at this point:

  • only IPv4 connections are supported
  • only PJLink Class 1 commands are supported. Class 2 devices should work fine nevertheless, it is just the Class 2 features that will not work.

The binding is tested with the PJLink device test tool (PJLinkTEST4CNT) and an Acer VL7680.

Discovery ​

Autodiscovery scans all Class C IPv4 subnets connected to the openHAB system for devices that respond to PJLink on the standard port 4352.

Thing Configuration ​

The pjLinkDevice Thing type has the following parameters:

ParameterDescription
ipAddressthe IPv4 address of the device Mandatory
tcpPortthe listening TCP port of the devices. Optional, the default value is 4352
adminPasswordthe PJLink password of the device (should be left empty for devices without authentication). Optional
refreshIntervalthe polling interval (in seconds) to update the channel values from the device, can be set to 0 to disable polling. Optional, the default value is 5
refreshPowerenables polling of the power status. Optional, the default value is false
refreshMuteenables polling of the mute status. Optional, the default value is false
refreshInputChannelenables polling of the selected input channel. Optional, the default value is false
refreshLampStateenables polling of the lamp usage hours and activity. Optional, the default value is false
autoReconnectIntervalseconds between connection retries when connection to the PJLink device has been lost, 0 means never retry, minimum 30s Optional, the default value is 60

Channels ​

ChannelDescription
powerSwitches the device on/off
inputSwitches the input channel of the device
audioMuteMutes the device audio
videoMuteMutes the device video
lamp1HoursThe hours lamp 1 has been in use
lamp1ActiveShows if lamp 1 is in use

Full Example ​

sample.things:

java
pjLinkDevice:pjLinkDevice:MyProjector [ ipAddress="192.168.178.10" ]

sample.items:

dsl
Switch Projector_Power "Projector Power"          { channel="pjLinkDevice:pjLinkDevice:MyProjector:power" }
String Projector_Input "Projector Input"          { channel="pjLinkDevice:pjLinkDevice:MyProjector:input" }
Switch Projector_AudioMute "Projector Audio Mute" { channel="pjLinkDevice:pjLinkDevice:MyProjector:audioMute" }
Switch Projector_VideoMute "Projector Video Mute" { channel="pjLinkDevice:pjLinkDevice:MyProjector:videoMute" }
Number Projector_Lamp1Hours "Projector lamp 1 used hours"   { channel="pjLinkDevice:pjLinkDevice:MyProjector:lamp1Hours" }
Switch Projector_Lamp1Active "Projector lamp 1 active"      { channel="pjLinkDevice:pjLinkDevice:MyProjector:lamp1Active" }

sample.sitemap:

dsl
sitemap sample label="Main Menu" {
  Frame  {
    Switch item=Projector_Power
    Selection item=Projector_Input
    Switch item=Projector_AudioMute
    Switch item=Projector_VideoMute
    Switch item=Projector_Lamp1Active
    Text item=Projector_Lamp1Hours
  }
}

Multiple lamps ​

Most of the time, there's just one lamp. In case a projector has more than one lamp, additional channels for those lamps can be configured.

sample-lamp-2.things:

dsl
pjLinkDevice:pjLinkDevice:MyProjector [ ipAddress="192.168.178.10" ]
{
  Channels:
    Type lampHours : lamp2Hours "Lamp 2 Hours" [
        lampNumber=2
    ]
    Type lampActive : lamp2Active "Lamp 2 Active" [
        lampNumber=2
    ]
}

sample-lamp-2.items:

dsl
Number Projector_Lamp2Hours "Projector lamp 2 used hours"   { channel="pjLinkDevice:pjLinkDevice:MyProjector:lamp2Hours" }
Switch Projector_Lamp2Active "Projector lamp 2 active"      { channel="pjLinkDevice:pjLinkDevice:MyProjector:lamp2Active" }

sample-lamp-2.sitemap:

dsl
sitemap sample label="Main Menu" {
  Frame  {
    Switch item=Projector_Lamp2Active
    Text item=Projector_Lamp2Hours
  }
}