Number Sensoren_Status_Strom "Stromzählerstand [%.1f kwh]" (gEnergie) { channel="smlreader:meter:BinderPower:1-0#1-8-0",conversionRatio="1000" }
Everything works fine - except the value of channel="smlreader:meter:BinderPower:1-0#1-8-0", is 1000times higher than the exact value. For this @msteigenberger added an attribute “conversionRatio” to the channel, which can be set via PaperUI:
how is the correct Syntax in a .items file to configure the channel for it? { channel="smlreader:meter:BinderPower:1-0#1-8-0",conversionRatio="1000" } doesn’t work, { channel="smlreader:meter:BinderPower:1-0#1-8-0,conversionRatio=1000" } either…
Looks like this is the right direction… But unfortunately it breaks at the Input for the right channel:
This is the channel with PaperUI configuration:
Thing is, if I try to us something as channel selector as you provided, I get ERRORs:
2017-09-26 16:44:41.316 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'powermeter.things' has errors, therefore ignoring it: [5,14]: mismatched input 'Number' expecting RULE_ID
[5,28]: mismatched input '.' expecting '}'
[5,29]: no viable alternative at input '8'
[5,31]: no viable alternative at input '0'
[6,13]: no viable alternative at input 'conversionRatio'
[6,29]: no viable alternative at input '1000'
This error is always the same, regardless, what I type in after “Type”, e.g.
smlreader:meter:BinderPower [port="/dev/ttyUSB0", refresh=20] {
Channels:
Type Id : 1-0#1.8.0 [
conversionRatio=1000
]
}
Where do you get that “NumberChannel” from? I didn’t see something like that…?
but unfortunately:
2017-09-26 17:57:31.977 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'powermeter.things' has errors, therefore ignoring it: [5,35]: mismatched input '.' expecting '}'
[5,36]: no viable alternative at input '8'
[5,38]: no viable alternative at input '0'
[6,13]: no viable alternative at input 'conversionRatio'
[6,29]: no viable alternative at input '1000'
I’m not sure, if the “#” in the value is the cause of this? but escaping it like # didn’t help either:
2017-09-26 17:58:29.508 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'powermeter.things' has errors, therefore ignoring it: [5,33]: mismatched input '\' expecting '}'
[5,35]: no viable alternative at input '1'
[5,37]: no viable alternative at input '8'
[5,39]: no viable alternative at input '0'
[6,13]: no viable alternative at input 'conversionRatio'
[6,29]: no viable alternative at input '1000'
The first part of that is to be omitted, so the Type should be NumberChannel
Of course I should have written the correct id (with - instead of .) at first place…