This page last changed on May 12, 2013 by bryanchicken.

i'm reading a volume setting from my AVR via telnet. The value being returned is: MV35MV35^M@VOL:-450
I'm trying to extract the digits to use in a sensor but nothing i try works. I get the following in the logs no matter what i try for my regular expression i can't get a match. The log shows the following:

2013-05-12 13:57:07,796 INFO [Polling thread for sensor: VolumeSensor \(NR1603\)]: send: MV?
2013-05-12 13:57:12,803 INFO [Polling thread for sensor: VolumeSensor \(NR1603\)]: received: MV35^M@VOL:-450
2013-05-12 13:57:12,806 WARN [Polling thread for sensor: VolumeSensor \(NR1603\)]: Telnet Read Status: No Match using Regex: 'MV([0-9][0-9]).*' on response from command 'null|MV?'

I've tried group 0 and group 1, same result.

I've confirmed on regexplant.com that my expression matches the value and that group 1 does indeed return 35.
So why doesn't OpenRemote work?

Thanks

not to worry, figured it out, guess there are some funny characters somewhere or something. This worked:

^(?i)(?s)(?m).MV(\d+).$

Posted by bryanchicken at May 12, 2013 14:38
Document generated by Confluence on Jun 05, 2016 09:40