Multi Binding Hue + Modbus

The aim of the following was toggling a Hue bulb with a modbus connected switch.
Both items work separatly, when controlling the switch on the model, both items are activated.
When I use the modbus switch, the Hue is not following.

Switch Buro "Buro [%s]"	<light>	(gBuroLamp)	["Switch", "Switchable"]	{ channel="hue:0100:1:Buro_lamp1:brightness", channel="modbus:data:plc:coils:QX1_4:switch", autoupdate="false" [profile="system:rawbutton-toggle-switch"] }

This profile is only suitable for use with trigger event type channels.

The Modbus binding does not create any trigger type channels at all, only ordinary state type.

So, how could you do this task?
Link your Modbus channel to an ordinary Switch Item in the ordinary way, no profiles.
Link the hue channel to the Modbus Item as well, but use a follow profile. This will listen for state changes of the Item and forward them as “commands” to the hue channel.

Beware that Modbus is a polling binding, and will be regularly updating that Item, depending how you’ve configured it.
I don’t know if follow profile operates only on changes, or also update-to-same state updates.
You might pump out a stream of commands to the hue.

thank you very much for the support

you mean something like this:

Switch Buro "Buro [%s]"	<light>	(gBuroLamp)	["Switch", "Switchable"]	{ channel="hue:0100:1:Buro_lamp1:brightness" [profile="follow"] }
Switch Buro "Buro [%s]"	<light>	(gBuroLamp)	["Switch", "Switchable"]	{ channel="modbus:data:plc:coils:QX1_4:switch", autoupdate="false"  }

there are some issues with this:
Validation issues found in configuration model ‘hue-modbus.items’, using it anyway:
Duplicate ModelItem ‘Buro’

There certainly are. Every Item must have a unique name, as it is trying to tell you.

This is not how you link multiple channels to one Item. That is documented here -

To expand a bit, I don’t think I’d be trying to stuff everything into one Item.
Have an Item for the hue, in the normal way.
Have a separate Item for the modbus,in the normal way.
Now add the hue channel to the modbus Item using a follow profile.
Choose which one you want on your UI, the hue Item probably.

ok, I mis-understood you…

Switch Buro "Buro [%s]"	<light>	(gBuroLamp)	["Switch", "Switchable"]	{ channel="modbus:data:plc:coils:QX1_4:switch", autoupdate="false", channel="hue:0100:1:Buro_lamp1:brightness" [profile="follow"] }

This works without errors.

1 Like

Could the same be achieved with a dimmer value? eg a holding register with a 0-100 value for brightness control?

The follow profile merely copies an Item state to the channel as though it were a command.
So, where a Dimmer Item has a state update like 65, ‘follow’ will send command 65 to the channel. A channel of dimmer, color, or number type should know what to do with that. A channel of switch type will not, I suspect.

Recent post here

I just don’t get it, this works fine:

Switch	Buro_lamp1_Toggle		"Buro [%s]"		<light>	(gBuroHueLamp)	["Switch", "Switchable"]	{ channel="modbus:data:plc:coils:QX1_4:switch", autoupdate="false", channel="hue:0100:1:Buro_lamp1:brightness" [profile="follow"] }
Switch	Buro_Gledopto_Toggle	"Buro [%s]"		<light>	(gBuroLedStrip)	["Switch", "Switchable"]	{ channel="modbus:data:plc:coils:QX1_4:switch", autoupdate="false", channel="hue:0210:1:Buro_Gledopto:color" [profile="follow"] }

here, the Philips Hue does not do anything, Gledopto works fine:

Dimmer  Buro_lamp1_Dimmer		"Dimmer [%d]"	<light>	(gBuroHueLamp)	["Control", "Lighting"]		{ channel="modbus:data:plc:holding_registers_hue:QB600:dimmer", autoupdate="false", channel="hue:0100:1:Buro_lamp1:brightness" [profile="follow"] }
Dimmer	Buro_Gledopto_Dimmer	"Dimmer [%d]"	<light>	(gBuroLedStrip)	["Control", "Lighting"]		{ channel="modbus:data:plc:holding_registers_hue:QB600:dimmer", autoupdate="false", channel="hue:0210:1:Buro_Gledopto:color" [profile="follow"] }

Are your Dimmer Items actually getting state updates or changes?

I’m not sure that you can link the same channel more than once using a follow profile, to different Items. In theory yes, but you may have run into a practical problem. Never seen it done before. I’m suspicious the ON/OFF fromone may be overriding the numeric from the other.