Announcement

Collapse
No announcement yet.

A way to remove PED named data?

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

    A way to remove PED named data?

    Hi,

    this is data created from another plugin, wich i can't remove. When i start Homeseer i got waring about serialization etc.

    . I would like to remove the second and third entries :

    xxxxxtriggerruntiemdata_133143993854: System.Byte[]
    xxxxxriggerruntimedata_133143993854: System.Byte[]

    I have seen this :
    https://help.homeseer.com/help/HS3SD...m#.removenamed

    and tried to do a script but I do not understand how a scripts would be constructed for this to work. I have no scripts skill.

    Can someone put me in the right direction to remove those plugin extra data entries?

    thanks.
    Matt

    Attached Files

    #2
    Just a up maybe this thread got lost .

    Comment


      #3
      Using C# script - save this in a file with .cs extension in C:\Program Files (x86)\HomeSeer HS3\scripts folder.
      The script gets device using its refID (i.e. 20 in my example), prints all named PEDs, then calls RemoveNamed - you need to put your names there.

      Code:
      public int Main(Object[] args)
      {
        int dvRef = 20;
      
        Scheduler.Classes.DeviceClass dv = (Scheduler.Classes.DeviceClass)hs.GetDeviceByRef(dvRef);
        hs.WriteLog("info", dv.get_Name(null));
        PlugExtraData.clsPlugExtraData EDO = dv.get_PlugExtraData_Get(hs);
      
        foreach(string name in EDO.GetNamedKeys())
        {
            hs.WriteLog("info", name);
        }
      
        EDO.RemoveNamed("ak_checkconditionssatisfiedtriggertimercallback");
        EDO.RemoveNamed("ak_currenttab");
      
        hs.SaveEventsDevices();
      
        return 0;
      }
      Click image for larger version

Name:	Capture.PNG
Views:	165
Size:	42.2 KB
ID:	1291838

      Comment


        #4
        Hi, alexbk66 , thanks for this !!

        Can i run c# under linux?

        Comment


          #5
          Originally posted by MattL0 View Post
          Can i run c# under linux?
          Why not? You are using mono anyways. C# is actually better and faster under linux, for VB you need extra assemblies.

          Comment


            #6
            Thanks it worked !!

            I was getting error at the beginning because i wrote ''Main'' in the function field. But now it works haha...

            Comment


              #7
              NP

              Comment

              Working...
              X