Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Notifications
Login / Register
Community
Community
Notifications
close
  • Forums
  • Knowledge Center
  • Events & Webinars
  • Ideas
  • Blogs
Help
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Sustainability
Sustainability

Join our "Ask Me About" community webinar on May 20th at 9 AM CET and 5 PM CET to explore cybersecurity and monitoring for Data Center and edge IT. Learn about market trends, cutting-edge technologies, and best practices from industry experts.
Register and secure your Critical IT infrastructure

Enabling scheduler from Script/Group address in HL

SpaceLogic KNX Forum

Schneider Electric SpaceLogic KNX forum to get support and share knowledge including selection, installation and troubleshooting for spaceLYnk, Wiser for KNX, eConfigure KNX, SpaceLogic KNX Hybrid module and other topics.

cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Home
  • Schneider Electric Community
  • EcoStruxure Building
  • Light and Room Control
  • SpaceLogic KNX Forum
  • Enabling scheduler from Script/Group address in HL
Options
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Bookmark
  • Subscribe
  • Mute
  • Printer Friendly Page
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close
Top Experts
User Count
Thomas_Rohde
Sisko Thomas_Rohde Sisko
121
Erwin-vd-Zwart
Sisko Erwin-vd-Zwart Sisko
54
Heribert_Dölger
Lt. Commander Heribert_Dölger Lt. Commander
30
FZetina
Lt. Commander FZetina Lt. Commander
27
View All
Related Products
product field
SpaceLogic KNX - 4ʺ Touch Unit
product field
KNX Push Button Dynamic Labeling, universal
product field
Wiser for KNX : logic controller

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Back to SpaceLogic KNX Forum
jorge_marti
Ensign jorge_marti
Ensign

Posted: ‎2014-11-11 10:46 AM . Last Modified: ‎2024-07-15 12:04 AM

1 Like
6
558
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2014-11-11 10:46 AM

Enabling scheduler from Script/Group address in HL

Dear all,

Here I am again with question. I tried to reach the answer in documentation but no success.

The use case is the following. A house with quite fixed schedules for Heating. But when leaving out complete day Schedulers should have no effect and Standby mode should be selected until user is back.

There are several ways to do it and I have one way already done and working but.... The cleaner one for me would be to disable schedulers with a KNX telegram at the door push button. Is it possible that way?

Thanks for answers!

  • Thumbnail of SpaceLogic KNX - 4ʺ Touch Unit
    SpaceLogic KNX - 4ʺ Touch Unit
  • Thumbnail of KNX Push Button Dynamic Labeling, universal
    KNX Push Button Dynamic Labeling, universal
  • Thumbnail of Wiser for KNX : logic controller
    Wiser for KNX : logic controller
View products (3)
Reply
  • All forum topics
  • Previous Topic
  • Next Topic
Replies 6
esteve_budia
Lieutenant esteve_budia Lieutenant
Lieutenant

Posted: ‎2014-11-11 11:52 PM

0 Likes
0
492
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2014-11-11 11:52 PM

As same as you can enable/disable a script..

script.enable('My own script')

script.disable('My own script')

It would be nice ...

scheduler.enable('My scheduler')

Reply
Erwin-vd-Zwart
Sisko Erwin-vd-Zwart Sisko
Sisko

Posted: ‎2014-11-12 03:55 AM

4 Likes
4
492
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2014-11-12 03:55 AM

Hi Jorge,

You can disable and enable the scheduler with a little script by read/write directly to the DB.

Try this:

-- Function Enable Schedular (can be added to common functions and removed from this script)

function scheduler_enable(scheduler_name)

  query = 'SELECT id, name, active FROM schedulers'

  for _, scheduler in ipairs(db:getall(query)) do

  if scheduler.name == scheduler_name then

    db:update('schedulers', { active = 1 }, { id = scheduler.id })

  end

  end

end

-- Function Disable Schedular (can be added to common functions and removed from this script)

function scheduler_disable(scheduler_name)

  query = 'SELECT id, name, active FROM schedulers'

  for _, scheduler in ipairs(db:getall(query)) do

  if scheduler.name == scheduler_name then

    db:update('schedulers', { active = 0 }, { id = scheduler.id })

  end

  end

end

-- Action to change scheduler (event based)

eventvalue = event.getvalue()

if eventvalue == true then

  scheduler_enable('My scheduler')

else

  scheduler_disable('My scheduler')

end

Best regards,

Erwin

Reply
jorge_marti
Ensign jorge_marti
Ensign

Posted: ‎2014-11-13 12:48 AM

0 Likes
3
492
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2014-11-13 12:48 AM

Hi

It works perfectly. I would ask colleagues to add it as common function (same as sunset/sunrise).

I have a second question. As soon as schedulers are enabled, is it possible to force them to send the value that corresponds to the time is it?

Use case:

I leave home so all RTC goes to Standby and schedulers are disabled.

I arrive home at 13:00, so I activate schedulers, and because it is lunch time, kitchen is intended to be in Comfort.

If I arrive home at 20:00 then the room and living room should be in Comfort.

So the status when I come back should follow the schedulers.

Thanks a lot!

Reply
esteve_budia
Lieutenant esteve_budia Lieutenant
Lieutenant

Posted: ‎2014-11-13 01:05 AM

0 Likes
2
492
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2014-11-13 01:05 AM

-- sunrise / sunset / elevation / azimut calculation

function rscalc(latitude, longitude, when)
 
  local pi = math.pi
  local doublepi = pi * 2
  local rads = pi / 180.0
  local graus= 180.0 /pi

  local TZ = function(when)
    local ts = os.time(when)
    local utcdate, localdate = os.date('!*t', ts), os.date('*t', ts)
    localdate.isdst = false
     diff = os.time(localdate) - os.time(utcdate)
     dif=math.floor(diff/3600)
    return math.floor(diff / 3600)
  end
 
  local ts = os.time(when)
  local utcdate, localdate = os.date('!*t', ts), os.date('*t', ts)
  localdate.isdst = false
  local diff = os.time(localdate) - os.time(utcdate)
  local dif=math.floor(diff/3600)
  local hora = tonumber (os.date('%H'))
  local minut = tonumber (os.date('%M'))
  local minut_d= (minut/60)
  local hora_solar = hora - dif + minut_d
 
 
  local range = function(x)
    local a = x / doublepi
    local b = doublepi * (a - math.floor(a))
    return b < 0 and (doublepi + b) or b
  end

  when = when or os.date('*t')

  local y2k = { year = 2000, month = 1, day = 1 }
  local y2kdays = os.time(when) - os.time(y2k)
  y2kdays = math.ceil(y2kdays / 86400)

  local meanlongitude = range(280.461 * rads + 0.9856474 * rads * y2kdays)
  local meananomaly = range(357.528 * rads + 0.9856003 * rads * y2kdays)
  local lambda = range(meanlongitude + 1.915 * rads * math.sin(meananomaly) + rads / 50 * math.sin(2 * meananomaly))
local lambda_g = lambda *graus

  local obliq = (23.439 * rads) - (y2kdays * rads / 2500000)
obliq_g = obliq * graus
 
  local alpha = math.atan2(math.cos(obliq) * math.sin(lambda), math.cos(lambda))
  alpha_g = alpha * graus

  local declination = math.asin(math.sin(obliq) * math.sin(lambda))
  declination_g = declination *graus

 
  local LL = meanlongitude - alpha
  if meanlongitude < pi then
    LL = LL + doublepi
  end

  local dfo = pi / 216.45

  if latitude < 0 then
    dfo = -dfo
  end

  local fo = math.min(math.tan(declination + dfo) * math.tan(latitude * rads), 1)
  local ha = 12 * math.asin(fo) / pi + 6

  local timezone = TZ(when)
  local equation = 12 + timezone + 24 * (1 - LL / doublepi) - longitude / 15

  local sunrise, sunset = equation - ha, equation + ha

  if sunrise > 24 then
    sunrise = sunrise - 24
  end

  if sunset > 24 then
    sunset = sunset - 24
  end
  -- calculo de la elevacion
  local omega=(hora_solar-12)*15 --graus
  local zenit= math.acos(  ((math.cos(latitude*rads))*(math.cos(declination))*(math.cos(omega*rads))) + ((math.sin(latitude*rads))*(math.sin(declination)))  )
  local zenit_g=zenit*graus
  local elevacion=(90-zenit_g)
 
  -- calculo de azimut 
  az=math.acos((((math.cos(latitude*rads))*(math.sin(declination)))-((math.cos(omega*rads))*(math.sin(latitude*rads))*(math.cos(declination))))/((math.cos(elevacion*rads))))
  if omega>0 then
    azimut=360-(az*graus)
  else
    azimut=az*graus
  end
   return math.floor(sunrise*60), math.ceil(sunset*60),elevacion,azimut
end

5181

Reply
jorge_marti
Ensign jorge_marti
Ensign

Posted: ‎2014-11-13 01:08 AM

0 Likes
1
492
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2014-11-13 01:08 AM

HI Esteve,

I know sunset/sunrise is by default included.

What I wanted to say is that Scheduler-enable could be also by default included.

Reply
esteve_budia
Lieutenant esteve_budia Lieutenant
Lieutenant

Posted: ‎2014-11-13 01:21 AM

0 Likes
0
492
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2014-11-13 01:21 AM

I know. I added the azimut and sun elevation to this function 6 moths ago and working fine for testing. If officially someone wants to revise the modification and include to common functions it would be nice. This is an added value to our controller to do building blind controler position depending on sun positon.

Reply
To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support
Brand-Logo
Subscribing is a smart move!
You can subscribe to this board after you log in or create your free account.
Forum-Icon

Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2025 Schneider Electric

This is a heading

With achievable small steps, users progress and continually feel satisfaction in task accomplishment.

Usetiful Onboarding Checklist remembers the progress of every user, allowing them to take bite-sized journeys and continue where they left.

of