Is the Epson projector binding abandoned?

The Epson projector binding is now part of the official add-ons library. It should be installable directly through openhab without having to side load the jar file.

Ok, this is weird. Is see this in my logs:

2021-05-28 16:17:43.004 [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 [36]
  Unresolved requirement: Import-Package: org.apache.commons.io; version="[2.2.0,3.0.0)"

Even though I don’t have the addon anymore:

$ grep addon /etc/systemd/system/openhab.service 
  -v /opt/openhab/addons:/openhab/addons \
$ ls /opt/openhab/addons/
$ 

Could it be cached somehow? See below. And if it is, how can I remove that 3.0.0 reference without losing all my bindings and rules in the UI?

$ find /opt/openhab -type f | grep -v \.log: | xargs grep epsonprojector-3
grep: /opt/openhab/.bash_history: Permission denied
/opt/openhab/userdata/logs/openhab.log:2021-05-28 16:17:43.004 [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.3:2021-05-28 13:36:24.935 [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.1:2020-11-09 17:35:32.736 [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.1:2020-12-10 12:05:04.775 [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.2:2021-05-28 13:30:09.060 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/openhab/addons/org.openhab.binding.epsonprojector-3.0.0-SNAPSHOT.jar
Binary file /opt/openhab/userdata/cache/org.eclipse.osgi/framework.info.50 matches
Binary file /opt/openhab/userdata/backup/userdata-2020-12-10T12-04-00.tar matches
Binary file /opt/openhab/userdata/backup/userdata-2021-05-28T13-28-02.tar matches

I deleted /opt/openhab/userdata/cache/org.eclipse.osgi but the real issue seemed to be that I had lost the Epson Projector binding. So I loaded the one from 3.1.0 and recreated the projector. Since I had my rules send commands to it through a Global Caché thing, I didn’t lose those. I presume I would have lost them otherwise, or is there a better way to upgrade bindings?

My projector, set up w/ serial over IP for the GC (port 4999) is showing a status of “Unknown” now. It does however react to commands (e.g., ON/OFF via the Power channel) so not sure what that means exactly.

The unknown status means the binding is not recognizing the responses from the projector when polling for it’s current status. The first valid status response causes the status to go to online. You should turn on debugging for the EpsonProjector binding to see what output is being returned from the projector. There could be extra newline characters being added by the Global Caché that is causing the issue. Also you mention using a Global Caché thing, so if you are using the GC binding as well this could also be part of the problem.

How do I add debugging to the EpsonProjector binding? I disabled the serial1 port on the GC100, and then the whole GC100 add-on. My projector now shows as OFFLINE. It seems that despite the GC100 being configured at 9600 bauds, 8 bits data, 1 bit stop, no flow/parity per Epson doc, I do get garbled output from it, maybe because the serial cable goes through the wall close to HDMI, VGA (!), electrical…

$ telnet 192.168.13.7 4999
Trying 192.168.13.7...
Connected to 192.168.13.7.
Escape character is '^]'.

:
:PWR?
��Ղ7
:LAMP?
LP
բ10C�
:SOURCE?
ER�H�

but that should be UNKNOWN? Or maybe the add-on is having issues connecting. So I guess I’m back to how do I enable more debugging and where should I look for that to be logged?

It looks like the issue is with your connection from the GC to the projector. See this page from the GC manual:

Make sure the baud rate set in your GC matches what is set in the Epson’s menu. Also make flow control is FLOW_NONE and parity is PARITY_NO. If that does not fix your ability to send commands manually with telnet, you could have a bad cable or interference as you suggested.

I did check the config, and it was good. My projector has no settings for the serial port. Checking again now after killing ad restarting openHAB, it works, though I don’t think it’s openHAB’s fault at all, your add-on only uses telnet to talk to the projector. I am confused :).

$ telnet 192.168.13.7 4999
Trying 192.168.13.7...
Connected to 192.168.13.7.
:
:PWR?
:WR=01
:LAMP?
:AMP=410
:SAY-ERR

How would I enable debugging if I see this again?

In the console, issue this command to turn on debugging:

log:set DEBUG org.openhab.binding.epsonprojector

It looks like the GC might be messing with the end of line characters.

Hi All

Does the 2.5.11 Snapshot binding support projects with ethernet or WIFI built in?

thankyou

Yes. You will see that the description for the projector-tcp thing type mentions built in Ethernet and defaults to port 3629.

When the epsonprojector binding was finished for OH3, the volume channel was designed to work with my two test projectors that had a volume control that went from 0 to 20. @RafalO reported that his projector had a volume control that went from 0 to 40 and could not be controlled by the binding. I have addressed this problem in a new PR: [epsonprojector] Add configurable volume channel range by mlobstein · Pull Request #10988 · openhab/openhab-addons · GitHub
The new code allows the user to chose either the 0-20 or 0-40 range and maps the control to a 0-100% dimmer channel.

1 Like

Hello,

In OH2.5 I have been using your Epson binding installed as an additional jar file and I had volume channel. In fact there were two Volume channels: 20 and 40 (and I have been using the last one)
Recently I have upgraded to OH3.1 and I am using the standard Epson binding from openhab repository but I can NOT see any volume channel available on the Channels list (after ticking Show advanced) . Is your Epson binding for OH3 a part of official openhab repository or shall I use some addtional jar file to have volume in it?
Also I can not see a directsource channel which was in the previous binding.

Hi Rafal,

Sorry for the confusion with the volume channel. I did look in a fresh install of 3.1.0 and the volume channel is available from the binding installed from the official repository. See screenshot:

For the issue of the two volume channels 20 and 40… You were using a one-off OH 2.x jar that I created that had two volume channels (volume20 and volume40) if I remember correctly. In my previous post, I indicated that a new PR was created to change the volume channel to a 0-100% dimmer channel and make it support projectors with 0-20 and 0-40 volume controls. The configuration defaults to 0-20, so you will need to select the 0-40 option in the thing configuration. Unfortunately, these changes were not included in OH 3.1.0 so you will need to use the jar below until the next release.

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

As for the ‘directsource’ channel, it was eliminated in my refactoring of the binding. The ‘source’ channel will accept the 2 character code for any source input even if it is not in the pre-defined drop down. If you don’t know what the code to use is, then select that input with the projector’s remote control and the binding will display the code for that input in the ‘source’ channel.

Well, very, very strange, I can not see volume channel in my installation while I am looking at Epson thing channels. Volume channel is not visible in 3.1.0 nor in 3.2.0.202107282155

image

I do not see any logic of such a strange behavior: Volume Channel is a Number type and not visible but Lamp Channel is a Number type as well but is visible?

But I have found that when I look at items I can see Volume channel exists and is linked to the item😊

Hence I think there is some visibility error in OH3.1 but some workaround exists… Thank you for Volume40 channel!

Hello,
I have looked at logs and seems I have more issues with epson binding in OH3.1 than in OH2.5
I am using RS232-TCP/IP (Wifi - NodeMcu) convertor.

  1. When Epson projector is OFF I have pemanent changes ONLINE/OFFLINE of the Epson thing.
2021-08-06 18:13:17.174 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'epsonprojector:projector-tcp:9191909e' changed from OFFLINE to ONLINE
2021-08-06 18:13:27.185 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'epsonprojector:projector-tcp:9191909e' changed from ONLINE to OFFLINE
2021-08-06 18:13:27.198 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'epsonprojector:projector-tcp:9191909e' changed from OFFLINE to ONLINE
2021-08-06 18:13:37.231 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'epsonprojector:projector-tcp:9191909e' changed from ONLINE to OFFLINE
2021-08-06 18:13:37.254 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'epsonprojector:projector-tcp:9191909e' changed from OFFLINE to ONLINE

When epson projector is ON such ONLINE/OFFLINE changes of Epson thing are very rare or 0

  1. Quite often I can not turn ON the Epson projector in OH3 I need to use remote control
2021-08-06 17:40:22.135 [WARN ] [ternal.handler.EpsonProjectorHandler] - Couldn't execute command 'Power', No response received
  1. I have an error message regarding Volume 40 channel, as follows:
2021-08-06 18:36:15.940 [WARN ] [ternal.handler.EpsonProjectorHandler] - Unknown channel volume40
2021-08-06 18:36:20.779 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Epson_Volume' received command 8
2021-08-06 18:36:20.806 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Epson_Volume' predicted to become 8
2021-08-06 18:36:20.820 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Epson_Volume' changed from 15 to 8
2021-08-06 18:36:20.797 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.epsonprojector.internal.handler.EpsonProjectorHandler@8ae562': Not valid command type
java.lang.IllegalArgumentException: Not valid command type
	at org.openhab.binding.epsonprojector.internal.EpsonProjectorCommandType.getCommandType(EpsonProjectorCommandType.java:120) ~[?:?]
	at org.openhab.binding.epsonprojector.internal.handler.EpsonProjectorHandler.handleCommand(EpsonProjectorHandler.java:92) ~[?:?]
	at jdk.internal.reflect.GeneratedMethodAccessor215.invoke(Unknown Source) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
	at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
	at org.openhab.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [bundleFile:?]
	at com.sun.proxy.$Proxy746.handleCommand(Unknown Source) [?:?]
	at org.openhab.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:80) [bundleFile:?]
....
2021-08-06 18:36:23.055 [WARN ] [ternal.handler.EpsonProjectorHandler] - Unknown channel volume40
2021-08-06 18:36:30.574 [WARN ] [ternal.handler.EpsonProjectorHandler] - Unknown channel volume40
2021-08-06 18:36:37.590 [WARN ] [ternal.handler.EpsonProjectorHandler] - Unknown channel volume40

It looks like the projector is not responding to the power status request while off. You should turn on debugging to see if there is any additional information that would be good for troubleshooting.

The volume40 channel was never in the official jar for 3.0. If you use the OH 3.2.0 snapshot jar linked above, the latest changes added the ability to support both 0-20 and 0-40 volume ranges on the ‘volume’ channel. You must select the configuration option to use the 0-40 range (0-20 is the default).

Please find the log file attached. It includes PWR but also an error with LAMP occurred
Could you kindly look at it and advise:

epson.log (478.4 KB)

epsonevents.log (7.4 KB)

I am using 3.2-SNAPSHOT with Volume40 selected just after instalation

UID: epsonprojector:projector-tcp:9191909e
label: Epson Projector - TCP/IP
thingTypeUID: epsonprojector:projector-tcp
configuration:
  host: <ip address>
  pollingInterval: 5
  port: 23
  maxVolume: 40

In fact what I can observe today that the volume is changed but in addtion to it there is an error as follows

2021-08-07 10:30:27.641 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Epson_Volume' received command 25
2021-08-07 10:30:27.656 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Epson_Volume' predicted to become 25
2021-08-07 10:30:27.669 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Epson_Volume' changed from 31 to 25
2021-08-07 10:30:27.658 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.epsonprojector.internal.handler.EpsonProjectorHandler@8ae562': Not valid command type
java.lang.IllegalArgumentException: Not valid command type
	at org.openhab.binding.epsonprojector.internal.EpsonProjectorCommandType.getCommandType(EpsonProjectorCommandType.java:120) ~[?:?]
	at org.openhab.binding.epsonprojector.internal.handler.EpsonProjectorHandler.handleCommand(EpsonProjectorHandler.java:92) ~[?:?]
	at jdk.internal.reflect.GeneratedMethodAccessor403.invoke(Unknown Source) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
	at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
	at org.openhab.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [bundleFile:?]
	at com.sun.proxy.$Proxy1041.handleCommand(Unknown Source) [?:?]
	at org.openhab.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:80) [bundleFile:?]
	at org.openhab.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:48) [bundleFile:?]
	at jdk.internal.reflect.GeneratedMethodAccessor402.invoke(Unknown Source) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
	at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
...
2021-08-07 10:30:32.764 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'epsonprojector:projector-tcp:9191909e' changed from ONLINE to OFFLINE
2021-08-07 10:30:32.822 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'epsonprojector:projector-tcp:9191909e' changed from OFFLINE to ONLINE
2021-08-07 10:30:42.776 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'epsonprojector:projector-tcp:9191909e' changed from ONLINE to OFFLINE
2021-08-07 10:30:42.796 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'epsonprojector:projector-tcp:9191909e' changed from OFFLINE to ONLINE
2021-08-07 10:30:52.815 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'epsonprojector:projector-tcp:9191909e' changed from ONLINE to OFFLINE
2021-08-07 10:30:52.828 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'epsonprojector:projector-tcp:9191909e' changed from OFFLINE to ONLINE

Sorry to hear that you are still having problems. Which channel are you receiving the ‘not valid command type’? Its it volume? All I can think of with that is that you might still have old channel id of ‘volume40’ cached in your system. Re-creating your projector thing would take care of that.

For the reconnects it appears that either your serial over IP device or projector stops responding after a time. You see in the logs below that several power queries are done successfully and then suddenly no response is received. The binding will close the connection and re-connect when the response is not received. This is the expected behavior. I am not sure what to suggest to fix this.

2021-08-07 10:05:16.343 [DEBUG] [jector.internal.EpsonProjectorDevice] - Query: 'PWR?'
2021-08-07 10:05:16.446 [DEBUG] [jector.internal.EpsonProjectorDevice] - Response: 'PWR=00'
2021-08-07 10:05:21.450 [DEBUG] [jector.internal.EpsonProjectorDevice] - Query: 'PWR?'
2021-08-07 10:05:21.662 [DEBUG] [jector.internal.EpsonProjectorDevice] - Response: 'PWR=00'
2021-08-07 10:05:26.669 [DEBUG] [jector.internal.EpsonProjectorDevice] - Query: 'PWR?'
2021-08-07 10:05:26.979 [DEBUG] [jector.internal.EpsonProjectorDevice] - Response: 'PWR=00'
2021-08-07 10:05:31.983 [DEBUG] [jector.internal.EpsonProjectorDevice] - Query: 'PWR?'
2021-08-07 10:05:32.094 [DEBUG] [jector.internal.EpsonProjectorDevice] - Response: 'PWR=00'
2021-08-07 10:05:37.099 [DEBUG] [jector.internal.EpsonProjectorDevice] - Query: 'PWR?'
2021-08-07 10:05:42.107 [DEBUG] [ternal.handler.EpsonProjectorHandler] - Couldn't execute command 'Power', No response received
2021-08-07 10:05:42.114 [DEBUG] [ternal.handler.EpsonProjectorHandler] - Closing connection to device 'epsonprojector:projector-tcp:9191909e'
2021-08-07 10:05:42.115 [DEBUG] [connector.EpsonProjectorTcpConnector] - Close tcp out stream
2021-08-07 10:05:42.116 [DEBUG] [connector.EpsonProjectorTcpConnector] - Close tcp in stream
2021-08-07 10:05:42.117 [DEBUG] [connector.EpsonProjectorTcpConnector] - Closing socket
2021-08-07 10:05:42.118 [DEBUG] [connector.EpsonProjectorTcpConnector] - Closed
2021-08-07 10:05:42.120 [DEBUG] [connector.EpsonProjectorTcpConnector] - Open connection to address'192.168.0.110:23'
2021-08-07 10:05:47.126 [DEBUG] [jector.internal.EpsonProjectorDevice] - Query: 'PWR?'
2021-08-07 10:05:52.146 [DEBUG] [ternal.handler.EpsonProjectorHandler] - Couldn't execute command 'Power', No response received
2021-08-07 10:05:52.148 [DEBUG] [ternal.handler.EpsonProjectorHandler] - Closing connection to device 'epsonprojector:projector-tcp:9191909e'
2021-08-07 10:05:52.150 [DEBUG] [connector.EpsonProjectorTcpConnector] - Close tcp out stream
2021-08-07 10:05:52.152 [DEBUG] [connector.EpsonProjectorTcpConnector] - Close tcp in stream
2021-08-07 10:05:52.154 [DEBUG] [connector.EpsonProjectorTcpConnector] - Closing socket
2021-08-07 10:05:52.156 [DEBUG] [connector.EpsonProjectorTcpConnector] - Closed

Yes, you were right. After re-creating the Epson thing (also rebooting) I can see Volume channel in UI (the initial issue with visibility I had) and less errors in logs. Volume range 0-40 selected.
But the channel type is Dimmer (? - the previous one was Number)

Volume
ONLINE
Epson Projector - TCP/IP
epsonprojector:projector-tcp:9beb97ca7b:volume (Dimmer)

and I can change it from 0 to 100…

2021-08-08 21:40:35.117 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Epson_Volume' predicted to become 98
2021-08-08 21:40:35.125 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Epson_Volume' changed from 27 to 98
2021-08-08 21:40:36.435 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Epson_Volume' received command 12

Yes volume is a dimmer now. The 0-100% value is automatically scaled to 0-20 or 0-40 (per the configuration) when communicating with the projector.