openHAB2 + Plex

Hi all,

Been at this for ages but can’t get my Plex binding to work.

Restart OH2 and the log output:

==> /var/log/openhab2/openhab.log <==
        at org.openhab.binding.plex.internal.PlexBinding.internalReceiveCommand(PlexBinding.java:147)[196:org.openhab.binding.plex:1.10.0.201701300211]
        at org.openhab.core.binding.AbstractBinding.receiveCommand(AbstractBinding.java:97)[183:org.openhab.core.compat1x:2.1.0.201701231811]
        at org.openhab.core.events.AbstractEventSubscriber.handleEvent(AbstractEventSubscriber.java:42)[183:org.openhab.core.compat1x:2.1.0.201701231811]
        at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:415)[6:org.apache.karaf.services.eventadmin:4.0.8]
        at org.apache.felix.eventadmin.impl.tasks.HandlerTask.run(HandlerTask.java:90)[6:org.apache.karaf.services.eventadmin:4.0.8]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_121]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
        at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]

==> /var/log/openhab2/events.log <==

I’ve set up the binding via PaperUI, using my Plex token

I’ve set my I address for no auth in Pleax advanced.

Example .items:

Dimmer PlexTVVolume     "Volume"        <video>     	(gMedia)	{plex="3e9a3f8503d89d07-com-plexapp-android#playback/volume"}
Switch PlexTVPause      "Pause"         <video>     	(gMedia)	{plex="3e9a3f8503d89d07-com-plexapp-android#playback/pause"}
Switch PlexTVPlay       "Play"          <video>     	(gMedia)	{plex="3e9a3f8503d89d07-com-plexapp-android#playback/play"}

From Plex, my clientidentiifier:

<Device name="CUBOT DINOSAUR" publicAddress="212.xx.xx.xx" product="Plex for Android" productVersion="5.4.3.131" platform="Android" platformVersion="6.0" device="CUBOT DINOSAUR" model="x5623_h6013_cubot" vendor="CUBOT" provides="player,pubsub-player,controller,sync-target" clientIdentifier="3e9a3f8503d89d07-com-plexapp-android" version="5.4.3.131" id="88312949" token="igGDyz5Zq3uoypghpsoV" createdAt="1482239001" lastSeenAt="1486910981" screenResolution="1280x720" screenDensity="320">
<SyncList itemsCompleteCount="0" totalSize="0" version="2"/>
<Connection uri="http://192.168.178.62:32500"/>
</Device>

When I try send any command I get this in the log:

2017-02-12 16:29:27.595 [ItemCommandEvent          ] - Item 'PlexTVStop' received command ON

==> /var/log/openhab2/openhab.log <==
2017-02-12 16:29:30.221 [WARN ] [org.apache.karaf.services.eventadmin] - EventAdmin: Exception during event dispatch [org.osgi.service.event.Event [topic=openhab/command/PlexTVStop] {bridgemarker=true, item=PlexTVStop, command=ON} | {org.osgi.service.event.EventHandler}={event.topics=openhab/command/*, service.pid=org.openhab.plex, port=32400, token=ABCDEFGHIJKLSMONPRST, refresh=5000, host=192.168.178.153, component.name=org.openhab.binding.plex.binding, component.id=178, service.id=308, service.bundleid=196, service.scope=bundle} | Bundle(org.openhab.binding.plex_1.10.0.201701300211 [196])]
java.lang.NullPointerException
        at org.openhab.binding.plex.internal.PlexConnector.getHost(PlexConnector.java:417)[196:org.openhab.binding.plex:1.10.0.201701300211]
        at org.openhab.binding.plex.internal.PlexConnector.sendCommand(PlexConnector.java:238)[196:org.openhab.binding.plex:1.10.0.201701300211]
        at org.openhab.binding.plex.internal.PlexBinding.internalReceiveCommand(PlexBinding.java:147)[196:org.openhab.binding.plex:1.10.0.201701300211]
        at org.openhab.core.binding.AbstractBinding.receiveCommand(AbstractBinding.java:97)[183:org.openhab.core.compat1x:2.1.0.201701231811]
        at org.openhab.core.events.AbstractEventSubscriber.handleEvent(AbstractEventSubscriber.java:42)[183:org.openhab.core.compat1x:2.1.0.201701231811]
        at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:415)[6:org.apache.karaf.services.eventadmin:4.0.8]
        at org.apache.felix.eventadmin.impl.tasks.HandlerTask.run(HandlerTask.java:90)[6:org.apache.karaf.services.eventadmin:4.0.8]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_121]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
        at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]

Are there any dependent bindings that I’m missing maybe?

I don’t know what else to look for (maybe my setup is wrong somewhere?)

Thanks in advance

Please remove your Plex-token from that last log, you should keep that private.

What did you configure for host in the Plex binding? What ip/hostname?

1 Like

Hi Jeroen,

Thanks for the heads up. I always worry about what get’s published that
should be hidden, so this one got through!

In my Plex binding I’ve used my local IP address for my Raspberry Pi as
follows:

It may be interesting to note that I only bought my Plex Pass yesterday,
and I just went to check my token which today has changed! So I’ve
updated my config in PaperUI and I will try it again tonight after work.

If I still have an issue I’ll let you know.

Thanks again,

Craig

HI Craig,

Were you able to get the Plex binding to work properly? I am running into the exact same errors your are describing.

Thank you

Is anyone else having long delays receiving the Stopped signal while Playing/Paused/Buffering come through immediately?

My PHT integration is spotless except that my PHTStatus doesn’t change to Stopped when the movie is over and Plex returns to its home screen. I’m watching on a ShieldTV, on Plex Media Server Version 1.7.2.3878 and binding-plex1 - 1.10.0.SNAPSHOT. I’ve been having this problem for a while for many versions of either, so I don’t really know when it started.

It’s funny, because Stopped is sent fine between things, like between the trailers and the pre-roll and the actual movie. But when the movie is over, my lights don’t come on for several minutes (I haven’t timed it, but I’d say it’s around 5 minutes we’re sitting in the dark until OH2 is told the movie stopped and brings the lights back on).

If you look at my events.log below, you’ll see OH2 is told the trailer plays and stops, then the pre-roll plays and stops, then the movie plays. What the logs don’t show is when the movie actually finished and Plex dropped back to the home screen, roughly 5 full minutes before the last two lines.

2017-07-02 20:51:11.644 [ItemStateChangedEvent     ] - PHTStatus changed from Stopped to Playing
2017-07-02 20:54:28.908 [ItemStateChangedEvent     ] - PHTStatus changed from Playing to Stopped
2017-07-02 20:54:28.950 [ItemStateChangedEvent     ] - PHTStatus changed from Stopped to Playing
2017-07-02 20:54:29.002 [ItemStateChangedEvent     ] - PHTStatus changed from Playing to Stopped
2017-07-02 20:55:26.194 [ItemStateChangedEvent     ] - PHTStatus changed from Stopped to Playing
2017-07-02 20:57:26.135 [ItemStateChangedEvent     ] - PHTStatus changed from Playing to Buffering
2017-07-02 20:57:33.052 [ItemStateChangedEvent     ] - PHTStatus changed from Buffering to Playing
2017-07-02 20:57:33.055 [ItemCommandEvent          ] - Item 'modeMoviePlaying' received command ON
2017-07-02 20:57:33.442 [ItemStateChangedEvent     ] - PHTTitle changed from Trailer_dolby_conductor to [*redacted*]
2017-07-02 22:37:27.827 [ItemStateChangedEvent     ] - PHTStatus changed from Playing to Stopped
2017-07-02 22:37:27.831 [ItemCommandEvent          ] - Item 'modeMoviePlaying' received command OFF

Any ideas on where I should look? Is anyone else having the same issue? @idserda?

Thanks! You saved me from additional gray hairs… Stumbled over this by chance and this fixed my non-working binding as well.

Has anyone managed to get Plex working using a Xbox One? I can control Plex on my Iphone and android tabled but not on my Xbox one. I use my Xbox to watch Plex and Netflix so getting Plex to work would help my home automation efforts immensely. Any help would be appreciated.

Don’t have access to an Xbox One so can’t help you with this. Could you enable debug logging for the Plex binding and see if there’s anything in the openHAB logs? And maybe check the logs of your Plex server?

How do I enable debug logging?

See http://docs.openhab.org/administration/logging.html . From the Karaf console enter this command: log set DEBUG org.openhab.binding.plex

Sorry for my ignorance. I’m busy installing OpenHabian as we speak on a new PI. I think the documentation will make more sense now then with the previous installation I had. I should have it up and running in a hour or two. Thank for the help so far.

I am currently getting these errors with the Plex binding.

2017-08-12 01:49:54.104 [DEBUG] [.binding.plex.internal.PlexConnector] - [172.20.1.10]: Message received: {“NotificationContainer”:{“type”:“transcodeSession.update”,“size”:1,“TranscodeSession”:[{“key”:“/transcode/sessions/e0b7714eedc1cb62-com-plexapp-android”,“throttled”:false,“complete”:false,“progress”:85.30000305175781,“speed”:3.4000000953674318,“duration”:2634656,“remaining”:118,“context”:“streaming”,“sourceVideoCodec”:“h264”,“sourceAudioCodec”:“ac3”,“videoDecision”:“transcode”,“audioDecision”:“transcode”,“protocol”:“hls”,“container”:“mpegts”,“videoCodec”:“h264”,“audioCodec”:“aac”,“audioChannels”:2,“transcodeHwRequested”:false,“transcodeHwFullPipeline”:false}]}}
2017-08-12 01:49:57.653 [DEBUG] [.binding.plex.internal.PlexConnector] - [172.20.1.10]: Message received: {“NotificationContainer”:{“type”:“playing”,“size”:1,“PlaySessionStateNotification”:[{“sessionKey”:“1”,“guid”:“com.plexapp.agents.thetvdb://261690/3/5?lang=en”,“ratingKey”:“606237”,“url”:“”,“key”:“/library/metadata/606237”,“viewOffset”:1023068,“state”:“playing”,“transcodeSession”:“e0b7714eedc1cb62-com-plexapp-android”}]}}
2017-08-12 01:49:57.822 [DEBUG] [.binding.plex.internal.PlexConnector] - Refreshing Plex sessions
2017-08-12 01:49:57.890 [DEBUG] [.binding.plex.internal.PlexConnector] - Server returned HTTP response code: 403 for URL: http://172.20.1.10:32400/status/sessions
java.io.IOException: Server returned HTTP response code: 403 for URL: http://172.20.1.10:32400/status/sessions

It looks like it works on the Plex side. These are the logs for plex.

Aug 12, 2017 01:52:24.758 VERBOSE It took 0.0 sec to serialize a list with 2 elements.
Aug 12, 2017 01:52:24.758 DEBUG Completed: [172.20.1.120:47304] 200 GET /clients (8 live) 1ms 904 bytes (pipelined: 2)
Aug 12, 2017 01:52:24.757 DEBUG Request: [172.20.1.120:47304 (Allowed Network)] GET /clients (8 live) Signed-in Token (Johan)
Aug 12, 2017 01:52:24.757 VERBOSE * X-Plex-Provides => controller
Aug 12, 2017 01:52:24.757 VERBOSE * X-Plex-Device => OpenJDK Runtime Environment
Aug 12, 2017 01:52:24.757 VERBOSE * X-Plex-Client-Identifier => xxxxxx-xxxx-xxxxx-xxxxx-xxxxxxxxxxx
Aug 12, 2017 01:52:24.757 VERBOSE * X-Plex-Platform-Version => 1.8.0_121
Aug 12, 2017 01:52:24.757 VERBOSE * X-Plex-Token => xxxxxxxxxxxxxxxxxxxxxxx
Aug 12, 2017 01:52:24.757 VERBOSE * X-Plex-Device-Name => openHAB
Aug 12, 2017 01:52:24.757 VERBOSE * X-Plex-Product => openHAB
Aug 12, 2017 01:52:24.757 VERBOSE * X-Plex-Version => 1.10.0
Aug 12, 2017 01:52:24.757 VERBOSE * X-Plex-Platform => Java
Aug 12, 2017 01:52:24.757 VERBOSE * User-Agent => Java/1.8.0_121
Aug 12, 2017 01:52:24.757 VERBOSE * Host => 172.20.1.10:32400
Aug 12, 2017 01:52:24.757 VERBOSE * Accept => text/html, image/gif, image/jpeg, *; q=.2, /; q=.2
Aug 12, 2017 01:52:24.757 VERBOSE * Connection => keep-alive
Aug 12, 2017 01:52:24.756 VERBOSE Comparing request from 172.20.1.120 against 172.20.1.120/255.255.255.255
Aug 12, 2017 01:52:24.756 DEBUG Auth: We found auth token (xxxxxxxxxxxxxxxxxxx), enabling token-based authentication.
Aug 12, 2017 01:52:24.756 DEBUG Auth: authenticated user 7137391 as Johan

The issue is with the 403 status/sessions.

PS. I do have a PlexPass. If I paste the url on my local server I get a “401 Unauthorized” error.

Any ideas on how I can fix this?

By adding to the Network list in Plex I am now able to control my tablet with play, stop, volume and so on. The title, status and so on does not work. The errors are still as stated above.

On the XBox One I can’t control anything. I get these errors.

2017-08-12 02:37:01.393 [ItemCommandEvent ] - Item ‘PlexTVPause’ received command ON
==> /var/log/openhab2/openhab.log <==
2017-08-12 02:37:01.396 [DEBUG] [.binding.plex.internal.PlexConnector] - Calling url http://127.0.0.1:32400/player/playback/pause
2017-08-12 02:37:01.407 [ERROR] [.binding.plex.internal.PlexConnector] - Error sending command to Plex
java.net.ConnectException: Connection refused: /127.0.0.1:32400 to http://127.0.0.1:32400/player/playback/pause

2017-08-12 02:37:03.512 [ItemCommandEvent ] - Item ‘PlexTVPlay’ received command ON
==> /var/log/openhab2/openhab.log <==
2017-08-12 02:37:03.517 [DEBUG] [.binding.plex.internal.PlexConnector] - Calling url http://127.0.0.1:32400/player/playback/play
2017-08-12 02:37:03.531 [ERROR] [.binding.plex.internal.PlexConnector] - Error sending command to Plex
java.net.ConnectException: Connection refused: /127.0.0.1:32400 to http://127.0.0.1:32400/player/playback/play

2017-08-12 02:40:42.529 [DEBUG] [.binding.plex.internal.PlexConnector] - [172.20.1.10]: Message received: {“NotificationContainer”:{“type”:“playing”,“size”:1,“PlaySessionStateNotification”:[{“sessionKey”:“3”,“guid”:“”,“ratingKey”:“615304”,“url”:“”,“key”:“/library/metadata/615304”,“viewOffset”:327692,“state”:“stopped”}]}}
2017-08-12 02:40:42.533 [DEBUG] [.binding.plex.internal.PlexConnector] - Refreshing Plex sessions
2017-08-12 02:40:42.614 [DEBUG] [.binding.plex.internal.PlexConnector] - Server returned HTTP response code: 403 for URL: http://172.20.1.10:32400/status/sessions
java.io.IOException: Server returned HTTP response code: 403 for URL: http://172.20.1.10:32400/status/sessions

Can anyone help me? The issue is that I get this when trying to control the Xbox Plex.

2017-08-13 13:56:29.872 [DEBUG] [.binding.plex.internal.PlexConnector] - Refreshing Plex sessions
2017-08-13 13:56:29.933 [DEBUG] [.binding.plex.internal.PlexConnector] - Server returned HTTP response code: 403 for URL: http://172.20.1.10:32400/status/sessions
java.io.IOException: Server returned HTTP response code: 403 for URL: http://172.20.1.10:32400/status/sessions

The 403 on status/sessions is the issue…

Noobie here, been installing openHAB2 this morning, have had no real issues until trying to get Plex configured.
Installed the binding form the ‘add-ons’ section, filled in my PMS ip (both 10.0.0.1 and 172.0.0.1) which runs on the same server (windows 2008R2) as openHAB2 en filled in my key. So far so good. I see a log entry:

2017-08-30 14:17:51.536 [INFO ] [b.core.service.AbstractActiveService] - Plex Refresh Service has been started
2017-08-30 14:17:51.746 [INFO ] [.binding.plex.internal.PlexConnector] - Plex websocket connected to 10-0-0-1.aedfb5a366444b9f98ddda45eecf13bc.plex.direct:32400

Seems legit…When I then go to Inbox (remember, total noob here), I don’t see it popping up in there. Read a lot of posts about Plex problems, but nothing is in there that helps me.

Some tips would be appreciated!

@Mace

Hi
normaly you would be right, but since the Plex-Binding is not an original openHAB2 but an openHAB1 binding, there will be nothing in your inbox!

OpenHAB1 didn’t have the “thing-layer” between real life physical objetcts and openHAB “items”, that’s why there is nothing in your inbox, in the paper UI.

You said “noobie here” so i wil give you some elaborate help here :slight_smile:

You have to directly configure your items in your xxxx.items file. If you don’t know where to find it. look here http://docs.openhab.org/configuration/items.html. In chapter Introduction you find more information how to find/create an xxxx.items file.

Once found, you have to create your items like explained here http://docs.openhab.org/addons/bindings/plex1/readme.html

At the end of each item row is a part like {plex=“playerid#power”}. Now you have to exchange playerid with the id of you plex-client-device you want to get infos for, or controll, This is also explained in the second link above.

I myself, had some trouble geting the device id so here some hints.
First log in to you plex SERVER with your browser and your login and password.
Then change the URL in your browser to look like that http://your_plexserver_here:your_port_here/clients.

You should get something like this

<MediaContainer size="1">
<Server name="MiniTunes" host="192.168.xxx.xxx" address="192.168.xxx.xxx" port="3005" machineIdentifier="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" version="1.4.1.469-47a90f01" protocol="plex" product="Plex Home Theater" deviceClass="HTPC" protocolVersion="1" protocolCapabilities="navigation,playback,timeline,mirror,playqueues"/>
</MediaContainer>

The id mentioned above is the machineIdentifier so for a whole example:

String PlexTVStatus	"Status [%s]"		<video>				{plex="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx#state"}

so if you exchange the xxxxxx’s with your machineIdentifier-playerid. And put this in the xxx.items file. It will create an item “PlexTVStatus” which you can use in your Sitemap file, and shows if plex is playing ,paused, or stoped.

hope it helps

cu garionth

ps disclaimer: english is not my first language :slight_smile:

I’m also having trouble getting Plex setup with OpenHab. I cannot find any Plex ‘things’ or see any Plex devices to control. The PaperUI screen (PaperUI->Inbox->Plex Binding->Choose Thing) does/finds nothing.

Plex Server Version: 1.9.2.4285
OpenHab Version: 0.9.0.b5 on openHABianPi.

I’ve installed the Plex binding (binding-plex1 - 1.10.0) via the Paper interface. I’ve configured the binding (PaperUI->Configuration->Bindings->Plex) and set the IP and token. On my plex server I can see a new device (openHAB 1.10.0 OpenJDK Runtime Environment).

I have created a new items file (/etc/openhab2/items/plex.items):

String PlexTVStatus             "Status [%s]"           <video>         {plex="XXXXXXXX-d366-47e2-a378-03044e9d1XXX#state"}
String PlexTVLivingRoomStatus   "Status [%s]"           <video>         {plex="XXXXXXXX-7348-4AE5-850E-10DADC748XXX#state"}

I have created a new sitemap file /etc/openhab2/sitemap/plex.sitemap):

sitemap plex label="Main Menu"                                                                                                                                                                                                                                                                                                                                                                
{                                                                                                                                                                                                                                                                                                                                                                                                 
        Frame {                                                                                                                                                                                                                                                                                                                                                                                   
                Switch item=PlexTVPower                                                                                                                                                                                                                                                                                                                                                           
                Text item=PlexTVStatus                                                                                                                                                                                                                                                                                                                                                            
                Slider item=PlexTVProgress visibility=[PlexTVStatus!="Stopped"]
        }
}

As stated in the previous post, the Plex-binding is not an openHAB2 binding, so you will not see any items in the inbox. Rest of the configuration looks fine, should work as expected.

Hi
I need some assistance configurating the plex binding and plex.items.
As showen in the wiki I created the files and compiling the sitemap works so far.

So here is the conf and environement I do not use Plex Home:

OH2 installed on qnap
plex server installed on qnap http://192.xxx.x.xx:32400
plex client installed on ps4:

Plex binding
host: 192.xxx.x.xx
port: 32400
refresh:5000

devices:

   <Device name="Plex for PlayStation 4" publicAddress="mypublicip" product="Plex for PlayStation 4" productVersion="3.13.25" platform="WebMAF" platformVersion="01.81" device="PlayStation 4" model="" vendor="" provides="client,player,pubsub-player"clientIdentifier="myclientidentifer" version="3.13.25" id="myid" token="mytoken" createdAt="1533837279" lastSeenAt="1539513383" screenResolution="1280x720" screenDensity="">; <;/Device>;

plex.items:
Switch PlexTVPlay “Play” <video> {plex=“myclientidentifer#playback/play”}
Switch PlexTVStop “Stop” <video> {plex=“myclientidentifer#playback/stop”}

However, when I play something on my client, I can’t see the current status or control Plex via OpenHAB.
thanks for your help

I found out what the binding problem was with plex. It was the ip adress of the openhab server that needs to be defined as trusted http adress in plex. Now I can see the current PlexTvStatus in openhab.
But the hue lights are not dimming. What’s wrong here with the rule?
see the plex.rules:

rule "Lights on when paused"
when
    Item PlexTVStatus changed to Paused
then 
	logInfo("PlexLight", "Play to pause")
	sendCommand(EG_Wohnzimmer, 80)
	// dimLiving.apply(50)
end

rule "Lights on when stopped"
when 
    Item PlexTVStatus changed to Stopped
then 
	logInfo("PlexLight", "Play to pause")
	sendCommand(EG_Wohnzimmer, 150)
end

rule "Lights dimmed when playing"
when
	Item PlexTVStatus changed to Playing  
then
	logInfo("PlexLight", "Pause to play")	
	sendCommand(EG_Wohnzimmer, 10)
end

and the hue.items:

// Bulb2
Group EG_Wohnzimmer "EG Wohnzimmer"
Switch	Light2_Toggle	  (EG_Wohnzimmer)	{ channel="hue:0210:1:bulb2:color" }
Dimmer	Light2_Dimmer	  (EG_Wohnzimmer)	{ channel="hue:0210:1:bulb2:color" }
Color	Light2_Color	  (EG_Wohnzimmer)	{ channel="hue:0210:1:bulb2:color" }
Dimmer	Light2_ColorTemp  (EG_Wohnzimmer)	{ channel="hue:0210:1:bulb2:color_temperature" }
String	Light2_Alert	  (EG_Wohnzimmer)	{ channel="hue:0210:1:bulb2:alert" }
Switch	Light2_Effect	  (EG_Wohnzimmer)	{ channel="hue:0210:1:bulb2:effect" }

// Bulb3
Switch	Light3_Toggle	  (EG_Wohnzimmer)	{ channel="hue:0210:1:3:color" }
Dimmer	Light3_Dimmer	  (EG_Wohnzimmer)	{ channel="hue:0210:1:3:color" }
Color	Light3_Color	  (EG_Wohnzimmer)	{ channel="hue:0210:1:3:color" }
Dimmer	Light3_ColorTemp  (EG_Wohnzimmer)	{ channel="hue:0210:1:3:color_temperature" }
String	Light3_Alert	  (EG_Wohnzimmer)	{ channel="hue:0210:1:3:alert" }
Switch	Light3_Effect	  (EG_Wohnzimmer)	{ channel="hue:0210:1:3:effect" }

and the sitemap :

 Text label="Wohnzimmerbeleuchtung" icon=light{
                      Default item=EG_Wohnzimmer icon=light
                      }

Can anybody help me here with my code?

Hello!

You haven’t said if it shows log entries when status changes (your logInfo)? I’m not 100% sure, but I think you can’t use strings in changed to trigger. And even if you can, there’s no need to have 3 rules for such a simple activity. You could try this:

rule "Plex TV Status changed"
when 
    Item PlexTVStatus changed
then
    if (PlexTVStatus.state == "Paused") {
        logInfo("PlexLight", "Paused")
        EG_Wohnzimmer.sendCommand(80)
    } else if (PlexTVStatus.state == "Stopped") {
        logInfo("PlexLight", "Stopped")
        EG_Wohnzimmer.sendCommand(150)
    } else {
        logInfo("PlexLight", "Playing")
        EG_Wohnzimmer.sendCommand(10)
    } 
end

Best regards,
Davor

Edit: Forgot to say that it’s better to use item.sendCommand(Value) than sendCommand(Item, Value).