So i finally figured out my problem… I had to go into the advanced settings of plex list the ip of the openhab server so that it doesnt require authentication.
hi antasp3136, I’m stuck where you were, not getting the status updates in the log. Can you clarify exactly where you added the IP of the OH2 server in the Plex settings? Many thanks.
Hmm cant say that i have. This is what my config file looks like for plex:
# IP address of the Plex server
host=10.0.0.4
# Optional, port that the Plex server is running on. Default = 32400
port=32400
# Refresh interval in ms. Default = 5000
refresh=5000
import org.eclipse.xtext.xbase.lib.*
rule "Lights on when Stopped"
when
Item PlexTVStatus changed to Stopped
then
sendCommand(zwave_device_9e525cd7_node2_switch_dimmer, 100)
sendCommand(zwave_device_9e525cd7_node3_switch_dimmer, 100)
end
rule "Lights on when Paused"
when
Item PlexTVStatus changed to Paused
then
sendCommand(zwave_device_9e525cd7_node2_switch_dimmer, 10)
sendCommand(zwave_device_9e525cd7_node3_switch_dimmer, 10)
end
rule "Lights dimmed when playing"
when
Item PlexTVStatus changed to Playing
then
sendCommand(zwave_device_9e525cd7_node2_switch_dimmer, 0)
sendCommand(zwave_device_9e525cd7_node3_switch_dimmer, 0)
end
Many thanks again. I think its something to do with my configuration. I’ll double check everything. Very useful having your configs. Much appreciated.
Sham
I found my problem! I was trying to use the org.openhab.binding.plex-1.9.0-SNAPSHOT.jar but when I reverted back to org.openhab.binding.plex-1.8.2 everything started working fine! Doh.
No problem I just started with openhab and am still learning as well. So far I have all my lights working, got Plex integrated. Even have alexa and home kit working. I know I can do so much more too!
I have just got Alexa working too. I must say, i think it’s great as an interface to openhab. Now it would be really fantastic if we could control plex via alexa! I’m sure it could be done.
I put the org.openhab.binding.plex-1.8.3.jar into this folder /usr/share/openhab2/addons/
then i put a plex.cfg into /etc/openhab2/services
# IP address of the Plex server
host=---.---.--.--
# Optional, port that the Plex server is running on. Default = 32400
port=32400
# Refresh interval in ms. Default = 5000
refresh=5000
than i enabled in the paper.ui “Include Legacy 1.x Bindings” and restartet my server.
Now i have the following error in my logfile:
[WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.plex-1.8.3.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.plex [193]
Unresolved requirement: Import-Package: org.codehaus.jackson
at org.eclipse.osgi.container.Module.start(Module.java:434)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:393)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1245)[8:org.apache.felix.fileinstall:3.5.0]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1217)[8:org.apache.felix.fileinstall:3.5.0]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1207)[8:org.apache.felix.fileinstall:3.5.0]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:504)[8:org.apache.felix.fileinstall:3.5.0]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:358)[8:org.apache.felix.fileinstall:3.5.0]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:310)[8:org.apache.felix.fileinstall:3.5.0]
PS: I solved it by my self. You have to enable it with karaf by using “feature:install openhab-runtime-compat1x”
Has anyone else had an issue with the latest version of plex not working?.. getting this error…
09:32:03.210 [ERROR] [.binding.plex.internal.PlexConnector] - Error handling player state change message
java.lang.NullPointerException
at org.openhab.binding.plex.internal.PlexConnector$PlexWebSocketListener.onMessage(PlexConnector.java:494)[213:org.openhab.binding.plex:1.8.3]
at com.ning.http.client.providers.netty.NettyWebSocket.onTextFragment(NettyWebSocket.java:202)[213:org.openhab.binding.plex:1.8.3]
at com.ning.http.client.providers.netty.NettyAsyncHttpProvider$WebSocketProtocol.handle(NettyAsyncHttpProvider.java:2380)[213:org.openhab.binding.plex:1.8.3]
at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.messageReceived(NettyAsyncHttpProvider.java:1220)[213:org.openhab.binding.plex:1.8.3]
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)[213:org.openhab.binding.plex:1.8.3]
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)[213:org.openhab.binding.plex:1.8.3]
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)[213:org.openhab.binding.plex:1.8.3]
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)[213:org.openhab.binding.plex:1.8.3]
at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)[213:org.openhab.binding.plex:1.8.3]
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:536)[213:org.openhab.binding.plex:1.8.3]
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:435)[213:org.openhab.binding.plex:1.8.3]
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)[213:org.openhab.binding.plex:1.8.3]
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)[213:org.openhab.binding.plex:1.8.3]
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)[213:org.openhab.binding.plex:1.8.3]
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)[213:org.openhab.binding.plex:1.8.3]
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)[213:org.openhab.binding.plex:1.8.3]
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)[213:org.openhab.binding.plex:1.8.3]
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)[213:org.openhab.binding.plex:1.8.3]
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318)[213:org.openhab.binding.plex:1.8.3]
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)[213:org.openhab.binding.plex:1.8.3]
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)[213:org.openhab.binding.plex:1.8.3]
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)[213:org.openhab.binding.plex:1.8.3]
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)[213:org.openhab.binding.plex:1.8.3]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_111]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_111]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_111]
Yep, the last version of Plex Media Server doesn’t work anymore with the binding.
Not sur about when the modifications have been made, PMS 1.1.4 works but not PMS 1.3.0.
The websocket notification message have been modified.
You can look at this post to see my search about the changes :
but unfortunatly my dev skill isn’t enought strong to update the binding myself so I hope someone will take care of it