[SOLVED] Denon Binding and rules

I want to write some rules to control my Denon AVR-X4200w.
I installed the Denon/Marantz binding 2.4.0
As described in the binding documentation is tried marantz_command.sendCommand("MSMCH STEREO")
As soon as the rule triggers I get the error 2019-04-22 23:31:00.153 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'denon': The name 'avrCmd' cannot be resolved to an item or type; line 362, column 2, length 6

Can anybody help me?

Hi @djtronic, I happen to have a Denon AVR as well and will try to help you figure it out.
Could you share the rule (and related item definitions) because it looks like the error is not related to the command you showed.

Here is my rule:

rule "denon"
        Item mqtt_Schreibtisch received update A0
        logInfo("Denon", "Versuch 1");
        marantz_command.sendCommand("MSMCH STEREO")

Unfortunately I do not have a item definition :frowning:
Do I need to have something like this:
String marantz_command {channel="denonmarantz:avr:0006781d58b1:general#command"}

–> I added the item and now it works as expected - phantastic! Thank you!

The error is about avrCmd on line 362. I don’t see that in the part of the rule you showed.
Is this rule part of a large rule file?

Sorry for confusion. I tried several strings from several tutorials.
Error MSG and config did not match :wink:

But your hint to add a item definition pointed me to the right line in the binding documentation - it works!

1 Like

Good to hear! :grinning:

Please mark this thread as solved

I am not sure how to mark as solved. I marked one of your reply - is this correct?

Sure. And please add [SOLVED] to the title. :grinning: