Skip to content

Support for Sonoff Basic #16

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

Open
ksga opened this issue Sep 1, 2021 · 5 comments
Open

Support for Sonoff Basic #16

ksga opened this issue Sep 1, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@ksga
Copy link

ksga commented Sep 1, 2021

Support for ESP8285 based Sonoff Basic would be very simple to achieve.
I made a custom build with a minimum of changes, and it works as expected.

Edited platformio.ini changing the env section as such:
platform = [email protected] board = esp8285 framework = arduino lib_deps = paulstoffregen/OneWire@^2.3.5 bblanchon/ArduinoJson@^6.17.2 WiFiManager=https://github.com/tzapu/WiFiManager.git ; commit f5dd402ba2698be17e27d357b1ead5291c3d0eb1 as of 04/12/2021 worked fine, see backup next line ;./dependencies/[email protected] monitor_speed = 115200 board_build.flash_mode = dout board_upload.maximum_size = 786432 board_build.ldscript = eagle.flash.1m128.ld build_flags = -DSIZE_1M -DBUILD_NO_DEBUG -Os -s

and modified OneWire port in main.cpp:
OneWire ds(2);

Easy enough for me to edit and build, but would be nice to see in the releases as well for the cheapos ;) (me....)

@BernhardSchlegel BernhardSchlegel added the enhancement New feature or request label Sep 1, 2021
@BernhardSchlegel
Copy link
Owner

Hey ksga, thanks for reaching out! Can you provide a PR?

Thanks,
Bernhard.

@BernhardSchlegel
Copy link
Owner

Hey @ksga, I noticed you forked the repo. I'd suggest you create a branch called 'feature/sonoff-basic-support' on your fork. And commit all your changes there! Thanks!

@WireTownMan
Copy link

I have also changed the one wire pin in Main.cpp to use pin 2, re-compiled and flashed a sonoff basic R1 with V2.0 hardware. It works without any issues. I suggest that either two versions of the firmware are compiled or the main software is updated to detect the OneWire pin the temperature senor is connected. Detecting the OneWire pin used for temperature would provide compatibility with many ESP8266 devices not just sonoff TH16

@BernhardSchlegel
Copy link
Owner

That's a great idea! Auto detecting the 1W pin is probably tricky. Maybe PIO has some built-in lookup tables which we can use, maybe as precompiler command?

@WireTownMan
Copy link

WireTownMan commented Jan 23, 2022 via email

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

No branches or pull requests

3 participants