05.02.2021, 09:35 (This post was last modified: 05.02.2021, 11:44 by Kilogica.)
Hello,
I have a device with some data that need to be scaled but the scale changes dinamically, there is a modbus address that gave me the correct scale factor, is there a way apart from making a lua script to dinamically use the scale factor when it changes?
05.02.2021, 09:55 (This post was last modified: 05.02.2021, 11:45 by Kilogica.)
Thanks,
The problem is that it's not so rapid so if the value keep bouncing from a scale factor to another it could show wrong data before the scale factor reload.
I even thought about scheduling a script that read all the data, make the right conversion and then updates the group address with the final value but it didn't work so well for the same reason plus sometimes it says that I attempted to make math operation with a nil value, maybe because there are some reading errors in modbus.
Try adding "internal":true to the scaling register entry. Keep in mind that you have to create modbus device from scratch if profile is changed.
Example from a working profile:
(05.02.2021, 13:00)admin Wrote: Try adding "internal":true to the scaling register entry. Keep in mind that you have to create modbus device from scratch if profile is changed.
Example from a working profile: