Announcement

Collapse
No announcement yet.

HSEvent

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

    HSEvent

    The SDK docs identifies a parameter of HSEvent type for the HSEvent method. I was not able to find the a HSEvent type definition. Where is it? Are there any examples of using HSEvent method? I did not see it in the samples provided.

    #2
    In your plugin, HSEvent would be defined as (C#):

    Code:
            public override void HsEvent(HomeSeer.PluginSdk.Constants.HSEvent eventType, object[] @params)
            {
                Console.WriteLine("HSEvent: " + eventType.ToString());
    
            }
    You can right click on the HSEvent type to get the enum, but the values are:

    Code:
            public enum HSEvent
            {
                LOG = 2,
                AUDIO = 8,
                CONFIG_CHANGE = 32,
                STRING_CHANGE = 64,
                SPEAKER_CONNECT = 128,
                CALLER_ID = 256,
                VALUE_CHANGE = 1024,
                VALUE_SET = 2048,
                VOICE_REC = 4096,
                SETUP_CHANGE = 8192,
                RUN_SCRIPT_SPECIAL = 16384,
                GENERIC = 32768
            }
    website | buy now | support | youtube

    Comment


      #3
      Digging this up again .....

      Does anyone know where is the definition of the "PARAMS" object that accompanies the HSEvent callback? I've registered for CONFIG_CHANGE events because I want to get notified when a user deletes one of the PIs devices.

      At least 2 questions:
      1. what triggers CONFIG-CHANGE, is this only deletes, but also creates or modifies? Suspect the params object provides more detail
      2. what exaclty is to be found in params? Where is it documented? I looked at the HS4 documents and couldn't find anything. I looked at HS3 documents and at least I could find it but it shows 5 fields of PARAMS, but I see 6 (5 integers and a string). What are they?
      Thanks for the help

      Comment


        #4
        Originally posted by dcorsus View Post
        Digging this up again .....

        Does anyone know where is the definition of the "PARAMS" object that accompanies the HSEvent callback? I've registered for CONFIG_CHANGE events because I want to get notified when a user deletes one of the PIs devices.

        At least 2 questions:
        1. what triggers CONFIG-CHANGE, is this only deletes, but also creates or modifies? Suspect the params object provides more detail
        2. what exaclty is to be found in params? Where is it documented? I looked at the HS4 documents and couldn't find anything. I looked at HS3 documents and at least I could find it but it shows 5 fields of PARAMS, but I see 6 (5 integers and a string). What are they?
        Thanks for the help
        Click image for larger version

Name:	Screenshot 2021-02-24 110501.jpg
Views:	66
Size:	95.0 KB
ID:	1458419

        Comment


          #5
          Thanks Alex!

          Comment

          Working...
          X