Hi all,
Please post comments, questions, etc. in this thread: https://forums.homeseer.com/showthread.php?t=187188.
My scripts folder was getting pretty cluttered where I had no idea anymore which were "production" scripts and which were test, etc. I created a test sub-folder and moved some scripts into it only to realize that I moved some production scripts when I got errors in the log about missing scripts. So my solution was to create yet another script along with an aspx file (web page) to help figure out which scripts were used and which were not. Since HS3 keeps most of the event details in a BLOB (Binary Large OBject), this was not straight forward, but with some binary to hex to ascii (and vice versa) conversion was possible.
The web page will show each file in the Scripts folder and which events call it:

and also each event that calls one or more script files:

The specific script files are identified and if there's one missing in the scripts folder, it is shown in red for easy identification.
There's a report for immediate script commands:

There are additional reports available as well and others may be added in future releases. If there's something you would like to see added, let me know.
Save the scripteventsASPX.vb.txt file without the .txt extension in the HS3 Scripts folder and and save scriptevents.aspx.txt without the .txt extension in the HS3 html folder. To see the reports, access them by browsing to this url:
Replace www.xxx.yyy.zzz with the ip address of your HS server and pp with the port number used by your HS web server. Once you have it open, then pick " - Settings" from the drop down and re-configure any of the settings as needed:

The script requires the exact case to your scripts folder as used by your events. Check some events on your system to confirm what the exact case is. On my system, the path was listed using two different cases, so that's why there are two fields. If you find a different case syntax than these defaults, let me know.
By default, the script will query the production HS3 database file. It's not making any modifications, just retrieving info from it. However, if you feel uncomfortable with that, create a copy of your HS3 database file in the \Data folder and provide the filename to the copy in the settings.
Important Note: You must modify your settings.ini file in the \Config folder for the script page to work by adding the following setting to the ScriptingReferences= line under the [settings] section and restart HS. Adjust the path to System.Data.SQLite.dll as per your own system and only include the trailing comma if you have other scripting references after this one. The latest version of the script/web page checks for this and it will display that the scripting reference is not there and add it for you. You will need to restart HS after that.
If you don't have a ScriptingReferences line in your settings.ini file already, then add as follows right below the [settings] header:
again adjusting the path to System.Data.SQLite.dll as per your own system.
Version - Description
0.0.3 - Original Release
0.0.8 - Test version splitting functions out of aspx file
0.1.0 - Released "split" version an bug fixes and functionality enhancements
0.1.1 - Added report for immediate script commands, code enhancements and bug fixes
Cheers
Al
Please post comments, questions, etc. in this thread: https://forums.homeseer.com/showthread.php?t=187188.
My scripts folder was getting pretty cluttered where I had no idea anymore which were "production" scripts and which were test, etc. I created a test sub-folder and moved some scripts into it only to realize that I moved some production scripts when I got errors in the log about missing scripts. So my solution was to create yet another script along with an aspx file (web page) to help figure out which scripts were used and which were not. Since HS3 keeps most of the event details in a BLOB (Binary Large OBject), this was not straight forward, but with some binary to hex to ascii (and vice versa) conversion was possible.
The web page will show each file in the Scripts folder and which events call it:
and also each event that calls one or more script files:
The specific script files are identified and if there's one missing in the scripts folder, it is shown in red for easy identification.
There's a report for immediate script commands:
There are additional reports available as well and others may be added in future releases. If there's something you would like to see added, let me know.
Save the scripteventsASPX.vb.txt file without the .txt extension in the HS3 Scripts folder and and save scriptevents.aspx.txt without the .txt extension in the HS3 html folder. To see the reports, access them by browsing to this url:
Code:
http://www.xxx.yyy.zzz:pp/scriptevents.aspx
The script requires the exact case to your scripts folder as used by your events. Check some events on your system to confirm what the exact case is. On my system, the path was listed using two different cases, so that's why there are two fields. If you find a different case syntax than these defaults, let me know.
By default, the script will query the production HS3 database file. It's not making any modifications, just retrieving info from it. However, if you feel uncomfortable with that, create a copy of your HS3 database file in the \Data folder and provide the filename to the copy in the settings.
Important Note: You must modify your settings.ini file in the \Config folder for the script page to work by adding the following setting to the ScriptingReferences= line under the [settings] section and restart HS. Adjust the path to System.Data.SQLite.dll as per your own system and only include the trailing comma if you have other scripting references after this one. The latest version of the script/web page checks for this and it will display that the scripting reference is not there and add it for you. You will need to restart HS after that.
Code:
System.Data.SQLite;C:\Program Files (x86)\HomeSeer HS3\Bin\System.Data.SQLite.dll,
Code:
[settings] ScriptingReferences=System.Data.SQLite;C:\Program Files (x86)\HomeSeer HS3\Bin\System.Data.SQLite.dll
Version - Description
0.0.3 - Original Release
0.0.8 - Test version splitting functions out of aspx file
0.1.0 - Released "split" version an bug fixes and functionality enhancements
0.1.1 - Added report for immediate script commands, code enhancements and bug fixes
Cheers
Al
Comment