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

Run Script when Plan opened

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
  • Run Script when Plan opened
Options
  • Subscribe to RSS Feed
  • 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
Solved Go to Solution
Back to SpaceLogic KNX Forum
Solved
IC_Systems
Captain IC_Systems
Captain

Posted: ‎2020-11-26 12:46 AM . Last Modified: ‎2024-07-14 11:47 PM

0 Likes
12
736
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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

‎2020-11-26 12:46 AM

Run Script when Plan opened

Hello Everyone

 

Is it possible to run a script when a specific plan opens?

I have a plan with some results to show, but instead of using the resident script, I think to use an event-based script that runs when the plan opens.

How I can do this 

 

any idea?

 

Best Regards, 

Best Regards,
  • 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)
Labels
  • Labels:
  • Scripts
  • SpaceLYnk
Tags (1)
  • Tags:
  • english
Reply
  • All forum topics
  • Previous Topic
  • Next Topic

Accepted Solutions
Erwin-vd-Zwart
Sisko Erwin-vd-Zwart Sisko
Sisko

Posted: ‎2020-11-26 01:05 AM . Last Modified: ‎2020-11-26 01:06 AM

1 Like
11
733
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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

‎2020-11-26 01:05 AM

Hi,

 

You can do that with custom Javascript

 

$(function(){
   $('body').on('showplan', function(e, id) {
      if(id == 1){
         grp.write('1/0/0', true);
      }
   });
});

 

Attach your script to 1/0/0 as event based

 

BR,

 

Erwin

See Answer In Context

Tags (1)
  • Tags:
  • english
Reply
Replies 12
Erwin-vd-Zwart
Sisko Erwin-vd-Zwart Sisko
Sisko

Posted: ‎2020-11-26 01:05 AM . Last Modified: ‎2020-11-26 01:06 AM

1 Like
11
734
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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

‎2020-11-26 01:05 AM

Hi,

 

You can do that with custom Javascript

 

$(function(){
   $('body').on('showplan', function(e, id) {
      if(id == 1){
         grp.write('1/0/0', true);
      }
   });
});

 

Attach your script to 1/0/0 as event based

 

BR,

 

Erwin

Tags (1)
  • Tags:
  • english
Reply
IC_Systems
Captain IC_Systems
Captain

Posted: ‎2020-11-26 01:44 AM

0 Likes
4
730
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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

‎2020-11-26 01:44 AM

and how can I use this javascript in SL?

@Erwin-vd-Zwart 

Regards

Best Regards,
Tags (1)
  • Tags:
  • english
Reply
Erwin-vd-Zwart
Sisko Erwin-vd-Zwart Sisko
Sisko

Posted: ‎2020-11-26 01:48 AM

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

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

‎2020-11-26 01:48 AM

Goto Configurator -> Scripting -> Tools -> Edit Custom JavaScript and past the code in there, reload the browser so the client gets the JS loaded.

Tags (1)
  • Tags:
  • english
Reply
IC_Systems
Captain IC_Systems
Captain

Posted: ‎2020-11-26 01:58 AM

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

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

‎2020-11-26 01:58 AM

Thank you  @Erwin-vd-Zwart 

 

Does this Script run for any plan? 

I past the script there but the address 0/0/1 didn't change when I open a plan

Best Regards,
Tags (1)
  • Tags:
  • english
Reply
Erwin-vd-Zwart
Sisko Erwin-vd-Zwart Sisko
Sisko

Posted: ‎2020-11-26 02:01 AM

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

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

‎2020-11-26 02:01 AM

No, current sample is plan ID 1   if(id == 1), change 1 to your actual plan where you want to activate the LUA script from

Tags (1)
  • Tags:
  • english
Reply
IC_Systems
Captain IC_Systems
Captain

Posted: ‎2020-11-26 02:05 AM

1 Like
0
720
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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

‎2020-11-26 02:05 AM

Worked Perfect.

Thanks to @Erwin-vd-Zwart 

 

SL is a very amazing device, I like it 

Best Regards,
Tags (1)
  • Tags:
  • english
Reply
IC_Systems
Captain IC_Systems
Captain

Posted: ‎2020-12-23 02:17 AM

0 Likes
5
706
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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

‎2020-12-23 02:17 AM

hello @Erwin-vd-Zwart 

IF I want to use this script for Widgets what should I change? 

I try: $('body').on('showwidget', function(e, id) {

but seems not right.

 

regards

Best Regards,
Tags (1)
  • Tags:
  • english
Reply
Erwin-vd-Zwart
Sisko Erwin-vd-Zwart Sisko
Sisko

Posted: ‎2020-12-23 02:30 AM

1 Like
4
703
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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

‎2020-12-23 02:30 AM

Hi,

 

There is no build-in event for detecting an open widget, but you can use this to achieve what you want:

 

$(function(){
var OutputAddr = '32/1/1'
var OpenWidget = 0;
setInterval(function() {
var WidgetNumber = 0;
$('.layer-widget').each(function( index, element ) {
if ( $(this).is(':visible') == true) {
fields = $(this)[0].id.split(/-/);
WidgetNumber = Number(fields[1]);
}
});
if (WidgetNumber > 0 && OpenWidget != WidgetNumber){
OpenWidget = WidgetNumber;
grp.update(OutputAddr, WidgetNumber);
//console.log(WidgetNumber);
}
if (WidgetNumber == 0 && OpenWidget != WidgetNumber){
OpenWidget = WidgetNumber;
grp.update(OutputAddr, WidgetNumber);
//console.log(WidgetNumber);
}
}, 1000);
});

 

This writes the widget number to an object, you can add a event script to this object and add a LUA script like this:

 

if event.getvalue() == 3 then -- run when widget 3 is open

   -- do your action

end

Tags (1)
  • Tags:
  • english
Reply
IC_Systems
Captain IC_Systems
Captain

Posted: ‎2020-12-23 04:05 AM . Last Modified: ‎2020-12-23 04:06 AM

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

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

‎2020-12-23 04:05 AM

thanks @Erwin-vd-Zwart 

perfect ðŸ™‚

This Script gives me the Widget ID when it's Open and 0 when closed Right?

I should only enter the address

 

regards,

Best Regards,
Tags (1)
  • Tags:
  • english
Reply
IC_Systems
Captain IC_Systems
Captain

Posted: ‎2022-12-08 01:41 AM

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

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

‎2022-12-08 01:41 AM

Hello @Erwin-vd-Zwart 

I've noticed that both JS stop working after Firmware update.

now I am using the last Version 2.8.0

Could you help in this

 

Best Regards,
Reply
Erwin-vd-Zwart
Sisko Erwin-vd-Zwart Sisko
Sisko

Posted: ‎2022-12-08 02:29 AM

1 Like
1
667
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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

‎2022-12-08 02:29 AM

@IC_Systems 

I just tested both on 2.8.0 and they still work.. Do you have any errors in the console (F12)?

Reply
IC_Systems
Captain IC_Systems
Captain

Posted: ‎2022-12-11 12:01 AM

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

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

‎2022-12-11 12:01 AM

That's right @Erwin-vd-Zwart  there was an error 

Best Regards,
Reply
Preview Exit Preview

never-displayed

You must be signed in to add attachments

never-displayed

 
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