telnet command feedback

Complete java noob here so I’m more than likely missing the obvious, but what would be the best approach to using the feedback of a telnet command in a rule or an in-memory virtual command?

Here’s what I have for now;

command: Power.On
protocol: telnet
IP address: localhost
port: 3000
command: null|!1PWR01
(feedback is !1PWRxx with xx being a hex value between 00 and 64)
Read Regex Filter: ^.{5}([[:xdigit:]]+)
(filter has been tested to return only the xx value)
Read Regex Group: 1
Default Response: 00

command: V.Power.Status
protocol: In-Memory Virtual Command
command: status
address: OnkyoVpower

command: V.Power.On
protocol: In-Memory Virtual Command
command: on
address: OnkyoVpower

command: V.Power.Off
protocol: In-Memory Virtual Command
command: off
address: OnkyoVpower

sensor: VPower
type: switch
command: V.Power.Status

switch: VPower.S
sensor: VPower
command(on): V.Power.On
command(off): V.Power.Off

and in rules;

rule “OnkyoOn”
Event(source==“VPower”, value==“on”)

it prints out “test” properly on screen and I can see the correct telnet data in and out from a sniffer, but for debugging purpose I would want to print the output from execute.command(“Power.On”)

I should specify, I’m on OpenRemote Controller 2.5.0

If your Onkyo is an N series (network enabled) ,make a sensor and use the Onkyo/Integra ISCP commands…

See here for reference : (start at page 5)

You need to send the string:


Use to convert.

You should put that in ASCII, hit convert, then get:

49 53 43 50 10 09 01 21 31 50 57 52 51 53 54 4e

You need to add 0D 0A to the end to provide the return character (to send the command), and a prefix of 0x - and strip all spaces.

So you think you should send…


However - ascii to hex doesn’t deal with the null space you need…


To port 60128 on your Onkyo - assuming you’ve enabled Telnet access

You need to use TCP/IP, not telnet - I didn’t find telnet very successful with Onkyo.

You should then get back…



if the power is off…or



if the power is on…

It’s actually an older non-N series, a TX-SR606. Doesn’t normally come with a serial port but actually has the internal header for it, so all it needed was a level shifter and a connector.

I’m talking to it through the serial port but have to map said serial port through telnet with ser2net since Designer 2.5 doesn’t offer serial protocol anymore.

Using sensors works fine as is, I just thought it was somewhat inelegant since we’re already getting the reply from the ‘set’ commands themselves.

Now if I could figure out how to make a sensor just poll ‘on request’ instead of automatically it’d be perfect.

I think it’s been discussed and remains outstanding (i.e. command updates a sensor)

I have a home heating system which updates it’s own values every 30 secs, which is an age if you press the button. I was using IMVs and that was fine until someone used the actual controller, not OpenRemote, then it went out of Sync. I think a combination of event rules and IMV would allow you to both set an IMV (on/off) and a periodic sensor (large second value) to provide a “reality check” maybe…

That’s what I’ll be doing for now, a workaround until (if) the issue is looked at.

There was also a ‘connection manager’ that was put in place in a fork, to remove the issue of near-simultaneous calls blocking each other when trying to open ports. Hopefully that neat feature will be added in the 3.0 branch.