<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Rule for dimmer and LED strip]]></title><description><![CDATA[<p dir="auto">Hello!</p>
<p dir="auto">I have two nodes:</p>
<ol>
<li>Dimmer (encoder with switch)</li>
<li>RGB LED strip</li>
</ol>
<p dir="auto">Please tell me how to make a rule for controlling two parameters (on / off, brightness) of an RGB LED strip using a dimmer unit.</p>
<p dir="auto">Perhaps someone already uses this rule in OpenHAB?</p>
<p dir="auto"><img src="https://image.ibb.co/jfbi9e/2018_09_06_22_06_32.png" alt="Dimmer" class=" img-fluid img-markdown" /><br />
<img src="https://image.ibb.co/k4sC2z/2018_09_06_22_06_49.png" alt="Dimmer" class=" img-fluid img-markdown" /><br />
<img src="https://image.ibb.co/n9hUhz/2018_09_06_22_06_37.png" alt="RGB LED strip" class=" img-fluid img-markdown" /><br />
<img src="https://image.ibb.co/m48PFK/2018_09_06_22_07_11.png" alt="RGB LED strip" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.mysensors.org/topic/9691/rule-for-dimmer-and-led-strip</link><generator>RSS for Node</generator><lastBuildDate>Tue, 21 Jul 2026 17:02:51 GMT</lastBuildDate><atom:link href="https://forum.mysensors.org/topic/9691.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 06 Sep 2018 19:11:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Rule for dimmer and LED strip on Fri, 07 Sep 2018 17:06:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/vladimir" aria-label="Profile: vladimir">@<bdi>vladimir</bdi></a><br />
Are you looking for something similar to the following:</p>
<pre><code>rule  "Rule Dimmer to Color Item Brightness"
// TestDimmer121 is the item name of the dimmer value
// Mock_RGB_Color_x is the Item name of the color strip
// Openhab sends color data as Hue, Saturation, Brightness Data

when
	Item TestDimmer121 changed
then

	logInfo("rules","Dimmer to Color conversion Received " +TestDimmer121.state )
	var PercentType BrightnessfromDimmer= TestDimmer121.state
	var HSBType currentState = Mock_RGB_Color_x.state as HSBType
	var DecimalType CurrentHue = currentState.hue 
	var PercentType CurrentSaturation = currentState.saturation
	var PercentType CurrentBrightness = currentState.brightness

	logInfo("rules","HSBtype " + currentState) 
	Mock_RGB_Color_x.sendCommand(new HSBType(CurrentHue,CurrentSaturation,BrightnessfromDimmer))
	logInfo("rules","HSBtype NEW " +Mock_RGB_Color_x.state.toString) 
end
</code></pre>
<p dir="auto">You did not post your item names, so you need to change to suit.<br />
I do not have a HSB lamp node to physicaly test on, so i have only been checking the openhab logs.</p>
]]></description><link>https://forum.mysensors.org/post/93366</link><guid isPermaLink="true">https://forum.mysensors.org/post/93366</guid><dc:creator><![CDATA[hard-shovel]]></dc:creator><pubDate>Fri, 07 Sep 2018 17:06:46 GMT</pubDate></item></channel></rss>