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.

Scripting
#22
(18.01.2025, 11:12)admin Wrote: Explain exactly what do you want this script to do.

so its a littlebit complicated.
I have underfloor heating i want the pwm valves to not close and i want to change the %of the opening valve i want if the actual temperature 
is higher than then setpoint to write to the group address of the heating actuator the setpoint - the offset that my client will set 
but if the actual temperature is lower than the set i want to write to  group address of the heating actuator the actual temperature so it will open more if need it heres is the script that i end up. Thank you in advance! 
Code:
if event.getvalue() then
-- actual temperature of room1
  local actual_temp1 = grp.getvalue('12/0/5')
  -- group address of the heating actuator for temperature
  local fake_temp_addr1 = '3/3/1'
-- virtual group address that i created for mosaic
  local offsetvalue = grp.getvalue('32/1/69')
-- master setpoint for all rooms    
  local value_temp = grp.getvalue('12/1/0')
  --setpoint of room
  local value_temp1 = grp.getvalue('3/1/1')
-- for mosaic because that i made it with rotary dimmer
  local offset = value_temp - offsetvalue * 0.01


if actual_temp1 >= value_temp or  value_temp1
  then
grp.write(fake_temp_addr1,offset)
 
else
  grp.write(fake_temp_addr1,actual_temp1)
Reply


Messages In This Thread
Scripting - by mariosp - 16.01.2025, 09:17
RE: Scripting - by RomansP - 16.01.2025, 10:05
RE: Scripting - by mariosp - 16.01.2025, 10:57
RE: Scripting - by Daniel - 16.01.2025, 11:02
RE: Scripting - by mariosp - 16.01.2025, 11:22
RE: Scripting - by Daniel - 16.01.2025, 11:29
RE: Scripting - by mariosp - 16.01.2025, 11:37
RE: Scripting - by Daniel - 16.01.2025, 11:43
RE: Scripting - by mariosp - 16.01.2025, 11:54
RE: Scripting - by RomansP - 16.01.2025, 11:59
RE: Scripting - by mariosp - 16.01.2025, 12:04
RE: Scripting - by RomansP - 16.01.2025, 12:09
RE: Scripting - by mariosp - 16.01.2025, 12:11
RE: Scripting - by Daniel - 16.01.2025, 12:23
RE: Scripting - by RomansP - 16.01.2025, 12:26
RE: Scripting - by mariosp - 17.01.2025, 12:15
RE: Scripting - by RomansP - 17.01.2025, 12:37
RE: Scripting - by mariosp - 18.01.2025, 08:14
RE: Scripting - by baggins - 18.01.2025, 10:11
RE: Scripting - by mariosp - 18.01.2025, 11:11
RE: Scripting - by admin - 18.01.2025, 11:12
RE: Scripting - by mariosp - 20.01.2025, 09:10
RE: Scripting - by RomansP - 20.01.2025, 10:07
RE: Scripting - by mariosp - 20.01.2025, 12:08
RE: Scripting - by admin - 20.01.2025, 12:24
RE: Scripting - by mariosp - 20.01.2025, 13:55
RE: Scripting - by admin - 20.01.2025, 13:57
RE: Scripting - by Erwin van der Zwart - 20.01.2025, 15:10
RE: Scripting - by mariosp - 20.01.2025, 15:25
RE: Scripting - by mariosp - 21.01.2025, 11:19
RE: Scripting - by admin - 21.01.2025, 11:31

Forum Jump: