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 TH10/16 #476

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Add Sonoff TH10/16 #476

wants to merge 4 commits into from

Conversation

tyeth
Copy link
Contributor

@tyeth tyeth commented Aug 28, 2023

This adds the initial provisional ALPHA quality release for the Sonoff TH10/16 Relays, using the ESP8266.

@tyeth tyeth marked this pull request as ready for review August 28, 2023 14:00
@tyeth tyeth marked this pull request as draft August 28, 2023 15:45
@tyeth
Copy link
Contributor Author

tyeth commented Aug 28, 2023

Will require the board adding to the CI system, both in this repo (doxy yaml), and ci-arduino
https://github.com/adafruit/ci-arduino/blob/master/build_platform.py#L54-L179
(Currently the ci-arduino repo used is not the adafruit copy, but the brentru fork)

Copy link
Member

@brentru brentru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK, some questions and changes. Have you gotten this running yet?

@@ -68,6 +68,7 @@ monitor_filters = esp32_exception_decoder, time
[common:esp8266]
platform = espressif8266
lib_ignore = WiFiNINA, Adafruit TinyUSB Library
board_build.filesystem = littlefs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am curious - why is this flag required for the sonoff_th but not for the huzzah ESP8266?

Copy link
Contributor Author

@tyeth tyeth Sep 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think maybe it is required for both. I couldn't push the filesystem image (platformIO) for the ESP8266 huzzah without this, I kept forgetting as it was part of my stash with secrets data file. Maybe I've got something configured wrong, but I think it was defaulting to spiffs rather than littlefs. I did the initial sonoff work just before the huzzah arrived later in the day and I was then able to get the secrets across and see debug with both sonoff + huzzah and moved the line to the common:esp8266 definition instead of the sonoff one.
I'll try to check on a fresh machine at some point soon.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't push the filesystem image (platformIO) for the ESP8266 huzzah without this, I kept forgetting as it was part of my stash with secrets data file. Maybe I've got something configured wrong, but I think it was defaulting to spiffs rather than littlefs

Interesting! Could you try in the near the board define, USE_LITTLEFS too?

#define BOARD_ID "sonoff-th"
#define USE_LITTLEFS
#define USE_STATUS_LED
#define STATUS_LED_PIN 13 // pull down
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this pin pulled down by default?

@@ -82,7 +82,7 @@ void Wippersnapper_DigitalGPIO::initDigitalPin(
#endif

// Initialize LOW
#if defined(ARDUINO_ESP8266_ADAFRUIT_HUZZAH)
#if defined(ARDUINO_ESP8266_ADAFRUIT_HUZZAH) || defined(ESP8266_SONOFF_TH)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This applies to every ifdef like this, would we want to detect the ESP8266 arch instead of individual boards? Both boards we're using here (and elsewhere) seem to take the same pinout/pd resistor

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

2 participants