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

Add Sonoff Itead S31 Lite Hardware Profile #1830

Merged
merged 2 commits into from
Aug 5, 2019

Conversation

CrazyIvan359
Copy link
Contributor

This adds a hardware profile for the S31 "Lite" version, which does not have the power monitoring chip installed on the board. The device is otherwise identical. It uses the exact same board and components as the regular S31.

I tried using the regular S31 profile, but Espurna would not boot because it could not open communications with the CSE7766 chip. The Lite profile simply removes the CSE7766 support and re-enables debug serial (might as well since we don't need the quiet for the CSE7766).

IMG_20190720_092306

Signed-off-by: Michael Murton <6764025+CrazyIvan359@users.noreply.github.com>
@mcspr
Copy link
Collaborator

mcspr commented Aug 5, 2019

Huh. This is exactly the same pin layout as Sonoff Basic:

// Relays
#define RELAY1_PIN 12
#define RELAY1_TYPE RELAY_TYPE_NORMAL
// LEDs
#define LED1_PIN 13
#define LED1_PIN_INVERSE 1

...or even going back to the Sonoff SV (minus second button)

Adding for convenience sake, but we need to handle these duplicates at some point

@mcspr mcspr merged commit c8547fa into xoseperez:dev Aug 5, 2019
@CrazyIvan359
Copy link
Contributor Author

CrazyIvan359 commented Aug 6, 2019

@mcspr what about a "base" hardware profile and addon profiles with only the extra options needed. Then in platformio.ini you make the build env with -DSONOFF_BASE -DSONOFF_S31 for example, then the S31 light would only be -DSONOFF_BASE. I'm actually doing something similar in my custom.h where Wi-Fi and MQTT creditials are defined, then a bunch of options defined for specific devices like MQTT topics and I do a define for the device name in the build command.

@tching911
Copy link

HI every body.
I just received my s31 lite sonoff and the connections are different from yours. Someone knows which pins p02 p03 or p04
are equivalent to tx and rx
Thank's
sonoff s31 lite

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

Successfully merging this pull request may close these issues.

None yet

3 participants