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.

Shelly 3em- MQTT
#1
Hello guys ,
I have made integration with a shelly 3em over mqtt, in the mqtt explorer there is not appear the total consumption . is there any way i can make a scrit to add L1  consumption-  L2  consumption - L3 consumption so i can take the total  consumption

Thank you in advance!
Reply
#2
See this: https://forum.logicmachine.net/showthrea...6#pid14506
Reply
#3
(13.01.2025, 12:56)admin Wrote: See this: https://forum.logicmachine.net/showthrea...6#pid14506

Thank you!!!
Reply
#4
(14.01.2025, 08:08)mariosp Wrote:
(13.01.2025, 12:56)admin Wrote: See this: https://forum.logicmachine.net/showthrea...6#pid14506

Thank you!!!
i tried it but the number i get it realy big is any way to display smaller number i tried this code but it returns 0 
Code:
local offset = event.getvalue() * 0.001

if event.getvalue()
  then grp.write(event.dst,offset)
  end
thank you in advance!
Reply
#5
In general grp.write(event.dst, value) should not be used in event scripts. You are creating an infinite loop where each write triggers the script again.

If you want to scale the resulting value simply modify the tag_sum script. You won't need an additional script this way.
Code:
grp.checkwrite('1/1/1', sum * 0.001)
Reply


Forum Jump: