[XTension] Database Check
William R Vogel
hightrailrider at icloud.com
Sat Apr 8 16:00:09 EDT 2023
Some background first.
I have several inputs to my Barionett 100 that I use to graph various things going on around the house. They are all digital, contact closures.
It works, graphs showing when things change state. (I monitor the boiler’s burner, dehumidifiers, and the like for ON/OFF states.)
I turned off logging new values, but I see constant changes in the List View: ON/OFF as well as value changes. Xtdb is very slow and unresponsive.
I’m thinking Xtdb is getting bogged down with constant updates, so I decided that I needed to change the first four inputs from analog to digital. I used the edit unit dialog to change one of them. Then everything went south with a stream of odd messages:
4/6/23 6:50:11 PM Received value for Barionett 100 Analog Input 503 (1) of 1017.
4/6/23 6:50:11 PM Barionett 100: received ON
4/6/23 6:50:12 PM Barionett 100: received OFF
4/6/23 6:50:12 PM Barionett 100: received ON
4/6/23 6:50:13 PM Barionett 100: received OFF
4/6/23 6:50:13 PM Barionett 100: received ON
4/6/23 6:50:14 PM Barionett 100: received ON
4/6/23 6:50:14 PM Barionett 100: received ON
4/6/23 6:50:14 PM Received value for Barionett 100 Analog Input 503 (1) of 1023.
4/6/23 6:50:15 PM Barionett 100: received OFF
--------------------------------------------------------------------------------------
4/6/23 6:50:15 PM Barionett 100 Analog Input 504: Unit Device Type Changed To: xt.barix.digitalIn unit will be rebuilt
4/6/23 6:50:15 PM Barionett 100: processing unit change for Barionett 100 Analog Input 504
4/6/23 6:50:15 PM Barionett 100: unit is removed
4/6/23 6:50:15 PM Barionett 100: new unit is created
--------------------------------------------------------------------------------------
4/6/23 6:50:16 PM Barionett 100: received ON
4/6/23 6:50:16 PM Barionett 100: received ON
4/6/23 6:50:17 PM Barionett 100: received OFF
4/6/23 6:50:17 PM Received value for Barionett 100 Analog Input 503 (1) of 1019.
...
4/6/23 6:50:29 PM Barionett 100: received ON
4/6/23 6:50:29 PM Barionett 100: received ON
4/6/23 6:50:30 PM Received value for Barionett 100 Analog Input 503 (1) of 1023.
4/6/23 6:50:31 PM Received value for Barionett 100 Analog Input 503 (1) of 1017.
4/6/23 6:50:31 PM Barionett 100: received OFF
4/6/23 6:50:31 PM Barionett 100: received ON
4/6/23 6:50:32 PM Barionett 100: received ON
4/6/23 6:50:32 PM Received value for Barionett 100 Analog Input 503 (1) of 1022.
4/6/23 6:50:32 PM Barionett 100: received OFF
4/6/23 6:50:33 PM Barionett 100: received ON
4/6/23 6:50:33 PM Received value for Barionett 100 Analog Input 503 (1) of 1016.
4/6/23 6:50:33 PM Barionett 100: received OFF
4/6/23 6:50:35 PM Received value for Barionett 100 Analog Input 503 (1) of 1023.
Once this starts any further changes only make things worse.
Fortunately I was able to back out by reloading the last nightly backup, so it’s back to working now. Xtdb is still very slow and unresponsive and the list view is showing constant updates.
I also noticed that all my units are logging data for Xtdb by default. I have been trying to change the ones that I don’t need to track, by unchecking the “Save data from this unit in Xtdb” box. In time, though, they change back.
So I was wondering if something is hosed up in my database.
Any ideas?
Bill V
On Apr 8, 2023, at 9:00 AM, xtensionlist-request at machomeautomation.com wrote:
Message: 2
Date: Fri, 7 Apr 2023 12:27:36 -0400
From: "james at sentman.com <mailto:james at sentman.com>" <james at sentman.com <mailto:james at sentman.com>>
To: XTension Discussion List <xtensionlist at machomeautomation.com <mailto:xtensionlist at machomeautomation.com>>
Subject: Re: [XTension] Database check.
Message-ID: <A81EB786-3C2D-4E95-AF50-1683DA4D9B50 at sentman.com <mailto:A81EB786-3C2D-4E95-AF50-1683DA4D9B50 at sentman.com>>
Content-Type: text/plain; charset="utf-8"
Are you having trouble with the database?
This was a tool for use with the classic MacOS version of the database ;) And hasn?t been around in 20 years or more ;)
The old database was a flat file using Apples resource management system to store individual blobs of information and those could get corrupted sometimes. Since it was a single file, the corruption of one part of it could render large sections of it unreadable. Thats not a problem with the new database format. It is now a Bundle in Apple parley. But it?s really just a folder that the Finder presents as a single file instead of a folder. If you wish to get inside it to see all the stored data you can control click on it and select ?show package contents? that will open it and everything within will be just regular files and folders.
So it is still possible that individual parts will become corrupt or get confused, though I've not gotten any reports of this happening in a VERY long time, but they cannot cause the entirety of the database to be corrupt. Unless it?s the main preferences file in there that holds so much important information. All your Units and Scripts and other entities have their own folders and individual data files within.
The XTension database files are not human readable, but if you wish to see the values that are stored in them you can just drag the ?something.xtdb? file out of the database and drop it onto a running instance of XTension and it will open a window with all the data visible for you to look through. It will also show any errors in the parsing of the file if there were any. The other files are script files which can be dropped onto the script editor to load the script. Though they will load without the local reference to XTension so any XTension verbs in the scripts will show in raw verb notation and you won?t be able to do a check syntax in the script editor unless you add a tell XTension or using terms from XTension block around it.
There are also many just plain text files in there. Every script folder has some revert/backup files that are plain text versions of the text of the script so that you can use the revert menu in the edit script dialog. These are also used to recompile the script if there is an error with loading it or if you select to rebuild all the scripts when loading the app. There is also a backup file in there of the binary version of the complied script as AppleScripts go goofy some times and Apple doesn?t seem to care. So when you successfully save a script I also make a second copy of that which can be used by XTension if the main copy refuses to load or has other problems later.
So you?ll see a lot of stuff in there ;) But it?s all separate files so the whole database cannot become unreadable.
TLDR; If you?re having some specific issue please let me know more, if you?re just wondering if there is some routine maintenance you should be running then the answer is no.
> On Mar 26, 2023, at 4:29 PM, William R Vogel <hightrailrider at icloud.com <mailto:hightrailrider at icloud.com>> wrote:
>
> I remember a program to verify the XTension database. Is that still a thing?
>
Thanks,
James
James Sentman http://www.PlanetaryGear.org <http://www.planetarygear.org/> http://MacHomeAutomation.com <http://machomeautomation.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://machomeautomation.com/pipermail/xtensionlist_machomeautomation.com/attachments/20230408/9c516a20/attachment.htm>
More information about the XtensionList
mailing list