arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
22.2k stars 4.81k forks source link

I2C does not reckognize SCD30 device after power up #15627

Closed clanganke closed 2 years ago

clanganke commented 2 years ago

PROBLEM DESCRIPTION

The problem occurs with versions from Tasmota v10.1.0 on, including the current development v11.1.0.3, and did not occurr from v9.2.0 (first version being used here) up to and including v10.0.0: With an ESP8266 with I2C attached 7segment display (address 0x70) and I2C attached SCD30 sensor (address 0x61), the sensor is not being detected (early enough..?) after a power up, even though the i2cscan command reports both devices right afterwards:

  21:25:43.873 MQT: stat/mydevice/RESULT = {"I2CScan":"Device(s) found at 0x61 0x70"}

Without a power cut, like with a restart and after e.g. reflashing Tasmota, the sensor is being reckognized on startup

REQUESTED INFORMATION

- [ ] If using rules, provide the output of this command: `Backlog Rule1; Rule2; Rule3`:
```lua
  Rules output here:
  -none-
- [x] Set `weblog` to 4 and then, when you experience your issue, provide the output of the Console log:
```lua
  Console output here:
00:00:00.001 HDW: ESP8266EX
00:00:00.050 CFG: aus Flash geladen von F9, Anzahl 185
00:00:00.056 QPC: Count 1
00:00:00.059 ROT: Mode 1
00:00:00.061 I2C: SevenSeg gefunden bei 0x70
00:00:00.065 SRC: Restart
00:00:00.067 Projekt tasmota - mydevice Version 11.1.0.3(tasmota)-2_7_4_9(2022.05.14 22:23:53)
00:00:00.081 SRC: Rule
00:00:00.082 CMD: Grp 0, Cmd 'POWER', Idx 1, Len 1, Pld 1, Data '1'
00:00:00.085 RSL: RESULT = {"POWER":"ON"}
00:00:00.086 RSL: POWER = ON
00:00:00.087 SRC: Rule
00:00:00.088 CMD: Grp 0, Cmd 'DISPLAYMODE', Idx 1, Len 1, Pld 3, Data '3'
00:00:00.093 RSL: RESULT = {"DisplayMode":3}
00:00:00.096 SRC: Rule
00:00:00.097 CMD: Grp 0, Cmd 'DISPLAYDIMMER', Idx 1, Len 4, Pld 6, Data '6.00'
00:00:00.100 RSL: RESULT = {"DisplayDimmer":6}
00:00:00.102 SRC: Rule
00:00:00.103 CMD: Grp 0, Cmd 'DISPLAYBLINKRATE', Idx 1, Len 1, Pld 0, Data '0'
00:00:00.106 RSL: RESULT = {"DisplayBlinkrate":0}
00:00:00.220 WIF: Prüfe Verbindung...
00:00:00.221 WIF: Verbindungsversuch...
00:00:00.558 WIF: verbinden mit AP1 MySSID Channel 5 BSSId 2C:91:AB:96:AA:84 in Modus 11n als mydevice...
00:00:02.484 WIF: Prüfe Verbindung...
00:00:02.485 WIF: verbunden
00:00:02.687 HTP: Web-Server aktiv bei mydevice mit IP-Adresse 192.168.1.15
00:00:02.989 HTP: Konsolen
00:00:03.383 WIF: Sending Gratuitous ARP
00:00:03.385 NTP: Sync time...
00:00:03.413 RTC: UTC 2022-05-14T20:45:48, DST 2022-03-27T02:00:00, STD 2022-10-30T03:00:00
21:54:48.001 RTC: Synced by NTP
21:54:48.271 MQT: Verbindungsversuch...
21:54:50.064 MQT: TLS connected in 1621 ms, max ThunkStack used 4500
21:54:50.066 MQT: Server fingerprint: 69 35 83 D2 76 0F E9 73 22 A0 DD 65 22 AC FE EF E6 23 E1 6E
21:54:50.067 MQT: verbunden
21:54:50.121 MQT: tele/mydevice/LWT = Online (beibehalten)
21:54:50.133 MQT: cmnd/mydevice/POWER = 
21:54:50.135 MQT: abonniere cmnd/mydevice/#
21:54:50.143 MQT: abonniere cmnd/tasmotas/#
21:54:50.150 MQT: abonniere cmnd/mydevice_fb/#
21:54:50.212 MQT: tele/mydevice/INFO1 = {"Info1":{"Module":"mydevice","Version":"11.1.0.3(tasmota)","FallbackTopic":"cmnd/mydevice_fb/","GroupTopic":"cmnd/tasmotas/"}}
21:54:50.231 MQT: tele/mydevice/INFO2 = {"Info2":{"WebServerMode":"Admin","Hostname":"mydevice","IPAddress":"192.168.1.15"}}
21:54:50.247 MQT: tele/mydevice/INFO3 = {"Info3":{"RestartReason":"External System","BootCount":22}}
21:54:50.264 MQT: stat/mydevice/RESULT = {"POWER":"ON"}
21:54:50.274 MQT: stat/mydevice/POWER = ON
21:54:50.286 HTP: Konsole
21:54:52.435 QPC: Reset
21:54:54.381 APP: Anzahl Startvorgänge 22

After a restart the SCD30 sensor is being reckognized:

...
00:00:00.102 CMD: Grp 0, Cmd 'DISPLAYBLINKRATE', Idx 1, Len 1, Pld 0, Data '0'
00:00:00.105 RSL: RESULT = {"DisplayBlinkrate":0}
00:00:00.124 I2C: SCD30 gefunden bei 0x61
00:00:00.125 SCD: FW v3.66
00:00:00.181 WIF: Prüfe Verbindung...
00:00:00.182 WIF: Verbindungsversuch...
00:00:00.518 WIF: verbinden mit AP1 MySSID Channel 5 BSSId 2C:91:AB:96:AA:84 in Modus 11n als mydevice...
...

TO REPRODUCE

EXPECTED BEHAVIOUR

SCREENSHOTS

none

ADDITIONAL CONTEXT

not req.

sfromis commented 2 years ago

Duplicate of https://github.com/arendst/Tasmota/issues/15438

clanganke commented 2 years ago

Hmm searched for I2C there only, I bet ... maybe it is at least of value to have pinpointed the first version with the error.

arnowelzel commented 2 years ago

I still experience this problem with a D1 mini and Tasmota 12.0.1.1