@nebulahome/integration-sdk 1.1.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -333,6 +333,69 @@
333
333
  }
334
334
  }
335
335
  ]
336
+ },
337
+ "mac": {
338
+ "anyOf": [
339
+ {
340
+ "type": "string",
341
+ "minLength": 1,
342
+ "maxLength": 256,
343
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
344
+ },
345
+ {
346
+ "minItems": 1,
347
+ "maxItems": 4,
348
+ "type": "array",
349
+ "items": {
350
+ "type": "string",
351
+ "minLength": 1,
352
+ "maxLength": 256,
353
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
354
+ }
355
+ }
356
+ ]
357
+ },
358
+ "serialNumber": {
359
+ "anyOf": [
360
+ {
361
+ "type": "string",
362
+ "minLength": 1,
363
+ "maxLength": 256,
364
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
365
+ },
366
+ {
367
+ "minItems": 1,
368
+ "maxItems": 4,
369
+ "type": "array",
370
+ "items": {
371
+ "type": "string",
372
+ "minLength": 1,
373
+ "maxLength": 256,
374
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
375
+ }
376
+ }
377
+ ]
378
+ },
379
+ "auth": {
380
+ "anyOf": [
381
+ {
382
+ "type": "string",
383
+ "minLength": 1,
384
+ "maxLength": 256,
385
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
386
+ },
387
+ {
388
+ "minItems": 1,
389
+ "maxItems": 4,
390
+ "type": "array",
391
+ "items": {
392
+ "type": "string",
393
+ "minLength": 1,
394
+ "maxLength": 256,
395
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
396
+ }
397
+ }
398
+ ]
336
399
  }
337
400
  },
338
401
  "additionalProperties": false
@@ -534,6 +597,497 @@
534
597
  ],
535
598
  "additionalProperties": false
536
599
  },
600
+ "mqtt": {
601
+ "type": "object",
602
+ "properties": {
603
+ "match": {
604
+ "minItems": 1,
605
+ "maxItems": 16,
606
+ "type": "array",
607
+ "items": {
608
+ "anyOf": [
609
+ {
610
+ "type": "object",
611
+ "properties": {
612
+ "path": {
613
+ "type": "string",
614
+ "minLength": 1,
615
+ "maxLength": 256,
616
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
617
+ },
618
+ "equals": {
619
+ "type": [
620
+ "string",
621
+ "number",
622
+ "boolean"
623
+ ]
624
+ }
625
+ },
626
+ "required": [
627
+ "path",
628
+ "equals"
629
+ ],
630
+ "additionalProperties": false
631
+ },
632
+ {
633
+ "type": "object",
634
+ "properties": {
635
+ "path": {
636
+ "type": "string",
637
+ "minLength": 1,
638
+ "maxLength": 256,
639
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
640
+ },
641
+ "exists": {
642
+ "type": "boolean",
643
+ "const": true
644
+ }
645
+ },
646
+ "required": [
647
+ "path",
648
+ "exists"
649
+ ],
650
+ "additionalProperties": false
651
+ },
652
+ {
653
+ "type": "object",
654
+ "properties": {
655
+ "path": {
656
+ "type": "string",
657
+ "minLength": 1,
658
+ "maxLength": 256,
659
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
660
+ },
661
+ "oneOf": {
662
+ "minItems": 1,
663
+ "maxItems": 64,
664
+ "type": "array",
665
+ "items": {
666
+ "type": [
667
+ "string",
668
+ "number",
669
+ "boolean"
670
+ ]
671
+ }
672
+ }
673
+ },
674
+ "required": [
675
+ "path",
676
+ "oneOf"
677
+ ],
678
+ "additionalProperties": false
679
+ },
680
+ {
681
+ "type": "object",
682
+ "properties": {
683
+ "path": {
684
+ "type": "string",
685
+ "minLength": 1,
686
+ "maxLength": 256,
687
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
688
+ },
689
+ "startsWith": {
690
+ "type": "string",
691
+ "minLength": 1,
692
+ "maxLength": 64
693
+ }
694
+ },
695
+ "required": [
696
+ "path",
697
+ "startsWith"
698
+ ],
699
+ "additionalProperties": false
700
+ },
701
+ {
702
+ "type": "object",
703
+ "properties": {
704
+ "path": {
705
+ "type": "string",
706
+ "minLength": 1,
707
+ "maxLength": 256,
708
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
709
+ },
710
+ "endsWith": {
711
+ "type": "string",
712
+ "minLength": 1,
713
+ "maxLength": 64
714
+ }
715
+ },
716
+ "required": [
717
+ "path",
718
+ "endsWith"
719
+ ],
720
+ "additionalProperties": false
721
+ },
722
+ {
723
+ "type": "object",
724
+ "properties": {
725
+ "path": {
726
+ "type": "string",
727
+ "minLength": 1,
728
+ "maxLength": 256,
729
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
730
+ },
731
+ "contains": {
732
+ "type": [
733
+ "string",
734
+ "number",
735
+ "boolean"
736
+ ]
737
+ }
738
+ },
739
+ "required": [
740
+ "path",
741
+ "contains"
742
+ ],
743
+ "additionalProperties": false
744
+ },
745
+ {
746
+ "type": "object",
747
+ "properties": {
748
+ "path": {
749
+ "type": "string",
750
+ "minLength": 1,
751
+ "maxLength": 256,
752
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
753
+ },
754
+ "min": {
755
+ "type": "number"
756
+ },
757
+ "max": {
758
+ "type": "number"
759
+ }
760
+ },
761
+ "required": [
762
+ "path"
763
+ ],
764
+ "additionalProperties": false
765
+ }
766
+ ]
767
+ }
768
+ },
769
+ "model": {
770
+ "default": "model",
771
+ "anyOf": [
772
+ {
773
+ "type": "string",
774
+ "minLength": 1,
775
+ "maxLength": 256,
776
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
777
+ },
778
+ {
779
+ "minItems": 1,
780
+ "maxItems": 4,
781
+ "type": "array",
782
+ "items": {
783
+ "type": "string",
784
+ "minLength": 1,
785
+ "maxLength": 256,
786
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
787
+ }
788
+ }
789
+ ]
790
+ }
791
+ },
792
+ "required": [
793
+ "match"
794
+ ],
795
+ "additionalProperties": false
796
+ },
797
+ "modbus": {
798
+ "type": "object",
799
+ "properties": {
800
+ "match": {
801
+ "minItems": 1,
802
+ "maxItems": 16,
803
+ "type": "array",
804
+ "items": {
805
+ "anyOf": [
806
+ {
807
+ "type": "object",
808
+ "properties": {
809
+ "path": {
810
+ "type": "string",
811
+ "minLength": 1,
812
+ "maxLength": 256,
813
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
814
+ },
815
+ "equals": {
816
+ "type": [
817
+ "string",
818
+ "number",
819
+ "boolean"
820
+ ]
821
+ }
822
+ },
823
+ "required": [
824
+ "path",
825
+ "equals"
826
+ ],
827
+ "additionalProperties": false
828
+ },
829
+ {
830
+ "type": "object",
831
+ "properties": {
832
+ "path": {
833
+ "type": "string",
834
+ "minLength": 1,
835
+ "maxLength": 256,
836
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
837
+ },
838
+ "exists": {
839
+ "type": "boolean",
840
+ "const": true
841
+ }
842
+ },
843
+ "required": [
844
+ "path",
845
+ "exists"
846
+ ],
847
+ "additionalProperties": false
848
+ },
849
+ {
850
+ "type": "object",
851
+ "properties": {
852
+ "path": {
853
+ "type": "string",
854
+ "minLength": 1,
855
+ "maxLength": 256,
856
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
857
+ },
858
+ "oneOf": {
859
+ "minItems": 1,
860
+ "maxItems": 64,
861
+ "type": "array",
862
+ "items": {
863
+ "type": [
864
+ "string",
865
+ "number",
866
+ "boolean"
867
+ ]
868
+ }
869
+ }
870
+ },
871
+ "required": [
872
+ "path",
873
+ "oneOf"
874
+ ],
875
+ "additionalProperties": false
876
+ },
877
+ {
878
+ "type": "object",
879
+ "properties": {
880
+ "path": {
881
+ "type": "string",
882
+ "minLength": 1,
883
+ "maxLength": 256,
884
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
885
+ },
886
+ "startsWith": {
887
+ "type": "string",
888
+ "minLength": 1,
889
+ "maxLength": 64
890
+ }
891
+ },
892
+ "required": [
893
+ "path",
894
+ "startsWith"
895
+ ],
896
+ "additionalProperties": false
897
+ },
898
+ {
899
+ "type": "object",
900
+ "properties": {
901
+ "path": {
902
+ "type": "string",
903
+ "minLength": 1,
904
+ "maxLength": 256,
905
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
906
+ },
907
+ "endsWith": {
908
+ "type": "string",
909
+ "minLength": 1,
910
+ "maxLength": 64
911
+ }
912
+ },
913
+ "required": [
914
+ "path",
915
+ "endsWith"
916
+ ],
917
+ "additionalProperties": false
918
+ },
919
+ {
920
+ "type": "object",
921
+ "properties": {
922
+ "path": {
923
+ "type": "string",
924
+ "minLength": 1,
925
+ "maxLength": 256,
926
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
927
+ },
928
+ "contains": {
929
+ "type": [
930
+ "string",
931
+ "number",
932
+ "boolean"
933
+ ]
934
+ }
935
+ },
936
+ "required": [
937
+ "path",
938
+ "contains"
939
+ ],
940
+ "additionalProperties": false
941
+ },
942
+ {
943
+ "type": "object",
944
+ "properties": {
945
+ "path": {
946
+ "type": "string",
947
+ "minLength": 1,
948
+ "maxLength": 256,
949
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
950
+ },
951
+ "min": {
952
+ "type": "number"
953
+ },
954
+ "max": {
955
+ "type": "number"
956
+ }
957
+ },
958
+ "required": [
959
+ "path"
960
+ ],
961
+ "additionalProperties": false
962
+ }
963
+ ]
964
+ }
965
+ },
966
+ "model": {
967
+ "default": "values.model",
968
+ "anyOf": [
969
+ {
970
+ "type": "string",
971
+ "minLength": 1,
972
+ "maxLength": 256,
973
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
974
+ },
975
+ {
976
+ "minItems": 1,
977
+ "maxItems": 4,
978
+ "type": "array",
979
+ "items": {
980
+ "type": "string",
981
+ "minLength": 1,
982
+ "maxLength": 256,
983
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
984
+ }
985
+ }
986
+ ]
987
+ },
988
+ "unitId": {
989
+ "default": 1,
990
+ "type": "integer",
991
+ "minimum": 1,
992
+ "maximum": 247
993
+ },
994
+ "read": {
995
+ "default": {},
996
+ "type": "object",
997
+ "propertyNames": {
998
+ "type": "string",
999
+ "pattern": "^[a-z][a-zA-Z0-9_]{0,31}$"
1000
+ },
1001
+ "additionalProperties": {
1002
+ "type": "object",
1003
+ "properties": {
1004
+ "function": {
1005
+ "anyOf": [
1006
+ {
1007
+ "type": "number",
1008
+ "const": 1
1009
+ },
1010
+ {
1011
+ "type": "number",
1012
+ "const": 2
1013
+ },
1014
+ {
1015
+ "type": "number",
1016
+ "const": 3
1017
+ },
1018
+ {
1019
+ "type": "number",
1020
+ "const": 4
1021
+ }
1022
+ ]
1023
+ },
1024
+ "address": {
1025
+ "anyOf": [
1026
+ {
1027
+ "type": "integer",
1028
+ "minimum": 0,
1029
+ "maximum": 65535
1030
+ },
1031
+ {
1032
+ "type": "string",
1033
+ "pattern": "^0x[0-9a-fA-F]{1,4}$"
1034
+ }
1035
+ ]
1036
+ },
1037
+ "type": {
1038
+ "type": "string",
1039
+ "enum": [
1040
+ "u16",
1041
+ "s16",
1042
+ "u32",
1043
+ "s32",
1044
+ "f32",
1045
+ "string"
1046
+ ]
1047
+ },
1048
+ "count": {
1049
+ "type": "integer",
1050
+ "minimum": 1,
1051
+ "maximum": 64
1052
+ },
1053
+ "bit": {
1054
+ "type": "integer",
1055
+ "minimum": 0,
1056
+ "maximum": 15
1057
+ },
1058
+ "scale": {
1059
+ "type": "number"
1060
+ },
1061
+ "unit": {
1062
+ "type": "string",
1063
+ "maxLength": 16
1064
+ },
1065
+ "options": {
1066
+ "type": "object",
1067
+ "propertyNames": {
1068
+ "type": "string",
1069
+ "pattern": "^-?\\d{1,10}$"
1070
+ },
1071
+ "additionalProperties": {
1072
+ "type": "string",
1073
+ "minLength": 1,
1074
+ "maxLength": 64
1075
+ }
1076
+ }
1077
+ },
1078
+ "required": [
1079
+ "function",
1080
+ "address"
1081
+ ],
1082
+ "additionalProperties": false
1083
+ }
1084
+ }
1085
+ },
1086
+ "required": [
1087
+ "match"
1088
+ ],
1089
+ "additionalProperties": false
1090
+ },
537
1091
  "adopt": {
538
1092
  "default": "owner",
539
1093
  "type": "string",
@@ -74,7 +74,9 @@
74
74
  "enum": [
75
75
  "declarative",
76
76
  "code",
77
- "matter"
77
+ "matter",
78
+ "mqtt",
79
+ "modbus"
78
80
  ]
79
81
  },
80
82
  "defaultIcon": {
@@ -101,6 +103,11 @@
101
103
  "minLength": 1,
102
104
  "maxLength": 256
103
105
  },
106
+ "template": {
107
+ "type": "string",
108
+ "minLength": 1,
109
+ "maxLength": 256
110
+ },
104
111
  "setup": {
105
112
  "type": "string",
106
113
  "minLength": 1,
@@ -60,6 +60,18 @@
60
60
  "default": false,
61
61
  "type": "boolean"
62
62
  },
63
+ "twins": {
64
+ "minItems": 1,
65
+ "maxItems": 2,
66
+ "type": "array",
67
+ "items": {
68
+ "type": "string",
69
+ "enum": [
70
+ "mac",
71
+ "serial"
72
+ ]
73
+ }
74
+ },
63
75
  "setup": {
64
76
  "type": "string",
65
77
  "minLength": 1,