LCN How to set a Variable

@fwolter maybe you can help me?
I want to set a Value to a LCN Module Variable.
In LCN Pro the I try to set the Variable to LCN Native, but it keeps changing to °C.
What do I have to do so I can set the Variable via Script or via API?
I keep getting the following Error Messages

cn:module:3f20f61e68:S000M055:variable#2: Failed to handle command DecimalType: Current variable value unknown

S000M055: Failed to receive measurement value: S000M055 VARIABLE 2: Failed finally after 3 tries

Did you configure the variable as counter in LCN-PRO?


What’s the firmware version of your LCN module?

it says:

You found a bug. Seems like nobody used this feature before.

Additionally, you need to set the variable initially by the module itself after it powered up. E.g. via a reset to zero (Nullstellen) command. Otherwise openHAB can’t control it.

Here is the fixed version:

You can drop the the JAR file into the addons folder of your OH installation. To be sure, you should uninstall the stock LCN binding, beforehand.

1 Like

Thank you works great now.

I do! Indeed, it took some time until I figured out that I had to do a manual “reset” (Nullstellen) at the module level. But to be honest, I thought this is the way how LCN works and this is complicated by design :wink:

Thanks for fixing this and making my life a bit easier in the event of a module reset/power loss. Now I don’t have to remember the module reset!

Interesting… I couldn’t convince my PCHK version to execute any variable request with the previous openHAB binding implementation. I’m a bit suprised it worked with your setup.

Just to be clear, a reset of the variable is also necessary with the fixed version. There’s nothing openHAB can do about it, but the fact is now part of the readme.