Announcement

Collapse
No announcement yet.

"Outside the bounds of the array" New in 5.23.5.0

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

    "Outside the bounds of the array" New in 5.23.5.0

    Hi, Just upgraded to 5.23.5.0 and see this multiple times in the HS log v4.2.8.0. So far all are for this Shelly Uni device....


    ProcessMessage New shellies/shellyuni-E8DB84D247EC/ext_temperatures_f={"0":{"hwID":"28692adb0c000020","tF":53.9 },"1":{"hwID":"28d505db0c0000cd","tF":58.0}} at MCSMQTTHS4_2020.Shelly.ProcessPayload(String sValue) in C:\Users\Public\Documents\LaptopVM\MCSMQTT2020HS4\Shelly.vb: line 210 at MCSMQTTHS4_2020.ProcessMessage..ctor(MqttMsgPublishEventArgs eventArg, Int32 iPubBroker) in C:\Users\Public\Documents\LaptopVM\MCSMQTT2020HS4\ProcessMes sage.vb:line 113 Line 210 Index was outside the bounds of the array.

    When HS starts, this shows up once:

    ProcessMessage New shellies/shelly1-500291ED11CD/info={"wifi_sta":{"connected":true,"ssid":"xxxx","ip":"10.0. 0.41","rssi":-73},"cloud":{"enabled":false,"connected":false},"mqtt":{"con nected":true},"time":"","unixtime":0,"serial":1,"has_update" :false,"mac":"500291ED11CD","cfg_changed_cnt":0,"actions_sta ts":{"skipped":0},"relays":[{"ison":true,"has_timer":false,"timer_started":0,"timer_dura tion":0,"timer_remaining":0,"source":"mqtt"}],"meters":[{"power":0.00,"is_valid":true}],"inputs":[{"input":0,"event":"","event_cnt":0}],"ext_sensors":{},"ext_temperature":{},"ext_humidity":{},"up date":{"status":"unknown","has_update":false,"new_version":" ","old_version":"20211109-124958/v1.11.7-g682a0db"},"ram_total":50880,"ram_free":38824,"fs_size":2336 81,"fs_free":151353,"uptime":1334428} at MCSMQTTHS4_2020.Shelly.ProcessPayload(String sValue) in C:\Users\Public\Documents\LaptopVM\MCSMQTT2020HS4\Shelly.vb: line 210 at MCSMQTTHS4_2020.ProcessMessage..ctor(MqttMsgPublishEventArgs eventArg, Int32 iPubBroker) in C:\Users\Public\Documents\LaptopVM\MCSMQTT2020HS4\ProcessMes sage.vb:line 113 Line 210 Index was outside the bounds of the array.

    #2
    I will take a look tomorrow. Perhaps I have a regression after adding the Gen2/Plus devices.

    Comment


      #3
      The message is from topics that are not mapped directly into HS devices so should not be impacting your existing HS data. I did fix these to properly parse the JSON input. Update at bottom of post #1 at mcsMQTT Change Log (HS4 & HS3) - HomeSeer Message Board

      Comment


        #4
        This worked.

        Comment


          #5
          Hi Michael,
          This error occurs at startup. It has been there since the post above, but I missed it. The reference to TCP make me think this is related to the Intesis integration I use. I don't notice lack of functionality.

          Init TCP HTTP at System.String.Substring(Int32 startIndex, Int32 length) at MCSMQTTHS4_2020.hsCommon.InitTCP() in C:\Users\Public\Documents\TFVC\HS\MQTT\MCSMQTTHS4_2020\hsCom mon.vb:line 503 Line 0 Index and length must refer to a location within the string. Parameter name: length

          Comment


            #6
            It probably has to do with the URL tab. Line 503 does not make sense for the current source. If you want to help understand why the error is being produced, then use the current version posted at bottom of first post at mcsMQTT Change Log (HS4 & HS3) - HomeSeer Message Board. The HS4 file is unzipped into the \bin\mcsMQTT folder.

            Comment


              #7
              Tried this version, and the "Init TCP" error is gone, but a new one below. It seems this is only at startup.

              JSON Payload not in proper format: {"ID":{""Model:":"DK-RC-WMP-1","MAC":CC3F1D0247DC","IP":"10.0.0.100","Protocol":"ASCII", "Version":"v1.3.3","RSSI":"-25"}}

              Comment


                #8
                I have recently switched to using Newtonsoft to decode JSON. URL/Cloud servers were downloading nested JSON arrays which was not handled well with the native parsing. The positive is that mcsMQTT will be able to handle any valid JSON format in the future. The downside it that the format does not need to be JSON. mcsMQTT native parsing was tolerant of typical formatting errors in the JSON payload. Note the double quote before Model and the lack of a quote before CC3F... The -25 is also questionable as it is probably a number rather than the string.

                Do you recognize the source that is sending this JSON payload?

                Thank you for taking the effort to help with trying to isolate the prior error message.

                Comment


                  #9
                  Hi Michael. This payload comes from mcsMQTT, if I understand your implementation of the Intesis WMP to mcsMQTT. This line represents the startup query "ID". I don't see any bad effects of this, but perhaps a new setup might suffer.

                  Comment


                    #10
                    I see the problem and fixed the source. I do not think the ID message is used for anything. It is just informational.

                    Thank You for your feedback.

                    Comment

                    Working...
                    X