forked from mongoose-os-apps/shelly-homekit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mos.yml
987 lines (945 loc) · 39.1 KB
/
mos.yml
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
author: Shelly-HomeKit contributors
description: A HomeKit firmware for Shelly switches
version: 2.12.0-beta2
libs_version: latest
modules_version: latest
mongoose_os_version: latest
sources:
- src
- src/mock
- src/BL0937
- src/${build_vars.MODEL}
includes:
- src
filesystem:
- fs
config_schema:
- ["debug.event_level", 3]
- ["dns_sd.txt", "fw_type=homekit"] # To be easily distinguishable from stock.
- ["file_logger.level", 3]
- ["file_logger.max_num_files", 1]
- ["file_logger.max_file_size", 16000]
- ["file_logger.buf_size", 1000]
- ["http.auth_algo", 1] # SHA-256
- ["http.auth_domain", ""]
- ["rpc.auth_algo", 1] # SHA-256
- ["rpc.auth_domain", ""]
- ["sntp.enable", true]
- ["shelly.name", "s", "", {title: "User-facing device name"}] # Note: will be overridden by cfg 2 -> 3 migration.
- ["shelly.mode", "i", 0, {title: "System mode: 0 - default, 1 - roller shutter (if supported), 2 - garage door opener (if supported), 3 - RGB (if supported), 4 - RGBW (if supported), 5 - RGB+W (if supported), 6 - CCT (if supported), 7 - White Mode (if supported)"}]
- ["shelly.cfg_version", "i", 0, {title: "Configuration version"}]
- ["shelly.legacy_hap_layout", "b", false, {title: "Use legacy accessory layout instead of a bridged accessory"}]
- ["shelly.overheat_on", "i", 100, {title: "Overheat protection mode kicks in at or above this temperature"}]
- ["shelly.overheat_off", "i", 90, {title: "Overheat protection mode turns off when the temperature is back below this threshold"}]
- ["shelly.reboot_counter", "i", 0, {title: "Counter of boot tries with a uptime of less then 10 sec."}]
- ["ts", "o", {title: "Temperature Sensor settings", abstract: true}]
- ["ts.name", "s", "", {title: "Name of the sensor"}]
- ["ts.unit", "i", 0, {title: "Display unit of the Sensor"}] # 0 - Celsius, 1 - Farenheit
- ["ts.update_interval", "i", 1, {title: "Update Interval of the sensor in seconds, minimum 1s"}]
- ["sw", "o", {title: "Switch settings", abstract: true}]
- ["sw.name", "s", "", {title: "Name of the switch"}]
- ["sw.enable", "b", true, {title: "Enable this switch in the accessory"}]
- ["sw.out_inverted", "b", false, {title: "Invert output, set to true for normally open output"}]
- ["sw.in_mode", "i", 1, {title: "-1 - Absent, 0 - Momentary, 1 - Toggle, 2 - Edge, 3 - Detached"}]
- ["sw.in_inverted", "b", false, {title: "Invert input, set to true for normally closed input"}]
- ["sw.state", "b", false, {title: "State of the switch"}]
- ["sw.svc_type", "i", 0, {title: "HAP service type, -1 = disable, 0 = switch, 1 = outlet, 2 = lock, 3 = valve"}]
- ["sw.hk_state_inverted", "b", false, {title: "Invert switch state in HomeKit, for switch and outlet only"}]
- ["sw.valve_type", "i", 1, {title: "HAP valve type (if svc is 3), -1 = disable, 0 = GenericValve, 1 = Irrigation"}] # see for details about non supported types https://github.com/mongoose-os-apps/shelly-homekit/issues/510
- ["sw.initial_state", "i", 3, {title: "Initial state on power-on: 0 - off, 1 - on, 2 - restore last state, 3 - matches input if in toggle mode, otherwise off"}]
- ["sw.auto_off", "b", false, {title: "Whether the switch should automatically turn OFF after turning ON"}]
- ["sw.auto_off_delay", "d", 0, {title: "Delay for automatically turning OFF, in seconds"}]
- ["sw.state_led_en", "i", -1, {title: "State LED: -1 - unsupported by device, 0 - off, 1 - on"}]
- ["in", "o", {title: "Detached Input settings", abstract: true}]
- ["in.type", "i", 3, {title: "HAP service type, 3 - Stateless switch, 7 - Motion sensor, 8 - Occupancy sensor, 6 - Disabled"}]
- ["in.inverted", "b", false, {title: "Invert input, set to true for normally closed input"}]
- ["in.ssw", "o", {title: "Stateless Switch settings"}]
- ["in.ssw.name", "s", "", {title: "Name of the switch"}]
- ["in.ssw.in_mode", "i", 0, {title: "0 - Momentary; 1 - Toggle, single press event on change; 2 - Toggle, on = single press, off = double press"}]
- ["in.sensor", "o", {title: "Motion Sensor settings"}]
- ["in.sensor.name", "s", "", {title: "Name of the sensor"}]
- ["in.sensor.in_mode", "i", 0, {title: "0 - Level, 1 - Pulse"}]
- ["in.sensor.idle_time", "i", 15, {title: "In pulse mode, go back to 'no motion' after no pulse received within this interval"}]
- ["wc", "o", {title: "Roller shutter settings", abstract: true}]
- ["wc.name", "s", "Shutter 1", {title: "Accessory name"}]
- ["wc.in_mode", "i", 0, {title: "Input mode: 0 - separate, momentary; 0 - separate, toggle; 2 - single, momentary; 3 - detached"}]
- ["wc.swap_inputs", "b", false, {title: "Swap inputs (2 - open, 1 - close)"}]
- ["wc.swap_outputs", "b", false, {title: "Swap outputs (2 - open, 1 - close)"}]
- ["wc.calibrated", "b", false, {title: "Calibration done"}]
- ["wc.idle_power_thr", "f", 5.0, {title: "Power consumption threshold for motor idle detection"}]
- ["wc.move_power", "f", 0.0, {title: "Power consumption during movement, watts"}]
- ["wc.move_time_ms", "i", 0, {title: "Move time, in millseconds"}]
- ["wc.max_ramp_up_time_ms", "i", 5000, {title: "Maximum ramp up time, in millseconds"}]
- ["wc.obstruction_power_coeff", "f", 2.5, {title: "How much power consumption vs average is too much?"}]
- ["wc.obstruction_duration_ms", "i", 3000, {title: "How long should the overpower persist for obstruction to be reported?"}]
- ["wc.obstruction_time_coeff", "f", 1.5, {title: "How long is too long (compared to max)?"}]
- ["wc.current_pos", "f", 0.0, {title: "Last position, percent: 0 - fully closed, 100 - fully open."}]
- ["gdo", "o", {title: "Garage door settings", abstract: true}]
- ["gdo.name", "s", "Garage Door", {title: "Accessory name"}]
- ["gdo.close_sensor_mode", "i", 0, {title: "Close sensor mode: 0 - normally closed, 1 - normally open"}]
- ["gdo.open_sensor_mode", "i", 0, {title: "Close sensor mode: 0 - normally closed, 1 - normally open, 2 - disabled"}]
- ["gdo.out_mode", "i", 0, {title: "Output mode: 0 - single (open=close=1), 1 - dual (1=open, 2=close), 2 - single inverted (open=close=1)"}]
- ["gdo.move_time_ms", "i", 30000, {title: "Movement time, ms"}]
- ["gdo.begin_move_time_ms", "i", 7000, {title: "Time allowed for movement to begin, ms"}]
- ["gdo.pulse_time_ms", "i", 300, {title: "Output active time, ms"}]
- ["lb", "o", {title: "Light bulb settings", abstract: true}]
- ["lb.name", "s", "Light bulb", {title: "Accessory name"}]
- ["lb.svc_hidden", "b", false, {title: "Whether HAP service is hidden"}]
- ["lb.enable", "b", true, {title: "Enable this light in the accessory"}]
- ["lb.in_mode", "i", 1, {title: "-1 - Absent, 0 - Momentary, 1 - Toggle, 2 - Edge, 3 - Detached"}]
- ["lb.in_inverted", "b", false, {title: "Invert input, set to true for normally closed input"}]
- ["lb.state", "b", false, {title: "State of the light"}]
- ["lb.hue", "i", 0, {title: "Hue of the light"}]
- ["lb.brightness", "i", 100, {title: "Brightness of the light"}]
- ["lb.saturation", "i", 100, {title: "Saturation of the light"}]
- ["lb.color_temperature", "i", 400, {title: "Color Temperature of the light"}]
- ["lb.initial_state", "i", 3, {title: "Initial state on power-on: 0 - off, 1 - on, 2 - restore last state, 3 - matches input if in toggle mode, otherwise off"}]
- ["lb.auto_off", "b", false, {title: "Whether the switch should automatically turn OFF after turning ON"}]
- ["lb.auto_off_delay", "d", 0, {title: "Delay for automatically turning OFF, in seconds"}]
- ["lb.transition_time", "i", 2000, {title: "Time in milliseconds how long a transition will take"}]
- ["_const.rpc_acl", "s", '[{"ch_type": "UART", "acl": "*"},{"method": "Shelly.GetInfo", "acl": "*"},{"method": "*", "ch_type": "HTTP", "acl": "admin"},{"method": "*", "ch_type": "WS_in", "acl": "admin"}]', {}]
# Preserved from stock.
- ["k_apparent", "i", 1750000, {}]
- ["max_power", "i", 1800, {}]
# Deprecated settings, only kept to enable migration.
- ["sw.persist_state", "b", false, {}] # Since cfg v1
- ["ssw", "o", {abstract: true}]
- ["ssw.name", "s", "", {}]
- ["ssw.in_mode", "i", 0, {}]
build_vars:
# BLE disabled for most models.
MGOS_HAP_BLE: 0
# Enables storing setup info in the config and a simple RPC service to configure it.
MGOS_HAP_SIMPLE_CONFIG: 1
MGOS_FW_EXTRA_ATTRS: shelly_hk_model=${build_vars.MODEL}
cdefs:
PRODUCT_VENDOR: Allterco
PRODUCT_MODEL: ${build_vars.MODEL}
LED_GPIO: -1
LED_ON: 0
BTN_GPIO: -1
BTN_DOWN: 0
BTN_NOISY: 1
RST_GPIO_INIT: -1
SHELLY_HAVE_DUAL_INPUT_MODES: 0
MAX_NUM_HAP_SESSIONS: 12
libs:
- location: ./libreset
- location: https://github.com/mongoose-os-libs/core
- location: https://github.com/mongoose-os-libs/file-logger
- location: https://github.com/mongoose-os-libs/homekit-adk
- location: https://github.com/mongoose-os-libs/http-server
- location: https://github.com/mongoose-os-libs/ota-http-server
- location: https://github.com/mongoose-os-libs/rpc-service-config
- location: https://github.com/mongoose-os-libs/rpc-service-fs
- location: https://github.com/mongoose-os-libs/rpc-uart
- location: https://github.com/mongoose-os-libs/rpc-ws
- location: https://github.com/mongoose-os-libs/sntp
# Not enough space on 2.5
# - location: https://github.com/mongoose-os-libs/rpc-mqtt
# - location: https://github.com/mongoose-os-libs/rpc-service-ota
conds:
- when: mos.platform != "ubuntu"
apply:
sources:
- src/noisy_input_pin
- src/wifi_config
config_schema:
- ["wifi.ap.pass", ""]
- ["wifi.ap.ip", "192.168.33.1"]
- ["wifi.ap.gw", ""]
- ["wifi.ap.dhcp_start", "192.168.33.2"]
- ["wifi.ap.dhcp_end", "192.168.33.100"]
- ["wifi.sta_connect_timeout", 15]
- ["wifi.sta_roam_rssi_thr", -80]
- ["wifi.sta_roam_interval", 600]
- ["wifi.ap.keep_enabled", "b", false, {title: "Keep WiFi AP enabled even when STA is connected"}]
# This is a mitigation for devices dropping of wifi and never coming back.
# This is believed to be fixed, default has been flipped back to 0 in 2.11.0.
# Consider removing in later releases.
- ["shelly.wifi_connect_reboot_timeout", "i", 0, {title: "If not connected for this long when supposed to be, reboot"}]
libs:
- location: https://github.com/mongoose-os-libs/adc
- location: https://github.com/mongoose-os-libs/pwm
- location: https://github.com/mongoose-os-libs/wifi
cdefs:
# Size fine-tuning, saves substantial amount of RAM vs defaults.
HAP_SESSION_SIZE: 392
HAP_IP_SESSION_SIZE: 600
# XXX: fix size calculation with and without BLE
XHAP_ACCESSORY_SERVER_SIZE: 1680
HAP_LOG_LEVEL: 0 # This saves 36K on esp8266.
HAP_TLV_NO_LOG: 1 # Saves us stack
HAP_DISABLE_ASSERTS: 1 # 32K
HAP_DISABLE_PRECONDITIONS: 1 # 40K
- when: mos.platform == "esp32"
apply:
config_schema:
- ["wifi.sta_ps_mode", 1]
- when: build_vars.MODEL == "Shelly1"
apply:
name: switch1 # To allow OTA from stock fw.
sources:
- src/DS18XXX
- src/DHT
libs:
- location: https://github.com/mongoose-os-libs/onewire
- location: https://github.com/mongoose-os-libs/dht
- location: https://github.com/mongoose-os-libs/mongoose
variant: esp8266-nossl
build_vars:
FLASH_SIZE: 2097152
FS_SIZE: 262144
BOOT_CONFIG_ADDR: 0x1000 # To be compatible with stock firmware.
MGOS_ROOT_FS_TYPE: SPIFFS
cdefs:
PRODUCT_HW_REV: "1.0"
STOCK_FW_MODEL: SHSW-1
# We don't use SSL, HomeKit uses its own crypto. This saves ~120K.
MG_ENABLE_SSL: 0
config_schema:
- ["device.id", "shelly1-??????"]
- ["shelly.name", "shelly1-??????"]
- ["wifi.ap.ssid", "shelly1-??????"]
- ["ts1", "ts", {title: "TS1 settings"}]
- ["ts1.name", "Shelly TS1"]
- ["ts2", "ts", {title: "TS2 settings"}]
- ["ts2.name", "Shelly TS2"]
- ["ts3", "ts", {title: "TS3 settings"}]
- ["ts3.name", "Shelly TS3"]
- ["sw1", "sw", {title: "SW1 settings"}]
- ["sw1.name", "Shelly SW"]
- ["in1", "in", {title: "Input 1 settings"}]
- ["in1.ssw.name", "Shelly SSW1"]
- ["in1.sensor.name", "Shelly S1"]
- ["in2", "in", {title: "Input 2 settings"}]
- ["in2.ssw.name", "Shelly SSW2"]
- ["in2.sensor.name", "Shelly S2"]
- ["gdo1", "gdo", {title: "GDO1 settings"}]
- ["gdo1.name", "Garage Door"]
- ["gdo1.open_sensor_mode", 2]
# Only for backward compatibility (config <= v3).
- ["ssw1", "ssw", {title: "SSW1 settings"}]
- ["ssw1.name", "Input"]
- when: build_vars.MODEL == "Shelly1L"
apply:
name: switch1l # To allow OTA from stock fw.
libs:
- location: https://github.com/mongoose-os-libs/mongoose
variant: esp8266-nossl
build_vars:
FLASH_SIZE: 2097152
FS_SIZE: 262144
BOOT_CONFIG_ADDR: 0x1000 # To be compatible with stock firmware.
MGOS_ROOT_FS_TYPE: SPIFFS
cdefs:
LED_GPIO: 0
LED_ON: 0
BTN_GPIO: 13
BTN_DOWN: 0
PRODUCT_HW_REV: "1.0"
STOCK_FW_MODEL: SHSW-L
# We don't use SSL, HomeKit uses its own crypto. This saves ~120K.
MG_ENABLE_SSL: 0
SHELLY_HAVE_DUAL_INPUT_MODES: 1
config_schema:
- ["device.id", "shelly1l-??????"]
- ["shelly.name", "shelly1l-??????"]
- ["wifi.ap.ssid", "shelly1l-??????"]
- ["sw1", "sw", {title: "SW1 settings"}]
- ["sw1.name", "Shelly SW"]
- ["in1", "in", {title: "Input 1 settings"}]
- ["in1.ssw.name", "Shelly SSW1"]
- ["in1.sensor.name", "Shelly S1"]
- ["in2", "in", {title: "Input 2 settings"}]
- ["in2.ssw.name", "Shelly SSW2"]
- ["in2.sensor.name", "Shelly S2"]
# Only for backward compatibility (config <= v3).
- ["ssw1", "ssw", {title: "SSW1 settings"}]
- ["ssw1.name", "Input 1"]
- ["ssw2", "ssw", {title: "SSW2 settings"}]
- ["ssw2.name", "Input 2"]
- when: build_vars.MODEL == "Shelly1PM"
apply:
name: switch1pm # To allow OTA from stock fw.
sources:
- src/DS18XXX
- src/DHT
libs:
- location: https://github.com/mongoose-os-libs/onewire
- location: https://github.com/mongoose-os-libs/dht
- location: https://github.com/mongoose-os-libs/mongoose
variant: esp8266-nossl
build_vars:
FLASH_SIZE: 2097152
FS_SIZE: 262144
BOOT_CONFIG_ADDR: 0x1000 # To be compatible with stock firmware.
MGOS_ROOT_FS_TYPE: SPIFFS
cdefs:
LED_GPIO: 0
LED_ON: 0
BTN_GPIO: 2
BTN_DOWN: 0
PRODUCT_HW_REV: "1.0"
STOCK_FW_MODEL: SHSW-PM
# We don't use SSL, HomeKit uses its own crypto. This saves ~120K.
MG_ENABLE_SSL: 0
config_schema:
- ["device.id", "shelly1pm-??????"]
- ["shelly.name", "shelly1pm-??????"]
- ["wifi.ap.ssid", "shelly1pm-??????"]
- ["sw1", "sw", {title: "SW settings"}]
- ["sw1.name", "Shelly SW"]
- ["ts1", "ts", {title: "TS1 settings"}]
- ["ts1.name", "Shelly TS1"]
- ["ts2", "ts", {title: "TS2 settings"}]
- ["ts2.name", "Shelly TS2"]
- ["ts3", "ts", {title: "TS3 settings"}]
- ["ts3.name", "Shelly TS3"]
- ["in1", "in", {title: "Input 1 settings"}]
- ["in1.ssw.name", "Shelly SSW1"]
- ["in1.sensor.name", "Shelly S1"]
- ["in2", "in", {title: "Input 2 settings"}]
- ["in2.ssw.name", "Shelly SSW2"]
- ["in2.sensor.name", "Shelly S2"]
- ["gdo1", "gdo", {title: "GDO1 settings"}]
- ["gdo1.name", "Garage Door"]
- ["gdo1.open_sensor_mode", 2]
- ["bl0937.power_coeff", "f", 0, {title: "BL0937 counts -> watts conversion coefficient"}]
- ["bl0937.power_coeff", 1.79942025] # (16 + 1010 + 1935) / (8.53 + 561 + 1076)
# Only for backward compatibility (config <= v3).
- ["ssw1", "ssw", {title: "SSW1 settings"}]
- ["ssw1.name", "Input"]
- when: build_vars.MODEL == "Shelly2"
apply:
name: switch
libs:
- location: https://github.com/mongoose-os-libs/mongoose
variant: esp8266-nossl
build_vars:
FLASH_SIZE: 2097152
FS_SIZE: 262144
BOOT_CONFIG_ADDR: 0x1000
MGOS_ROOT_FS_TYPE: SPIFFS
cdefs:
PRODUCT_HW_REV: "1.0"
STOCK_FW_MODEL: SHSW-21
MG_ENABLE_SSL: 0
config_schema:
- ["device.id", "shellyswitch21-??????"]
- ["shelly.name", "shellyswitch21-??????"]
- ["wifi.ap.ssid", "shellyswitch21-??????"]
- ["sw1", "sw", {title: "SW1 settings"}]
- ["sw1.name", "Shelly SW1"]
- ["in1", "in", {title: "Input 1 settings"}]
- ["in1.ssw.name", "Shelly SSW1"]
- ["in1.sensor.name", "Shelly S1"]
- ["sw2", "sw", {title: "SW2 settings"}]
- ["sw2.name", "Shelly SW2"]
- ["in2", "in", {title: "Input 2 settings"}]
- ["in2.ssw.name", "Shelly SSW2"]
- ["in2.sensor.name", "Shelly S2"]
- ["gdo1", "gdo", {title: "GDO1 settings"}]
- ["gdo1.name", "Garage Door"]
# Only for backward compatibility (config <= v3).
- ["ssw1", "ssw", {title: "SSW1 settings"}]
- ["ssw1.name", "Input 1"]
- ["ssw2", "ssw", {title: "SSW2 settings"}]
- ["ssw2.name", "Input 2"]
- when: build_vars.MODEL == "Shelly25"
apply:
name: switch25
sources:
- src/ADE7953
includes:
- src/ADE7953
libs:
- location: https://github.com/mongoose-os-libs/mongoose
variant: esp8266-nossl
- location: https://github.com/mongoose-os-libs/ade7953
build_vars:
FLASH_SIZE: 2097152
FS_SIZE: 262144
BOOT_CONFIG_ADDR: 0x1000
MGOS_ROOT_FS_TYPE: SPIFFS
cdefs:
LED_GPIO: 0
LED_ON: 0
BTN_GPIO: 2
BTN_DOWN: 0
PRODUCT_HW_REV: "2.5"
STOCK_FW_MODEL: SHSW-25
MG_ENABLE_SSL: 0
SHELLY_HAVE_PM: 1
config_schema:
- ["device.id", "shellyswitch25-??????"]
- ["shelly.name", "shellyswitch25-??????"]
- ["wifi.ap.ssid", "shellyswitch25-??????"]
- ["i2c.enable", true]
- ["sw1", "sw", {title: "SW1 settings"}]
- ["sw1.name", "Shelly SW1"]
- ["in1", "in", {title: "Input 1 settings"}]
- ["in1.ssw.name", "Shelly SSW1"]
- ["in1.sensor.name", "Shelly S1"]
- ["sw2", "sw", {title: "SW2 settings"}]
- ["sw2.name", "Shelly SW2"]
- ["in2", "in", {title: "Input 2 settings"}]
- ["in2.ssw.name", "Shelly SSW2"]
- ["in2.sensor.name", "Shelly S2"]
- ["wc1", "wc", {title: "WC1 settings"}]
- ["wc1.name", "Window 1"]
- ["gdo1", "gdo", {title: "GDO1 settings"}]
- ["gdo1.name", "Garage Door"]
# Only for backward compatibility (config <= v3).
- ["ssw1", "ssw", {title: "SSW1 settings"}]
- ["ssw1.name", "Input 1"]
- ["ssw2", "ssw", {title: "SSW2 settings"}]
- ["ssw2.name", "Input 2"]
- when: build_vars.MODEL == "ShellyColorBulb"
apply:
name: color-bulb # To allow OTA from stock fw.
libs:
- origin: https://github.com/mongoose-os-libs/mongoose
variant: esp8266-nossl
build_vars:
FLASH_SIZE: 2097152
FS_SIZE: 262144
BOOT_CONFIG_ADDR: 0x1000 # To be compatible with stock firmware.
MGOS_ROOT_FS_TYPE: SPIFFS
cdefs:
PWM_SUPPORT: 1
PRODUCT_HW_REV: "1.0"
STOCK_FW_MODEL: SHCB-1
# We don't use SSL, HomeKit uses its own crypto. This saves ~120K.
MG_ENABLE_SSL: 0
config_schema:
- ["shelly.mode", 4] # 4 - RGBW"
- ["device.id", "shellycolorbulb-??????"]
- ["shelly.name", "shellycolorbulb-??????"]
- ["wifi.ap.ssid", "shellycolorbulb-??????"]
- ["lb1", "lb", {title: "RGBW "}]
- ["lb1.initial_state", 2] # last
- when: build_vars.MODEL == "ShellyDuo"
apply:
name: bulbduo # To allow OTA from stock fw.
libs:
- origin: https://github.com/mongoose-os-libs/mongoose
variant: esp8266-nossl
build_vars:
FLASH_SIZE: 2097152
FS_SIZE: 262144
MGOS_ROOT_FS_TYPE: SPIFFS
cdefs:
PRODUCT_HW_REV: "1.0"
STOCK_FW_MODEL: SHBDUO-1
# We don't use SSL, HomeKit uses its own crypto. This saves ~120K.
MG_ENABLE_SSL: 0
config_schema:
- ["device.id", "ShellyBulbDuo-??????"]
- ["shelly.name", "ShellyBulbDuo-??????"]
- ["wifi.ap.ssid", "ShellyBulbDuo-??????"]
- ["lb1", "lb", {title: "Light bulb settings"}]
- ["lb1.initial_state", 2] # last
- when: build_vars.MODEL == "ShellyI3"
apply:
name: ix3
libs:
- location: https://github.com/mongoose-os-libs/mongoose
variant: esp8266-nossl
build_vars:
FLASH_SIZE: 2097152
FS_SIZE: 262144
BOOT_CONFIG_ADDR: 0x1000
MGOS_ROOT_FS_TYPE: SPIFFS
cdefs:
PRODUCT_HW_REV: "1.0"
STOCK_FW_MODEL: SHIX3-1
MG_ENABLE_SSL: 0
LED_GPIO: 5
LED_ON: 0
BTN_GPIO: 4
BTN_DOWN: 0
config_schema:
- ["device.id", "shellyix3-????????????"]
- ["wifi.ap.ssid", "shellyix3-????????????"]
- ["in1", "in", {title: "Input 1 settings"}]
- ["in1.ssw.name", "Input 1"]
- ["in1.sensor.name", "Shelly S1"]
- ["in2", "in", {title: "Input 2 settings"}]
- ["in2.ssw.name", "Input 2"]
- ["in2.sensor.name", "Shelly S2"]
- ["in3", "in", {title: "Input 3 settings"}]
- ["in3.ssw.name", "Input 3"]
- ["in3.sensor.name", "Shelly S3"]
# Only for backward compatibility (config <= v3).
- ["ssw1", "ssw", {title: "SSW1 settings"}]
- ["ssw1.name", "Input 1"]
- ["ssw2", "ssw", {title: "SSW2 settings"}]
- ["ssw2.name", "Input 2"]
- ["ssw3", "ssw", {title: "SSW3 settings"}]
- ["ssw3.name", "Input 3"]
# Note this is also known as "ShellyPlug 2", as opposed to the original Plug
# which was based on CC3200. However, that one is long gone and we can ignore it.
- when: build_vars.MODEL == "ShellyPlug"
apply:
name: shelly-plug2 # To allow OTA from stock fw.
libs:
- location: https://github.com/mongoose-os-libs/mongoose
variant: esp8266-nossl
build_vars:
# Note: 4 MB flash chip
FS_SIZE: 262144
MGOS_ROOT_FS_TYPE: SPIFFS
cdefs:
LED_GPIO: 13 # Green, 14 red, 16 blue.
LED_ON: 0
BTN_GPIO: 12
BTN_DOWN: 1
PRODUCT_HW_REV: "1.0"
STOCK_FW_MODEL: SHPLG2-1
MG_ENABLE_SSL: 0
config_schema:
- ["device.id", "shellyplug-??????"]
- ["shelly.name", "shellyplug-??????"]
- ["wifi.ap.ssid", "shellyplug-??????"]
- ["sw1", "sw", {title: "Plug settings"}]
- ["sw1.name", "Shelly Plug"]
- ["sw1.in_mode", -1]
- ["sw1.svc_type", 1] # Outlet
- ["sw1.initial_state", 2]
- ["bl0937.power_coeff", "f", 0, {title: "BL0937 counts -> watts conversion coefficient"}]
- ["bl0937.power_coeff", 8.59980831] # (16 + 1010 + 1935) / (2.01 + 117.3 + 225)
- when: build_vars.MODEL == "ShellyPlugS"
apply:
name: shelly-plug-s # To allow OTA from stock fw.
libs:
- location: https://github.com/mongoose-os-libs/mongoose
variant: esp8266-nossl
build_vars:
FLASH_SIZE: 2097152
FS_SIZE: 262144
BOOT_CONFIG_ADDR: 0x7000 # To be compatible with stock firmware.
MGOS_ROOT_FS_TYPE: SPIFFS
cdefs:
LED_GPIO: 2 # Blue, 0 red.
LED_ON: 0
BTN_GPIO: 13
BTN_DOWN: 0
PRODUCT_HW_REV: "1.0"
STOCK_FW_MODEL: SHPLG-S
MG_ENABLE_SSL: 0
config_schema:
- ["device.id", "shellyplug-s-??????"]
- ["shelly.name", "shellyplug-s-??????"]
- ["wifi.ap.ssid", "shellyplug-s-??????"]
- ["sw1", "sw", {title: "Plug settings"}]
- ["sw1.name", "Shelly Plug S"]
- ["sw1.in_mode", -1]
- ["sw1.svc_type", 1] # Outlet
- ["sw1.initial_state", 2]
- ["sw1.state_led_en", 1]
- ["bl0937.power_coeff", "f", 0, {title: "BL0937 counts -> watts conversion coefficient"}]
- ["bl0937.power_coeff", 1.64358469] # (16 + 1010 + 1935) / (9.55 + 617 + 1175)
- when: build_vars.MODEL == "ShellyPlus1"
apply:
name: Plus1
sources:
- src/DS18XXX
- src/DHT
libs:
- location: https://github.com/mongoose-os-libs/onewire
- location: https://github.com/mongoose-os-libs/dht
- location: https://github.com/mongoose-os-libs/mongoose
build_vars:
MGOS_ROOT_FS_TYPE: LFS
MGOS_ROOT_FS_SIZE: 458752
ESP_IDF_EXTRA_PARTITION: "aux,0x55,0x00,0x3f0000,48K"
ESP_IDF_EXTRA_PARTITION_2: "shelly,data,0x88,0x3fc000,16K"
ESP_IDF_SDKCONFIG_OPTS: >
${build_vars.ESP_IDF_SDKCONFIG_OPTS}
CONFIG_FREERTOS_UNICORE=y
CONFIG_ESPTOOLPY_FLASHMODE_DIO=y
cdefs:
LED_GPIO: 0
LED_ON: 0
BTN_GPIO: 25
BTN_DOWN: 0
PRODUCT_HW_REV: "0.1.6"
STOCK_FW_MODEL: Plus1
MAX_NUM_HAP_SESSIONS: 16
config_schema:
- ["device.id", "ShellyPlus1-??????"]
- ["shelly.name", "ShellyPlus1-??????"]
- ["wifi.ap.ssid", "ShellyPlus1-??????"]
- ["sw1", "sw", {title: "SW1 settings"}]
- ["sw1.name", "Shelly SW"]
- ["in1", "in", {title: "Input 1 settings"}]
- ["in1.ssw.name", "Shelly SSW1"]
- ["in1.sensor.name", "Shelly S1"]
- ["in2", "in", {title: "Input 2 settings"}]
- ["in2.ssw.name", "Shelly SSW2"]
- ["in2.sensor.name", "Shelly S2"]
- ["gdo1", "gdo", {title: "GDO1 settings"}]
- ["gdo1.name", "Garage Door"]
- ["gdo1.open_sensor_mode", 2]
# Only for backward compatibility (config <= v3).
- ["ssw1", "ssw", {title: "SSW1 settings"}]
- ["ssw1.name", "Input"]
- ["ts1", "ts", {title: "TS1 settings"}]
- ["ts1.name", "Shelly TS1"]
- ["ts2", "ts", {title: "TS2 settings"}]
- ["ts2.name", "Shelly TS2"]
- ["ts3", "ts", {title: "TS3 settings"}]
- ["ts3.name", "Shelly TS3"]
- when: build_vars.MODEL == "ShellyPlus1PM"
apply:
name: Plus1PM
sources:
- src/DS18XXX
- src/DHT
libs:
- location: https://github.com/mongoose-os-libs/onewire
- location: https://github.com/mongoose-os-libs/dht
- location: https://github.com/mongoose-os-libs/mongoose
build_vars:
MGOS_ROOT_FS_TYPE: LFS
MGOS_ROOT_FS_SIZE: 458752
ESP_IDF_EXTRA_PARTITION: "aux,0x55,0x00,0x3f0000,48K"
ESP_IDF_EXTRA_PARTITION_2: "shelly,data,0x88,0x3fc000,16K"
ESP_IDF_SDKCONFIG_OPTS: >
${build_vars.ESP_IDF_SDKCONFIG_OPTS}
CONFIG_FREERTOS_UNICORE=y
CONFIG_ESPTOOLPY_FLASHMODE_DIO=y
cdefs:
LED_GPIO: 0
LED_ON: 0
BTN_GPIO: 25
BTN_DOWN: 0
PRODUCT_HW_REV: "0.1.6"
STOCK_FW_MODEL: Plus1PM
MAX_NUM_HAP_SESSIONS: 16
config_schema:
- ["device.id", "ShellyPlus1PM-??????"]
- ["shelly.name", "ShellyPlus1PM-??????"]
- ["wifi.ap.ssid", "ShellyPlus1PM-??????"]
- ["sw1", "sw", {title: "SW1 settings"}]
- ["sw1.name", "Shelly SW"]
- ["in1", "in", {title: "Input 1 settings"}]
- ["in1.ssw.name", "Shelly SSW1"]
- ["in1.sensor.name", "Shelly S1"]
- ["in2", "in", {title: "Input 2 settings"}]
- ["in2.ssw.name", "Shelly SSW2"]
- ["in2.sensor.name", "Shelly S2"]
- ["gdo1", "gdo", {title: "GDO1 settings"}]
- ["gdo1.name", "Garage Door"]
- ["gdo1.open_sensor_mode", -1]
# Calibration values from stock
- ["bl0937_0", "o", {title: "BL0937 calibration"}]
- ["bl0937_0.apower_scale", "f", 2.028531, {title: "BL0937 apower scale"}]
- ["bl0937_0.voltage_scale", "f", 0.15510, {title: "BL0937 voltage scale"}]
- ["bl0937_0.current_scale", "f", 0.01287, {title: "BL0937 current scale"}]
# Only for backward compatibility (config <= v3).
- ["ssw1", "ssw", {title: "SSW1 settings"}]
- ["ssw1.name", "Input"]
- ["ts1", "ts", {title: "TS1 settings"}]
- ["ts1.name", "Shelly TS1"]
- ["ts2", "ts", {title: "TS2 settings"}]
- ["ts2.name", "Shelly TS2"]
- ["ts3", "ts", {title: "TS3 settings"}]
- ["ts3.name", "Shelly TS3"]
- when: build_vars.MODEL == "ShellyPlusI4"
apply:
name: PlusI4
sources:
- src/DS18XXX
- src/DHT
libs:
- location: https://github.com/mongoose-os-libs/onewire
- location: https://github.com/mongoose-os-libs/dht
build_vars:
MGOS_ROOT_FS_TYPE: LFS
MGOS_ROOT_FS_SIZE: 458752
ESP_IDF_EXTRA_PARTITION: "aux,0x55,0x00,0x3f0000,48K"
ESP_IDF_EXTRA_PARTITION_2: "shelly,data,0x88,0x3fc000,16K"
ESP_IDF_SDKCONFIG_OPTS: >
${build_vars.ESP_IDF_SDKCONFIG_OPTS}
CONFIG_FREERTOS_UNICORE=y
CONFIG_ESPTOOLPY_FLASHMODE_DIO=y
cdefs:
LED_GPIO: 0
LED_ON: 0
BTN_GPIO: 25
BTN_DOWN: 0
PRODUCT_HW_REV: "0.1.6"
STOCK_FW_MODEL: PlusI4
MAX_NUM_HAP_SESSIONS: 16
config_schema:
- ["device.id", "ShellyPlusI4-??????"]
- ["shelly.name", "ShellyPlusI4-??????"]
- ["wifi.ap.ssid", "ShellyPlusI4-????????????"]
- ["in1", "in", {title: "Input 1 settings"}]
- ["in1.ssw.name", "Shelly SSW1"]
- ["in1.sensor.name", "Shelly S1"]
- ["in2", "in", {title: "Input 2 settings"}]
- ["in2.ssw.name", "Shelly SSW2"]
- ["in2.sensor.name", "Shelly S2"]
- ["in3", "in", {title: "Input 3 settings"}]
- ["in3.ssw.name", "Shelly SSW3"]
- ["in3.sensor.name", "Shelly S3"]
- ["in4", "in", {title: "Input 4 settings"}]
- ["in4.ssw.name", "Shelly SSW4"]
- ["in4.sensor.name", "Shelly S4"]
- ["ts1", "ts", {title: "TS1 settings"}]
- ["ts1.name", "Shelly TS1"]
- ["ts2", "ts", {title: "TS2 settings"}]
- ["ts2.name", "Shelly TS2"]
- ["ts3", "ts", {title: "TS3 settings"}]
- ["ts3.name", "Shelly TS3"]
- when: build_vars.MODEL == "ShellyRGBW2"
apply:
name: rgbw2-color # To allow OTA from stock fw.
libs:
- location: https://github.com/mongoose-os-libs/mongoose
variant: esp8266-nossl
build_vars:
FLASH_SIZE: 2097152
FS_SIZE: 262144
BOOT_CONFIG_ADDR: 0x7000 # To be compatible with stock firmware.
MGOS_ROOT_FS_TYPE: SPIFFS
cdefs:
LED_GPIO: 2
LED_ON: 0
BTN_GPIO: 13
BTN_DOWN: 0
BTN_NOISY: 0
RST_GPIO_INIT: 15 # reset GPIO 15 to prevent green flash on startup
PRODUCT_HW_REV: "1.0"
STOCK_FW_MODEL: SHRGBW2-color
# We don't use SSL, HomeKit uses its own crypto. This saves ~120K.
MG_ENABLE_SSL: 0
config_schema:
- ["shelly.mode", 3] # 3 - RGB, 4 - RGBW, 5 - RGB+W, 6 - CCT, 7 - White
- ["device.id", "shellyrgbw2-??????"]
- ["shelly.name", "shellyrgbw2-??????"]
- ["wifi.ap.ssid", "shellyrgbw2-??????"]
- ["lb1", "lb", {title: "Light 1 settings"}]
- ["lb2", "lb", {title: "Light 2 settings"}]
- ["lb2.initial_state", 2] #input only available to lb1
- ["lb3", "lb", {title: "Light 3 settings"}]
- ["lb3.initial_state", 2] #input only available to lb1
- ["lb4", "lb", {title: "Light 4 settings"}]
- ["lb4.initial_state", 2] #input only available to lb1
- ["in1", "in", {title: "Input 1 settings"}]
- ["in1.ssw.name", "Shelly SSW1"]
- ["in1.sensor.name", "Shelly S1"]
- when: build_vars.MODEL == "ShellyUNI"
apply:
name: uni
libs:
- location: https://github.com/mongoose-os-libs/mongoose
variant: esp8266-nossl
- location: https://github.com/mongoose-os-libs/ade7953
build_vars:
FLASH_SIZE: 2097152
FS_SIZE: 262144
BOOT_CONFIG_ADDR: 0x1000
MGOS_ROOT_FS_TYPE: SPIFFS
cdefs:
LED_GPIO: 0
LED_ON: 0
BTN_GPIO: 2
BTN_DOWN: 0
PRODUCT_HW_REV: "1.0"
STOCK_FW_MODEL: SHUNI-1
MG_ENABLE_SSL: 0
config_schema:
- ["device.id", "shellyuni-????????????"]
- ["shelly.name", "shellyuni-????????????"]
- ["wifi.ap.ssid", "shellyuni-????????????"]
- ["sw1", "sw", {title: "SW1 settings"}]
- ["sw1.name", "Shelly SW1"]
- ["in1", "in", {title: "Input 1 settings"}]
- ["in1.ssw.name", "Shelly SSW1"]
- ["in1.sensor.name", "Shelly S1"]
- ["sw2", "sw", {title: "SW2 settings"}]
- ["sw2.name", "Shelly SW2"]
- ["in2", "in", {title: "Input 2 settings"}]
- ["in2.ssw.name", "Shelly SSW2"]
- ["in2.sensor.name", "Shelly S2"]
- ["gdo1", "gdo", {title: "GDO1 settings"}]
- ["gdo1.name", "Garage Door"]
- when: build_vars.MODEL == "ShellyVintage"
apply:
name: bulb6w # To allow OTA from stock fw.
libs:
- origin: https://github.com/mongoose-os-libs/mongoose
variant: esp8266-nossl
build_vars:
FLASH_SIZE: 2097152
FS_SIZE: 262144
MGOS_ROOT_FS_TYPE: SPIFFS
cdefs:
PRODUCT_HW_REV: "1.0"
STOCK_FW_MODEL: SHVIN-1
# We don't use SSL, HomeKit uses its own crypto. This saves ~120K.
MG_ENABLE_SSL: 0
config_schema:
- ["device.id", "ShellyVintage-??????"]
- ["shelly.name", "ShellyVintage-??????"]
- ["wifi.ap.ssid", "ShellyVintage-??????"]
- ["lb1", "lb", {title: "Light bulb settings"}]
- ["lb1.initial_state", 2] # last
# Test device for BLE development.
- when: build_vars.MODEL == "ShellyT32"
apply:
libs:
# adding bt-common enables BLE support at compile time
#- origin: https://github.com/mongoose-os-libs/bt-common
#- origin: https://github.com/mongoose-os-libs/ethernet
build_vars:
APP_SLOT_SIZE: 0x1b0000
MGOS_HAP_BLE: 1
MGOS_ROOT_FS_TYPE: LFS
ESP_IDF_EXTRA_PARTITION: "aux,data,0x88,0x3f0000,48K,encrypted"
ESP_IDF_SDKCONFIG_OPTS: >
${build_vars.ESP_IDF_SDKCONFIG_OPTS}
CONFIG_FREERTOS_UNICORE=y
CONFIG_ESPTOOLPY_FLASHMODE_DIO=y
cdefs:
LED_GPIO: 13
LED_ON: 1
BTN_GPIO: 34
BTN_DOWN: 0
PRODUCT_HW_REV: "1.0"
STOCK_FW_MODEL: XXX
SHELLY_HAVE_PM: 0
BTN_NOISY: 0
MGOS_CONFIG_DEV_3: '"aux"'
config_schema:
# - ["bt.enable", true]
- ["bt.adv_enable", false] # ADK controls advertisement.
- ["bt.keep_enabled", true]
- ["device.id", "ShellyT32-????"]
- ["shelly.name", "ShellyT32-????"]
- ["wifi.ap.ssid", "ShellyT32-??????"]
- ["sw1", "sw", {"title": "SW settings"}]
- ["sw1.name", "SWT32"]
- ["sw1.in_mode", 0]
- ["in1", "in", {title: "Input 1 settings"}]
- ["in1.ssw.name", "SSWT32"]
- ["in1.sensor.name", "ST32"]
- when: build_vars.MODEL == "ShellyU"
apply:
sources:
- src/mock/pwm
- src/mock/wifi_config
libs:
- location: https://github.com/mongoose-os-libs/mongoose
variant: ubuntu-nossl
cdefs:
PRODUCT_HW_REV: "1.0"
STOCK_FW_MODEL: XXX
MG_ENABLE_SSL: 0
SHELLY_HAVE_PM: 1
BTN_NOISY: 0
config_schema:
- ["device.id", "ShellyU-????"]
- ["shelly.name", "ShellyU-????"]
- ["file_logger.dir", "./"]
- ["ts1", "ts", {title: "TS1 settings"}]
- ["ts1.name", "Shelly TS"]
- ["ts2", "ts", {title: "TS2 settings"}]
- ["ts2.name", "Shelly TS"]
- ["sw1", "sw", {title: "SW1 settings"}]
- ["sw1.name", "ShellyU SW1"]
- ["in1", "in", {title: "Input 1 settings"}]
- ["in1.ssw.name", "ShellyU SSW1"]
- ["in1.sensor.name", "ShellyU S1"]
- ["in2", "in", {title: "Input 2 settings"}]
- ["in2.ssw.name", "ShellyU SSW2"]
- ["in2.sensor.name", "ShellyU S2"]
- when: build_vars.MODEL == "ShellyUDuo"
apply:
sources:
- src/ShellyDuo/shelly_init.cpp
- src/mock/pwm
- src/mock/wifi_config
libs:
- location: https://github.com/mongoose-os-libs/mongoose
variant: ubuntu-nossl
cdefs:
PRODUCT_HW_REV: "1.0"
STOCK_FW_MODEL: XXX
MG_ENABLE_SSL: 0
SHELLY_HAVE_PM: 0
BTN_NOISY: 0
config_schema:
- ["device.id", "ShellyUBulbDuo-??????"]
- ["shelly.name", "ShellyUBulbDuo-??????"]
- ["wifi.ap.ssid", "ShellyUBulbDuo-??????"]
- ["lb1", "lb", {title: "Light bulb settings"}]
- ["lb1.initial_state", 2] # last
- when: build_vars.MODEL == "ShellyU25"
apply:
sources:
- src/Shelly25/shelly_init_components.cpp # Same components as Shelly25
- src/mock/pwm
- src/mock/wifi_config
libs:
- location: https://github.com/mongoose-os-libs/mongoose
variant: ubuntu-nossl
cdefs:
PRODUCT_HW_REV: "1.0"
STOCK_FW_MODEL: XXX
MG_ENABLE_SSL: 0
SHELLY_HAVE_PM: 1
BTN_NOISY: 0
config_schema:
- ["device.id", "ShellyU25-????"]
- ["shelly.name", "ShellyU25-????"]
- ["file_logger.dir", "./"]
- ["sw1", "sw", {title: "SW1 settings"}]
- ["sw1.name", "ShellyU25 SW1"]
- ["in1", "in", {title: "Input 1 settings"}]
- ["in1.ssw.name", "ShellyU25 SSW1"]
- ["in1.sensor.name", "Shelly S1"]
- ["sw2", "sw", {title: "SW2 settings"}]
- ["sw2.name", "ShellyU25 SW2"]
- ["in2", "in", {title: "Input 2 settings"}]
- ["in2.ssw.name", "ShellyU25 SSW2"]
- ["in2.sensor.name", "ShellyU25 S2"]
- ["wc1", "wc", {title: "WC1 settings"}]
- ["wc1.name", "Window 1"]
- ["gdo1", "gdo", {title: "GDO1 settings"}]
- ["gdo1.name", "ShellyU25 GDO"]
- when: build_vars.MODEL == "ShellyURGBW2"
apply:
sources:
- src/ShellyRGBW2/shelly_init.cpp # Same components as ShellyRGBW2
- src/mock/pwm
- src/mock/wifi_config
libs:
- location: https://github.com/mongoose-os-libs/mongoose
variant: ubuntu-nossl
cdefs:
PRODUCT_HW_REV: "1.0"
STOCK_FW_MODEL: XXX
MG_ENABLE_SSL: 0
SHELLY_HAVE_PM: 0
BTN_NOISY: 0
config_schema:
- ["device.id", "ShellyRGBW2-????"]
- ["shelly.name", "ShellyRGBW2-????"]
- ["file_logger.dir", "./"]
- ["shelly.mode", 3]
- ["lb1", "lb", {title: "Light 1 settings"}]
- ["lb2", "lb", {title: "Light 2 settings"}]
- ["lb2.initial_state", 2] #input only available to lb1
- ["lb3", "lb", {title: "Light 3 settings"}]
- ["lb3.initial_state", 2] #input only available to lb1
- ["lb4", "lb", {title: "Light 4 settings"}]
- ["lb4.initial_state", 2] #input only available to lb1
- ["in1", "in", {title: "Input 1 settings"}]
- ["in1.ssw.name", "Shelly SSW1"]
- ["in1.sensor.name", "Shelly S1"]
manifest_version: 2020-01-29