User Tools

Site Tools


current:beta

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
current:beta [2023/06/03 16:05] James Sentmancurrent:beta [2024/02/05 17:51] (current) – 9.5.5b1 James Sentman
Line 1: Line 1:
-=====Beta Version (9.5.3 b1)=====+=====Beta Version9.5.5 beta 1=====
  
-The currently available beta version of XTension is 9.5.3 beta 1 (build 1079) released on 6/3/2023+This is a beta release of the next XTension version 9.5.5. This release contains no new features and is concentrating on fixing potential issues and making the scripting engine more robust and reliable.
  
-[[https://machomeautomation/files/xtension/xtension_9_5_3_b1.dmg|Download Xtension 9.5.3b1]] 
  
-Keep in mind this is a beta build and may contain bugs or annoyances and not all expected features or changes may yet be implementedNo database changes are made so if you to have to revert to the last release version simply replace the application with the previous version and all will be well.+**This version makes no changes to the format of the Database so returning to a previous version can be done simply by placing the previous version of the application back into service. The default location of the XTension Support folder and possibly the Database within it are changed and it will be necessary manually move the folder back to the Documents folder if you need to roll back to a previous version. See below for more info.** 
 + 
 + 
 +If you’re not interested in the history and why the support folder needs to be moved skip to the next section. 
 + 
 +===Changes to the location of XTension’s data files=== 
 + 
 +There are 2 ways that XTension can be installed. If the application is placed in the Applications folder then a folder called “XTension Support” was created in the Users Documents folder and the Database and other support files were placed there. You can also continue to use XTension as it was in days of old and run it from any other folder on your drive. If you do this the database and some support folders are created along side the app inside this same folder but an XTension support folder is still created in the Documents folder. 
 + 
 +The location of the XTension Support folder has become an issue with Apple’s iCloud feature of syncing your Documents folder with iCloud. This service remains potentially problem for many things but can and does cause corruption of the XTension database as files seem to be updated too often for it to remain in sync. It seems to restore files that were deleted as well as replacing new versions with older versions on occasion. 
 + 
 +It is my advice to not use this iCloud feature at all as it causes the same problems with other files you may have stored in your documents folder. If you have this turned on you should turn it off immediately to avoid losing information. In the meantime moving the XTension Support folder to the Application Support folder will solve the problem for XTension **unless you are using XTension outside of the Applications folder but still somewhere under the Documents folder** in that case you must either switch to running from the Applications folder or make sure you are not using the iCloud Documents sync functions.  
 + 
 +===Process of moving the files=== 
 +When first run XTension will look for an XTension Support folder in your Documents folder. If it exists in that location but not already in the Application Support folder it will move it and startup normally. Giving you a startup message window telling you exactly what it did. If there is already an XTension Support folder in your Application support folder and it does not contain a database then it will be renamed and the current XTension Support folder will be moved to the new locationIf it does contain a database, even if it is an old one, then it cannot move it and will startup with that database along with a message that what appears to be your current database could not be moved and you will have to resolve the conflict manually. There should not be a live database in the Application Support folder however much earlier versions of XTension did use this location and so there may be old and outdated versions of information there that you may have to remove. 
 + 
 +===Switching to Running in the Applications Folder=== 
 +If you are running XTension in the legacy way of being anywhere but the Applications folder you do not have to move anything manually yet. However at some point Apple may enforce that applications have to live in the Applications folder. If you wish to make the change now you can move the XTension application into the Applications folder. Then move all the support folders and database from the folder you used to have the App in to the Documents/XTension Support folder. This includes the “icons”, “sounds”, “views” and other folders that will be there along with the XTension Database bundle. When you first run this version of XTension from the Applications folder it will move that Support folder to the Application Support folder and run normally from then on. 
 + 
 +===Returning to a previous version=== 
 + 
 +If you find this version to cause new problems, please do not just return to the previous version without letting me know exactly what the issue was that caused you to need to do so or it will be much less likely I can get it sorted out by the release. Without XTension running just move the XTension Support folder from the Application Support folder back to your Documents folder and then start the previous version. The Application Support folder is generally hidden from the User and may not be easily visible from the Finder. If so you can use the “Go” menu in the Finder to reveal the Library folder and inside that will be the Application Support folder. If XTension is still running you can use the Reveal Database In The Finder menu item from it’s Database menu, Then Quit XTension and do the move manually before replacing it with the previous version
 + 
 +====Changelog:==== 
 + 
 +  * At startup if XTension finds that your database is being shared to iCloud it will open a startup messages window advising you of this and suggesting that you turn that off. This info is also saved in the database so that if someone sends me a database to debug I can check easily if this is the source of some of the problems. 
 +  * If the database has already suffered some kinds of corruption from being shared to iCloud there are many things that it can now clean up. This includes deleted units or scripts that have been replaced by an over zealous iCloud sync service. It cannot replace active files that were replaced or reverted incorrectly but this can still be a major help in getting things sorted out. 
 +  * The XTension Support folder is moved from the Documents Folder to the Application Support folder. Unless there is already a Database in an older version of the folder that might exist in the Application Support folder. In which case no files are moved or deleted and a message is displayed asking you to move the most current version there manually to make sure you get the right one. 
 +  * Improved script error logging. Previously errors that were generated while running handlers in a different script were sometimes not logged causing instead a generic error in the script doing the calling. They will now log more useful information for debugging purposes to find out just went wrong in the other script. 
 +  * Quite a few major OS versions now Apple changed Applescript to be somewhat, sometimes, unpredictably threaded. This allowed the application to continue to process commands and events while another script might have still been running. This led to confusion and things no longer happening in a linear and logically consistent order. I fixed that back in the day by pausing the command queue while a script was running so that even if the app got control back no more commands would be processed until the current script being run was complete. I recently added some new RTS cameras of higher resolution to my system which is pushing my older Mini a bit and I started getting more regular strange scripting errors that rarely or never happened before. In studying the problem I realized that not all scripts are purely started by received commands or scheduled events anymore. The Idle handler and the DoLater commands use program timers to pump the script callbacks. These were still potentially happening while a script was running. This usually worked OK but occasionally there was either a race condition or a script would never return causing the timeout and an error message that the script environment was unstable and should be restarted. All timer pumped scripts will now defer until the current script is finished running. If you are having any odd and difficult to duplicate script issues and if you make use of either the idle callback or Do Later commands then this will solve those issues. There still may be one more path for things to go wrong, or there may yet be other applescript issues but 99.9% of my issues have been fixed by this change. There is a debug menu item to turn on logging of these occurrences. If you’re curious or if you want to see if it’s really catching anything you can turn that on and watch the log. 
 +  * Further new script debugging I’ve added the ability to log runtimes of individual scripts. You can turn this on in the Gear toolbar menu for any script be it an On/Off script or a Global Script. This may be useful if there is a script that sometimes seems to take a lot longer than it should be. Especially if that script is talking to an external app to wait for something. 
 +  * Errors that could be logged when deleting more than a single page of Units from a list is now suppressed. It was never a useful error message so no fix was necessary, it’s just confusing debug logging. 
 +  * Errors that would sometimes be logged when closing the Interface list window while doing CPU and Memory use displaying in the “show more information” mode are no longer logged. Again these were just over zealous debugging messages and did not indicate a real problem. 
 +  * Fixed the incorrect display of version information. The version logged and in the About window will properly show 9.5.5 beta 1 in this case rather than 0.0.0.whatever as it did in some previous versions. 
 +  * Made some additions and changes to the runtime debugger window to better sort items when there are more than 10k of any individual kind. I also added deltas to the memory used and object count displays to make figuring out things easier. Most of you have never opened this window from the debug menu and won’t ever need to but it is helpful while I am testing and debugging and could be useful to help gather more info if needed from any of you. 
 +  * Added another debug menu option to log the current state of the globals “thisUnit”, “thisScript” and “thisInterface” as well as the value of gCurrentScript internally which is used to direct handler calls of global handlers and other such thingsThese should all be empty with gCurrentScript being nil at any point that a script is not running. If there remain issues with scripts failing to exit or otherwise hanging up in the background these may be left set to incorrect values causing interesting results. If so this will show that it has happened making debugging easier. 
 + 
 + 
 +[[https://machomeautomation.com/files/xtension/xtension_9_5_5b1.dmg|XTension 9.5.5 beta 1]] 2/5/2024 
  
-**Changelog:** 
  
-  * Hue Plugin: 
-    * Hue Plugin: Fixed an issue where it could send continual updates for a sensor value even if the value had not changed. 
-    * Hue Plugin: Fixed an issue where the temperature format was not saved, sticking all readings in F. 
-  * Video System: 
-    * Video Encoder Plugin: Added a checkbox so you can suppress logging of video encoding times if you wish. 
-    * Video: Removed error logging for stalled streams as this would fill the log if the camera was offline for any length of time. To log this information please implement the stalled script handler in the Interface Script and write to the log whatever information is helpful. 
-  * Sysinfo Plugin:  
-    * System Info Plugin: no longer claims in it’s startup log message to be the Disk Space plugin. 
-    * Fixed an incorrect default link to the boot volume so that this will work without having to edit it each time. 
-  * Internal Python: 
-    * Python: A symlink to the built in python3 version is now added to /usr/local/bin/pythonxt so if you wish to use the built in version for your own script you can just execute it via that command. 
-    * Python: XTension changes many environment variables in order to use it’s internal version of python. If you are running a system version of python in your own script from a shell in XTension this may cause errors or make it unable to find installed modules. You can now use a scripting command “revertENV()” in your script before invoking your shell script to reset the environment to the system default just before launching it which will solve most, but probably not all of these issues. Note that you should do this immediately before starting any shell script as XTension will change it again as needed when launching plugins.  
-  * Web Remote: 
-    * Web Remote: New documentation of the hashing of web remote links to immediately go to a specific page or view. This can be useful if you are saving specific links as iOS shortcuts, or creating a Kiosk type application. This is not a new feature, but was never properly documented. [[webremote:kioskview|Kiosk View and Hash Linking Info]] 
-    * Web Remote: Added several new scripting commands to control sessions in the web remote. This lets you programmatically change the view on a specific device to say, a video page or a View in response to motion or other event. Additionally you can script a popup alert or timed message in any color to display on all active sessions or only on specific ones. [[webremote:scripting|Scripting Web Remote]] 
-    * Web Remote: Added support for a resource folder that will be served as regular files through the web remote built in web server. This way if custom controls or other features you are adding need to load a specific image or other support file they can do so if you put it in the resources directory inside your XTension Database. [[webremote:resourceserver|Resource Server]] 
-  * Plugin API:  
-    * A new key for the info.json file that will allow a plugin to receive any scripting command the user issues. This simplifies some kinds of plugin tasks at the expense that users script will not know if the command succeeded or not, all commands will just be sent and forgot. This does not affect regular using the app, only plugin developers. 
-    * Added the capability for plugins to display information in new text windows and to append to or change the display of one without opening a new window each time. This mostly affects plugin developers but I used it in the new and changed show info commands in the Amcrest API plugin above. 
-    * All plugins now log their version number in the startup message from the information stored in their info.json file. This will keep them from always being wrong as I forget to update it in 2 places instead of just 1. 
-  * Hubitat Plugin: 
-    * Hubitat: Added entries to the “insert” toolbar menu for the central scene Held, and Released events to make it easier to script these without having to visit the wiki to look up the specifics. 
-    * Hubitat: Added support for Energy and Usage units. If a device reports these values a Unit will be created for them. 
-    * Hubitat: Added support for values that come in as “STRING” rather than numerical or enumerated. This is a bit of a hack as it’s impossible to know what format these things will seem to be. First the value is scanned to see if there is a number in the first part of the string. If there is then the Unit will be dimmable and the value will be placed in the value of the Unit. for example: “3.2 Hours” would create a dimmable unit and set the value to 3.2. The Default Label and the description for the unit will be set to the string as it is sent. So even though the Unit value is 3.2, the display of the value in any XTension interfaces would be “3.2 Hours” If there is no number at the beginning of the string then the UNit will not be dimmable and it will just have it’s default label and description set to the text. You can capture the set description event in the unit’s on script to get the text and parse manually if you need to. 
-    * Hubitat: Some devices from the Hubitat will now have more descriptive, or less long winded names when created by default. This will mostly effect the Thermostat units but some others can be made better with this too. This does not affect Units already created, and you can always manually edit the unit’s name once it’s created to be whatever you like in either case. 
-    * Hubitat: The list of supported commands for each Unit is now saved to a [[dictionary:unitinformation:getunitproperty|Unit Property]] so  you can see all the commands the device supports directly. You may still have to discover what parameters are required, if any, but this will make it easier to do things to the Units via the [[https://www.machomeautomation.com/doku.php/supported_hardware/hubitat#sending_device_specific_commandsm|sendDeviceCommand()]] 
-    * Hubitat: Push messages from the Hubitat that are sent when a software update is started, or when the device is about to reboot to install a software update will now just log that information rather than generate an “unknown push message” error in the log. 
-  * Amcrest Camera API: All the additions mentioned below have been added to the [[video:api:amcrest_hd|Amcrest Camera API Documentation]] 
-    * Amcrest Camera API: Added support for specific Units to link to Object Detection if your camera supports it. You can now create a Unit to get an ON when a human is detected, or when a vehical is detected and so forth. 
-    * Amcrest API New Status and Display commands: 
-      * setFontScale(0.1..2.0) control the size of the text displayed over the image. 
-      * setChannelTitleVisible( true|false) 
-      * setChannelTitleLocation( 34, 12) 
-      * setChannelTitleColor( R, G, B, A) 
-      * setChannelTitleBackColor( R, G, B, A) 
-      * setUserDisplayVisible( index, true|false) 
-      * setUserDisplayText( index, “the info to display”) 
-      * setUserDisplayLocation( index, xloc, yloc) 
-      * setUserDisplayColor( R, G, B, A) 
-      * setUserDisplayBackColor( R, G, B, A) 
-      * setLogoVisible( true|false) hide or show the Amcrest logo image overlay 
-      * setLogoLocation( xLoc, yLoc) 
-      * setLogoFilename( “osd.bmp”) your camera must support allowing you to change this or it will do nothing. 
-      * setTimeDisplayVisible( true|false) 
-      * setTimeDisplayLocation( xLoc, yLoc) 
-      * setTimeDisplayColor( R, G, B, A) 
-      * setTimeDisplayBackColor( R, G, B, A) 
-      * setTimeDisplayFormat( “yyyy-M-dd hh:mm:ss t”) see the wiki link above for a table of valid format string entities. 
-      * **note that there is a limit to the number of overlays the camera can “blend” into the encoding video. Check the capabilities below to find out what the limit is for your camera. They may all be different. My doorbell cam can only do 2 at once.** 
-    * changed the logEvents() command to be showEvents() and it now shows the info in a window rather than just writing it to the log. 
-    * changed logMotionRegions() showMotionRegions() which also shows the list in a separate window rather than just writing it to the log. 
-    * showCapabilities() opens a window with most, but not all, of the capabilities of the camera listed. There are still some more to add 
-    * There are a LOT of other things I can add to this plugin that could be controlled.  If you know of something else you’d like to be able to tweak in the cameras programmatically please let me know. 
-  * NEW: the [[dictionary:unitinformation:enumeratedvalue|Enumerated Value]] verb now accepts an optional parameter “for” and will return the correct enumeration for the value that you pass or an error if the enumeration is out of range. This is especially useful in the ON script of a unit as you can now check the enumeration for the future value to see what it is going to be when the script is done running. The direct parameter of unit name is now also made optional and if you dont specify it then it will use the value for thisUnit making it easier to script these in a units on or off script. For example: **write log enumerated value for (future value)** would write the enumerated value for the new value being passed to the On script. 
-  * NEW: The [[dictionary:unitinformation:changefuturevalue|change future value]] verb now also accepts enumerations just like the regular set value verbs so you can issue a change future value to “high” instead of just knowing what the numerical value is. 
  
  
current/beta.1685808301.txt.gz · Last modified: 2023/06/03 16:05 by James Sentman