The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

RE: Problems with xpl_x10cache and xplhal_globals



Hi John,

> I just tried stopping xplhal, deleting x10cache.xml and then
> restarting xplhal. This deleted all my x10 devices from
> xplhal manager.
>
> I then recreated an x10 object and the status was unknown. I
> then switched it off in xplmgr and clicked on refresh - and
> it then went back to saying status unknown. Of note the
> xplcache file is not recreated again until I shutdown xplhal
> - should this not be updated every time there is a change  or
> is it kept in memory?

It's kept in memory, but in my case, I have a recurring event that fires
every 15 minutes which saves the X10 cache to disk, along with all the
other xPLHal config files.

I thought this was an out-of-the-box event, so unless you've deleted it,
you should have an event called xPLHalBackup which runs a script called
SaveSystem().

My SaveSystem() is in the xplhal_load script, and is as follows:

sub SaveSystem()

' save globals
call sys.saveglobals()

' save x10 cache
call x10.save()

' save events
call sys.saveevents()

End Sub

And in the xplhal_load sub-routine, I have the following line:

call
sys.recurringevent("00:01","23:59",15,0,"YYYYYYY","SAVESYSTEM","","XPLHA
LBACKUP",True)

This means that even if the xPLHalBackup event is accidentally deleted,
it will be recreated at system startup.

I know this doesn't explain the unknown status problem, but at least it
may explain why the cache files aren't being recreated.
If you don't have this recurring event in place, and your PC crashes,
you will lose your globals, your X10 devices and your timed events.
At least with the recurring event in place, any crash will only result
in the loss of a maximum of the last 15 minutes of changes.

HTH,

John


xPL Links: http://www.xplproject.org.uk http://www.xplhal.com http://www.xpl.myby.co.uk
To Post a Message: ukha_xpl@xxxxxxx
To Subscribe:  ukha_xpl-subscribe@xxxxxxx
To Unsubscribe:  ukha_xpl-unsubscribe@xxxxxxx

xPL Main Index | xPL Thread Index | xPL Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.