New binding for Sony projectors

I open this topic to mention a new binding allowing the control of Sony projectors (HW and VW models) through either an Ethernet connection using PJ Talk or a (direct) serial connection or a serial over IP connection (RFC2217).

You can find a test version inside the PR:

Documentation

It has been tested fully with a serial connection.
Any feedback is welcome. Just let me know if you are using an Ethernet or serial connection and what is your projector model.

2 Likes

The binding is now available in the Eclipse IoT marketplace and you can install it in your openHAB (tested in version 2.5 but should work in version 2.4 too).

And a PR is in progress for an integration in the official openHAB distribution.

The binding is now included in the official distribution, 2.5 M2 and 2.5 snapshots.

1 Like

First, THANK YOU! This has been a big gap for me on my system and this is awesome.

I pulled the binding in, added the thing and items as per the documents. I get the following error:

2019-08-20 11:09:32.851 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.IllegalArgumentException: Value must be between 0 and 100
        at org.eclipse.smarthome.core.library.types.PercentType.validateValue(PercentType.java:58) ~[?:?]
        at org.eclipse.smarthome.core.library.types.PercentType.<init>(PercentType.java:53) ~[?:?]
        at org.eclipse.smarthome.core.library.types.DecimalType.as(DecimalType.java:160) ~[?:?]
        at org.eclipse.smarthome.core.internal.items.ItemStateConverterImpl.convertToAcceptedState(ItemStateConverterImpl.java:58) ~[?:?]
        at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl.sendUpdate(ProfileCallbackImpl.java:135) ~[?:?]
        at org.eclipse.smarthome.core.thing.internal.profiles.SystemDefaultProfile.onStateUpdateFromHandler(SystemDefaultProfile.java:54) ~[?:?]
        at org.eclipse.smarthome.core.thing.internal.CommunicationManager.lambda$9(CommunicationManager.java:468) ~[?:?]
        at org.eclipse.smarthome.core.thing.internal.CommunicationManager.lambda$11(CommunicationManager.java:488) ~[?:?]
        at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
        at org.eclipse.smarthome.core.thing.internal.CommunicationManager.handleCallFromHandler(CommunicationManager.java:484) ~[?:?]
        at org.eclipse.smarthome.core.thing.internal.CommunicationManager.stateUpdated(CommunicationManager.java:466) ~[?:?]
        at org.eclipse.smarthome.core.thing.internal.ThingManagerImpl$1.stateUpdated(ThingManagerImpl.java:168) ~[?:?]
        at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.updateState(BaseThingHandler.java:283) ~[?:?]
        at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.updateState(BaseThingHandler.java:302) ~[?:?]
        at org.openhab.binding.sonyprojector.internal.handler.SonyProjectorHandler.refreshChannel(SonyProjectorHandler.java:685) ~[?:?]
        at org.openhab.binding.sonyprojector.internal.handler.SonyProjectorHandler.pollProjector(SonyProjectorHandler.java:407) ~[?:?]
        at org.openhab.binding.sonyprojector.internal.handler.SonyProjectorHandler.lambda$0(SonyProjectorHandler.java:372) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:?]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) ~[?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) ~[?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
        at java.lang.Thread.run(Thread.java:748) [?:?]

Of all of the items, only 4 seem to populate.

2019-08-20 11:09:32.846 [vent.ItemStateChangedEvent] - VPLVW285ES_power changed from NULL to ON
2019-08-20 11:09:32.847 [vent.ItemStateChangedEvent] - VPLVW285ES_powerstate changed from NULL to Power On
2019-08-20 11:09:32.848 [vent.ItemStateChangedEvent] - VPLVW285ES_input changed from NULL to HDMI1
2019-08-20 11:09:32.850 [vent.ItemStateChangedEvent] - VPLVW285ES_calibrationpreset changed from NULL to Film1

What Version of OH are you running?
Some channels were changed recently from Number to Dimmer. What kind of items did you declare ?

The lines in your stack trace are not matching the current code.
Please clarify your versions of the binding and the openHAB server you are running.
And please try the last 2.5 snapshot.

Iā€™m on 2.5.0M2. I copy/pasted from https://www.openhab.org/addons/bindings/sonyprojector/ for my items (renamed as appropriate).

openhab> bundle:list -s | grep -i sony
302 ā”‚ Active ā”‚ 80 ā”‚ 2.5.0.M2 ā”‚ org.openhab.binding.sonyprojector

With 2.5M2 version, you should replace Dimmer by Number for 6 channels (contrast, hue, ā€¦).

That fixed the errors and it looks like all of my items are updating now. Looks like the documentation just needs an update to reflect the change going to M2. Thanks again for the great work!

The documentation is up-to-date and reflects the current code which changed after 2.5M2.

Please give me a feedback with your VPLVW285ES. I could then mention this model as fully supported.