-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathIHsController.cs
2131 lines (1888 loc) · 115 KB
/
IHsController.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
using System;
using System.Collections.Generic;
using HomeSeer.PluginSdk.Devices;
using HomeSeer.PluginSdk.Devices.Controls;
using HomeSeer.PluginSdk.Energy;
using HomeSeer.PluginSdk.Events;
using HomeSeer.PluginSdk.Logging;
using HSCF.Communication.ScsServices.Service;
// ReSharper disable UnusedMemberInSuper.Global
// ReSharper disable UnusedMember.Global
namespace HomeSeer.PluginSdk {
/// <summary>
/// The interface used by plugins to communicate with the HomeSeer software
/// <para>
/// An instance of this interface is automatically provided to an AbstractPlugin when AbstractPlugin.Connect(string[]) is called.
/// </para>
/// </summary>
[System.Reflection.Obfuscation(Exclude = true, ApplyToMembers = true)]
[ScsService]
public interface IHsController {
/// <summary>
/// The current version of the HomeSeer Plugin API
/// </summary>
double APIVersion { get; }
/// <summary>
/// The number of devices connected to the HomeSeer system
/// </summary>
int DeviceCount { get; }
/// <summary>
/// Register a new plugin with HomeSeer
/// <para>
/// This will add the specified ID/filename pair to HomeSeer's list of plugins to check when it runs through
/// the plugin initialization process.
/// </para>
/// </summary>
/// <param name="pluginId">The ID of the plugin to register</param>
/// <param name="pluginName">The name of the plugin to register</param>
/// <returns>
/// TRUE if the plugin was registered successfully;
/// FALSE if there was a problem with registration
/// </returns>
bool RegisterPlugin(string pluginId, string pluginName);
#region Settings and Config data
/// <summary>
/// Clear all of the settings saved in a section in a specific file
/// </summary>
/// <param name="sectionName">The section to clear</param>
/// <param name="fileName">The name of the INI file to edit</param>
void ClearIniSection(string sectionName, string fileName);
/// <summary>
/// Get the value of the setting saved to INI file
/// </summary>
/// <param name="sectionName">The name of the section the setting is saved to</param>
/// <param name="key">The key of the setting</param>
/// <param name="defaultVal">A default value to use if the setting was not previously saved</param>
/// <param name="fileName">The name of the INI file to search</param>
/// <returns></returns>
string GetINISetting(string sectionName, string key, string defaultVal, string fileName = "");
/// <summary>
/// Save the new value of a setting
/// </summary>
/// <param name="sectionName">The name of the section the setting is saved to</param>
/// <param name="key">The key of the setting</param>
/// <param name="value">The value to save</param>
/// <param name="fileName">The name of the INI file to save the setting to</param>
void SaveINISetting(string sectionName, string key, string value, string fileName);
/// <summary>
/// Get a key-value map of settings saved in the specified section of the INI file
/// </summary>
/// <param name="section">The section to get</param>
/// <param name="fileName">The name of the INI file</param>
/// <returns>A Dictionary of setting keys and values</returns>
Dictionary<string, string> GetIniSection(string section, string fileName);
#endregion
#region Features/Pages
/// <summary>
/// Register a feature page to create a link to it in the navigation menu in HomeSeer.
/// <para>
/// The PluginFilename must end with .html and not include the enclosing folder name.
/// The page must exist in the HomeSeer html folder as: PluginID/PluginFilename
/// </para>
/// </summary>
/// <param name="pluginId">The ID of the plugin</param>
/// <param name="pageFilename">The filename of the page, ending with .html</param>
/// <param name="linkText">The text that appears in the navigation menu</param>
void RegisterFeaturePage(string pluginId, string pageFilename, string linkText);
/// <summary>
/// Unregister a feature page to remove any navigation links to the page.
/// </summary>
/// <param name="pluginId">The ID of the plugin</param>
/// <param name="pageFilename">
/// The filename of the page, ending with .html.
/// This must be exactly the same as the filename used to register the page</param>
void UnregisterFeaturePage(string pluginId, string pageFilename);
/// <summary>
/// Register a page as the device inclusion process guide for this plugin.
/// <para>
/// There can only be one device inclusion process for each plugin.
/// The page that is tagged as the device inclusion process will be displayed first in
/// the list of features for the plugin and be shown in the list of devices users can add.
/// </para>
/// </summary>
/// <param name="pluginId">The ID of the plugin</param>
/// <param name="pageFilename">The filename of the page, ending with .html</param>
/// <param name="linkText">The text that appears in the navigation menu</param>
void RegisterDeviceIncPage(string pluginId, string pageFilename, string linkText);
/// <summary>
/// Unregister the device inclusion page for this plugin.
/// </summary>
/// <param name="pluginId">The ID of the plugin</param>
void UnregisterDeviceIncPage(string pluginId);
#endregion
#region Devices
#region Create
/// <summary>
/// Create a new device in HomeSeer
/// </summary>
/// <param name="deviceData">
/// <see cref="NewDeviceData"/> describing the device produced by <see cref="DeviceFactory"/>
/// </param>
/// <returns>The unique reference ID assigned to the device</returns>
int CreateDevice(NewDeviceData deviceData);
/// <summary>
/// Create a new feature on a device in HomeSeer
/// </summary>
/// <param name="featureData">
/// <see cref="NewFeatureData"/> describing the feature produced by <see cref="FeatureFactory"/>
/// </param>
/// <returns>The unique reference ID assigned to the feature</returns>
int CreateFeatureForDevice(NewFeatureData featureData);
#endregion
#region Read
//Both
/// <summary>
/// Get a list of device/feature references that are associated with the specified plugin interface
/// </summary>
/// <param name="interfaceName">The ID of the plugin interface to get devices and features for</param>
/// <param name="deviceOnly"> Whether to get refs for devices or both devices and features</param>
/// <returns>A list of device/feature reference IDs</returns>
List<int> GetRefsByInterface(string interfaceName, bool deviceOnly = false);
/// <summary>
/// Get a map containing the value of a specific property for every device owned by a particular plugin
/// </summary>
/// <param name="interfaceName">The ID of the plugin that owns the devices</param>
/// <param name="property">The EProperty type to read</param>
/// <param name="deviceOnly">Whether the result should only contain devices or both devices and features</param>
/// <returns>A Dictionary of device/feature refs and the value of the EProperty requested</returns>
Dictionary<int, object> GetPropertyByInterface(string interfaceName, EProperty property, bool deviceOnly = false);
/// <summary>
/// Get the name of a specific device/feature by its <see cref="AbstractHsDevice.Ref"/>
/// </summary>
/// <param name="devOrFeatRef">The <see cref="AbstractHsDevice.Ref"/> of the <see cref="AbstractHsDevice"/> to read</param>
/// <returns>The name of the device/feature with the matching <see cref="AbstractHsDevice.Ref"/></returns>
string GetNameByRef(int devOrFeatRef);
/// <summary>
/// Determine if a specific device/feature <see cref="AbstractHsDevice.Ref"/> exists in the HomeSeer system
/// </summary>
/// <param name="devOrFeatRef">The <see cref="AbstractHsDevice.Ref"/> of the <see cref="AbstractHsDevice"/> to read</param>
/// <returns>TRUE if the <see cref="AbstractHsDevice.Ref"/> exists, FALSE if it does not</returns>
bool DoesRefExist(int devOrFeatRef);
/// <summary>
/// Get the value of the <see cref="EProperty"/> for the <see cref="AbstractHsDevice"/> with the specified <see cref="AbstractHsDevice.Ref"/>
/// </summary>
/// <param name="devOrFeatRef">The <see cref="AbstractHsDevice.Ref"/> of the <see cref="AbstractHsDevice"/> to read</param>
/// <param name="property">The <see cref="EProperty"/> to read</param>
/// <returns>The value of the requested <see cref="EProperty"/> of the <see cref="AbstractHsDevice"/></returns>
object GetPropertyByRef(int devOrFeatRef, EProperty property);
/// <summary>
/// Determine if a <see cref="EMiscFlag"/> is turned on for a particular <see cref="AbstractHsDevice"/>
/// </summary>
/// <param name="devOrFeatRef">The <see cref="AbstractHsDevice.Ref"/> of the <see cref="AbstractHsDevice"/> to read</param>
/// <param name="miscFlag">The <see cref="EMiscFlag"/> to read</param>
/// <returns>TRUE if the <see cref="AbstractHsDevice"/> found contains the specified <see cref="EMiscFlag"/>, FALSE if it doesn't</returns>
bool IsFlagOnRef(int devOrFeatRef, EMiscFlag miscFlag);
/// <summary>
/// Determine if the <see cref="AbstractHsDevice"/> with the specified <see cref="AbstractHsDevice.Ref"/> is a <see cref="HsDevice"/> or a <see cref="HsFeature"/> of a device
/// </summary>
/// <param name="devOrFeatRef">The <see cref="AbstractHsDevice.Ref"/> of the <see cref="AbstractHsDevice"/> to read</param>
/// <returns>TRUE if the <see cref="AbstractHsDevice"/> found is a <see cref="HsDevice"/>, FALSE if it is a <see cref="HsFeature"/></returns>
bool IsRefDevice(int devOrFeatRef);
/// <summary>
/// Get a list of all of the device and feature refs present in the HomeSeer system
/// <para>
/// To get just a list of devices, call <see cref="GetAllDeviceRefs"/>
/// or to get a list of features, call <see cref="GetAllFeatureRefs"/>
/// </para>
/// </summary>
/// <returns>A list of integers corresponding to the device and feature refs managed by the HomeSeer system</returns>
List<int> GetAllRefs();
//Devices
/// <summary>
/// Get the <see cref="AbstractHsDevice"/> as a <see cref="HsDevice"/> with the specified <see cref="AbstractHsDevice.Ref"/>.
/// The <see cref="HsDevice.Features"/> property will be empty. To include <see cref="HsFeature"/>s use <see cref="GetDeviceWithFeaturesByRef"/>
/// </summary>
/// <remarks>
/// Calling this using the <see cref="AbstractHsDevice.Ref"/> of a <see cref="HsFeature"/> may have adverse effects.
/// </remarks>
/// <param name="devRef">The <see cref="AbstractHsDevice.Ref"/> of the <see cref="AbstractHsDevice"/> to read</param>
/// <returns>A <see cref="HsDevice"/> whether it is a <see cref="Devices.Identification.ERelationship.Device"/> or <see cref="Devices.Identification.ERelationship.Feature"/></returns>
HsDevice GetDeviceByRef(int devRef);
/// <summary>
/// Get the <see cref="AbstractHsDevice"/> as a <see cref="HsDevice"/> with the specified <see cref="AbstractHsDevice.Ref"/>.
/// The <see cref="HsDevice.Features"/> property will be populated with associated features.
/// </summary>
/// <remarks>
/// Calling this using the <see cref="AbstractHsDevice.Ref"/> of a <see cref="HsFeature"/> may have adverse effects.
/// </remarks>
/// <param name="devRef">The <see cref="AbstractHsDevice.Ref"/> of the <see cref="AbstractHsDevice"/> to read</param>
/// <returns>A <see cref="HsDevice"/> whether it is a <see cref="Devices.Identification.ERelationship.Device"/> or <see cref="Devices.Identification.ERelationship.Feature"/></returns>
HsDevice GetDeviceWithFeaturesByRef(int devRef);
/// <summary>
/// Get the <see cref="AbstractHsDevice"/> as a <see cref="HsDevice"/> with the specified <see cref="AbstractHsDevice.Address"/>.
/// The <see cref="HsDevice.Features"/> property will be empty. To include <see cref="HsFeature"/>s use <see cref="GetDeviceWithFeaturesByRef"/>
/// </summary>
/// <remarks>
/// Calling this using the <see cref="AbstractHsDevice.Address"/> of a <see cref="HsFeature"/> may have adverse effects.
/// </remarks>
/// <param name="devAddress">The <see cref="AbstractHsDevice.Address"/> of the <see cref="AbstractHsDevice"/> to read</param>
/// <returns>A <see cref="HsDevice"/> whether it is a <see cref="Devices.Identification.ERelationship.Device"/> or <see cref="Devices.Identification.ERelationship.Feature"/></returns>
HsDevice GetDeviceByAddress(string devAddress);
/// <summary>
/// Get the first <see cref="AbstractHsDevice"/> found as a <see cref="HsDevice"/> with the specified Code.
/// </summary>
/// <remarks>
/// Calling this using the <see cref="AbstractHsDevice.Address"/> of a <see cref="HsFeature"/> may have adverse effects.
/// </remarks>
/// <remarks>
/// The Code field was used in HS3 and has been deprecated since. This method is for backwards compatibility support.
/// </remarks>
/// <param name="devCode">The Code of the <see cref="AbstractHsDevice"/> to read</param>
/// <returns>A <see cref="HsDevice"/> whether it is a <see cref="Devices.Identification.ERelationship.Device"/> or <see cref="Devices.Identification.ERelationship.Feature"/></returns>
/// <seealso cref="AbstractHsDevice.GetCodeFromAddressString"/>
HsDevice GetDeviceByCode(string devCode);
/// <summary>
/// Get a list of all of the device refs present in the HomeSeer system
/// <para>
/// This does not include refs for features. To get those in addition to these, use <see cref="GetAllRefs"/>
/// or call <see cref="GetAllFeatureRefs"/> to get a list of just features
/// </para>
/// </summary>
/// <returns>A list of integers corresponding to the device refs managed by the HomeSeer system</returns>
List<int> GetAllDeviceRefs();
/// <summary>
/// Get a list of all of the devices managed by the HomeSeer system without associated features.
/// <para>
/// WARNING - this is an expensive method to execute and it should be used with the utmost discretion
/// </para>
/// </summary>
/// <param name="withFeatures">
/// TRUE if associated features should be attached to their devices,
/// or FALSE if features should be left out.
/// </param>
/// <returns>
/// A list of <see cref="HsDevice"/>s managed by the HomeSeer system with or without associated features linked.
/// </returns>
List<HsDevice> GetAllDevices(bool withFeatures);
#if BETA
/// <summary>
/// Get a list of all of the device refs present in the HomeSeer system that match the specified pattern
/// </summary>
/// <param name="matchPattern">
/// The property state to match devices to. Create an instance of <see cref="HsDevice"/> and use
/// <see cref="AbstractHsDevice.Changes"/> for this parameter.
/// </param>
/// <returns>
/// A list of integers corresponding to the device refs managed by the HomeSeer system that match
/// the specified pattern.
/// </returns>
List<int> GetAllMatchingDeviceRefs(Dictionary<EProperty, object> matchPattern);
/// <summary>
/// Get a list of all of the devices present in the HomeSeer system that match the specified pattern
/// <para>
/// WARNING - this is an expensive method to execute and it should be used with the utmost discretion
/// </para>
/// </summary>
/// <param name="matchPattern">
/// The property state to match devices to. Create an instance of <see cref="HsDevice"/> and use
/// <see cref="AbstractHsDevice.Changes"/> for this parameter.
/// </param>
/// <param name="withFeatures">
/// TRUE if associated features should be attached to their devices,
/// or FALSE if features should be left out.
/// </param>
/// <returns>
/// A list of <see cref="HsDevice"/>s managed by the HomeSeer system that match the specified pattern.
/// </returns>
List<HsDevice> GetAllMatchingDevices(Dictionary<EProperty, object> matchPattern, bool withFeatures);
#endif
//Features
/// <summary>
/// Get the <see cref="AbstractHsDevice"/> as a <see cref="HsFeature"/> with the specified <see cref="AbstractHsDevice.Ref"/>.
/// </summary>
/// <remarks>
/// Calling this using the <see cref="AbstractHsDevice.Ref"/> of a <see cref="HsDevice"/> may have adverse effects.
/// </remarks>
/// <param name="featRef">The <see cref="AbstractHsDevice.Ref"/> of the <see cref="AbstractHsDevice"/> to read</param>
/// <returns>A <see cref="HsFeature"/> whether it is a <see cref="Devices.Identification.ERelationship.Device"/> or <see cref="Devices.Identification.ERelationship.Feature"/></returns>
HsFeature GetFeatureByRef(int featRef);
/// <summary>
/// Get the <see cref="AbstractHsDevice"/> as a <see cref="HsFeature"/> with the specified <see cref="AbstractHsDevice.Address"/>.
/// </summary>
/// <remarks>
/// Calling this using the <see cref="AbstractHsDevice.Address"/> of a <see cref="HsDevice"/> may have adverse effects.
/// </remarks>
/// <param name="featAddress">The <see cref="AbstractHsDevice.Address"/> of the <see cref="AbstractHsDevice"/> to read</param>
/// <returns>A <see cref="HsFeature"/> whether it is a <see cref="Devices.Identification.ERelationship.Device"/> or <see cref="Devices.Identification.ERelationship.Feature"/></returns>
HsFeature GetFeatureByAddress(string featAddress);
/// <summary>
/// Get the first <see cref="AbstractHsDevice"/> found as a <see cref="HsFeature"/> with the specified Code.
/// </summary>
/// <remarks>
/// Calling this using the <see cref="AbstractHsDevice.Address"/> of a <see cref="HsDevice"/> may have adverse effects.
/// </remarks>
/// <remarks>
/// The Code field was used in HS3 and has been deprecated since. This method is for backwards compatibility support.
/// </remarks>
/// <param name="featCode">The Code of the <see cref="AbstractHsDevice"/> to read</param>
/// <returns>A <see cref="HsFeature"/> whether it is a <see cref="Devices.Identification.ERelationship.Device"/> or <see cref="Devices.Identification.ERelationship.Feature"/></returns>
/// <seealso cref="AbstractHsDevice.GetCodeFromAddressString"/>
HsFeature GetFeatureByCode(string featCode);
/// <summary>
/// Determine if the current status value of a <see cref="HsFeature"/> is considered valid.
/// This calls <see cref="HsFeature.IsValueValid"/> on the <see cref="HsFeature"/> to determine validity.
/// </summary>
/// <param name="featRef">The <see cref="AbstractHsDevice.Ref"/> of the <see cref="HsFeature"/> to read</param>
/// <returns>The result of <see cref="HsFeature.IsValueValid"/></returns>
bool IsFeatureValueValid(int featRef);
/// <summary>
/// Get a list of all of the feature refs present in the HomeSeer system
/// <para>
/// This does not include refs for devices. To get those in addition to these, use <see cref="GetAllRefs"/>
/// or call <see cref="GetAllDeviceRefs"/> to get a list of just devices
/// </para>
/// </summary>
/// <returns>A list of integers corresponding to the feature refs managed by the HomeSeer system</returns>
List<int> GetAllFeatureRefs();
#if BETA
/// <summary>
/// Get a list of all of the feature refs present in the HomeSeer system that match the specified pattern
/// </summary>
/// <param name="matchPattern">
/// The property state to match features to. Create an instance of <see cref="HsFeature"/> and use
/// <see cref="AbstractHsDevice.Changes"/> for this parameter.
/// </param>
/// <returns>
/// A list of integers corresponding to the feature refs managed by the HomeSeer system that match
/// the specified pattern.
/// </returns>
List<int> GetAllMatchingFeatureRefs(Dictionary<EProperty, object> matchPattern);
/// <summary>
/// Get a list of all of the features present in the HomeSeer system that match the specified pattern
/// <para>
/// WARNING - this is an expensive method to execute and it should be used with the utmost discretion
/// </para>
/// </summary>
/// <param name="matchPattern">
/// The property state to match features to. Create an instance of <see cref="HsFeature"/> and use
/// <see cref="AbstractHsDevice.Changes"/> for this parameter.
/// </param>
/// <returns>A list of features managed by the HomeSeer system that match the specified pattern.</returns>
List<HsFeature> GetAllMatchingFeatures(Dictionary<EProperty, object> matchPattern);
#endif
/// <summary>
/// Get the <see cref="StatusControl"/> for a value on an <see cref="HsFeature"/>
/// </summary>
/// <param name="featRef">The <see cref="AbstractHsDevice.Ref"/> of the <see cref="AbstractHsDevice"/> to read</param>
/// <param name="value">The <see cref="AbstractHsDevice.Value"/> managed by the <see cref="StatusControl"/></param>
/// <returns>A <see cref="StatusControl"/> that manages the value specified for the <see cref="HsFeature"/></returns>
StatusControl GetStatusControlForValue(int featRef, double value);
/// <summary>
/// Get the <see cref="StatusControl"/> for a <see cref="StatusControl.Label"/> on an <see cref="HsFeature"/>
/// </summary>
/// <param name="featRef">The <see cref="AbstractHsDevice.Ref"/> of the <see cref="AbstractHsDevice"/> to read</param>
/// <param name="label">The <see cref="StatusControl.Label"/> used by the <see cref="StatusControl"/></param>
/// <returns>A <see cref="StatusControl"/> with the specified <see cref="StatusControl.Label"/> for the <see cref="HsFeature"/></returns>
StatusControl GetStatusControlForLabel(int featRef, string label);
/// <summary>
/// Get a list of <see cref="StatusControl"/>s for a range of values on an <see cref="HsFeature"/>
/// </summary>
/// <param name="featRef">The <see cref="AbstractHsDevice.Ref"/> of the <see cref="AbstractHsDevice"/> to read</param>
/// <param name="min">The minimum value of the range</param>
/// <param name="max">The maximum value of the range</param>
/// <returns>A list of <see cref="StatusControl"/>s for a range of values on the <see cref="HsFeature"/></returns>
List<StatusControl> GetStatusControlsForRange(int featRef, double min, double max);
/// <summary>
/// Get the number of <see cref="StatusControl"/>s associated with an <see cref="HsFeature"/>
/// </summary>
/// <param name="featRef">The <see cref="AbstractHsDevice.Ref"/> of the <see cref="AbstractHsDevice"/> to read</param>
/// <returns>The number of <see cref="StatusControl"/>s for the <see cref="HsFeature"/></returns>
int GetStatusControlCountByRef(int featRef);
/// <summary>
/// Get a list of <see cref="StatusControl"/>s associated with an <see cref="HsFeature"/>
/// </summary>
/// <param name="featRef">The <see cref="AbstractHsDevice.Ref"/> of the <see cref="AbstractHsDevice"/> to read</param>
/// <returns>The list of <see cref="StatusControl"/>s for the <see cref="HsFeature"/></returns>
List<StatusControl> GetStatusControlsByRef(int featRef);
/// <summary>
/// Get the <see cref="StatusControlCollection"/> describing all of the <see cref="StatusControl"/>s associated with
/// an <see cref="HsFeature"/>
/// </summary>
/// <param name="featRef">The <see cref="AbstractHsDevice.Ref"/> of the <see cref="AbstractHsDevice"/> to read</param>
/// <returns>The <see cref="StatusControlCollection"/> for the <see cref="HsFeature"/></returns>
StatusControlCollection GetStatusControlCollectionByRef(int featRef);
/// <summary>
/// Get the <see cref="StatusGraphic"/> for a value on an <see cref="HsFeature"/>
/// </summary>
/// <param name="featRef">The <see cref="AbstractHsDevice.Ref"/> of the <see cref="AbstractHsDevice"/> to read</param>
/// <param name="value">The <see cref="AbstractHsDevice.Value"/> managed by the <see cref="StatusGraphic"/></param>
/// <returns>A <see cref="StatusGraphic"/> that manages the value specified for the <see cref="HsFeature"/></returns>
StatusGraphic GetStatusGraphicForValue(int featRef, double value);
/// <summary>
/// Get a list of <see cref="StatusGraphic"/>s for a range of values on an <see cref="HsFeature"/>
/// </summary>
/// <param name="featRef">The <see cref="AbstractHsDevice.Ref"/> of the <see cref="AbstractHsDevice"/> to read</param>
/// <param name="min">The minimum value of the range</param>
/// <param name="max">The maximum value of the range</param>
/// <returns></returns>
List<StatusGraphic> GetStatusGraphicsForRange(int featRef, double min, double max);
/// <summary>
/// Get the number of <see cref="StatusGraphic"/>s associated with an <see cref="HsFeature"/>
/// </summary>
/// <param name="featRef">The <see cref="AbstractHsDevice.Ref"/> of the <see cref="AbstractHsDevice"/> to read</param>
/// <returns>The number of <see cref="StatusGraphic"/>s for the <see cref="HsFeature"/></returns>
int GetStatusGraphicCountByRef(int featRef);
/// <summary>
/// Get a list of <see cref="StatusGraphic"/>s associated with an <see cref="HsFeature"/>
/// </summary>
/// <param name="featRef">The <see cref="AbstractHsDevice.Ref"/> of the <see cref="AbstractHsDevice"/> to read</param>
/// <returns>The list of <see cref="StatusGraphic"/>s for the <see cref="HsFeature"/></returns>
List<StatusGraphic> GetStatusGraphicsByRef(int featRef);
#endregion
#region Update
/// <summary>
/// <para>
/// Update some properties on a device
/// </para>
/// <para>
/// The collection of changes passed as parameter is usually <see cref="AbstractHsDevice.Changes"/>
/// </para>
/// </summary>
/// <param name="devRef">The <see cref="AbstractHsDevice.Ref"/> of the <see cref="HsDevice"/> to update</param>
/// <param name="changes">A collection of <see cref="EProperty"/> with their new values</param>
/// <returns>The updated <see cref="HsDevice"/></returns>
HsDevice UpdateDeviceByRef(int devRef, Dictionary<EProperty, object> changes);
/// <summary>
/// <para>
/// Update some properties on a feature
/// </para>
/// <para>
/// The collection of changes passed as parameter is usually <see cref="AbstractHsDevice.Changes"/>
/// </para>
/// </summary>
/// <remarks>
/// Do not use this method to update <see cref="EProperty.StatusControls"/> or <see cref="EProperty.StatusGraphics"/>.
/// Instead, use <see cref="AddStatusControlToFeature"/>, <see cref="DeleteStatusControlByValue"/>, <see cref="ClearStatusControlsByRef"/>,
/// <see cref="AddStatusGraphicToFeature"/>, <see cref="DeleteStatusGraphicByValue"/>, <see cref="ClearStatusGraphicsByRef"/>
/// </remarks>
/// <param name="featRef">The <see cref="AbstractHsDevice.Ref"/> of the <see cref="HsFeature"/> to update</param>
/// <param name="changes">A collection of <see cref="EProperty"/> with their new values</param>
/// <returns>The updated <see cref="HsFeature"/></returns>
HsFeature UpdateFeatureByRef(int featRef, Dictionary<EProperty, object> changes);
/// <summary>
/// <para>
/// Update one property on a device or a feature
/// </para>
/// <para>
/// When used with <see cref="EProperty.Value"/>, this is the same as the legacy method SetDeviceValueByRef(Integer, Double, False).
/// This does not fire a control event to the owning <see cref="AbstractHsDevice.Interface"/>.
/// Use <see cref="SendControlForFeatureByValue"/> to control a device you do not own.
/// </para>
/// </summary>
/// <remarks>
/// Do not use this method to update <see cref="EProperty.StatusControls"/> or <see cref="EProperty.StatusGraphics"/>.
/// Instead, use <see cref="AddStatusControlToFeature"/>, <see cref="DeleteStatusControlByValue"/>, <see cref="ClearStatusControlsByRef"/>,
/// <see cref="AddStatusGraphicToFeature"/>, <see cref="DeleteStatusGraphicByValue"/>, <see cref="ClearStatusGraphicsByRef"/>
/// </remarks>
/// <param name="devOrFeatRef">The <see cref="AbstractHsDevice.Ref"/> of the <see cref="AbstractHsDevice"/> to update</param>
/// <param name="property">The <see cref="EProperty"/> to update</param>
/// <param name="value">The new value for this property</param>
void UpdatePropertyByRef(int devOrFeatRef, EProperty property, object value);
/// <summary>
/// <para>
/// Set the value on a feature and trigger HomeSeer to process the update to update the status accordingly.
/// </para>
/// <para>
/// To update the value without triggering HomeSeer to process the update, call
/// <see cref="UpdatePropertyByRef"/>
/// </para>
/// <para>
/// This does not fire a control event to the owning <see cref="AbstractHsDevice.Interface"/>.
/// Use <see cref="SendControlForFeatureByValue"/> to control a device you do not own.
/// </para>
/// </summary>
/// <remarks>
/// This is the same as the legacy method SetDeviceValueByRef(Integer, Double, True).
/// </remarks>
/// <param name="featRef">The unique reference of the feature to control</param>
/// <param name="value">The new value to set on the feature</param>
/// <returns>TRUE if the control sent correctly, FALSE if there was a problem</returns>
bool UpdateFeatureValueByRef(int featRef, double value);
/// <summary>
/// <para>
/// Set the value on a feature by string and trigger HomeSeer to process the update to update the status
/// accordingly
/// </para>
/// <para>
/// This does not fire a control event to the owning <see cref="AbstractHsDevice.Interface"/>.
/// Use <see cref="SendControlForFeatureByValue"/> to control a device you do not own.
/// </para>
/// </summary>
/// <remarks>
/// This is the same as the legacy method SetDeviceString(Integer, String, True)
/// </remarks>
/// <param name="featRef">The unique reference of the feature to control</param>
/// <param name="value">The new value to set on the feature</param>
/// <returns>TRUE if the control sent correctly, FALSE if there was a problem</returns>
bool UpdateFeatureValueStringByRef(int featRef, string value);
/// <summary>
/// Add a <see cref="StatusControl"/> to the collection of <see cref="StatusControl"/>s associated with an <see cref="HsFeature"/>
/// </summary>
/// <param name="featRef">The <see cref="AbstractHsDevice.Ref"/> of the <see cref="HsFeature"/> to update</param>
/// <param name="statusControl">The <see cref="StatusControl"/> to add</param>
void AddStatusControlToFeature(int featRef, StatusControl statusControl);
/// <summary>
/// Delete a <see cref="StatusControl"/> in the collection of <see cref="StatusControl"/>s associated with an <see cref="HsFeature"/>
/// </summary>
/// <param name="featRef">The <see cref="AbstractHsDevice.Ref"/> of the <see cref="HsFeature"/> to update</param>
/// <param name="value">The value of the <see cref="StatusControl"/> to delete</param>
/// <returns>true if the deletion succeeded, otherwise false</returns>
bool DeleteStatusControlByValue(int featRef, double value);
/// <summary>
/// Delete all <see cref="StatusControl"/>s associated with an <see cref="HsFeature"/>
/// </summary>
/// <param name="featRef">The <see cref="AbstractHsDevice.Ref"/> of the <see cref="HsFeature"/> to update</param>
void ClearStatusControlsByRef(int featRef);
/// <summary>
/// Add a <see cref="StatusGraphic"/> to the collection of <see cref="StatusGraphic"/>s associated with an <see cref="HsFeature"/>
/// </summary>
/// <param name="featRef">The <see cref="AbstractHsDevice.Ref"/> of the <see cref="HsFeature"/> to update</param>
/// <param name="statusGraphic">The <see cref="StatusGraphic"/> to add</param>
void AddStatusGraphicToFeature(int featRef, StatusGraphic statusGraphic);
/// <summary>
/// Delete a <see cref="StatusGraphic"/> in the collection of <see cref="StatusGraphic"/>s associated with an <see cref="HsFeature"/>
/// </summary>
/// <param name="featRef">The <see cref="AbstractHsDevice.Ref"/> of the <see cref="HsFeature"/> to update</param>
/// <param name="value">The value of the <see cref="StatusGraphic"/> to delete</param>
/// <returns>true if the deletion succeeded, otherwise false</returns>
bool DeleteStatusGraphicByValue(int featRef, double value);
/// <summary>
/// Delete all <see cref="StatusGraphic"/>s associated with an <see cref="HsFeature"/>
/// </summary>
/// <param name="featRef">The <see cref="AbstractHsDevice.Ref"/> of the <see cref="HsFeature"/> to update</param>
void ClearStatusGraphicsByRef(int featRef);
#endregion
#region Delete
/// <summary>
/// Delete the <see cref="HsDevice"/> with the specified <see cref="AbstractHsDevice.Ref"/> and all
/// other <see cref="AbstractHsDevice"/>s associated with it.
/// </summary>
/// <param name="devRef">The <see cref="AbstractHsDevice.Ref"/> of the <see cref="HsDevice"/> to delete</param>
/// <returns>
/// TRUE if the <see cref="HsDevice"/> was deleted, FALSE if there was an error.
/// Check the HS logs for more info on the error.
/// </returns>
/// <exception cref="ArgumentException">
/// Thrown when the specified <paramref name="devRef"/> refers to a <see cref="HsFeature"/> and
/// not a <see cref="HsDevice"/>.
/// </exception>
bool DeleteDevice(int devRef);
/// <summary>
/// Delete the <see cref="HsFeature"/> with the specified <see cref="AbstractHsDevice.Ref"/>
/// </summary>
/// <param name="featRef">The <see cref="AbstractHsDevice.Ref"/> of the <see cref="HsFeature"/> to delete</param>
/// <returns>
/// TRUE if the <see cref="HsFeature"/> was deleted, FALSE if there was an error.
/// Check the HS logs for more info on the error.
/// </returns>
bool DeleteFeature(int featRef);
/// <summary>
/// Delete all devices, and their corresponding features, from the HomeSeer system that are managed by
/// the specified plugin interface
/// </summary>
/// <param name="interfaceName">
/// The name of the interface that owns all of the devices and features to delete. This is usually the plugin Id
/// </param>
/// <returns>TRUE if the delete was successful, FALSE if there was a problem during the process.</returns>
bool DeleteDevicesByInterface(string interfaceName);
#endregion
#region Control
/// <summary>
/// <para>
/// Send a control request through HomeSeer to the <see cref="AbstractPlugin.SetIOMulti"/> implementation for
/// the <see cref="AbstractHsDevice.Interface"/> that owns the device.
/// </para>
/// <para>
/// If you own the device being controlled, you should be calling <see cref="UpdateFeatureValueByRef"/>,
/// <see cref="UpdateFeatureValueStringByRef"/>, or <see cref="UpdatePropertyByRef"/> respectively.
/// </para>
/// </summary>
/// <remarks>
/// This is the same as the legacy method CAPIControlHandler(CAPIControl)
/// </remarks>
/// <param name="devOrFeatRef">
/// The <see cref="AbstractHsDevice.Ref"/> of the device or feature to control. You should only be pointing at
/// <see cref="HsDevice"/> instead of its <see cref="HsFeature"/> for legacy devices.
/// </param>
/// <param name="value">
/// The value corresponding with the <see cref="StatusControl.TargetValue"/> or
/// <see cref="StatusControl.TargetRange"/> to send a control event for
/// </param>
/// <returns>True if the control event succeeded, False if an error was reported</returns>
bool SendControlForFeatureByValue(int devOrFeatRef, double value);
/// <summary>
/// <para>
/// Send a control request through HomeSeer to the <see cref="AbstractPlugin.SetIOMulti"/> implementation for
/// the <see cref="AbstractHsDevice.Interface"/> that owns the device.
/// This is different than <see cref="SendControlForFeatureByValue"/> because the value that describes the
/// desired control outcome is encoded into a string and cannot be described by a double.
/// </para>
/// <para>
/// If you own the device being controlled, you should be calling <see cref="UpdateFeatureValueByRef"/>,
/// <see cref="UpdateFeatureValueStringByRef"/>, or <see cref="UpdatePropertyByRef"/> respectively.
/// </para>
/// </summary>
/// <remarks>
/// This is the same as the legacy method CAPIControlHandler(CAPIControl)
/// <para>
/// Most simple features use a single value within a range of decimal numbers to control their state.
/// These situations can easily be hardcoded as <see cref="StatusControl"/>s allowing HomeSeer to automatically
/// handle processing control requests tied to these values. IE A dimmable light uses a value of 0-100
/// to determine what state it is in. This usually requires 3 <see cref="StatusControl"/>s:
/// one for off (0), one for a variable on state (1-99), and one for full brightness (100)
/// This does not work well for values that cannot be described by a range of decimal numbers or require more
/// than a handful of <see cref="StatusControl"/>s.
/// When a more complex data value is required to describe the desired state to set the feature to,
/// a string is used. IE the color of a light uses a value from 0-16777216.
/// That requires 16777216 different <see cref="StatusControl"/>s. It is more efficient to send the raw value
/// to the handling plugin for processing.
/// </para>
/// </remarks>
/// <param name="devOrFeatRef">
/// The <see cref="AbstractHsDevice.Ref"/> of the device or feature to control. You should only be pointing at
/// <see cref="HsDevice"/> instead of its <see cref="HsFeature"/> for legacy devices.
/// </param>
/// <param name="controlValue">
/// The value corresponding with the <see cref="StatusControl.TargetValue"/> or
/// <see cref="StatusControl.TargetRange"/> of the <see cref="StatusControl"/> to select
/// and include in the <see cref="ControlEvent"/> being sent to the owning plugin.
/// </param>
/// <param name="controlString">
/// The desired value to send to the control for processing. This is passed to <see cref="ControlEvent.ControlString"/>
/// </param>
/// <returns>True if the control event succeeded, False if an error was reported</returns>
bool SendControlForFeatureByString(int devOrFeatRef, double controlValue, string controlString);
#endregion
#endregion
#region Events
#region Create
/// <summary>
/// Create a new event with a specific name in a particular group
/// </summary>
/// <remarks>
/// PLEASE NOTE: This was ported directly from the legacy HS3 API and has not been fully reviewed to ensure
/// proper compatibility and support through this SDK. This may undergo significant change in the near future.
/// Please use with caution.
/// </remarks>
/// <param name="name">The name of the new event</param>
/// <param name="group">The group to add the event to</param>
/// <returns>The Ref of the new event</returns>
int CreateEventWithNameInGroup(string name, string group);
#endregion
#region Read
/// <summary>
/// Get the name of the event with the specific Ref
/// </summary>
/// <remarks>
/// PLEASE NOTE: This was ported directly from the legacy HS3 API and has not been fully reviewed to ensure
/// proper compatibility and support through this SDK. This may undergo significant change in the near future.
/// Please use with caution.
/// </remarks>
/// <param name="eventRef">The Ref of the event to read</param>
/// <returns>The name of the event</returns>
string GetEventNameByRef(int eventRef);
/// <summary>
/// Get the DateTime of the last time a specific event was triggered
/// </summary>
/// <remarks>
/// PLEASE NOTE: This was ported directly from the legacy HS3 API and has not been fully reviewed to ensure
/// proper compatibility and support through this SDK. This may undergo significant change in the near future.
/// Please use with caution.
/// </remarks>
/// <param name="evRef">The Ref of the event to read</param>
/// <returns>The DateTime the event was last triggered</returns>
DateTime GetEventTriggerTime(int evRef);
/// <summary>
/// Get the voice command attached to an event
/// </summary>
/// <remarks>
/// PLEASE NOTE: This was ported directly from the legacy HS3 API and has not been fully reviewed to ensure
/// proper compatibility and support through this SDK. This may undergo significant change in the near future.
/// Please use with caution.
/// </remarks>
/// <param name="evRef">The Ref of the event to read</param>
/// <returns>The voice command string set on the event</returns>
string GetEventVoiceCommand(int evRef);
/// <summary>
/// Get the Ref of an event by name
/// </summary>
/// <remarks>
/// PLEASE NOTE: This was ported directly from the legacy HS3 API and has not been fully reviewed to ensure
/// proper compatibility and support through this SDK. This may undergo significant change in the near future.
/// Please use with caution.
/// </remarks>
/// <param name="eventName">The name of the event to read</param>
/// <returns>The Ref of the event</returns>
int GetEventRefByName(string eventName);
/// <summary>
/// Get the Ref of an event by its name and the group it is in
/// </summary>
/// <remarks>
/// PLEASE NOTE: This was ported directly from the legacy HS3 API and has not been fully reviewed to ensure
/// proper compatibility and support through this SDK. This may undergo significant change in the near future.
/// Please use with caution.
/// </remarks>
/// <param name="eventName">The name of the event</param>
/// <param name="eventGroup">The name of the group</param>
/// <returns>The Ref of the event</returns>
int GetEventRefByNameAndGroup(string eventName, string eventGroup);
/// <summary>
/// Get the data for an event group
/// </summary>
/// <remarks>
/// PLEASE NOTE: This was ported directly from the legacy HS3 API and has not been fully reviewed to ensure
/// proper compatibility and support through this SDK. This may undergo significant change in the near future.
/// Please use with caution.
/// </remarks>
/// <param name="groupRef">The Ref of the group</param>
/// <returns>The data of the event group</returns>
EventGroupData GetEventGroupById(int groupRef);
/// <summary>
/// Get the data for all event groups
/// </summary>
/// <remarks>
/// PLEASE NOTE: This was ported directly from the legacy HS3 API and has not been fully reviewed to ensure
/// proper compatibility and support through this SDK. This may undergo significant change in the near future.
/// Please use with caution.
/// </remarks>
/// <returns>A list of all of the event groups</returns>
List<EventGroupData> GetAllEventGroups();
/// <summary>
/// Get the data for an event
/// </summary>
/// <remarks>
/// PLEASE NOTE: This was ported directly from the legacy HS3 API and has not been fully reviewed to ensure
/// proper compatibility and support through this SDK. This may undergo significant change in the near future.
/// Please use with caution.
/// </remarks>
/// <param name="eventRef">The Ref of the event</param>
/// <returns>The data of the event</returns>
EventData GetEventByRef(int eventRef);
/// <summary>
/// Get the data for all of the events
/// </summary>
/// <remarks>
/// PLEASE NOTE: This was ported directly from the legacy HS3 API and has not been fully reviewed to ensure
/// proper compatibility and support through this SDK. This may undergo significant change in the near future.
/// Please use with caution.
/// </remarks>
/// <returns>A list of all of the events</returns>
List<EventData> GetAllEvents();
/// <summary>
/// Get all of the events in a particular group
/// </summary>
/// <remarks>
/// PLEASE NOTE: This was ported directly from the legacy HS3 API and has not been fully reviewed to ensure
/// proper compatibility and support through this SDK. This may undergo significant change in the near future.
/// Please use with caution.
/// </remarks>
/// <param name="groupId">The Ref of the event group</param>
/// <returns>A list of all of the events in the event group</returns>
List<EventData> GetEventsByGroup(int groupId);
/// <summary>
/// Get all of the event actions managed by a specific plugin
/// </summary>
/// <remarks>
/// PLEASE NOTE: This was ported directly from the legacy HS3 API and has not been fully reviewed to ensure
/// proper compatibility and support through this SDK. This may undergo significant change in the near future.
/// Please use with caution.
/// </remarks>
/// <param name="pluginId">The ID of the plugin
/// <remarks>If you are targeting a actiona owned by a legacy plugin, use the IPlugInAPI.Name of the plugin for <paramref name="pluginId"/></remarks>
/// </param>
/// <returns>A list of all of the actions managed by the plugin</returns>
List<TrigActInfo> GetActionsByInterface(string pluginId);
/// <summary>
/// Determine if logging is enabled on an event
/// </summary>
/// <remarks>
/// PLEASE NOTE: This was ported directly from the legacy HS3 API and has not been fully reviewed to ensure
/// proper compatibility and support through this SDK. This may undergo significant change in the near future.
/// Please use with caution.
/// </remarks>
/// <param name="eventRef">The Ref of the event</param>
/// <returns>TRUE if logging is enabled for the event</returns>
bool IsEventLoggingEnabledByRef(int eventRef);
/// <summary>
/// Determine if an event is enabled or not
/// </summary>
/// <remarks>
/// PLEASE NOTE: This was ported directly from the legacy HS3 API and has not been fully reviewed to ensure
/// proper compatibility and support through this SDK. This may undergo significant change in the near future.
/// Please use with caution.
/// </remarks>
/// <param name="evRef">The Ref of the event</param>
/// <returns>TRUE if the event is enabled</returns>
bool EventEnabled(int evRef);
/// <summary>
/// The number of events configured on the HomeSeer system
/// </summary>
/// <remarks>
/// PLEASE NOTE: This was ported directly from the legacy HS3 API and has not been fully reviewed to ensure
/// proper compatibility and support through this SDK. This may undergo significant change in the near future.
/// Please use with caution.
/// </remarks>
int EventCount { get; }
/// <summary>
/// Determine if an event with a particular Ref exists
/// </summary>
/// <remarks>
/// PLEASE NOTE: This was ported directly from the legacy HS3 API and has not been fully reviewed to ensure
/// proper compatibility and support through this SDK. This may undergo significant change in the near future.
/// Please use with caution.
/// </remarks>
/// <param name="evRef">The Ref of the event</param>
/// <returns>TRUE if an event with the specified Ref exists</returns>
bool EventExistsByRef(int evRef);
/// <summary>
/// Get all of the triggers managed by a specific plugin
/// </summary>
/// <remarks>
/// PLEASE NOTE: This was ported directly from the legacy HS3 API and has not been fully reviewed to ensure
/// proper compatibility and support through this SDK. This may undergo significant change in the near future.
/// Please use with caution.
/// </remarks>
/// <param name="pluginId">The ID of the plugin
/// <remarks>If you are targeting triggers owned by a legacy plugin, use the IPlugInAPI.Name of the plugin for <paramref name="pluginId"/></remarks>
/// </param>
/// <returns>An array of triggers managed by the plugin</returns>
TrigActInfo[] GetTriggersByInterface(string pluginId);
#endregion
#region Update
/// <summary>
/// Run an event causing it to execute its actions
/// </summary>
/// <remarks>
/// PLEASE NOTE: This was ported directly from the legacy HS3 API and has not been fully reviewed to ensure
/// proper compatibility and support through this SDK. This may undergo significant change in the near future.
/// Please use with caution.
/// </remarks>
/// <param name="eventRef">The Ref of the event</param>
/// <returns>TRUE if the event run started successfully. This does not indicate that the actions succeeded.</returns>
bool TriggerEventByRef(int eventRef);
/// <remarks>
/// PLEASE NOTE: This was ported directly from the legacy HS3 API and has not been fully reviewed to ensure
/// proper compatibility and support through this SDK. This may undergo significant change in the near future.
/// Please use with caution.
/// </remarks>
string AddDeviceActionToEvent(int evRef, ControlEvent CC);
/// <remarks>
/// PLEASE NOTE: This was ported directly from the legacy HS3 API and has not been fully reviewed to ensure
/// proper compatibility and support through this SDK. This may undergo significant change in the near future.
/// Please use with caution.
/// </remarks>
bool EventSetTimeTrigger(int evRef, DateTime DT);
/// <remarks>
/// PLEASE NOTE: This was ported directly from the legacy HS3 API and has not been fully reviewed to ensure
/// proper compatibility and support through this SDK. This may undergo significant change in the near future.
/// Please use with caution.
/// </remarks>
bool EventSetRecurringTrigger(int evRef, TimeSpan Frequency, bool Once_Per_Hour, bool Reference_To_Hour);
/// <remarks>
/// PLEASE NOTE: This was ported directly from the legacy HS3 API and has not been fully reviewed to ensure
/// proper compatibility and support through this SDK. This may undergo significant change in the near future.
/// Please use with caution.
/// </remarks>
void AddActionRunScript(int @ref, string script, string method, string parms);
/// <summary>