Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,


as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.


As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!



Smart Home Forum by FIBARO Team

Scan variables and strings. 1.2

   (0 reviews)

3 Screenshots

About This File

Due to lack of global functions, we're adding more and more global variables. In some  cases after a while we find a way to do it differently, but the global variables are still there. Usually we quite afraid to delete the variable because we're not sure if the variable is not in use somewhere in code.
So, this code scans scenes and virtual devices and finds where the variable is in use.

  • Scenes displayed (blue color) by name and scene ID.
  • Virtual devices displayed (wheat color) by name, button name, device ID and button ID.

The program execution has four options:
1. Scan for all variables and display scenes and virtual devices where every variable is in use. (make sure findVar=nil and findString=nil)
2. Find where specific variable is in use by defining findVar.
3. Find where specific string (phrase) is in use by defining findString.

Some characters, called magic characters, have special meanings when used in a pattern. The magic characters are      

(     )   .   %   +   -   *   ?   [   ^  $

The character `%´ works as an escape for those magic characters. So, '%.' matches a dot; '%%' matches the character `%´ itself. You can use the escape `%´  also for all other non-alphanumeric characters. When in doubt, play safe and put an escape. For example if you're searching for string "match(" you should use "match%(".

4. To find not in use variables only. Press "start" twice within 1 second.


--================= User configurable parameters ============================
findVar = nil --------- Name of specific variable to search.
findString = nil ------ Any string to search.


  • In case findVar and findString are both defined, the code will scan for findString.
  • Make sure when findVar and findString  are not in use to set to nil


As usual hope it helps...

What's New in Version 1.2   See changelog


New improvements:

  • Shown number instances (if more than one)  of variable/string that found in scene or virtual device.
  • In case of large number of variables the scanning could take up to minute, now the scanning progress is shown on debug window.
  • Global variables search engine accuracy.
  • Minor cosmetics on text output.
  • Added lower and upper cases for string search.

User Feedback

You may only provide a review once you have downloaded the file.

There are no reviews to display.

  • Create New...