Announcement

Collapse
No announcement yet.

9000 devices created because of an air quality sensor?

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

    9000 devices created because of an air quality sensor?

    Using HS3 with the 2.18 DeConz gateway (windows). I added an Aqara air quality sensor to the DeConz config a few days ago. This one: https://www.amazon.com/gp/product/B094R8RBWT

    Just now I got an error on HS3 telling me there were more than 9000 devices, and everything had slowed to an absolute crawl.
    Too many devices, cannot create more than 9000 devices

    I managed to get the device list to limit showing only things in the 'Not set' room. And in there I found 7689 devices related to that Air Quality device.

    I checked the DeConz window and it was not showing anything out of the ordinary in the graph view.

    For my sanity's sake, I immediately stopped DeConz and HS3. Backed up everything in the HS3 folders.

    I restart DeConz and deleted the air quality device. I don't need it "right now" and would rather not have it freak out the HS3 database again.

    I restarted HS3 and changed the database to one from a few days ago, and it safely showed my expected 1200+ devices. So I've got a fallback, though it's missing some events I'd spent some time configuring in the last week.

    I have managed to slog back through the logs and I see when the problem started:
    Oct-22 11:14:45 PM JowiHue Issue occurred while creating sensor device, please notify plugin owner with the lines logged here
    Oct-22 11:14:45 PM JowiHue Error: (CreateNewDevice)::Error: Requested value 'ZHAAirQuality' was not found.
    Oct-22 11:14:45 PM JowiHue Creating device for AirQuality 43 of type ZHAAirQuality
    Oct-22 11:14:45 PM JowiHue Creating device for AirQuality 43 of type ZHAAirQuality
    Oct-22 11:14:00 PM JowiHue Device found supporting Air quality, plugin does not yet support this...get support on the forum for this?
    Oct-22 11:14:00 PM JowiHue sensor type ZHAAirQuality
    Oct-22 11:14:00 PM JowiHue tried to create device for sensor AirQuality 43

    It seems to have been trying to do this repeatedly, ever 15 seconds, for the past four days. And in the process it ran amok creating devices in HS3.

    Have you seen anything like this happen before? And were would you like me to start, debugging-wise?​

    #2
    I've brought the corrupted database back online, and have found the 1st of the 7689 duplicate devices that got created.

    I changed the 'room' on that 1st one from being 'not set' to an existing room. I then went back to the device list, and attempted to get them selected for deletion.

    Chome was NOT having it:
    Exception generating device utility page main view table (0): Exception of type 'System.OutOfMemoryException' was thrown.-> at System.Text.StringBuilder.ToString() at Scheduler.DeviceUtilityPageBuilder.GetStatusPage_MainContent (String UserName, clsViewSortStateData& VD)​

    Same with Firefox, and Opera.

    So I switched to an instance of Edge running on a different machine (the one hosting HS3) Edge kept complaining about the page 'not responding'. After clicking [Wait] on that dialog a dozen times, I gave up.

    Is there a way to programmatically delete a range of devices, from x deviceID to y deviceID?
    Attached Files

    Comment


      #3
      jon00 gave you a script in your other post.


      Originally posted by jon00 View Post
      Try this script:

      Code:
      Sub Main(ByVal Parm As Object)
      
      For Ref As Integer = 1296 to 9004
      If hs.DeviceExists(Ref) Then hs.DeleteDevice(Ref)
      Next
      
      End Sub
      Save as a .vb script
      HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

      Comment


        #4
        Originally posted by randy View Post
        jon00 gave you a script in your other post​
        yeah, and I saw that, and replied about it's not working. so, uh, thanks?

        and now I'm down the rabbit hole of refreshing my understanding of how hs handles devices. It would appear there are a few not-bogus devices in this range (which I only caught purely by accident) and I'd need to amend the script to check against the device name before deleting it.

        I raised the question HERE because I'd like the plug-in developer to SEE it.

        My question about handling devices and deleting them is of a more generic nature, but of a more pressing concern.

        Comment


          #5
          The script jon00 posted looks good for its goal indeed, but did not test it.

          The issue here is that the HS3 plugin does not support the airquality device. Probably becuase it sees the temperature sensor, it tries to create the device anyway. I will send out an update on the plugin that excludes the airquality sensor, so it will not create the loop in devices anymore. My advise is to remove the device from deCONZ for now so the plugin will not try to create any devices for the sensor. Once the update is out, you can add the device again.

          Wim

          -- Wim

          Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

          1210 devices/features ---- 392 events ----- 40 scripts

          Comment


            #6
            I deleted the device from DeConz when I first discovered the problem (two days later) and will not pair it again until the next plug-in version is available.

            There are likely other kinds of unknown devices that could show up in the future, is there a way for the plug-in to not do the same thing again if/when that happens?

            Comment


              #7
              Most types should not cause problems. But one never can guess what new device will emerge, so I cannot promise on that
              -- Wim

              Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

              1210 devices/features ---- 392 events ----- 40 scripts

              Comment


                #8
                Originally posted by w.vuyk View Post
                Most types should not cause problems. But one never can guess what new device will emerge, so I cannot promise on that
                I understand but this created quite a lot of completely duplicated devices. It would seem like if there's an unknown device then it would be better to NOT create something in HS, versus recreating the same thing, over and over again.

                Comment


                  #9
                  Was this ever resolved? Has the plug-in had any error-handling changes to prevent this from happening again?

                  Comment


                    #10
                    I have no issues here with the airquality device, and did not hear back with the latest versions of the plugin?
                    -- Wim

                    Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

                    1210 devices/features ---- 392 events ----- 40 scripts

                    Comment


                      #11
                      Originally posted by w.vuyk View Post
                      I have no issues here with the airquality device, and did not hear back with the latest versions of the plugin?
                      I did not want to re-try adding it because of the mess it made last time. So I was waiting to hear that something had been done to prevent it from happening again.

                      Comment


                        #12
                        The runaway import and subsequent attempts to fix it did not eliminate all the problems. I had to manually edit the HomeSeer.hsd database to eliminate the null reference startup problem.

                        Detailed here: https://forums.homeseer.com/forum/ho...85#post1626785

                        I have not tried to load the sensor again. I do not want to go through those headaches again.

                        Comment

                        Working...
                        X