Announcement

Collapse
No announcement yet.

New Temp device gets created every time the plugin starts

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

    New Temp device gets created every time the plugin starts

    I'm running 3.0.31 of the plugin. Every time I restart HS3 or Disable/Enable the plugin, a new Temperature device is created - which means I end up with one that works (the first/oldest one) and a bunch of copies that don't reflect the value provided by the WF AIR module. Here's the output from the HS3 log:

    Code:
     
    Dec-31 5:46:14 PM WeatherFlow Starting UDP listener...
    Dec-31 5:46:14 PM WeatherFlow Starting communication with websocket server.
    Dec-31 5:46:14 PM WeatherFlow An item with the same key has already been added.
    Dec-31 5:46:14 PM WeatherFlow Failure while checking for missing devices.
    Dec-31 5:46:14 PM WeatherFlow Configuring Temperature - AR-00002661-1
    Dec-31 5:46:14 PM WeatherFlow Creating new device Temperature - AR-00002661-1
    Dec-31 5:46:14 PM WeatherFlow Devices are now configured
    Dec-31 5:46:14 PM WeatherFlow Station 4719 previously added.
    Dec-31 5:46:14 PM WeatherFlow Found station 4719
    Dec-31 5:46:12 PM WeatherFlow Querying meta data for station 4719
    Dec-31 5:46:12 PM WeatherFlow Station 4719 added.
    Dec-31 5:46:12 PM WeatherFlow Found station 4719
    Dec-31 5:46:12 PM WeatherFlow In InitWeatherFlow()
    Dec-31 5:46:11 PM Plug-In Finished initializing plug-in WeatherFlow
    Dec-31 5:46:11 PM Starting Plug-In WeatherFlow loaded in 320 milliseconds
    Dec-31 5:46:11 PM Starting Plug-In Plugin WeatherFlow started successfully in 15 milliseconds
    Dec-31 5:46:11 PM WeatherFlow Exit InitIO()
    Dec-31 5:46:11 PM WeatherFlow In InitIO()
    Dec-31 5:46:11 PM Starting Plug-In Initializing plugin WeatherFlow ...
    Dec-31 5:46:11 PM Info Plugin WeatherFlow has connected. IP:127.0.0.1:55920
    Dec-31 5:46:11 PM WeatherFlow I have connected to HomeSeer.

    #2
    When the plug-in starts it loads all the existing WeatherFlow devices from HomeSeer and then compares them with what it expects to exist. If it fails to find a match, it will attempt to create the missing device.

    The comparison is checking the device type and the device address. In your case, it's looking for a device of type TEMPERATURE with an address that starts with "AR-00002661". It's not find one so it tries to create it. It creates the device but then fails to add it to it's internal list because there's already a device there with address "AR-00002661-1".

    That implies that the device type is missing or wrong in the original device record. If you open the device in the HomeSeer management screen, there should be a tab labeled "WeatherFlow". If you look at that tab, it should show the device type along with some other info.

    If the tab doesn't exist or the device type isn't TEMPERATURE then you have to delete the device and let the plug-in recreate it as there is something wrong with the device record.
    --
    Bob Paauwe
    ISYInsteon Plug-in
    http://www.bobsplace.com/ISYInsteon/

    Comment


      #3
      Here's a snip of the WeatherFlow tab from the older Temperature device (older as in the last time I started the WF plugin, it created a newer one than this one). I have deleted several of these Temperature devices today...

      Click image for larger version

Name:	WeatherFlow_Temp_Device.PNG
Views:	81
Size:	13.9 KB
ID:	1444406
      Attached Files

      Comment


        #4
        So based on the WeathetFlow tab’s info, I don’t understand why the plug-in doesn’t like this device...

        Regards, BBB

        Comment


          #5
          If you've deleted all the other duplicate devices, then I don't either.

          You can check the "developer mode" checkbox before starting the plug-in and it will open a console window with additional debug, but I don't print out the values that are being compared there so I'm not sure that will help.

          If you're willing to keep digging into it, I can release a beta version with some addition debug message that do show what's being compared. Otherwise, I'd just delete the device (and all duplicates) and let the plug-in re-create it.
          --
          Bob Paauwe
          ISYInsteon Plug-in
          http://www.bobsplace.com/ISYInsteon/

          Comment


            #6
            Bob:

            I believe I've deleted them all in the past and still ended up w/ the same problem - so I guess it's time to dive into the wild & woolly world of Beta testing... : )

            Regards,
            BBB

            Comment


              #7
              Bob:

              Let me know when you have something for me to test.

              In the interim, is there some configuration file I can look at to see what the plug in thinks it has for devices?

              Regards,
              BBB

              Comment


                #8
                This list of devices is hard-coded into the plug-in. Each device created holds the configuration for the device in the device record.

                I haven't had time to look at creating a beta version yet.
                --
                Bob Paauwe
                ISYInsteon Plug-in
                http://www.bobsplace.com/ISYInsteon/

                Comment


                  #9
                  bpwwer i am having this same problem (a new temperature device is created every time HS3 restarts). The Weatherflow tab on the real Temperature device looks right and the "Technology Address" of the device is the serial number of my AIR followed by "-1" as I believe it should be.

                  i see this in my HS3 log (I have masked the ID numbers... please let me know if I should DM the unmasked log to you)
                  May-01 2:21:43 PM WeatherFlow Change station ID to xxxx
                  May-01 2:21:41 PM WeatherFlow Change station ID to xxxx
                  May-01 1:31:20 PM WeatherFlow Skipping calculations, station is missing wind speed data.
                  May-01 1:31:06 PM WeatherFlow Starting UDP listener...
                  May-01 1:31:05 PM WeatherFlow Starting communication with websocket server.
                  May-01 1:31:05 PM WeatherFlow An item with the same key has already been added.
                  May-01 1:31:05 PM WeatherFlow Failure while checking for missing devices.
                  May-01 1:31:05 PM WeatherFlow Configuring Temperature - AR-000xxxxx-1
                  May-01 1:31:05 PM WeatherFlow Creating new device Temperature - AR-000xxxxx-1
                  May-01 1:31:05 PM WeatherFlow Failed to load Temperature / AR-000xxxxx-1 because address is already in use.
                  May-01 1:31:05 PM WeatherFlow Devices are now configured
                  May-01 1:31:05 PM WeatherFlow Station xxxx previously added.
                  May-01 1:31:05 PM WeatherFlow Found station xxxx
                  May-01 1:31:03 PM WeatherFlow Station xxxx added.
                  May-01 1:31:03 PM WeatherFlow Querying meta data for station xxxx
                  May-01 1:31:03 PM WeatherFlow Found station xxxx
                  May-01 1:31:03 PM WeatherFlow In InitWeatherFlow()
                  May-01 1:31:02 PM WeatherFlow Exit InitIO()
                  May-01 1:31:02 PM WeatherFlow In InitIO()
                  May-01 1:31:02 PM WeatherFlow I have connected to HomeSeer.
                  Thanks for any help!

                  === Edit ===

                  software versions:

                  HomeSeer Version: HS3 Pro Edition 3.0.0.548
                  Operating System: Microsoft Windows 10 Pro - Work Station
                  3.0.0.31: WeatherFlow

                  Comment


                    #10
                    There must be something wrong with the original temperature device record.

                    When the plug-in starts, it goes through the following sequence:

                    1) enumerate all devices (this is every device, not just those created by the plug-in)
                    2) if the device is owned by the plug-in, add it to an internal list; else skip the device
                    3) verify that the devices it added to the internal list are correct
                    4) compare the internal list with the expected list and create any missing devices

                    You're seeing the error at step 4 because the internal list doesn't contain the temperature device and it creates a new one. Then it errors because there is already a device configured in HomeSeer with the same address.

                    There are only 2 possible reasons for this. Either HomeSeer is not enumerating all the devices so the list that the plug-in gets is missing devices (I vaguely recall hearing about a bug where this could happen if the number of devices on the system was large but I don't remember the details). If this is happening, there should be an error reported. Or, the device record is corrupt and doesn't show up as owned by the plug-in. This is easy to check by looking at the advanced configuration for the device and checking what "Interface" is set to. It should be "WeatherFlow".
                    --
                    Bob Paauwe
                    ISYInsteon Plug-in
                    http://www.bobsplace.com/ISYInsteon/

                    Comment


                      #11
                      The interface looks right:


                      Reference ID 1818
                      Technology Address AR-000xxxxx-1
                      Status 65.2 = Dim
                      Value 65.2 = "65.2 °F"
                      String
                      Supports Status False
                      Dimmable False
                      Interface WeatherFlow
                      Extra Data Store 2 Named entries, 0 UnNamed entries.
                      Device Type Internal Plug-In API, Type: Plug-In Type 1, SubType:
                      Device Type (String)
                      Misc Settings Show Values
                      Device Image File images\Devices\Image-Not-Selected.png
                      Thumbnail Image File images\Devices\Image-Not-Selected_small.png
                      Relationship Status Child
                      Associated Devices Weatherflow Air AR-000xxxxx (1817)

                      and the parent device know about this temperature device:


                      Reference ID 1817
                      Technology Address AR-000xxxxx
                      Status 0 = OFF
                      Value 0 = "Enabled"
                      String
                      Supports Status False
                      Dimmable False
                      Interface WeatherFlow
                      Extra Data Store 6 Named entries, 0 UnNamed entries.
                      Device Type Internal Plug-In API, Type: Plug-In Type 1, SubType:
                      Device Type (String)
                      Misc Settings Hidden, Show Values
                      Device Image File images\Devices\Image-Not-Selected.png
                      Thumbnail Image File images\Devices\Image-Not-Selected_small.png
                      Relationship Status Parent Root
                      Associated Devices Weatherflow Temperature (1818), Weatherflow Humidity (1819), Weatherflow Dewpoint (1821), Weatherflow Lightning Strikes (1822), Weatherflow Lightning Distance (1823), Weatherflow Apparent Temperature (1824), Weatherflow Heat Index (1825), Weatherflow Windchill (1826), Weatherflow Pressure Trend (1827), Weatherflow Last Strike (1913), Weatherflow Pressure (2020), Weatherflow Air Battery (2608)



                      i have 1010 devices (not sure if that's considered a lot?)

                      Number of Devices: 1010
                      Number of Events: 743
                      Available Threads: 1200


                      i see "Found 1 issues(s) with devices)" in my HS3 log when I restarted, am not sure if it has anything to do with weatherflow (and if it is just referencing this same issue or not)?


                      May-01 1:31:17 PM Startup Start up complete.
                      May-01 1:31:17 PM Info Found 1 issue(s) with devices
                      May-01 1:31:17 PM Warning Device (2861) Temperature references a parent, but the parent does not reference this child
                      May-01 1:31:17 PM Warning Issue checking child device (2861) Temperature
                      May-01 1:31:17 PM Warning Device (2860) Temperature references a parent, but the parent does not reference this child
                      May-01 1:31:17 PM Warning Issue checking child device (2860) Temperature
                      May-01 1:31:17 PM Warning Device (2022) Ω System MeiHarmonyHub Theater Hub references a child device with a device ref of 2150 but the device does not exist
                      May-01 1:31:17 PM Warning Issue checking parent device (2022) Ω System MeiHarmonyHub Theater Hub
                      May-01 1:31:17 PM Info ASCII listener started on port 11000
                      May-01 1:31:17 PM Info Checking device parent child relationships...
                      May-01 1:31:17 PM Startup Starting HSSentry watchdog.



                      What should I check next? Thanks!

                      Comment


                        #12
                        That all does look correct. So maybe it is the bug with device enumeration that's causing the problem. I only have about half that number of devices but I have know idea how many devices would trigger it.

                        I remember reading about it and that there is a workaround for it, but that was a while ago and the details are a bit fuzzy. I'll have to spend some time to find the info again and modify the plug-in with the workaround.
                        --
                        Bob Paauwe
                        ISYInsteon Plug-in
                        http://www.bobsplace.com/ISYInsteon/

                        Comment


                          #13
                          After looking into, if the enumeration fails, it should cause the plug-in to fail to find any devices and it should be output an error message to the log. I don't see the error in the log so I'm assuming it's not failing.

                          I just submitted a new version of the plug-in to the store where I added some additional log output to try and track down what's happening.
                          --
                          Bob Paauwe
                          ISYInsteon Plug-in
                          http://www.bobsplace.com/ISYInsteon/

                          Comment


                            #14
                            I published a new version that adds some additional log information around where it's failing. Please try the new version and paste the log results here.
                            --
                            Bob Paauwe
                            ISYInsteon Plug-in
                            http://www.bobsplace.com/ISYInsteon/

                            Comment


                              #15
                              Thanks!

                              I installed .32 and here is the weatherflow logging:

                              May-08 9:00:16 PM WeatherFlow Starting UDP listener...
                              May-08 9:00:15 PM WeatherFlow Starting communication with websocket server.
                              May-08 9:00:15 PM WeatherFlow Attempting to connecto to ws.weatherflow.com on port 80
                              May-08 9:00:15 PM WeatherFlow An item with the same key has already been added.
                              May-08 9:00:15 PM WeatherFlow Failure while checking for missing devices.
                              May-08 9:00:15 PM WeatherFlow Configuring Temperature - AR-00013226-1
                              May-08 9:00:15 PM WeatherFlow Creating new device Temperature - AR-00013226-1
                              May-08 9:00:15 PM WeatherFlow Found AIR with address AR-00013226 not SK-00014609
                              May-08 9:00:15 PM WeatherFlow Found SKY with address SK-00014609
                              May-08 9:00:15 PM WeatherFlow Found TEMPERATURE with address AR-00013226-1 not SK-00014609
                              May-08 9:00:15 PM WeatherFlow Failed to load Temperature / AR-00013226-1 because address is already in use.
                              May-08 9:00:15 PM WeatherFlow Devices are now configured
                              May-08 9:00:15 PM WeatherFlow Adding Sky Battery / SK-00014609-11
                              May-08 9:00:15 PM WeatherFlow Adding Air Battery / AR-00013226-12
                              May-08 9:00:15 PM WeatherFlow Adding Precipitation Yearly / SK-00014609-10
                              May-08 9:00:15 PM WeatherFlow Adding Illuminance / SK-00014609-9
                              May-08 9:00:15 PM WeatherFlow Adding Solar Radiation / SK-00014609-8
                              May-08 9:00:15 PM WeatherFlow Adding UV Index / SK-00014609-7
                              May-08 9:00:15 PM WeatherFlow Adding Rain Rate / SK-00014609-6
                              May-08 9:00:15 PM WeatherFlow Adding Precipitation Daily / SK-00014609-5
                              May-08 9:00:15 PM WeatherFlow Adding Precipitation / SK-00014609-4
                              May-08 9:00:15 PM WeatherFlow Adding Wind Direction / SK-00014609-3
                              May-08 9:00:15 PM WeatherFlow Adding Gust Speed / SK-00014609-2
                              May-08 9:00:15 PM WeatherFlow Adding Wind Speed / SK-00014609-1
                              May-08 9:00:15 PM WeatherFlow Found station 5767
                              May-08 9:00:15 PM WeatherFlow Station 5767 previously added.
                              May-08 9:00:15 PM WeatherFlow Adding Sky SK-00014609 / SK-00014609
                              May-08 9:00:15 PM WeatherFlow Adding Pressure / AR-00013226-3
                              May-08 9:00:15 PM WeatherFlow Adding Last Strike / AR-00013226-11
                              May-08 9:00:15 PM WeatherFlow Adding Pressure Trend / AR-00013226-10
                              May-08 9:00:15 PM WeatherFlow Adding Windchill / AR-00013226-9
                              May-08 9:00:15 PM WeatherFlow Adding Heat Index / AR-00013226-8
                              May-08 9:00:15 PM WeatherFlow Adding Apparent Temperature / AR-00013226-6
                              May-08 9:00:15 PM WeatherFlow Adding Lightning Distance / AR-00013226-5
                              May-08 9:00:15 PM WeatherFlow Adding Lightning Strikes / AR-00013226-4
                              May-08 9:00:15 PM WeatherFlow Adding Dewpoint / AR-00013226-7
                              May-08 9:00:15 PM WeatherFlow Adding Humidity / AR-00013226-2
                              May-08 9:00:15 PM WeatherFlow Adding Temperature / AR-00013226-1
                              May-08 9:00:15 PM WeatherFlow Adding Air AR-00013226 / AR-00013226
                              May-08 9:00:00 PM WeatherFlow Station 5767 added.
                              May-08 9:00:00 PM WeatherFlow Querying meta data for station 5767
                              May-08 9:00:00 PM WeatherFlow Found station 5767
                              May-08 8:59:59 PM WeatherFlow In InitWeatherFlow()
                              May-08 8:59:58 PM WeatherFlow Exit InitIO()
                              May-08 8:59:58 PM WeatherFlow In InitIO()
                              May-08 8:59:58 PM WeatherFlow I have connected to HomeSeer.

                              and here is the new Temperature device it created:


                              Click image for larger version

Name:	Screen Shot 2021-05-09 at 5.18.54 PM.png
Views:	25
Size:	95.8 KB
ID:	1473572

                              Comment

                              Working...
                              X