Is the Epson projector binding abandoned?

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:

Here is the new binding jar back-ported to 2.5.x: https:// github .com/mlobstein/mlobstein-beta-test/raw/master/org.openhab.binding.epsonprojector-2.5.11-SNAPSHOT.jar

(you need to manually construct the link, it won’t let me post it for some reason)

If the binding is not visible after putting the jar in the ‘addons’ folder, issue this command on the openHAB console:
feature:install openhab-transport-serial

Thank you for info. Will try it!
The reason of lack of link mode are two spaces in the link https://(1)github(2) .com :slight_smile:

https://github.com/mlobstein/mlobstein-beta-test/raw/master/org.openhab.binding.epsonprojector-2.5.11-SNAPSHOT.jar

I did try that. The forum software was blocking me from inserting a link. Not enough posts I guess.

Edit: I just opened another PR against 3.0 to add support for projectors with a built-in Ethernet connector. The protocol is the same, but they require a special initialization string to be sent. The 2.5.11-SNAPSHOT jar linked by @RafalO above was updated as well.

Hello, I have sucessfully installed the 2.5.11-SNAPSHOT :slight_smile: and performed tests with finding as follows:
Epson thing was ONLINE after my Epson Projector was electrically powered (STANDBY mode)
All channels I am using work fine but there is an issue with the volume channel as follows:

  • just few seconds after I set new volume value ( decrease/increase) in Basic UI it goes back to 0 (displayed as 0 in Basic UI and also at item definition in .items file)

  • degree of Increasing/decreasing volume in Basic UI is not the same as in projector. For example if I increase volume to 7 in Basic UI, in Epson it is 14 (or other)

Another observation: after switching off Epson projector (STANDBY mode) Epson thing goes OFFLINE then ONLINE every ~ 4 minutes as follows:

2020-12-15 19:26:01.074 [hingStatusInfoChangedEvent] - 'epsonprojector:projector-tcp:851779dc' changed from ONLINE to OFFLINE
2020-12-15 19:26:01.082 [hingStatusInfoChangedEvent] - 'epsonprojector:projector-tcp:851779dc' changed from OFFLINE to ONLINE
2020-12-15 19:26:16.102 [hingStatusInfoChangedEvent] - 'epsonprojector:projector-tcp:851779dc' changed from ONLINE to OFFLINE
2020-12-15 19:26:16.110 [hingStatusInfoChangedEvent] - 'epsonprojector:projector-tcp:851779dc' changed from OFFLINE to ONLINE
2020-12-15 19:26:31.146 [hingStatusInfoChangedEvent] - 'epsonprojector:projector-tcp:851779dc' changed from ONLINE to OFFLINE
2020-12-15 19:26:31.157 [hingStatusInfoChangedEvent] - 'epsonprojector:projector-tcp:851779dc' changed from OFFLINE to ONLINE
2020-12-15 19:26:41.271 [vent.ItemStateChangedEvent] - Epson_Power changed from OFF to UNDEF
2020-12-15 19:26:51.583 [vent.ItemStateChangedEvent] - Epson_Power changed from UNDEF to OFF

2020-12-15 19:30:00.752 [hingStatusInfoChangedEvent] - 'epsonprojector:projector-tcp:851779dc' changed from ONLINE to OFFLINE
2020-12-15 19:30:00.814 [hingStatusInfoChangedEvent] - 'epsonprojector:projector-tcp:851779dc' changed from OFFLINE to ONLINE
2020-12-15 19:30:15.818 [hingStatusInfoChangedEvent] - 'epsonprojector:projector-tcp:851779dc' changed from ONLINE to OFFLINE
2020-12-15 19:30:15.832 [hingStatusInfoChangedEvent] - 'epsonprojector:projector-tcp:851779dc' changed from OFFLINE to ONLINE
2020-12-15 19:30:30.878 [hingStatusInfoChangedEvent] - 'epsonprojector:projector-tcp:851779dc' changed from ONLINE to OFFLINE
2020-12-15 19:30:30.888 [hingStatusInfoChangedEvent] - 'epsonprojector:projector-tcp:851779dc' changed from OFFLINE to ONLINE
2020-12-15 19:30:41.203 [vent.ItemStateChangedEvent] - Epson_Power changed from OFF to UNDEF
2020-12-15 19:30:51.309 [vent.ItemStateChangedEvent] - Epson_Power changed from UNDEF to OFF

Initially I thought this could because of my Wifi network (I have built RS232-Wifi connector based on ESP8266) but those reconnections do not happen when Epson is in ON mode (and also when I turned the electricity power first time)

What model is your projector? Can you check range of the volume control on your projector? Mine is 0-20. Manipulating any of the number based controls via the serial port on these projectors is tricky. Rather than simply send or receive the same number that is shown on screen, the serial port value is mapped within a 1 byte value (0-255) in a strange way. For example on my projector, the correlation of the on-screen volume to protocol volume is this:

screen-> protocol
0 0
1 12
2 24
3 36
4 48
5 60
6 73
7 85
...
19 231
20 243

I am guessing that yours is slightly different and the mapping array that I did to go from display value to protocol value is not lining up. This also might explain the lack of the volume control channel on the original binding :wink:

For the thing going online and offline, I think there is probably another slightly different behavior going on in the command protocol output in your projector. Can you turn on debugging output and post the same output as above but with the debugging messages included?

Just type the following in the openhab console to turn on debugging:
log:set DEBUG org.openhab.binding.epsonprojector

I have Epson TW6100. The maximum Volume in my epson is 40. But the issue is not only with the mapping but also keeping/presenting the set up value (it always display 0). Ex: I set 6 then few second later the Volume item value is 0 (seems like item reset to 0), I set 9 then few second later the Volume item value is 0, etc.

Please find attached the log file:
epson.log (263.5 KB)
with the following scenario/comments:

18:14:59 – Electricity supply power on (I have controlled socket)
18:20:58 – Epson Switch ON (Basic UI Switch)

  • then changing volume and others

18:38:11 – Epson Switch OFF (Basic UI Switch),

  • unfortunately the Epson thing went OFLINE after that :neutral_face:

18.48 – disable and enable Epson Thing in Paper UI – the thing went ONLINE

  • ~periodic re-connection (thing OFFLINE/ONLINE)

Unfortunately the volume will not work for your projector since it is 0-40 instead of 0-20 that the binding understands. There is an array that translates 0-20 into a value to send to the projector. Since it is sending a value the projector does not accept, the value in the UI changes back to 0 after the next polling update. I will need to make a change to support the 0-40 range.

As for the thing going offline and back online, I see from the logs lots of messages like ‘java.net.NoRouteToHostException: No route to host (Host unreachable)’ that indicate the binding is having trouble reaching the projector over the network. And once it is connected, a lack of response to a query after 5 seconds triggers the binding to disconnect and reconnect. Every time it does that the thing status goes from online to offline to online again. I will look into making that logic less aggressive. In the meantime, could you try a direct serial connection? I would like to rule out the network as a cause of these issues. It could be that your projector is slower to respond to commands than mine is.

Would be great to extend volume mapping to 40 :slightly_smiling_face:

Currently I do not have possibility to contect to projector-openhab directly via RS232 due to distance and all my USB ports in RPI3 are busy. Also this reconnection (OFFLINE-ONLLINE) is not a problem for me as appart form standby mode I also turn off power supply/electricity so that the Epson thing is OFFLINE.

But I am ordering new RPI3 for OH3 so that this might be an opportunity to somehow test RS232/UART-USB direct connection.

Blockquote
Would be great to extend volume mapping to 40

It can be done, but I need your help. As I mentioned, for adjusting number values on this projector, the number on the screen does not match the number sent in the serial protocol. So I will require you to get the values sent by the serial port for each step of the volume control from 0 thru 40. Start by setting the volume on the screen to 0. You will then need to connect to the projector directly on its IP address (192.168.0.110) and port 23 using putty or other telnet client.
Once connected type this command followed by the enter key: VOL?
The projector should respond with “VOL=0”

On the screen, increase the volume to 1 and then run the VOL? query again. Notice that the reported volume number has increased. Now you need to repeat this process for all 40 steps of the volume control and provide me the list of numbers (41 total, starting with 0). It will look like “0, 5, 10, 15, 20, 26…”

With those values, I can modify the binding to properly send the volume setting for the 0-40 range.

Yes of course, plase find attached volume mapping: TW6100_volume.txt (279 Bytes)

I updated the 2.5.11-SNAPSHOT build with two volume channels: volume20 and volume40. The latter should work to control the volume on your projector. Let me know how it works.

https://github.com/mlobstein/mlobstein-beta-test/raw/master/org.openhab.binding.epsonprojector-2.5.11-SNAPSHOT.jar