Skip to content

Commit

Permalink
add model to github action build; fix upgradability from newer stock …
Browse files Browse the repository at this point in the history
…fws; fix pinning, remove neopixel as output, they are not a relay
  • Loading branch information
Markus Kirberg committed May 17, 2024
1 parent b993c8d commit cc78582
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
model: [Shelly1, Shelly1L, Shelly1PM, Shelly25, Shelly2, ShellyColorBulb, ShellyDuo, ShellyI3, ShellyPlug, ShellyPlugS, ShellyPlus1, ShellyPlus1PM, ShellyPlusI4, ShellyRGBW2, ShellyVintage, ShellyUNI]
model: [Shelly1, Shelly1L, Shelly1PM, Shelly25, Shelly2, ShellyColorBulb, ShellyDuo, ShellyI3, ShellyPlug, ShellyPlugS, ShellyPlus1, ShellyPlus1PM, ShellyPlusI4, ShellyPlusPlugS, ShellyRGBW2, ShellyVintage, ShellyUNI]
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
4 changes: 1 addition & 3 deletions mos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -563,14 +563,12 @@ conds:

- when: build_vars.MODEL == "ShellyPlusPlugS"
apply:
sources:
- src/ShellyPlugPlusS/shelly_init.cpp
name: PlusPlugS
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,nvs,0x3fc000,16K"
ESP_IDF_EXTRA_PARTITION_2: "shelly,data,0x88,0x3fc000,16K"
ESP_IDF_SDKCONFIG_OPTS: >
${build_vars.ESP_IDF_SDKCONFIG_OPTS}
CONFIG_FREERTOS_UNICORE=y
Expand Down
7 changes: 3 additions & 4 deletions src/ShellyPlugPlusS/shelly_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,15 @@
#include "shelly_sys_led_btn.hpp"
#include "shelly_temp_sensor_ntc.hpp"


namespace shelly {

void CreatePeripherals(std::vector<std::unique_ptr<Input>> *inputs,
std::vector<std::unique_ptr<Output>> *outputs,
std::vector<std::unique_ptr<PowerMeter>> *pms,
std::unique_ptr<TempSensor> *sys_temp) {
outputs->emplace_back(new OutputPin(1, 4, 1));
outputs->emplace_back(new OutputPin(98, LED_GPIO, 1)); // Red LED.
outputs->emplace_back(new OutputPin(99, LED2_GPIO, 1)); // Red LED.

// GPIO 25 and 26 are neopixel lights

std::unique_ptr<PowerMeter> pm(
new BL0937PowerMeter(1, 10 /* CF */, 22 /* CF1 */, 19 /* SEL */, 2,
Expand All @@ -53,7 +52,7 @@ void CreateComponents(std::vector<std::unique_ptr<Component>> *comps,
std::vector<std::unique_ptr<mgos::hap::Accessory>> *accs,
HAPAccessoryServerRef *svr) {
CreateHAPSwitch(1, mgos_sys_config_get_sw1(), nullptr, comps, accs, svr,
true /* to_pri_acc */, FindOutput(99) );
true /* to_pri_acc */, FindOutput(1));
}

} // namespace shelly

0 comments on commit cc78582

Please sign in to comment.