Is the Epson projector binding abandoned?

-v /opt/openhab/addons:/openhab/addons : only needed if installing addons unavailable via PaperUI or the Karaf Console

you normally can set a folder where to drop .jar files.

[Edited.]

I added binding = epsonprojector in addons.cfg. RTFM. However I see complaints in openhab.log about two things:

Complaints that there is no epsonprojector binding.

/opt/openhab/userdata/logs/openhab.log:2020-11-06 13:40:03.997 [WARN ] [core.karaf.internal.FeatureInstaller] - The binding add-on 'epsonprojector' does not exist - ignoring it.
/opt/openhab/userdata/logs/openhab.log:2020-11-06 13:40:55.697 [WARN ] [core.karaf.internal.FeatureInstaller] - The binding add-on 'epsonprojector' does not exist - ignoring it.

Complaints about the jar itself

So it looks like OH tries to load it anyways? But I didn’t see that until I edited addons.cfg.

/opt/openhab/userdata/logs/openhab.log:2020-11-06 13:41:58.649 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/openhab/addons/org.openhab.binding.epsonprojector-3.0.0-SNAPSHOT.jar
/opt/openhab/userdata/logs/openhab.log:org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.epsonprojector [233]

Any idea?

You shouldn’t have to do that. I just copied the .jar file (not in a Docker container mind you, but it shouldn’t make any difference), and it immediately got recognized.
You know the addon is loaded if you go to the console and do a bundle:list:

234 │ Active │  80 │ 3.0.0.202004142345      │ openHAB Add-ons :: Bundles :: Epson Projector Binding
openhab>                                                                                                  

or when you go to Things and click the Add button in the bottom-right corner in the UI you should see it:

See my edited post above. I couldn’t find it in the UI at all.

More data… So the log shows an unfulfilled dependency:

2020-11-06 13:51:47.530 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/openhab/addons/org.openhab.binding.epsonprojector-3.0.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.epsonprojector [233]
  Unresolved requirement: Import-Package: org.openhab.core.io.transport.serial

        at org.eclipse.osgi.container.Module.start(Module.java:444) ~[org.eclipse.osgi-3.12.100.jar:?]
        at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[org.eclipse.osgi-3.12.100.jar:?]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1221) [bundleFile:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:515) [bundleFile:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.6.4]
2020-11-06 13:52:24.323 [WARN ] [core.karaf.internal.FeatureInstaller] - The binding add-on 'epsonprojector' does not exist - ignoring it.

But the Karaf console shows it installed:

openhab> bundle:list | grep -i epson
233 x Installed x  80 x 3.0.0.202004142345      x openHAB Add-ons :: Bundles :: Epson Projector Binding
openhab>

But it’s not available in the UI. Maybe Karaf’s “Installed” is a false signal given the dependency exception?

I’ll try the manual installation steps in Karaf from this thread.

Oh ok. That’s something I should’ve anticipated :slight_smile:
When you install add-ons the “regular” way they will install their dependencies automatically, like when you install a package in a Linux distribution. However when you install add-ons manually that will not happen, and that add-on happens to rely on the openhab-transport-serial feature.

So please do a feature:install openhab-transport-serial in the console.
Then reload the add-on with bundle:reload 233.

I did install the feature (per the thread I linked to, and as you say too), and actually restarted the whole openHAB. But then I used search and search didn’t return the projector binding:

Though the projector was listed on the non-search page (I just hit search without looking).

I think this was the culprit, a cache of my addons.cfg. And when I removed the line in addons.cfg the cache wasn’t updated.

$ find . -type f | xargs grep epsonprojector
./userdata/config/org/openhab/addons.config:binding="epsonprojector"

Removing that line from that file too, and restarting everything once more, made the binding available and searchable too:

That’s normal, “side-loading” the add-on doesn’t add it to the distribution’s add-ons, the same way installing a .apk file to your Android phone doesn’t make the app appear on the Play Store.
It’s not as obvious because the current UI doesn’t help, but it’s the same principle.

So why can I search for it now?

Because those screens you posted are very different.

That’s basically what you can install:

And that’s a list of what’s installed:

Oops. Sorry, been on too many screens. Thanks!

I created a Thing and it works to send my power on and off commands through the GC100. Thanks for porting the binding and the help to get it to run.

A small suggestion: You may edit the description “An Epson projector which supports the ESC/VP21 protocol over a serial port” to be “An Epson projector which supports the ESC/VP21 protocol over a serial port or a telnet to serial adapter” since it definitely works with the latter! (Or just stop after mentioning ESC/VP21).

A more major issue (for me). It seems that the projector binding holds onto its telnet connection to my GC100 all the time. That means that I can’t get to that port, and therefore to the projector myself using telnet or other apps (for example any remote app that can connect to the GC100 too). That’s a pretty big limitation. Is that really what’s happening, and would you consider removing it? I think that’s what’s happening. If I telnet to my GC100 while OH is running, telnet hangs, and successfully connects as soon as I kill OH.

@ysc is another PR for OH 3 planned? I have a couple old Epson projectors with serial ports. I could do testing or take over maintaining the code if necessary.

I am assuming that if @ysc does a PR, then it is easier for others to contribute once it’s in OH3, by doing other PRs? For example to change the behavior of holding onto the connection that I mentioned above. So that would be nice.

I got the epsonprojector binding running successfully. I did see several issues right away. The first thing I noticed is the query commands other than PWR? all fail in the polling job when the projector is off. Another problem is with the enums that map the values sent back from the projector and how unknown values are handled. For example, when querying the projector for the active source, it returns a two digit code that maps to an enum. However, my projector returned a value that was not defined in the enum, and this threw an exception that caused the polling job to fail. I had the same problem with the Color Mode channel. I can add all the missing enum entries, but for Source input, the selection dropdown needs to be made configurable since not all projectors have the same sources available. In looking through the ESC/VP21 documentation, in addition to standard inputs like HDMI, component, video, etc. there are some obscure options on some business projectors (USB, WirelessHD, Easy MP and so on) that should be accounted for as well. To make it even more tricky the two digit codes to set an input source (HDMI, VGA, video, etc) are not the same across all projectors in the documentation. :unamused:

You would very much have my blessing. In fact you can get the current code: https://github.com/openhab/openhab-addons/compare/1ee3e8dfa7ddfd0e001fe9f7efe84dd99376b050...ghys:epsonprojector3.diff and “git apply” it to a new branch and submit a new PR; it doesn’t have to be me, if you credit the other authors nobody would mind and you’ll be able to work on improving it in the process.

All the problems mentioned above are likely to be in the original OH1 binding too, since most of the code was simply ported over. I’m not too concerned with them because I’m not asking too much from the binding - switching the projector on and off, reporting the power status, lamp time and a few others accurately, the occasional color mode change… and that’s it. And of course it shouldn’t crash or have regressions without workarounds. So if you’re motivated to actively maintain it and make it better, by all means, be my guest!

This is likely to be per spec (though I’d bet that LAMP? may work too, but maybe not for all projectors). See section 4.1 of this ESC/VP21 spec. (I found and read through a few recently, this may not be the very latest :slight_smile:…) Interestingly enough I have what I consider a home projector (Epson 5020UB) but the business doc for ESC/VP21 seems to be more accurate.

Yes LAMP? does work when the projector is off, but none of the other queries did. I think I could adjust the code to only query the other channels when the projector is on and slow the LAMP? query to once every 5 minutes or so. These changes would cut down a lot of unnecessary chatter to the projector.

@ysc I will see what I can do with the code and put out another PR when ready.

Yes. That’s exactly what’s documented in that section of the protocol documentation I referred you to.

slow the LAMP? query to once every 5 minutes or so.

The time are in hours, right? You can ask even less often than that. If you really care not to be off by an hour, you ask every 5 minutes initially until the value changes, and then every hour. Then you’d be off by 5 min at most.

Hello, Would be good to add VOLUME control if possible to this binding (missing in v1 I am using with OH2.5.10-1) :slight_smile: