New PJLink Binding for controlling multiple projector brands/models

If I use the Test Programm it works well and I got the follow responce

[2019.06.16 14:46:41.320] Connected!!!
[2019.06.16 14:46:41.595] RECV:pjlink 0

[2019.06.16 14:46:41.604] SEND:%1LAMP ?

[2019.06.16 14:46:41.764] RECV:%1lamp=4 1

[2019.06.16 14:46:41.771] Closed!!!(Disconnect)
[2019.06.16 14:46:45.049] Connected!!!
[2019.06.16 14:46:45.300] RECV:pjlink 0

[2019.06.16 14:46:45.306] SEND:%1INST ?

[2019.06.16 14:46:45.476] RECV:%1inst=11 21 31 32 41

[2019.06.16 14:46:45.481] Closed!!!(Disconnect)
[2019.06.16 14:46:46.460] Connected!!!
[2019.06.16 14:46:46.811] RECV:pjlink 0

[2019.06.16 14:46:46.816] SEND:%1NAME ?

[2019.06.16 14:46:47.075] RECV:%1name=Optoma UHD

[2019.06.16 14:46:47.080] 4F 70 74 6F 6D 61 20 55 48 44
[2019.06.16 14:46:47.087] Closed!!!(Disconnect)
[2019.06.16 14:46:48.172] Connected!!!
[2019.06.16 14:46:48.419] RECV:pjlink 0

[2019.06.16 14:46:48.424] SEND:%1INFO ?

[2019.06.16 14:46:48.677] RECV:%1info=UHD

[2019.06.16 14:46:48.683] Closed!!!(Disconnect)
[2019.06.16 14:46:49.580] Connected!!!
[2019.06.16 14:46:49.655] RECV:pjlink 0

[2019.06.16 14:46:49.659] SEND:%1INF1 ?

[2019.06.16 14:46:49.809] RECV:%1inf1=Optoma

[2019.06.16 14:46:49.814] Closed!!!(Disconnect)
[2019.06.16 14:46:50.491] Connected!!!
[2019.06.16 14:46:50.697] RECV:pjlink 0

[2019.06.16 14:46:50.701] SEND:%1INF2 ?

[2019.06.16 14:46:50.955] RECV:%1inf2=Optoma UHD

[2019.06.16 14:46:50.961] Closed!!!(Disconnect)
[2019.06.16 14:46:52.708] Connected!!!
[2019.06.16 14:46:52.960] RECV:pjlink 0

[2019.06.16 14:46:52.965] SEND:%1CLSS ?

[2019.06.16 14:46:53.217] RECV:%1clss=1

[2019.06.16 14:46:53.222] Closed!!!(Disconnect)
[2019.06.16 14:47:00.565] Connected!!!
[2019.06.16 14:47:00.881] RECV:pjlink 0

[2019.06.16 14:47:00.887] SEND:%1ERST ?

[2019.06.16 14:47:01.168] RECV:%1erst=000000

[2019.06.16 14:47:01.214] Closed!!!(Disconnect)
[2019.06.16 14:47:02.182] Connected!!!
[2019.06.16 14:47:02.487] RECV:pjlink 0

[2019.06.16 14:47:02.492] SEND:%1POWR ?

[2019.06.16 14:47:02.580] RECV:%1powr=1

[2019.06.16 14:47:02.585] Closed!!!(Disconnect)
[2019.06.16 14:47:02.846] Connected!!!
[2019.06.16 14:47:03.054] RECV:pjlink 0

[2019.06.16 14:47:03.060] SEND:%1INPT ?

[2019.06.16 14:47:03.288] RECV:%1inpt=41

[2019.06.16 14:47:03.295] Closed!!!(Disconnect)
[2019.06.16 14:47:03.392] Connected!!!
[2019.06.16 14:47:03.635] RECV:pjlink 0

[2019.06.16 14:47:03.640] SEND:%1AVMT ?

[2019.06.16 14:47:03.876] RECV:%1avmt=20

[2019.06.16 14:47:03.881] Closed!!!(Disconnect)
[2019.06.16 14:47:04.034] Connected!!!
[2019.06.16 14:47:04.137] RECV:pjlink 0

[2019.06.16 14:47:04.142] SEND:%1ERST ?

[2019.06.16 14:47:04.308] RECV:%1erst=000000

[2019.06.16 14:47:04.313] Closed!!!(Disconnect)
[2019.06.16 14:47:04.446] Connected!!!
[2019.06.16 14:47:04.705] RECV:pjlink 0

[2019.06.16 14:47:04.709] SEND:%1LAMP ?

[2019.06.16 14:47:04.764] RECV:%1lamp=4 1

[2019.06.16 14:47:04.768] Closed!!!(Disconnect)
[2019.06.16 14:47:04.864] Connected!!!
[2019.06.16 14:47:05.014] RECV:pjlink 0

[2019.06.16 14:47:05.018] SEND:%1INST ?

[2019.06.16 14:47:05.344] RECV:%1inst=11 21 31 32 41

[2019.06.16 14:47:05.349] Closed!!!(Disconnect)
[2019.06.16 14:47:05.437] Connected!!!
[2019.06.16 14:47:05.602] RECV:pjlink 0

[2019.06.16 14:47:05.606] SEND:%1NAME ?

[2019.06.16 14:47:05.686] RECV:%1name=Optoma UHD

[2019.06.16 14:47:05.690] 4F 70 74 6F 6D 61 20 55 48 44
[2019.06.16 14:47:05.693] Closed!!!(Disconnect)
[2019.06.16 14:47:06.024] Connected!!!
[2019.06.16 14:47:06.095] RECV:pjlink 0

[2019.06.16 14:47:06.099] SEND:%1INFO ?

[2019.06.16 14:47:06.329] RECV:%1info=UHD

[2019.06.16 14:47:06.333] Closed!!!(Disconnect)
[2019.06.16 14:47:06.465] Connected!!!
[2019.06.16 14:47:06.549] RECV:pjlink 0

[2019.06.16 14:47:06.553] SEND:%1INF1 ?

[2019.06.16 14:47:06.746] RECV:%1inf1=Optoma

[2019.06.16 14:47:06.750] Closed!!!(Disconnect)
[2019.06.16 14:47:06.935] Connected!!!
[2019.06.16 14:47:07.145] RECV:pjlink 0

[2019.06.16 14:47:07.150] SEND:%1INF2 ?

[2019.06.16 14:47:07.436] RECV:%1inf2=Optoma UHD

[2019.06.16 14:47:07.440] Closed!!!(Disconnect)
[2019.06.16 14:47:07.586] Connected!!!
[2019.06.16 14:47:07.634] RECV:pjlink 0

[2019.06.16 14:47:07.638] SEND:%1CLSS ?

[2019.06.16 14:47:07.798] RECV:%1clss=1

[2019.06.16 14:47:07.801] Closed!!!(Disconnect)

I guess your device responds with lowercase prefixes (e.g. pjlink 0 instead of PJLINK 0). I’ll try to provide a version which is able to handle that till next weekend.

Unfortunately I first need to get my development environment working again after the numerous changes introduced by the ESH integration and new build system, that’s why it will take some time even if it’s only a small adjustment.

Hi @Matthias1,

I’ve built a version which should ignore case when parsing responses from the projector.

It’s available from a different location than usual as it seems like the pull request builder is currently broken.

Please test it and let me know if it resolves the issues you were experiencing.

Best Regards,
Nils

Edit: Removed github release link

Hi Nils
Thx a lot now it’s works…

Hi @nils.schnabel,
I tried installing the version org.openhab.binding.pjlinkdevice-2.5.0-SNAPSHOT.jar manually into my openhab 2.5.0.M3 installation. I used the console to install that jar bundle but when starting, it provides the following error:
Error starting bundle 280: Could not resolve module: org.openhab.binding.pjlinkdevice [280]
Unresolved requirement: Import-Package: org.apache.commons.net.util; version="[3.3.0,4.0.0)"

Any ideas ?
Thanks, Daniel.

Hi Daniel,

I assume you downloaded the file from github that I wrote here some posts ago. That’s an outdated build. Because the pull request builder is working again you should download the file from the location mentioned in the opening post of this thread.

I don’t want to copy the link here to avoid that I have to update it everywhere whenever it changes. Please go to the opening post of this thread and download the current JAR using the link on

The lastest JAR can be found here

Best Regards,
Nils

P.S. 2.5.0.M4 will have the binding included, so when it will be released, there won’t be a need for manual installing of JARs any more :slight_smile:

PPS: Just noticed that M4 is already released! So you could also go and update to M4, if that’s an option for you.

1 Like

Excellent. Thanks for the quick answer @nils.schnabel.
It worked ! I upgraded to M4 today and the binding is there and automatically discovered my Optoma beamer.
Just one problem surfaced: I turned on Power_State AutoPoll in the binding settings and the binding goes offline with the following error message in the logs:
" (COMMUNICATION_ERROR): Expected prefix ‘%1POWR=’, instead got ‘%1powr=0’ "
Can I fix this myself with a mapping ?
I had to turn off the Power_State polling again for now.
Thanks for your support :slight_smile:

Cheers, Daniel.

Hi Daniel,

good to know that the version shipped with M4 works for you in general!

The problem you have reported looks similar to an issue that was solved before. I’ll try to provide a new version/jar with a fix till Saturday. (Yay JAR installation! :smiley:)

Best Regards,
Nils

Hi,

Under the last stable version,I also have this problem:
2020-01-11 19:51:09.915 [hingStatusInfoChangedEvent] - ‘pjLinkDevice:pjLinkDevice:192_168_0_52_4352’ changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Expected prefix ‘%1POWR=’, instead got ‘%1powr=1’

2020-01-11 19:51:09.923 [hingStatusInfoChangedEvent] - ‘pjLinkDevice:pjLinkDevice:192_168_0_52_4352’ changed from OFFLINE (COMMUNICATION_ERROR): Expected prefix ‘%1POWR=’, instead got ‘%1powr=1’ to OFFLINE (COMMUNICATION_ERROR): Cannot understand status: 20

2020-01-11 19:51:09.931 [hingStatusInfoChangedEvent] - ‘pjLinkDevice:pjLinkDevice:192_168_0_52_4352’ changed from OFFLINE (COMMUNICATION_ERROR): Cannot understand status: 20 to ONLINE

Connexion is with an Optoma projector.

If you have a solution, let me know.

Thanks in advance.

Hi @ifred , hi @dhopkins1000 ,

could you please try this version of the addon: https://github.com/nils/openhab2-addons/releases/download/2.5.4-SNAPSHOT/org.openhab.binding.pjlinkdevice-2.5.4-SNAPSHOT.jar

That version has some improved logging that should allow me to find the reason for the issues you are facing. Please install the JAR in your addons folder and copy the log files here.

Best Regards,
Nils

@nils.schnabel

Hi Nils

Thanks for your great work.

Just to let you know, I’ve just installed an Optoma UHD65 and tried PJLink (binding available within 2.5.6) for the very first time.

https://petertyson.co.uk/optoma-uhd65-projector

PaperUI didn’t find it automatically, but creating the Thing in PaperUi, with just the IP and default password (12345) worked like a charm.

It provides Items for :

  • Power
  • Input
  • Mute

But as I only wanted Power & Input, that’s perfect :smile:

Thanks again

(Small detail that the Thing goes off-line when the projector is OFF, but I suspect this is a setting in the projector that is turning off the network connection)

1 Like

Hi,

I come back very late, but, I tested the new one today. Looks good.

Automatically find the optoma, and configuration looks ok.

I will do more tests soon.

Thanks,

I know this is quite an old thread…but, I’ve just got a Optoma Projector which supports PJLink. I’ve got it connected to the Openhab using the binding fine - thanks for the tips here on auto-discovery not working.

Question I have is that I want to send some commands to the projector - actually to change the zoom - Using the TCP Set command. Is this possible via the TP Link Binding? Or do i need to try a different route? It looks like you can use Set and Get commands as part of the PJLink v1 protocol.

Hi Pete,

unfortunately there is no such thing like a generic “TCP Set Command”.

You can see what the PJLink protocol supports by looking at the specification.

There, you’ll only find these commands:

  • Power control instruction
  • Input switch instruction
  • Mute instruction
  • Speaker volume adjustment instruction*
  • Microphone volume adjustment command*
  • Freeze instruction*

* these are PJLink Class 2 features not (yet?) supported by the binding

PJLink is a cross-vendor standard with a very basic feature scope. For more advanced features, you should check if there is any vendor-specific protocol available for your projector.

Best Regards,
Nils

Hello Nils ,

I have changed my system to OH3 , now the PJ-Link binding does not work anymore.

I have tested with the “1-2.PJLink Test Software” and I also get no connection when it requires authentication.
If I turn off the authentication it works.

I think the problem will be in the authentication.

Can you look over there ?

Would be cool if you can help me ^^

Hi @itseogo ,

I’ll look into it sometime next week. I personally don’t use authentication (my projector does not support it), so it might indeed be broken in 3.x.

hi ,

thanks for your help already,
I have tried to disable the authentication on the projector but that does not work on my Epson, there is no setting for it, so I am dependent on the authentication.

Hi @itseogo,

Sorry to let you wait, I still plan to check this (latest on the weekend). My personal development setup is broken and requires a bit more time than expected to be restored.

@itseogo Ok, found the issue. Fixing one “bug” (rather a compatibility issue with some projectors) a while ago caused a new, actual bug :slight_smile:

The “uppercasing” of responses from the projector should not be done for the authentication challenge.

Here’s the Pull Request and information where the JAR should be available for download after the PR is built.

1 Like

hy everybody, i loved this binding on Openhab3.
now i switched to OH4.0.4
the binding does not work anymore.
i can not create Things/Items.
can you help me?