This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Script for division of an value
#1
I'm new in scripting, and I'm looking for a script where i can take group adress and change it from wh to kWh by dividing the value by 1000.
I'm using powertag for measure the energy but the result  from the powertag is in w and wh

BR
Smile
Thore W. Larssen
Reply
#2
I would download the profile and edit it to add a value multiplier in the profile, this way you have a direct output in the desired format.

See: https://kb.logicmachine.net/misc/modbus-profile/

Look for: value_multiplier
Reply
#3
Alternatively you can use an event script:
Code:
value = event.getvalue()
value = value / 1000
grp.checkupdate('0/0/3', value)
Reply


Forum Jump: