Announcement

Collapse
No announcement yet.

All of my events vanished

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

    All of my events vanished

    OK, I am really aggravated, so please excuse me asking what may be obvious questions.

    My HS4 events page is completely blank. All of the events vanished. What the actual f__k? The devices are all listed and work. All I can guess is that data on my SSD got corrupted, but why just the events? I take regular manual backups (using the backup function in HS4). Yes, I know, it would be better to copy the entire HomeSeer directory tree, but I haven't done that in too long. If I restore the most recent HS4-generated backup, will it restore the events? Or, are there any Linux tools that might recover the data? I know one can't run a disk check on a running system. Thanks in advance, gurus.

    This is HS4 Standard installed on a Raspberry Pi 4B, running Raspberry Pi OS:


    Date/time=1/8/2023 5:27:52 PM PST
    Version=HS4 Standard Edition 4.2.16.0 (Linux)
    MONO Version=Mono JIT compiler version 6.12.0.182 (tarball Tue Jun 14 22:42:26 UTC 2022)

    License=Registered
    Confguration File=/usr/local/HomeSeer/Data/HomeSeerData.json
    Uptime=0 Days 0 Hours 27 Minutes 29 Seconds
    Lan IP=127.0.0.1 (raspberrypi)
    Device Count=218
    Event Count=0
    Plugins Enabled=Twilio Messaging:,Z-Wave:,HS MyQ:,Manage Voice Devices:,rnbWeather:,Chromecast:
    Modules/Threads=79 Modules, 68 Threads
    Available Threads=399
    HomeSeer Memory Used=100 Mbytes
    Plugins Installed=Chromecast 4.0.20.0,HS MyQ 4.0.13.0,Manage Voice Devices 3.0.0.0,rnbWeather 4.4.2.0,Twilio Messaging 0.2.3.0,Z-Wave 4.1.0.3​

    #2
    It's somewhat-known issue for a while that the JSON file gets corrupt.

    That said, if you try a restore do you have any files in the list to choose from?
    Or, if you go into Setup -> under Configuration choose Edit Config - can you select a backup?

    Before trying any of those steps though, you might want to make a backup of your system as it exists before trying...

    HS4Pro Running on a Raspberry Pi4
    67 Z-Wave Nodes, 111 Events, 422 Devices
    Z-Wave, UPB, WiFi
    Plugins: EasyTrigger, weatherXML, OMNI, Z-Wave, Tuya, Device History
    HSTouch Clients: 3 Android, 1 Joggler

    Comment


      #3
      Though annoying, not the end of the world. There is a directory called: HomeSeer HS4\Data\HomeSeerData.json

      In that directory are all the JSON files that store Devices, Events, etc. There are also corresponding .BAK backup files for every JSON file. So if your events.json file says 0 bytes then the events.json.bak should say something different/larger, which would be your last known good version of this. Simply make a copy of events.json.bak to events.json, of course doing this while HS4 is shutdown.

      Comment


        #4
        Originally posted by TC1 View Post
        Though annoying, not the end of the world. There is a directory called: HomeSeer HS4\Data\HomeSeerData.json

        In that directory are all the JSON files that store Devices, Events, etc. There are also corresponding .BAK backup files for every JSON file. So if your events.json file says 0 bytes then the events.json.bak should say something different/larger, which would be your last known good version of this. Simply make a copy of events.json.bak to events.json, of course doing this while HS4 is shutdown.
        Sadly, both the active and backup files are (nearly) empty. I'll try restoring the last backup next. Thanks!

        Click image for larger version

Name:	image.png
Views:	111
Size:	104.5 KB
ID:	1585608

        Comment


          #5
          That happened to me 2 weeks ago . Had to copy psted the event json and eventgroup json back from backup

          Comment


            #6
            Originally posted by SteveW View Post

            Sadly, both the active and backup files are (nearly) empty. I'll try restoring the last backup next. Thanks!

            Click image for larger version

Name:	image.png
Views:	111
Size:	104.5 KB
ID:	1585608
            OK, I shutdown HS4, deleted the four bad events* files, then I copied in the good files from the backup and rebooted. I now have event groups, but no individual events within those groups. Shouldn't replacing the events.json file fixed that?

            I've attached the events.json file here, renamed to events.txt to get around the prohibition against uploading json files.
            Attached Files

            Comment


              #7
              What do your logs say? Right after you reboot there should be a section in the logs right before it reports the version number, looks something like this (from latest at top to earliest at bottom):

              Code:
              1/7/2023 4:01:03 AM
              HomeSeer
              Startup
              HomeSeer version is: 4.2.16.0
              1/7/2023 4:01:03 AM
              HomeSeer
              Info
              Loaded 0 Timers.
              1/7/2023 4:01:03 AM
              HomeSeer
              Info
              Loaded 0 Counters.
              1/7/2023 4:01:03 AM
              HomeSeer
              Info
              Loaded 99 Events.
              1/7/2023 4:01:02 AM
              HomeSeer
              Info
              Loaded 319 Devices.
              1/7/2023 4:01:02 AM
              HomeSeer
              Startup
              Loading configuration file ...​

              Comment


                #8
                The log shows 18 events, which, as it turns out, are not correct events. See below. And thanks so much for helping, BTW.

                Click image for larger version  Name:	image.png Views:	0 Size:	268.3 KB ID:	1585643
                Click image for larger version  Name:	image.png Views:	0 Size:	42.5 KB ID:	1585644Click image for larger version

Name:	image.png
Views:	85
Size:	19.6 KB
ID:	1585645

                Comment


                  #9
                  Originally posted by SteveW View Post

                  OK, I shutdown HS4, deleted the four bad events* files, then I copied in the good files from the backup and rebooted. I now have event groups, but no individual events within those groups. Shouldn't replacing the events.json file fixed that?

                  I've attached the events.json file here, renamed to events.txt to get around the prohibition against uploading json files.
                  Can you try an older backup of the two event* json file?

                  Comment


                    #10
                    I agree with the above suggestion, there's no way to know when the file corruption began. If you have daily backups then start working backwards until you get a valid result.

                    Comment


                      #11
                      Originally posted by TC1 View Post
                      I agree with the above suggestion, there's no way to know when the file corruption began. If you have daily backups then start working backwards until you get a valid result.
                      Thanks; I'll see what I can find.

                      Comment

                      Working...
                      X