Closed mvincm closed 5 years ago
Your change in sonoff_template.h
is probably wrong.
It was one simple change. Nothing to do with HX711. Take a look:
Original file:
// Default module settings
const mytmplt kModules[MAXMODULE] PROGMEM = {
{ "Sonoff Basic", // Sonoff Basic (ESP8266)
GPIO_KEY1, // GPIO00 Button
GPIO_USER, // GPIO01 Serial RXD and Optional sensor
GPIO_USER, // GPIO02 Only available on newer Sonoff Basic R2 V1
GPIO_USER, // GPIO03 Serial TXD and Optional sensor
GPIO_USER, // GPIO04 Optional sensor
0, // GPIO05
0, // GPIO06 (SD_CLK Flash)
0, // GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
0, // GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
0, // GPIO09 (SD_DATA2 Flash QIO)
0, // GPIO10 (SD_DATA3 Flash QIO)
0, // GPIO11 (SD_CMD Flash)
GPIO_REL1, // GPIO12 Red Led and Relay (0 = Off, 1 = On)
GPIO_LED1_INV, // GPIO13 Green Led (0 = On, 1 = Off)
GPIO_USER, // GPIO14 Optional sensor
0, // GPIO15
0, // GPIO16
0 // ADC0 Analog input
},
Changed file:
const mytmplt kModules[MAXMODULE] PROGMEM = {
{ "Sonoff Basic", // Sonoff Basic (ESP8266)
GPIO_KEY1, // GPIO00 Button
GPIO_USER, // GPIO01 Serial RXD and Optional sensor
GPIO_USER, // GPIO02 Only available on newer Sonoff Basic R2 V1
GPIO_USER, // GPIO03 Serial TXD and Optional sensor
GPIO_USER, // GPIO04 Optional sensor
GPIO_USER, // GPIO05 Optional sensor
0, // GPIO06 (SD_CLK Flash)
0, // GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
0, // GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
0, // GPIO09 (SD_DATA2 Flash QIO)
0, // GPIO10 (SD_DATA3 Flash QIO)
0, // GPIO11 (SD_CMD Flash)
GPIO_REL1, // GPIO12 Red Led and Relay (0 = Off, 1 = On)
GPIO_LED1_INV, // GPIO13 Green Led (0 = On, 1 = Off)
GPIO_USER, // GPIO14 Optional sensor
0, // GPIO15
0, // GPIO16
0 // ADC0 Analog input
},
Hi,
If you are not using the HX711 sensor, please, just disable it in _my_userconfig.h file, commenting the line #define USE_HX711
like //#define USE_HX711
Thanks
Have you defined the HX711 pins in the GPIO configuration ?
If I don't define those pins I don't have any readings from HX711.
Hello,
About "#define USE_HX711 like //#define USE_HX711". I will try it today and it should works (theoretically) but I'm afraid that there is some bug which could drain CPU/power (by not necessary readings/events).
I don't set up any HX171 sensors (thru web gui or thru my_user_config.h/sonoff_template.h file). The second observation is when I disconnect DS3231 those strange HX711 readings despair. So maybe it is problem with wrong I2C setup... but DS3231 works just fine.
@ascillato2 I can confirm it is a bug. If HX711 support is enabled there is HX711 on main page displayed....
13:32:07 MQT: Connected
13:32:07 MQT: tele/sonoff-1585B3B3/LWT = Online (retained)
13:32:07 MQT: cmnd/sonoff-1585B3B3/POWER =
13:32:07 MQT: tele/sonoff-1585B3B3/INFO1 = {"Module":"Generic","Version":"6.4.1.3(sonoff)","FallbackTopic":"cmnd/sonoff-1585B3B3_fb/","GroupTopic":"sonoffs"}
13:32:07 MQT: tele/sonoff-1585B3B3/INFO2 = {"WebServerMode":"Admin","Hostname":"sonoff-1585B3B3-1459","IPAddress":"192.168.2.149"}
13:32:07 MQT: tele/sonoff-1585B3B3/INFO3 = {"RestartReason":"External System"}
13:32:07 Write Time TO DS3231 from NTP (UTC) Sun Dec 30 12:32:07 2018, (DST) Sun Mar 25 02:00:00 2018, (STD) Sun Oct 28 03:00:00 2018
13:32:08 UPP: Multicast (re)joined
13:32:15 MQT: tele/sonoff-1585B3B3/STATE = {"Time":"2018-12-30T13:32:15","Uptime":"0T00:00:15","Vcc":3.039,"SleepMode":"Dynamic","Sleep":0,"LoadAvg":1204,"Wifi":{"AP":1,"SSId":"Jason_Home_WLAN","BSSId":"00:A0:57:2A:BD:19","Channel":9,"RSSI":100}}
13:32:15 MQT: tele/sonoff-1585B3B3/SENSOR = {"Time":"2018-12-30T13:32:15","HX711":{"Weight":0}}
13:36:10 CMD: i2cscan
13:36:10 MQT: stat/sonoff-1585B3B3/RESULT = {"I2CScan":"Device(s) found at 0x68"}
I will investigate
Caused by DS3231 breaking chain of functions.
Repaired and should be fine now.
@arendst Thank you, can confirm works correct now. @mvincm Thx for finding a bug, please close the issue.
Yeep!! It works just fine! Thx for quick response and support!
I have a similar problem, DS3231 is shown as BH1750, SHT3X-0x45 Temperature and SHT3X-0x45 Temperature.
I am trying to connect DS3231 to Sonoff Basic via serial as follows;
GPIO1 Serial Out SDA GPIO3 Serial In SCL
Serial logging disabled.
log during boot up is as follows;
00:00:00 Project sonoff Konteynir Bahce Isiklari Version 6.5.0(sonoff)-2_3_0 00:00:00 I2C: DS3231 found at 0x68 00:00:00 WIF: Connecting to AP1 Sur in mode 11N as sonoff-8166... 00:00:00 Set time from DS3231 to RTC (UTC) Wed Dec 31 00:00:00 1969, (DST) Sun Feb 15 19:31:44 1970, (STD) Sun Sep 20 20:31:44 1970 09:28:23 WIF: Connected 09:28:23 HTP: Web server active on sonoff-8166 with IP address 192.168.74.36 19:14:22 Write Time TO DS3231 from NTP (UTC) Sun Jun 23 16:14:22 2019, (DST) Sun Mar 31 02:00:00 2019, (STD) Sun Oct 27 03:00:00 2019 19:15:19 CMD: I2Cscan 19:15:19 RSL: stat/sonoff/RESULT = {"I2CScan":"Error 4 at 0x02"}
Gpio1 and 3 are not possible for a lot of use cases. See https://github.com/arendst/Sonoff-Tasmota/wiki/Expanding-Sonoffs#usable-pins
is there a way to use DS3231 with Sonoff Basic?
As far as I know, gpio1 and 3 are the only option available on board, other than soldering directly to ESP8x chip.
As you wrote correct only way is to solder on Esp for 1 additional Gpio There is GPIO14 or Gpio2 (depends on rev.) Wired to the header.
there is GPIO14 wired to the header, what are the pin configuration in this case?
it worked on GPIO1 Serial Out SDA and GPIO3 Serial In SCL after adding forward slashes to other I2C devices (basically I kept only #define USE_DS3231), built and uploaded. Serial logging disabled.
Hello!
Describe the bug I have compiled tasmota (6.4.1.2) for "sonoff basic" with DS3231 option enabled in "my_user_config.h"(uncomented line #define USE_DS3231). I use GIPO5 (SCL) and GPIO4 (SDA) with a little change in "sonoff_template.h":
And RTC seems to work but there is some strange log about HX711 on a console and on the main page there is a label "HX711 Weight 0 kg"
Something is wrong but kill me I do not know what... Compilation goes ok, RTC seems to work..
Also, make sure these boxes are checked [x] before submitting your issue - Thank you!
status 0
:To Reproduce As described beyond
Expected behavior No information about HX711 and maybe RTC time displayed on the main page.
Best regards, MvincM