Onkyo 616 Power-stats

I want the use the information i get form my AVR

11.9.2021, 14:48:22node: abc38942f12dbb25
eiscp : msg.payload : Object
object
command: "system-power"
argument: "on"
iscp_command: "PWR01"
host: "192.168.1.12"
port: "60128"
model: "TX-NR616"

I have tried it with the following:

image

but no success.

Would be thankfull for your help

What data from that debug are you trying to access?

You should not have two = signs in one statement. Please explain what you are trying to do.

I get a eiscp.msg from my AVR using this node - node-red-contrib-eiscp

What i try to do is, i want to know the power status
I think it is more usefull to search for the following status:
iscp_command: "PWR00" = off
iscp_command: "PWR01" = on

The AVRsends a message each time a change is made

Is there an easy way to do this?

I don't see anything like that in the debug output you have shown.

Row 5
I added the = to make it easier to understand

Do you mean the line

iscp_command: "PWR01"

If so then you can address that as `msg.payload.iscp_command. But you have not explained what you want to do with that.

Yes, thats the line i mean

I'm sorry for making it so complicated. i am quite a beginner.

I want the information (PWR on / off) to turn on the light in my room
The problem is that thes msg is included in most other msg...

11.9.2021, 15:33:34node: 0e75888fbb6c8a4d
eiscp : msg.payload : Object
object
iscp_command: "NSBON"
host: "192.168.1.12"
port: "60128"
model: "TX-NR616"
command: "PWR"
argument: "[Circular ~]"
11.9.2021, 15:33:34node: abc38942f12dbb25
eiscp : msg.payload : Object
object
command: "PWR"
iscp_command: "NMDOFF"
host: "192.168.1.12"
port: "60128"
model: "TX-NR616"
argument: "[Circular ~]"

I suspect that I have to take the information in the exact order so that I don't read out wrong data

Sorry, I have no idea what you are trying to do. Perhaps knowledge of the node you refer to is required. I thought you were just asking how to access data in messages you were receiving.

that's exactly what i want to do... i want to work with the msg PWR01 and PWR00 form the msg.

image

is that the right way?

maybe a changenode could help?
image

Oh, you are trying to set the values in msg.payload, not read them out.

Please don't post screenshots, it means I can't copy your code and correct it. I can see that you are trying to set msg.payload.command to "power-status" but what are you trying to set iscp_command to?

looks like I'm on the completely wrong way.
Yes, I just want to know if my AVR is on or off

I get a lot of information and i want to work with the PWR01 / PWR00 to get them in boolean true/false

Should be like

if iscp:command = PWR01
then return true

if iscp:command = PWR00
then return false

try

msg.payload = msg.payload.iscp_command === "PWR01";

or

msg.payload = msg.payload.argument === "on";
1 Like

What if iscp_command is neither of those?

Thanks for that - now i get true or false.
The last "problems" are

how can i make a request
how can i filter the msg - may no longer be necessary if I can make a specific request

@Colin
if i get no answer it should be false

what sort of request?

Thats my flow

[{"id":"db0692a9434fea7d","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"c89fa2e909d1f1e3","type":"eiscp-in","z":"db0692a9434fea7d","name":"Onkyo","controller":"336bdaabba8044df","x":430,"y":200,"wires":[["47f31ad091d7fc4c","ef2096db35d97c33"]]},{"id":"8f46cf382d03aae7","type":"eiscp-out","z":"db0692a9434fea7d","name":"","controller":"336bdaabba8044df","x":810,"y":280,"wires":[]},{"id":"dd181b6f0685663d","type":"function","z":"db0692a9434fea7d","name":"Ein","func":"msg.payload = msg.payload.iscp_command = \"system-power\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":630,"y":280,"wires":[["8f46cf382d03aae7"]]},{"id":"d496520ae2eaff96","type":"function","z":"db0692a9434fea7d","name":"Aus","func":"msg.payload = \"system-power=off\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":630,"y":320,"wires":[[]]},{"id":"3f26ed9a629d5c7c","type":"inject","z":"db0692a9434fea7d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":440,"y":280,"wires":[["dd181b6f0685663d"]]},{"id":"c566f14f72e3ecf0","type":"inject","z":"db0692a9434fea7d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":440,"y":320,"wires":[["d496520ae2eaff96"]]},{"id":"47f31ad091d7fc4c","type":"function","z":"db0692a9434fea7d","name":"EIN","func":"msg.payload = msg.payload.iscp_command === \"PWR01\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":590,"y":160,"wires":[["94bf1d2ddb4f1aac"]]},{"id":"94bf1d2ddb4f1aac","type":"debug","z":"db0692a9434fea7d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":780,"y":180,"wires":[]},{"id":"ef2096db35d97c33","type":"function","z":"db0692a9434fea7d","name":"AUS","func":"msg.payload = msg.payload.iscp_command === \"PWR00\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":590,"y":220,"wires":[["8a198fd7c201d341"]]},{"id":"8a198fd7c201d341","type":"debug","z":"db0692a9434fea7d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":770,"y":220,"wires":[]},{"id":"336bdaabba8044df","type":"eiscp-controller","name":"Onkyo","host":"192.168.1.12","port":"60128","model":"TX-NR616"}]

If i click on inject it should return the PWR Status
image

Have you tried
msg.raw = "PWR01" // on
or
msg.raw ="PWR00" // off
from the node read me

It is possible to send a raw data command, set msg.raw to the command you want to send. If msg.raw is set, this will overwrite any msg.payload, and it will send the command in raw format.

Example: msg.raw = 'NPR03' (this will select and play the 3rd item in your internet radio favorites)

so my guess is above the sending "PWR01" should turn the device on,
This is just guess work as i do not have the node installed or a device to test.

Sorry that was my fault. I have read the instructions and on / off should work - in the flow above i forgot to mention i was trying to send a request with the inject and not a cmd for ON / OFF

My problem is that i get e punch of infos back

The msg with the "ture" should be the PWR Status. The rest should be uninteresting information

Once again you have not made it clear. I am guessing that you only want to interpret messages with iscp_command PWR01 or PWR00, in which case the function could be

if (msg.payload.iscp_command === "PWR01") {
  msg.payload = true
} else if (msg.payload.iscp_command === "PWR00") {
  msg.payload = false
} else {
  msg = null      // this prevents the function from sending anything
}
return msg
1 Like