Onkyo volume +5 or -5

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

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.

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

Is that a Home Assistant node?

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.

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

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

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.

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.

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


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

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

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