I have problem with reading data from device.
I have device:
with state:
5.4;0.0;0.0
and value
0/5.4;0.0;0.0
I try to get this values (I need only first value: 5,4) by script:
Code: Select all
commandArray = {}
if (m % 1 == 0) then
print "Odczyt bilansu energii:"
current1, current2, current3=otherdevices_svalues['Pobor_pradu']:match("([^;]+);([^;]+);([^;]+)")
print(current1)
print(current2)
print(current3)
end
return commandArray
What is done incorrectly on my side?