state logic

For more convenient interaction some kind of state logic was added to the layout xml scheme. Check it out by selecting the “Default state layout” from within the 2.0 version of the app.

1. toggle button
A toggle button (e.g. mute on/off) with two or even more states can be defined with the following attributes:

 label="Mute off;Mute on"
 style="red;dark" ...>MUOFF;MUON</button>

As you can see, you have to define a statetype (toggle) and the states, seperated by character ;. The states have to match the corresponding EVENTS received from the AVR. The statequery attribute defines the COMMAND to request the current state from the AVR. Label, iconid and style attributes can be defined per state as well by using the above character as a delimiter. If you define only one, it is used for every state. The actual commands which will be sent refer to the states by their order, which means in “MUON” state “MUOFF” will be sent and vice versa for the example above.

2. view “button”
To show some info without interaction a view only “button” can be defined:

 style="red;dark" ...>dummy</button>

It works exactly the same as the toggle button except it can not be clicked. As the element value (the COMMAND) can not be empty in the xml structure, provide some dummy string as it will not be used at all.
To give some more flexibility placeholders “$number” and “$text” can be used in the state attribute and referenced in the label attribute by “$“.
The following example will show the current source:

 label="Source: $" ...</button>

$text” will match everything, “$number” can be used to explicitly match numbers.

3. chooser button
To allow for a more convenient way of selecting “something” with some more possible values (like input source, presets) a chooser button can be defined which shows a list context menu on button press:

 label="Source: $" 
 list="Blue Ray;Sat/Cable;TV;Net/USB;DVD..." 

The actual command which will be sent refers to the selected list entry by order. This element can be combined with placeholders.
You can omit the states and statequery attributes. In this case the button will act like a simple “list chooser” without any AVR response evaluation. This can be usefull for e.g. Presets.



  1. I like this app very much and have started to create my own layouts. I’m currently struggeling with view buttons andn the NSE0-NSE8 commands on a Denon DNP720. Any suggestions how these are correctly parametrized


    1. Hi,

      thank you.

      I guess to have a nice title display, more logic is needed as the view button can provide. I already tried it as well.
      I am not even sure about the update procedure on AVR side of theese lines.

      Sorry for not to be able to help you with this, but implementing specific logic for the display would break the generic logic from my point of view.


  2. Sam Newsome · · Reply

    Where’s my ip address for my AVR-1312 reciver

  3. David Kierkegaard · · Reply

    Hi! Great app! Is it possible to send state commands with Taskers intent action? (if you would like to create a shortcut which turns the receiver on/off, depending on state)


  4. Hi.

    Thank you for a great app. Is it possible to send “toggle” commands with taskers action intent?

      1. thjunge11,
        That thread only mentions standard AVR commands. Is their a way to send a toggle state command?

      2. can you explain more in detail?

    1. This is something I’m interested in as well. I want to be able to set a variable depending input and another depending on power state

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: