Plex controlling a hue light rule

My first rule was going to be plex progress controlling the colour of a hue light, but I’m struggling to get it working.

I have a plex item that I think I need to use as the “When” condition:

Dimmer PlexLoungeRokuProgress "Progress [%.1f%%]" <video> {plex="Plex4224D4001173#playback/progress"}

And I have a hue item that I think should be the output:

Color Color_1 "left bulb" (Colorize) {hue="1"}

My rule is as follows

import org.openhab.core.library.types.*

rule "PlexLightsRule"
when
	Item PlexLoungeRokuProgress recived update
then
//	logInfo("Updating hue")
	var DecimalType hue = PlexLoungeRokuProgress.state as DecimalType // 0-360; 0=red, 120=green, 240=blue, 360=red(again)
	var PercentType sat = new PercentType(100) // 0-100
	var PercentType bright = new PercentType(100) // 0-100
	var HSBType light = new HSBType(hue,sat,bright)
	sendCommand(Color_1, light)
end

Just nothing happens - I don’t see any errors in the logs, but the designer is telling me that there is an error with the when condition - it says

"No viable alternative at input ‘Item’

Thanks

Ross

looks like the when rule should be this:

Item PlexLoungeRokuProgress changed

Works great now!

keyword was missspelled. it should be Item PlexLoungeRokuProgress received update

1 Like

Gahh. Ta!