Announcement

Collapse
No announcement yet.

Error when updating Parent Device

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

    Error when updating Parent Device

    Hi, Michael

    I use a new method to get payload from my electricity meter

    Now i use .xml page

    I can create device without any problem, But when i want to change the field grouped chilren ref in new device,
    either the field remains empty or does not change

    I get this error in Log:
    avr.-13 18:50:57 mcsMQTT UpdateSubParent URL/eco-devices.GET:response:T1_IINST à System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessag e(IMessage reqMsg, IMessage retMsg) à System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(Mess ageData& msgData, Int32 type) à System.Object.GetType() à Microsoft.VisualBasic.CompilerServices.OverloadResolution.Ge tArgumentType(Object Argument) à Microsoft.VisualBasic.CompilerServices.OverloadResolution.Ge tArgumentTypeInContextOfParameterType(Object Argument, Type ParameterType) à Microsoft.VisualBasic.CompilerServices.OverloadResolution.Ca nPassToParameter(Method TargetProcedure, Object Argument, ParameterInfo Parameter, Boolean IsExpandedParamArray, Boolean RejectNarrowingConversions, List`1 Errors, Boolean& RequiresNarrowingConversion, Boolean& AllNarrowingIsFromObject) à Microsoft.VisualBasic.CompilerServices.OverloadResolution.Ca nMatchArguments(Method TargetProcedure, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean RejectNarrowingConversions, List`1 Errors) à Microsoft.VisualBasic.CompilerServices.NewLateBinding.Resolv eCall(Container BaseReference, String MethodName, MemberInfo[] Members, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, BindingFlags LookupFlags, Boolean ReportErrors, ResolutionFailure& Failure) à Microsoft.VisualBasic.CompilerServices.NewLateBinding.Object LateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack) à Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGe t(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack) à MCSMQTT_2020.MQTTASP.UpdateParentGroup(MqttReport oReport, String sValue) dans C:\Users\Public\Documents\TFVC\HS\MQTT\MCSMQTT_2020\MQTTASP. vb:ligne 6215 Line 0 There is not a method with name 'GetType' in service class. Service Version: NO_VERSION
    Click image for larger version

Name:	Screen Shot 04-13-22 at 07.08 PM.PNG
Views:	105
Size:	249.7 KB
ID:	1536650

    MCSMQTT_2020.dll version 5.23.15.1

    If i create a new Mqtt device, Device parent is created., error ONLY if i want to change parent device.

    Thank for this great plugin.

    Jean-francois



    #2
    I can replicate and in the process of trying to understand I split the expression into two lines and then it started to work.

    Code:
    Dim dv As Scheduler.Classes.DeviceClass = hs.GetDeviceByRef(iParentRef)
    If Not dv.Relationship(hs) = Enums.eRelationship.Parent_Root Then
    
    'If Not hs.GetDeviceByRef(iParentRef).Relationship(hs) = Enums.eRelationship.Parent_Root Then
    Update as 5.23.21.1 at https://forums.homeseer.com/forum/hs...ge-log-hs4-hs3

    Comment


      #3
      Hi, Michael

      Sorry
      It does'nt work

      When i update the parent device , i receive this error:

      avr.-14 18:30:42 mcsMQTT UpdateSubParent URL/eco-devices.GET:response:T1_IINST à Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger (String Value) à MCSMQTT_2020.MQTTASP.UpdateParentGroup(MqttReport oReport, String sValue) dans C:\Users\Public\Documents\LaptopVM\MCSMQTT_2020\MQTTASP.vb:l igne 6058 Line 0 La conversion de la chaîne "Ref" en type 'Integer' n'est pas valide.
      Jean-Francois

      Comment


        #4
        Try again with 5.23.21.2 at the same location. Don't know why I did not see this when I was testing 5.23.21.1.

        Comment


          #5
          Thanks, Michael

          It's OK.

          Jean-Francois.

          Comment


            #6
            Sorry, Michael

            New error message:
            avr.-14 21:16:33 mcsMQTT ProcessMessage New HS={"HS3":8.7,"BLBackup":-1,"BLLAN":0.3,"BLPlex":-1,"BLShutdown":0,"BLUSBUIRT":-1,"drhsIpPlugIn":0,"HSBuddy":0.1,"HSTOUCH":-1,"MCSMQTT":0.1,"MCSXAP":0,"MediaController":-1,"NETCAM":0,"PHLocation2":0,"RFXCOM":0,"SCREPOSITORY":-1,"SDJHealth":-1,"SDJ_VStat":-1,"WEATHERXML":-1,"X10":0,"YEELIGHT3P":0,"ZWave":0.2,"BLBackup":0,"BLLAN": 0, "BLPlex":0,"BLShutdown":0,"BLUSBUIRT":0,"drhsIpPlugIn":0 ,"HS Buddy":0,"mcsMQTT":0,"mcsXap":0,"MediaController":0,"NetCAM" :0,"PHLocation2":0,"RFXCOM":0,"SCREPOSITORY":0,"SDJHealth": 0 ,"SDJ-VStat":0,"weatherXML":0,"X10":0,"Yeelight3P":0,"ZWave":0} à MCSMQTT_2020.ProcessMessage.GetJSONKeyList(String sValue, Boolean bRetry) à MCSMQTT_2020.ProcessMessage..ctor(MqttMsgPublishEventArgs eventArg, Int32 iPubBroker) dans C:\Users\Public\Documents\LaptopVM\MCSMQTT_2020\ProcessMessa ge.vb:ligne 290 Line 632 Impossible de charger le fichier ou l'assembly 'Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' ou une de ses dépendances. La définition trouvée du manifeste de l'assembly ne correspond pas à la référence de l'assembly. (Exception de HRESULT : 0x80131040)
            I don't change anything exept MscMqtt.dll

            Jean-francois

            Comment


              #7
              I believe I posted the Newtonsoft dll that I am using which is version 12.0.0.0. I transitioned from internal JSON parsing to using the Newtonsoft library around version 5.23.8.0. Before this the library was not used by the plugin. It goes in the same folder as mcsMQTT dll.

              Comment


                #8
                Hi, Michael
                I found an old version of Newtonsoft in the root e HS3, I removed it and it's good now

                Thanks

                Jean-Francois.

                Comment

                Working...
                X