Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wich is the correct FW for the Shelly Plug S #2570

Open
tschuchort opened this issue Jan 5, 2023 · 1 comment
Open

Wich is the correct FW for the Shelly Plug S #2570

tschuchort opened this issue Jan 5, 2023 · 1 comment
Labels

Comments

@tschuchort
Copy link

Device

Shelly Plug S (EU)

Version

No response

Question

Hi, can anyone please point me to the correct firmware for the Allterco Shelly Plug S or isn't this device supported?
Thanks in advance.

@mcspr
Copy link
Collaborator

mcspr commented Jan 11, 2023

Not as-is, but based on the https://templates.blakadder.com/shelly_plug_S.html we should be able to use ALLTERCO_SHELLY1PM with some adjustments
(obviously, calibration might be off)

// ...

#elif defined(ALLTERCO_SHELLY1PM)
    // Info
    #define MANUFACTURER        "ALLTERCO"
    #define DEVICE              "SHELLY_PLUG_S"

    // Status LEDs
    #define LED1_PIN            0
    #define LED1_PIN_INVERSE    1

    #define LED2_PIN            2
    #define LED2_PIN_INVERSE    1

    // Buttons
    #define BUTTON1_PIN         4
    #define BUTTON1_CONFIG      BUTTON_SWITCH | BUTTON_DEFAULT_BOOT
    #define BUTTON1_RELAY       1
    #define BUTTON1_PRESS       BUTTON_ACTION_TOGGLE
    #define BUTTON1_RELEASE     BUTTON_ACTION_TOGGLE

    #define BUTTON2_PIN         2
    #define BUTTON2_CONFIG      BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
    #define BUTTON2_LNGCLICK    BUTTON_ACTION_RESET
    #define BUTTON2_LNGLNGCLICK BUTTON_ACTION_FACTORY

    // Relays
    #define RELAY1_PIN          15
    #define RELAY1_TYPE         RELAY_TYPE_NORMAL

    // HJL01 / BL0937
    #define HLW8012_SUPPORT             1
    #define HLW8012_SEL_PIN             12
    #define HLW8012_CF1_PIN             14
    #define HLW8012_CF_PIN              5

    #define HLW8012_SEL_CURRENT         LOW
    #define HLW8012_CURRENT_RATIO       25740
    #define HLW8012_VOLTAGE_RATIO       313400
    #define HLW8012_POWER_RATIO         3414290
    #define HLW8012_INTERRUPT_ON        FALLING

    //Temperature
    #define NTC_SUPPORT        1
    #define SENSOR_SUPPORT     1
    #define NTC_BETA           3350
    #define NTC_R_UP           32000
    #define NTC_R_DOWN         0
    #define NTC_R0             10000

// ...

Runtime config is (partially) described in the wiki; we need to adjust ledGpio..., relayGpio0 and hlw8012CF1 pins in settings storage if you mean to run PM .bin first
https://github.com/xoseperez/espurna/wiki/Buttons-and-switches

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants