Hi, I’m currently using the Youless device to read the data from my digital electricity meter.
At the moment i’m using the call that returns the json. That works fine.
However there is another call (http://192.168.1.14/V?p=1) that returns the raw data from the P1 port and that contains a lot more data.
I’m trying to create some items to get this data, but there are a lot of special characters in the raw data like “.” “(” “)” and “*”.
Does anybody know how to read this data as a number.
This is what the data looks like:
/FLU5\132115446_A
0-0:96.1.4(xxxxxxxxx)
0-0:96.1.1(xxxxxxxxxxxxxxxxxxxxxxxxxx)
0-0:1.0.0(2201354704126S)
1-0:1.8.1(005132.204*kWh)
1-0:1.8.2(008132.663*kWh)
1-0:2.8.1(002022.581*kWh)
1-0:2.8.2(000831.293*kWh)
0-0:96.14.0(0001)
1-0:1.7.0(01.043*kW)
1-0:2.7.0(00.000*kW)
1-0:21.7.0(00.058*kW)
1-0:41.7.0(00.579*kW)
1-0:61.7.0(00.405*kW)
1-0:22.7.0(00.000*kW)
1-0:42.7.0(00.000*kW)
1-0:62.7.0(00.000*kW)
1-0:32.7.0(234.8*V)
1-0:52.7.0(236.2*V)
1-0:72.7.0(238.4*V)
1-0:31.7.0(000.80*A)
1-0:51.7.0(002.70*A)
1-0:71.7.0(001.95*A)
0-0:96.3.10(1)
0-0:17.0.0(999.9*kW)
1-0:31.4.0(999*A)
0-0:96.13.0()
!A104
0D0A at the end of each line
I get these results:
Fase1
239.6*V)
1-0:52.7.0(239.1*V)
1-0:72.7.0(240.2
Fase2:
All (As expected)
How should i change the regex so i can read fase 1 as a number (239.6)?
My items file is this:
Thing http:url:YouLess "test SmartMeter YouLess LS120" @ "Garage" [ baseURL="http://192.100.1.1/V?p=1", refresh=10 ] {
Channels:
Type string : Fase1 "Fase1" [ stateTransformation="REGEX:.*1-0:32.7.0\\((.*)\\*V\\).*" ]
Type string : Fase2 "Fase2" [ stateTransformation="REGEX:(.*?)" ]
Type string : Fase3 "Fase3" [ stateTransformation="REGEX:.*1-0:32.7.0\\((.*)V.[\\s\\S]1-0:52.7.0.*" ]
}