Announcement

Collapse
No announcement yet.

VSTAT config gone

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    VSTAT config gone

    I have had some issues with controlling the temperature and the house getting quite warm.
    I have seen a few times that the heating appears to be on, even if it should't. I have not been able to any reason for this.

    Just now i noticed that the current temp in the VSTAT device is not the same as the actual temp of the device it is linked to.
    Then i opened the VSTAT config and noticed that all the VSTATs where gone!

    I have had some sort of crash on my system during the weekend where the system lost all the devices. These however came back after a restore of the HS3 config.

    After the restore I see this error message when starting the system again:
    Apr-02 17:26:57 SDJ-VStat ERROR - Failed during InitIO - Invalid IL code in System.Windows.Forms.Application:get_ProductVersion (): method body is empty.
    I don't know whether this is related or not.
    Is the VStat config not backed up/restored with the HS3 back up/restore?

    I'm running on Linux and have not made any changes lately.

    #2
    Originally posted by BME View Post
    I have had some issues with controlling the temperature and the house getting quite warm.
    I have seen a few times that the heating appears to be on, even if it should't. I have not been able to any reason for this.

    Just now i noticed that the current temp in the VSTAT device is not the same as the actual temp of the device it is linked to.
    Then i opened the VSTAT config and noticed that all the VSTATs where gone!

    I have had some sort of crash on my system during the weekend where the system lost all the devices. These however came back after a restore of the HS3 config.

    After the restore I see this error message when starting the system again:
    Apr-02 17:26:57 SDJ-VStat ERROR - Failed during InitIO - Invalid IL code in System.Windows.Forms.Application:get_ProductVersion (): method body is empty.
    I don't know whether this is related or not.
    Is the VStat config not backed up/restored with the HS3 back up/restore?

    I'm running on Linux and have not made any changes lately.
    Hi,

    I'm away on business until the weekend so I'm afraid I can't have a detailed look into this until then.
    It sounds like something in one or more of your VStat devices is corrupted which is causing the plug-in to fail when it initiates. in the InitIO routine the plug-in is finding all VStats within the HS3 database and checking their configuration.

    Global settings are stored in the SDJ-VStat.ini file. I doubt the HS3 backup/restore backs that up but if it was lost for some reason the plug-in will just create a new one at startup so all global settings would reset to defaults. I've never seen this happen but it wouldn't be much of an issue anyway,

    All the detailed information and schedules for each VStat is stored as PED data in the root device of each VStat in the HS3 database. I don't know exactly what HS does when you backup and restore but I would have thought that all device information would be restored intact. This shouldn't lose any VStat information but I have to say I have not tested this as I have never used the HS backup and restore functions. I have tested changing between the HS3 backup '.hsd' files that HS creates automatically and that has never caused any errors.

    I normally backup my database files daily and the whole HS3 folder at least once a week using BLBackup and I have restored using my backups with no issues. When I am home at the weekend I will experiment with the HS backup/restore commands to see if they cause some error with the device PED information in the VStats. Not much use for you now though I'm sorry.

    You may be able to restore things by swapping the active 'HomeSeerData.hsd' file in your '//Homeseer HS3/Data/' folder by renaming one of the backups from just before your system crashed. However, don't try this without taking a full copy of your HS3 folder for backup purposes. HS3 keeps 20 versions of the '.hsd' file. You should be able to find instructions for how to do this in the forum. Bear in mind that the 'HomeSeerData.hsd' file contains all your devices and events so you would lose any changes you have made since the date of the backup version you use.

    If I can discover what the corruption is in your database I might be able to configure the plug-in to recover your VStats but I won't be able to do that until I am back home. Your only other alternative at the moment would be to delete your VStat devices in HS3 . You should then be able to stop and restart the plug-in without errors. You would of course then need to recreate the VStats. This is pretty quick to do unless you have any events or HSTouch elements tied to the device id's.

    Let me know how you get on,

    Steve

    Comment


      #3
      BME

      I am back home now and have done some testing with the Homeseer Backup and Restore functions from the Tools>Setup menu-General Tab-Configuration section.
      The backup creates a zip file which in turn contains zip files of the Config, Data, html and scripts folders. This isn't a complete backup of the system but covers the main configuration and data files. It doesn't backup the plug-in exe files themselves nor the bin folder in which many plug-ins, including ZWave, generally store function libraries. These would however be recreated by re-installing any plug-ins that you run.

      As far as I can tell all relevant configuration files, custom graphics, etc related to SDJ-VStat are backed up by this method. The plug-in itself is not backed up so if the exe file of SDJ-VStat, or any other plug-in was lost or corrupted you would need to reinstall them, they would NOT be re-instated by the HS3 Restore command.

      So whilst the HS3 backup command doesn't backup everything it appears to backup configuration and data which can be restored after reinstalling HS3 and any plug-ins.

      Also as the backup consists of nested zip files you are able to extract individual files if you want to pick and choose a manual restore.

      Personally, I always back up the full HS3 folder to ensure that nothing is missed.

      Anyway, as a test I ran the HS3 Backup command and then deleted all my VStats. I restarted the system to make sure that all VStats were deleted and then ran the HS3 restore command. This then required a restart of the system. All my VStats were restored to their state at the time the Backup was created including all configuration settings. The SDJ-VStat plug-in started up and ran without any errors.

      The above test was on a windows system so I can't confirm that the same would be successful on linux although I would be surprised if it would be different.

      It would seem that due to your computer crash, or during your backup and restore, your VStat root devices have somehow become corrupted. If you have not been able to restore your VStats successfully and you don't want to delete and recreate your VStats I may be able to work with you to recover the existing VStats. I would need you to run a debug version of the plug-in to try and discover what the corruption is so that I could figure out how to correct it.

      Let me know how you have got on.

      Steve

      Comment


        #4
        I didn't have that many vstats, and no schedules.

        I haven't lost any .exe or system files, as far as I have seen.
        The vstat devices came back with the restore.

        When I look in the backup zip this is the only content in the vstat ini:
        [Global]
        MaxTempChange=10.9
        DefaultTempReduction=10
        DefaultMinTemp=40
        HighTempSwing=0.99
        LowTempSwing=0.99
        FrostTempSwing=1.99
        HoldTempSwing=0.99
        LoggingLevel=1
        TimerOffset=3
        EasyTrigger=False
        ForceSync=True
        HighTxtHeating=High
        LowTxtHeating=Low
        FrostTxtHeating=Frost
        HighTxtCooling=Day
        LowTxtCooling=Night
        FrostTxtCooling=Away

        I don't see any vstats there, should there have been?

        Comment


          #5
          Originally posted by BME View Post
          I didn't have that many vstats, and no schedules.

          I haven't lost any .exe or system files, as far as I have seen.
          The vstat devices came back with the restore.

          When I look in the backup zip this is the only content in the vstat ini:
          [Global]
          MaxTempChange=10.9
          DefaultTempReduction=10
          DefaultMinTemp=40
          HighTempSwing=0.99
          LowTempSwing=0.99
          FrostTempSwing=1.99
          HoldTempSwing=0.99
          LoggingLevel=1
          TimerOffset=3
          EasyTrigger=False
          ForceSync=True
          HighTxtHeating=High
          LowTxtHeating=Low
          FrostTxtHeating=Frost
          HighTxtCooling=Day
          LowTxtCooling=Night
          FrostTxtCooling=Away

          I don't see any vstats there, should there have been?
          The ini file looks fine.

          The VStat details are stored in the root device of each VStat. Can you post a screenshot of the Advanced tab of one of your VStat root devices.

          Steve

          Comment


            #6
            I have already deleted and created new devices. Everything i working fine for now.
            Attached is the advanced settings for one of the vstats.

            I still need to do something in regards to backups to ensure that the vstats are backed up as well.
            Attached Files

            Comment


              #7
              Originally posted by BME View Post
              I have already deleted and created new devices. Everything i working fine for now.
              Attached is the advanced settings for one of the vstats.

              I still need to do something in regards to backups to ensure that the vstats are backed up as well.
              As I mentioned the VStat information is all stored in the VStat device in HS3 so anything the backups the HS3 devices should backup and restore the VStats with no issues. The global settings are stored in an ini file in the Config folder with all the other HS3 and plug-in ini files. Although I don't normally use the HS3 built in backup/restore I have tested this on my system and it restored all my VStats intact. I haven't tested on Linux but I don't see why it should be different.

              In your case something must have got corrupted in the backup/restore operation but I don't know why that should be. If you want to test the backup/restore on your system, for peace of mind, I would suggest closing HS3 and making a copy of the full HS3 folder. You can then test a backup/restore knowing that if anything goes wrong in your test you can restore the whole folder to get back to where you were.

              Personally I use BLBackup to do managed daily backups of my HS3 installation.

              Steve

              Comment


                #8
                Now all my configs are gone again!

                I don't know when it happened. I'll look through the logs...
                All the devices are still there.

                Attached is the advanced tab again.

                Comment


                  #9
                  These are the only SDJ-VSTAT events in the log Click image for larger version

Name:	VStat3.JPG
Views:	48
Size:	33.5 KB
ID:	1301034

                  Comment


                    #10
                    Originally posted by BME View Post
                    These are the only SDJ-VSTAT events in the log Click image for larger version

Name:	VStat3.JPG
Views:	48
Size:	33.5 KB
ID:	1301034
                    Presumably that log message is at startup. Was there anything unusual about the shutdown and startup? Anything upgraded or changed?

                    The advanced tab looks fine.
                    Set the log level to 2 debug, disable the plugin then re-enable the plug-in. Capture the log for say 1 minute where the plug-in starts up and initialises, not just the SDJ-VStat entries.

                    This seems to be something unique to your system. I will be back home on Friday and have a more detailed look into your issue, perhaps send you a debug version to try and diagnose the issue better.

                    Steve

                    Comment


                      #11
                      No unusual happenings and no changes to the system.
                      Don't think I have had any restarts of the system or power outages.

                      I'll try a few things during the weekend to see if I can provoke something or figure something out...

                      Comment


                        #12
                        Originally posted by BME View Post
                        No unusual happenings and no changes to the system.
                        Don't think I have had any restarts of the system or power outages.

                        I'll try a few things during the weekend to see if I can provoke something or figure something out...
                        Any chance were you able to do what I suggested in message #10 and capture the debug logging?

                        Originally posted by SteveMSJ View Post
                        Set the log level to 2 debug, disable the plugin then re-enable the plug-in. Capture the log for say 1 minute where the plug-in starts up and initialises, not just the SDJ-VStat entries.
                        The error message at Apr 17th 11:49 is during the plug-in startup so that might have been HS3 starting up or alternatively if you had disabled and re-enabled the plug-in. The error message is in the InitIO function which is only called at Startup. At this point the plug-in is searching through the HS3 database looking for VStats and reading the configuration data for each one from the PED in the device. If debug logging was turned on it might give a better idea of where in this function the exception is occurring. However, I suspect from what you are saying that it isn't getting as far as finding any VStats which is why when you go to the Config page you see no VStats. Even though the VStat devices are still present in the database they won't be active.

                        I will add some additional debugging to the InitIO routine and post you a temporary version of the plug-in to try. Hopefully it will help me pin down what is happening on your system.

                        Steve

                        Comment


                          #13
                          Originally posted by SteveMSJ View Post
                          I will add some additional debugging to the InitIO routine and post you a temporary version of the plug-in to try. Hopefully it will help me pin down what is happening on your system.
                          In doing this I have found a likely culprit for your issue, although I have no idea why it should throw an occasional exception on your system and nobody else's. If your log goes back far enough to the 17th April 11:49 error, can you see if you have an SDJ-VStat message just prior to it saying something like:

                          Version 3.0.9.2 Initialized.

                          The plugin logs the version number just before searching the database. Judging by the wording of the exception in your error message the .NET call to get the version number might be what throws the exception. If you don't have this message at plugin startup then that would confirm it.

                          As well as adding more debugging information to the latest version (3.0.9.3) I have separated out the call for the version number so it will just log a warning if it fails and carry on to search for the VStats.

                          I will submit the new version to the updater but if you want to shortcut that I've attached just the exe file to this message. Disable the plugin, copy the attached exe file over the existing one in the HS3 root folder, re-enable the plug-in.

                          Steve

                          P.S. No need for attachment it is already in the updater. Adding to updater seems to very quick these days

                          Comment


                            #14
                            I found these messages during the startup:
                            Apr-17 11:49:07 Starting Plug-In Initializing plugin SDJ-VStat ...
                            Apr-17 11:49:07 Info Plugin SDJ-VStat has connected. IP:127.0.0.1:50364
                            Apr-17 11:48:45 Plug-In Found plug-in: SDJ-VStat, version: 3.0.9.2

                            You said that the advanced tab looked fine.
                            I don't see anything wrong, but I noticed that originally the Reference-IDs are not within the Assosited devices and in the next image has Reference-IDs for all devices.
                            I don't know why this is or if it means anything.

                            Comment


                              #15
                              I just added a VSTAT again.
                              When I restarted the plug-in (not the whole system) the version number was not logged and the VSTAT was gone again.

                              Which confirms your findings.

                              I will update the plug-in now and try again...

                              Comment

                              Working...
                              X