Announcement

Collapse
No announcement yet.

Corrupt ini File Options

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

  • Corrupt ini File Options

    At least once per year, the plugin stops working, presumably due to a corrupted ini file. Typically, it seems to happen after a power failure. The standard prescription is to delete the ini file and restart. But this recreates all the devices, assigning all new HS Reference numbers. And my Ref numbers are well into the thousands because this has happened so many times. Anyway, the result is that it literally takes days to fix scripts and HSTouch screens for 8 players and about 10 touchscreens. This process has gotten real old.

    Is there some way to repair the ini file? What should I look for? I have attached the one that no longer seems to work.
    Attached Files
    Mark

    Hometroller S6 w/ HS3Pro, Way2Call
    BLAB8SS, BL Backup, Easy Trigger, HSTouch, Open Sprinkler, SONOS, Ultra1Wire3, UltraM1G, WeatherXML, Z-Wave

  • #2
    Originally posted by Mark S. View Post
    At least once per year, the plugin stops working, presumably due to a corrupted ini file. Typically, it seems to happen after a power failure. The standard prescription is to delete the ini file and restart. But this recreates all the devices, assigning all new HS Reference numbers. And my Ref numbers are well into the thousands because this has happened so many times. Anyway, the result is that it literally takes days to fix scripts and HSTouch screens for 8 players and about 10 touchscreens. This process has gotten real old.

    Is there some way to repair the ini file? What should I look for? I have attached the one that no longer seems to work.
    I don't see anything wrong with the .ini file. Most problems that appear aren't necessary that the .ini file is corrupted, the root is that the HS DB isn't in sync with the .ini file. I actually don't see issues with this .ini file so let's go back to what exactly is it you see? If I parse your statement:

    1. "The PI stops working": Can you describe what is not working?
    2. "Usually after a power failure": do you see other issues with HS? Is this a Linux or windows environment? Do you see errors in the log?

    So here is some background: the PI hardly ever writes to the .ini file, so the likelihood it gets corrupted due to excessive writing and coincidental restart is small. Secondly, the PI does not write directly to the .ini file, it actually calls HS to access the file. However, HS introduced a caching mechanism a long time ago and initially had some issues with it. So a restart of HS could indeed causes issues with .ini file. So are you on a more recent HS version? Having that said, because the .ini file is not written in a lot, they don't get corrupt easily. All the postings you find here is typically because the HS DB got corrupted OR the user begins manual interventions and actually causes all the issues.

    So is the system currently not working and the ini file you posted belong to a non functioning PI? If so here's what I want you to do:
    1. turn the PIs debug flag on and restart HS. Capture log and post. Look for errors.
    2. look at the PIs devices table (on the config page), do you see duplicated devices? If you don't; the problem is somewhere else.

    If HS restarts occasionally, perhaps there is a more fundamental issue, such as memory issue or HW issue and you might want to focus on that. The use of the ini file, now 8 years or so after I created the PI, could have different ways to be implemented that didn't exist when I started with HS2. Having that said, the corruptions are almost non-existing (had some over the years when HS was making changes to their ini file caching) but DB out of sync have happened quite a bit and again, most of those were due to either the HS DB was foobar or the user began deleting things to the point their setup wasn't functioning.

    So before someone asks why I don't store the info into the HS devices itself, the PI has a lot more info that is not associated with one device, things like linkgroups etc and therefore there is simply no way around the fact that the PI needs some config storage.

    I do see that you have plenty of touchscreens, does that mean you use the MediaAPI functions (navigate content)? Reason I ask, is that I don't recommend you to use it because the implementation is SOOOOOO inefficient that it could cause a lot of load on the PI. Also, check your DB creation settings. If they are set to "immediate" I would recommend you set to a daily/nightly recreating and always make sure their is enough memory available on your system. If you have a large music selection that your Sonos system has discovered, the music DB can be quite large and it could easily demand a few 100Mbyte WHILE it is being created. Once the DB is created, all the memory is released but it can spike quite a bit.

    Hope this helps, sorry for the problems, happy to look at more logs if you have them.

    Dirk

    Comment


    • #3
      Thank, Dirk. That explanation definitely helps me understand a bit more.

      Anyway, by not working, I mean unresponsive - cannot play a sound, speak, change volume, play music - nothing via HS. But of course my speakers still work with the Sonos app. Regarding other power failure effects, my Elk alarm system lost its IP address, but nothing else that seems HS-related.

      I have attached the Sonos-related stuff in the startup log with debug on, and I also attempted to play a sound/announcement around 8:54:52. I also included a screen shot of the devices on the SonosConfig page.

      I am not using the MediaAPI, although I wish I could. That was great when it worked. No immediate DB checkmark.

      I also tried shutting down, replacing the HomeseerData.hsd file and the Sonos.ini file from a backup a few weeks ago (when everything worked fine) and restarted, but still no good.

      Thanks for your help.
      Attached Files
      Mark

      Hometroller S6 w/ HS3Pro, Way2Call
      BLAB8SS, BL Backup, Easy Trigger, HSTouch, Open Sprinkler, SONOS, Ultra1Wire3, UltraM1G, WeatherXML, Z-Wave

      Comment


      • #4
        Originally posted by Mark S. View Post
        Thank, Dirk. That explanation definitely helps me understand a bit more.

        Anyway, by not working, I mean unresponsive - cannot play a sound, speak, change volume, play music - nothing via HS. But of course my speakers still work with the Sonos app. Regarding other power failure effects, my Elk alarm system lost its IP address, but nothing else that seems HS-related.

        I have attached the Sonos-related stuff in the startup log with debug on, and I also attempted to play a sound/announcement around 8:54:52. I also included a screen shot of the devices on the SonosConfig page.

        I am not using the MediaAPI, although I wish I could. That was great when it worked. No immediate DB checkmark.

        I also tried shutting down, replacing the HomeseerData.hsd file and the Sonos.ini file from a backup a few weeks ago (when everything worked fine) and restarted, but still no good.

        Thanks for your help.
        At start-up, the PI seems unable to detect any of the players, this might be a firewall or network issue. Is this on Windows? If so, make sure the PI itself has all firewall allowance for port access (incoming and outgoing). If you have managed switches, makes sure they allow proper multicasting (best option is typically to turn snooping OFF). If this runs in a VM, it needs to be set in bridged mode not NAT mode! The IP address space in use 122.144.166.xx as far as I can remember, that is NOT a private address space is it? If not, you are now blacklisting part of the internet as these addresses should be having a path out towards your ISP. I don't think this is your problem but it raises red flags for me.
        I need to check my code why the players seems to indicate they are on-line whereas the log shows zero players discovered, at least at start-up.
        Dirk

        Comment


        • #5
          I checked my firewall and network settings - nothing amiss. Anyway, I finally fixed it by replacing the entire HS3 directory with a backup. So apparently some file in there was corrupted, but apparently it wasn't the .hsd or the sonos.ini because I had already tried those. I may never know which one, but thank goodness for BLBackup.
          Mark

          Hometroller S6 w/ HS3Pro, Way2Call
          BLAB8SS, BL Backup, Easy Trigger, HSTouch, Open Sprinkler, SONOS, Ultra1Wire3, UltraM1G, WeatherXML, Z-Wave

          Comment

          Working...
          X