Announcement

Collapse
No announcement yet.

Multiple batteries in one device not supported?

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

    Multiple batteries in one device not supported?

    Hello SteveMSJ!

    I am using a plugin for Netatmo devices. As it is now I have one "Location" for the main indoor sensor and the three outdoor sensors, which makes a parent device with three battery child devices. I am getting the following error in the HomeSeer log:

    8/18/2023 00:20:58 Legacy-Plugin SDJ-Health ERROR - Failed to add Parent device 1661 of battery device 1722 to list. An item with the same key has already been added. Key: 1661
    8/18/2023 00:20:58 Legacy-Plugin SDJ-Health ERROR - Failed to add Parent device 1661 of battery device 1721 to list. An item with the same key has already been added. Key: 1661

    1661 is the parent device, and 1721 and 1722 are two of the three battery devices. The first battery device 1720 is not listed in the logs. None of the batteries show up in the SDJ-Health plugin.

    Is this kind of setup is supported or does the plugin expect only one battery per device? Any chance of getting it to work?

    /Zyrgh

    #2
    Originally posted by zyrgh View Post
    Hello SteveMSJ!

    I am using a plugin for Netatmo devices. As it is now I have one "Location" for the main indoor sensor and the three outdoor sensors, which makes a parent device with three battery child devices. I am getting the following error in the HomeSeer log:

    8/18/2023 00:20:58 Legacy-Plugin SDJ-Health ERROR - Failed to add Parent device 1661 of battery device 1722 to list. An item with the same key has already been added. Key: 1661
    8/18/2023 00:20:58 Legacy-Plugin SDJ-Health ERROR - Failed to add Parent device 1661 of battery device 1721 to list. An item with the same key has already been added. Key: 1661

    1661 is the parent device, and 1721 and 1722 are two of the three battery devices. The first battery device 1720 is not listed in the logs. None of the batteries show up in the SDJ-Health plugin.

    Is this kind of setup is supported or does the plugin expect only one battery per device? Any chance of getting it to work?

    /Zyrgh
    Hi Zyrgh
    The simple answer is that the plug-in does expect only one battery feature per device and I can see why it would log those error messages in your situation.

    Typically in HomeSeer every physical device is represented by a parent device with a number of features, but this is not enforced and each plug-in author can use whatever arrangement they feel most appropriate for the technology they are interfacing. I'm not familiar with Netatmo devices or the Netatmo plug-in but the author obviously considered it appropriate to group multiple physical sensor devices as features to a single parent device.

    I may be able to make some adjustments to SDJ-Health to cope with this. I will have a look and if it isn't too much work I will give it a go, although the parent/feature structure is pretty fundamental to the way the plug-in works.

    Can you post a screenshot of the device list view for the particular device you refer to so I can get a better idea of the parent/feature arrangement. Do this with 'Show device ref on Status page' checked (Setup>Custom>Site Settings) so the device ref id is shown for each feature.

    Although I don't have any Netatmo devices I can create a virtual device with a similar structure for testing.

    Steve

    Comment


      #3
      Hi Steve,

      I figured that was the case. Here is a screen shot of how it looks, some child devices on the end didn't fit but I think you get the idea. It is a weather station with an indoor main unit, and three outdoor battery powered units, temperature/humidity, wind and rain. Thanks for looking into it!

      /Zyrgh

      Click image for larger version

Name:	image.png
Views:	44
Size:	167.9 KB
ID:	1632000

      Comment


        #4
        Originally posted by zyrgh View Post
        Hi Steve,

        I figured that was the case. Here is a screen shot of how it looks, some child devices on the end didn't fit but I think you get the idea. It is a weather station with an indoor main unit, and three outdoor battery powered units, temperature/humidity, wind and rain. Thanks for looking into it!

        /Zyrgh
        Thanks for the additional info. I’ll get back to you when I have had a chance to give it some thought.

        Steve

        Comment


          #5
          Originally posted by SteveMSJ View Post

          Thanks for the additional info. I’ll get back to you when I have had a chance to give it some thought.

          Steve
          zyrgh
          Hi,

          I finally had some time to look at the code to see whether it was possible to make a simple change for multiple battery features to one device. Unfortunately, the root/parent child/feature relationship of devices is fairly fundamental to the way the plugin works so it would be a major change.

          The Battery Devices section of the plugin targets physical devices that are battery powered. It is really looking at the device as a whole and monitoring whether it is waking up, or any built in sensors it may have are updating, to spot when a device dies. This could be due to battery failure but also other circumstances. Reported battery levels are just a secondary consideration. In the typical HomeSeer representation of a device, the Root/Parent is the device that links together any features of the device. The plugin therefore expects to only see one battery feature for a physical device represented by a HomeSeer device.

          Of course it is up to each plugin author how they represent technologies in HomeSeer and I can see how grouping your various sensor devices together as one device may be a logical approach. I probably would have kept the physical devices separate and used Location1 or Location2 to group the various devices together. But that is just me

          Even if I were to change things to cope with multiple battery features in one device (i.e. multiple physical device grouped together under one parent), the plugin wouldn't know which other features belong to the physical device that each battery belongs to. The plugin therefore wouldn't be able to monitor which physical device died, which would negate it's primary purpose.

          Sorry I can't be more helpful in this particular case.

          Steve

          Comment


            #6
            Hi Steve,

            I fully understand, no worries I'll set up my own battery monitoring for these devices. Thanks for looking into it!
            /Zyrgh

            Comment

            Working...
            X