Skip to content

Commit

Permalink
add support for plus1mini
Browse files Browse the repository at this point in the history
  • Loading branch information
markirb committed Aug 23, 2024
1 parent 16ce87a commit 289af3b
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 18 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
- ShellyPlus2PM
- ShellyPlusI4
- ShellyPlusPlugS
- ShellyPlus1Mini
- ShellyMini1Gen3
- ShellyMini1PMGen3
- ShellyRGBW2
Expand Down
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MAKEFLAGS += --warn-undefined-variables --no-builtin-rules

.PHONY: build check-format format release upload \
Shelly1 Shelly1L Shelly1PM Shelly25 Shelly2 ShellyColorBulb ShellyDuo ShellyI3 ShellyPlug ShellyPlugS ShellyPlusPlugS ShellyPlus1 ShellyPlus1PM ShellyPlus2PM ShellyPlusI4 ShellyRGBW2 ShellyVintage ShellyU ShellyU25 ShellyUDuo ShellyURGBW2 ShellyUNI
Shelly1 Shelly1L Shelly1PM Shelly25 Shelly2 ShellyColorBulb ShellyDuo ShellyI3 ShellyPlug ShellyPlugS ShellyPlusPlugS ShellyPlus1 ShellyPlus1PM ShellyPlus2PM ShellyPlusI4 ShellyRGBW2 ShellyVintage ShellyU ShellyU25 ShellyUDuo ShellyURGBW2 ShellyUNI ShellyPlus1Mini
.SUFFIXES:

MOS ?= mos
Expand All @@ -27,7 +27,7 @@ ifneq "$(VERBOSE)$(V)" "00"
MOS_BUILD_FLAGS_FINAL += --verbose
endif

build: Shelly1 Shelly1L Shelly1PM Shelly25 Shelly2 ShellyColorBulb ShellyDuo ShellyI3 ShellyPlug ShellyPlugS ShellyPlusPlugS ShellyPlus1 ShellyPlus1PM ShellyPlus2PM ShellyPlusI4 ShellyRGBW2 ShellyVintage ShellyU ShellyU25 ShellyURGBW2 ShellyUNI
build: Shelly1 Shelly1L Shelly1PM Shelly25 Shelly2 ShellyColorBulb ShellyDuo ShellyI3 ShellyPlug ShellyPlugS ShellyPlusPlugS ShellyPlus1 ShellyPlus1PM ShellyPlus2PM ShellyPlusI4 ShellyRGBW2 ShellyVintage ShellyU ShellyU25 ShellyURGBW2 ShellyUNI ShellyPlus1Mini

release:
$(MAKE) build CLEAN=1 RELEASE=1
Expand Down Expand Up @@ -84,6 +84,10 @@ ShellyPlusI4: PLATFORM=esp32
ShellyPlusI4: build-ShellyPlusI4
@true

ShellyPlus1Mini: PLATFORM=esp32
ShellyPlus1Mini: build-ShellyPlus1Mini
@true

ShellyMini1Gen3: PLATFORM=esp32c3
ShellyMini1Gen3: build-ShellyMini1Gen3
@true
Expand Down
25 changes: 16 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ Reverting to stock firmware is also possible [see here](https://github.com/mongo

### Plus devices

| |[+1]|[+1PM]|[+2PM]|+i4 [AC]/[DC]|[+Plug S]
|- |- |- |- |- |-
|Switch & Co.<sup>1</sup> |✓ |✓ |✓ |✗ |✓
|Stateless Input<sup>2</sup> |✓ |✓ |✓ |✓ |✗
|Sensors<sup>3</sup> |✓ |✓ |✓ |✓ |✗
|Garage door opener |✓ |✓ |✓ |✗ |✗
|Roller shutter mode |✗ |✗ |✓ |✗ |✗
|Power measurement |✗ |✓ |✓ |✗ |✓
|Temperature/Humidity measurement<sup>4</sup>|✓ |✓ |✓ |✓ |✗
| |[+1]|[+1Mini]|[+1PM]|[+2PM]|+i4 [AC]/[DC]|[+Plug S]
|- |- |- |- |- |- |-
|Switch & Co.<sup>1</sup> |✓ |✓ |✓ |✓ |✗ |✓
|Stateless Input<sup>2</sup> |✓ |✓ |✓ |✓ |✓ |✗
|Sensors<sup>3</sup> |✓ |✗ |✓ |✓ |✓ |✗
|Garage door opener |✓ |✓ |✓ |✓ |✗ |✗
|Roller shutter mode |✗ |✗ |✗ |✓ |✗ |✗
|Power measurement |✗ |✗ |✓ |✓ |✗ |✓
|Temperature/Humidity measurement<sup>4</sup>|✓ |✗ |✓ |✓ |✓ |✗

### Pro devices

Expand Down Expand Up @@ -152,12 +152,19 @@ See [here](https://github.com/mongoose-os-apps/shelly-homekit/wiki/Development)

See [here](AUTHORS.md).

## Support

If you like the project, consider a Donation to markib via [Paypal](https://www.paypal.com/donate/?hosted_button_id=RVFA9G5VMXRX8)

## License

This firmware is free software and is distributed under [Apache 2.0 license](LICENSE).

[1]: https://www.shelly.cloud/en/products/shop/1xs1
[+1]: https://www.shelly.cloud/en/products/shop/shelly-plus-1
[+1Mini]: https://www.shelly.cloud/en/products/shop/shelly-plus-1-mini
[Mini1G3]: https://www.shelly.cloud/en/products/shop/shelly-1-mini-gen-3
[Mini1PMG3]: https://www.shelly.cloud/en/products/shop/shelly-1-pm-mini-gen3
[+1PM]: https://www.shelly.cloud/en/products/shop/shelly-plus-1-pm-2-pack/shelly-plus-1-pm
[+2PM]: https://www.shelly.cloud/en/products/shop/shelly-plus-2-pm
[+Plug S]: https://www.shelly.cloud/en/products/shop/shelly-plus-plug-s
Expand Down
8 changes: 1 addition & 7 deletions fs_src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -425,14 +425,8 @@ <h1>Firmware</h1>
href="https://github.com/mongoose-os-apps/shelly-homekit/blob/master/AUTHORS.md">Shelly-HomeKit
contributors</a>.
<br>Use <a href="https://github.com/mongoose-os-apps/shelly-homekit/issues">GitHub</a> to report bugs and
request features.
request features. If you like the firmware consider a <a href="https://github.com/mongoose-os-apps/shelly-homekit?tab=readme-ov-file#support">Donation</a>.
<br>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick" />
<input type="hidden" name="hosted_button_id" value="6KPSKWJDHVLB4" />
<input type="image" id="donate_form_submit" border="0" name="submit" title="Donate via PayPal"
alt="Donate via PayPal" style="display: none" />
</form>
</div>
</div>

Expand Down
40 changes: 40 additions & 0 deletions mos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,46 @@ conds:
- ["gdo1.name", "Garage Door"]
- ["gdo1.open_sensor_mode", 2]

- when: build_vars.MODEL == "ShellyPlus1Mini"
apply:
name: Plus1Mini
sources:
- src/ShellyMini1Gen3
libs:
- 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,encrypted"
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: 1
BTN_DOWN: 0
PRODUCT_HW_REV: "0.1.6"
STOCK_FW_MODEL: Plus1Mini
MAX_NUM_HAP_SESSIONS: 16
config_schema:
- ["device.id", "ShellyPlus1Mini-??????"]
- ["shelly.name", "ShellyPlus1Mini-??????"]
- ["wifi.ap.ssid", "ShellyPlus1Mini-??????"]
- ["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]

- when: build_vars.MODEL == "ShellyPlus1"
apply:
name: Plus1
Expand Down

0 comments on commit 289af3b

Please sign in to comment.