# Onkyo volume +5 or -5

**URL:** <https://discourse.nodered.org/t/onkyo-volume-5-or-5/77282>\
**Category:** General\
**Created:** [5 April 2023 16:48 UTC](https://discourse.nodered.org/t/onkyo-volume-5-or-5/77282 "2023-04-05T16:48:14Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![schorrie](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/schorrie/32/68865_2.png) [@schorrie](https://discourse.nodered.org/u/schorrie)\
**Post date:** [5 April 2023 16:48 UTC](https://discourse.nodered.org/t/onkyo-volume-5-or-5/77282/1 "2023-04-05T16:48:14Z")

</div>

I use eiscp out and managed to make a button controlling my volume of the onkyo receiver.

I want to make buttons in home assistant for volume up or down,  
When clicking on it, it first has to read the current volume and then adjust the volume up or down with 5

anyone knows how to do this

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [5 April 2023 17:08 UTC](https://discourse.nodered.org/t/onkyo-volume-5-or-5/77282/2 "2023-04-05T17:08:52Z")

</div>

Hi @schorrie

> I want to **make buttons in home assistant** for volume up or down,

Unless your question is worded incorrectly - I suggest you seek the answer from the Home Assistant Community.

A majority here do not use Home Assistant.

If you mean, you use this node -\> **node-red-contrib-eiscp** , and want to create a Node RED dashboard button to trigger commands - then yes, but if this is a request for a Home Assistant Specific requirement - HA forums is your place.

---

<div class="post-metadata">

**Author:** ![schorrie](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/schorrie/32/68865_2.png) [@schorrie](https://discourse.nodered.org/u/schorrie)\
**Post date:** [6 April 2023 05:58 UTC](https://discourse.nodered.org/t/onkyo-volume-5-or-5/77282/3 "2023-04-06T05:58:34Z")

</div>

The question is worded incorrectly.  
In home assistant i have buttons vol\_up5 or vol\_down5

In nodered i want a node to use an event state node,  
when clicked, i want to read the current volume with eiscp out node and than send a new volume with payload that is 5 higher or lower

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [6 April 2023 08:23 UTC](https://discourse.nodered.org/t/onkyo-volume-5-or-5/77282/4 "2023-04-06T08:23:14Z")

</div>

> [@schorrie](#):
>
> In nodered i want a node to use an event state node,

Is that a Home Assistant node?

---

<div class="post-metadata">

**Author:** ![schorrie](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/schorrie/32/68865_2.png) [@schorrie](https://discourse.nodered.org/u/schorrie)\
**Post date:** [7 April 2023 08:55 UTC](https://discourse.nodered.org/t/onkyo-volume-5-or-5/77282/5 "2023-04-07T08:55:08Z")

</div>

i'm using 'node-red-eiscp' but question is about nodered and passing variables

With an eiscp out node, i do a query about the current volume status and the EISCP-Out node gives me following information:

{"command":["master-volume","volume"],"argument":50,"iscp\_command":"MVL31","host":"192.168.1.4","port":"60128","model":"HTR 695"}

I want to use an event-state node, when clicking a button, the event-node gets the argument 50 (current volume), then plus or minus 5, injecting it back to the Onkyo receiver.

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [7 April 2023 09:12 UTC](https://discourse.nodered.org/t/onkyo-volume-5-or-5/77282/6 "2023-04-07T09:12:16Z")

</div>

Maybe first answer this question by Colin?

or maybe I'll get to the point - if this node (event-state) you want to use, is a Home Assistant Node - you will need to divert your attention to the Home Assistant forums.

Most here do not use Home Assistant - therefore we won't/have no need to know.

Once you know how to use the event-state node - then we can help with Node RED Specifics

> [@Colin](#):
>
> > [@schorrie](#):
> >
> > In nodered i want a node to use an event state node,
> 
> Is that a Home Assistant node?

---

<div class="post-metadata">

**Author:** ![schorrie](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/schorrie/32/68865_2.png) [@schorrie](https://discourse.nodered.org/u/schorrie)\
**Post date:** [7 April 2023 09:15 UTC](https://discourse.nodered.org/t/onkyo-volume-5-or-5/77282/7 "2023-04-07T09:15:40Z")

</div>

the first node is just an event state node, that listens to a button in home assistant

so the home assistant button, just starts the first function in nodered

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [7 April 2023 09:18 UTC](https://discourse.nodered.org/t/onkyo-volume-5-or-5/77282/8 "2023-04-07T09:18:50Z")

</div>

Please try and ask your question without mentioning HA nodes and it may be clearer what you want. If it is just that you have a message of one format and want to convert it to a message with a different format then show us the format of the message in and tell us, for that input, exactly what message out you want.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [7 April 2023 10:48 UTC](https://discourse.nodered.org/t/onkyo-volume-5-or-5/77282/9 "2023-04-07T10:48:02Z")

</div>

Post your flow and add two inject nodes with the values the event state node/s output (e.g. the value for up and down button presses). Then it would be easier for others to give you an example.

---

<div class="post-metadata">

**Author:** ![schorrie](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/schorrie/32/68865_2.png) [@schorrie](https://discourse.nodered.org/u/schorrie)\
**Post date:** [7 April 2023 12:10 UTC](https://discourse.nodered.org/t/onkyo-volume-5-or-5/77282/10 "2023-04-07T12:10:10Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/d/9d4545e6e619310294b2ca2e9be8aab3913c5731.png)

the onkyo volume state is the trigger to start the function3

function3

> msg.payload = "master-volume=query"  
> return msg;

Onkyo forward sends the command to my Onkyo Stereo

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/3/139c52f5427f3a0e46fbe29f766442661e8b2a33.png)  
the onkyo eiscp out, sends the data received from my receiver, such as the current volume state, in the debug 14 i get the set volume as argument

> {"command":["master-volume","volume"],"argument":49,"iscp\_command":"MVL31","host":"192.168.1.4","port":"60128","model":"HTR 695"}

I want to achieve that i can use the argument, 49 in example, in a variable, so i can raise with 5

and then use nodered to set the volume of the receiver

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [7 April 2023 15:25 UTC](https://discourse.nodered.org/t/onkyo-volume-5-or-5/77282/11 "2023-04-07T15:25:51Z")

</div>

The following in a `function` node - directly after the incoming onkyo message, will produce a `payload` that is + 5 of the original `argument`.

This is based on the message example provided, and I'm going to assume the above example is within a `payload` object

```auto
msg.payload = (msg.payload.argument + 5)
return msg

```

How you need to correctly structure this command, will, I'm sure be in the documentation of the node or API documentation.

All you need to do is make sure the command body is correct - and attach the `function` node to an Onkyo outgoing node, I assume - much like you do with your `onkyo forward` node
