-
Notifications
You must be signed in to change notification settings - Fork 10
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
Comments
Hey ksga, thanks for reaching out! Can you provide a PR? Thanks, |
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! |
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 |
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? |
You don't have to check every pin for one wire, Sonoff only require gpio02 or gpio14. Socket type wifi switches based on SWA1 hardware all use gpio14.
Checking for a temperature sensor on pins 2 and 14 would allow the firmware to work on a large number of esp8266 based devices.
David KENT
On 23 Jan 2022, 15:03, at 15:03, Bernhard Schlegel ***@***.***> wrote:
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?
--
Reply to this email directly or view it on GitHub:
#16 (comment)
You are receiving this because you commented.
Message ID:
***@***.***>
|
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....)
The text was updated successfully, but these errors were encountered: