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

Sonoff SC Sensors not available anymore Webgui/MQTT/Status 8 #5005

Closed WaaromZoMoeilijk closed 5 years ago

WaaromZoMoeilijk commented 5 years ago

Make sure these boxes are checked [x] before submitting your issue - Thank you!

Status 8 should give me the info, but only reports time:

19:19:48 CMD: status 8
19:19:48 SRC: WebConsole from 192.168.3.3
19:19:48 RSL: Received Topic /status, Data Size 1, Data 8
19:19:48 RSL: Group 0, Index 1, Command STATUS, Data 8
19:19:48 MQT: sonoffsc/stat/STATUS8 = {"StatusSNS":{"Time":"2019-01-22T19:19:48"}}

This all did not happen after an upgrade or anything, just was gone, rebooting, reflashing etc etc doesnt work. Some more info:

19:21:26 CMD: I2Cscan
19:21:26 SRC: WebConsole from 192.168.3.3
19:21:26 RSL: Received Topic /I2Cscan, Data Size 0, Data 
19:21:26 RSL: Group 0, Index 1, Command I2CSCAN, Data 
19:21:26 MQT: sonoffsc/stat/RESULT = {"Command":"Unknown"}
19:21:45 CMD: Gpio
19:21:45 SRC: WebConsole from 192.168.3.3
19:21:45 RSL: Received Topic /Gpio, Data Size 0, Data 
19:21:45 RSL: Group 0, Index 1, Command GPIO, Data 
19:21:45 MQT: sonoffsc/stat/RESULT = {"GPIO2":"0 (None)"}
19:21:59 CMD: gpios
19:21:59 SRC: WebConsole from 192.168.3.3
19:21:59 RSL: Received Topic /gpios, Data Size 0, Data 
19:21:59 RSL: Group 0, Index 1, Command GPIOS, Data 
19:21:59 MQT: sonoffsc/stat/RESULT = {"GPIOs1":["0 (None)","18 (Button2)","91 (Button2n)","19 (Button3)","92 (Button3n)","20 (Button4)","93 (Button4n)","9 (Switch1)","82 (Switch1n)","10 (Switch2)","83 (Switch2n)","11 (Switch3)","84 (Switch3n)","12 (Switch4)","85 (Switch4n)","13 (Switch5)","86 (Switch5n)","14 (Switch6)","87 (Switch6n)","15 (Switch7)","88 (Switch7n)","16 (Switch8)","89 (Switch8n)","21 (Relay1)","29 (Relay1i)","22 (Relay2)","30 (Relay2i)","23 (Relay3)"]}
19:21:59 MQT: sonoffsc/stat/RESULT = {"GPIOs2":["31 (Relay3i)","24 (Relay4)","32 (Relay4i)","25 (Relay5)","33 (Relay5i)","26 (Relay6)","34 (Relay6i)","27 (Relay7)","35 (Relay7i)","28 (Relay8)","36 (Relay8i)","53 (Led2)","57 (Led2i)","54 (Led3)","58 (Led3i)","55 (Led4)","59 (Led4i)","37 (PWM1)","46 (PWM1i)","38 (PWM2)","47 (PWM2i)","39 (PWM3)","48 (PWM3i)","40 (PWM4)","49 (PWM4i)","41 (PWM5)","50 (PWM5i)","42 (Counter1)","94 (Counter1n)","43 (Counter2)","95 (Counter2n)"]}
19:21:59 MQT: sonoffsc/stat/RESULT = {"GPIOs3":["44 (Counter3)","96 (Counter3n)","45 (Counter4)","97 (Counter4n)","5 (I2C SCL)","6 (I2C SDA)","1 (DHT11)","2 (AM2301)","3 (SI7021)","4 (DS18x20)","7 (WS2812)","8 (IRsend)","51 (IRrecv)","105 (RFSend)","106 (RFrecv)","116 (RF Sensor)","73 (SR04 Tri)","74 (SR04 Ech)","79 (TM16 CLK)","80 (TM16 DIO)","81 (TM16 STB)","102 (HX711 SCK)","103 (HX711 DAT)","71 (SerBr Tx)","72 (SerBr Rx)","60 (MHZ Tx)","61 (MHZ Rx)","64 (SAir Tx)"]}
19:22:00 MQT: sonoffsc/stat/RESULT = {"GPIOs4":["65 (SAir Rx)","101 (SDS0X1 Tx)","70 (SDS0X1 Rx)","62 (PZEM0XX Tx)","63 (PZEM004 Rx)","98 (PZEM016 Rx)","99 (PZEM017 Rx)","75 (SDM120/220 Tx)","76 (SDM120/220 Rx)","77 (SDM630 Tx)","78 (SDM630 Rx)","69 (PMS5003)","104 (TX20)","100 (MP3 Player)","107 (Tuya Tx)","108 (Tuya Rx)"]}
Jason2866 commented 5 years ago

Erase flash with esptool (as described in wiki) and flash Tasmota again.

WaaromZoMoeilijk commented 5 years ago

Already done that. Changes nothing. Also with the linux version earasing flash is not supported, it does that when writing the firmware. In both linux and windows it says ereasing flash when im uploading sonof.bin

WaaromZoMoeilijk commented 5 years ago

@Jason2866 Also retrying it with esptool on linux i get this error:

root@wzm-PC:~# esptool --port /dev/ttyUSB0 erase_flash
esptool.py v2.1
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266
Enabling default SPI flash mode...
Erasing flash (this may take a while)...

A fatal error occurred: ESP8266 ROM does not support function erase_flash.
Jason2866 commented 5 years ago

So, you have hardware problem....

WaaromZoMoeilijk commented 5 years ago

Right, what makes you believe that? Sensors not showing or unable to manually erase flash?

I've done nothing with the hardware, did not take it apart, no other PSU or anything and its gone all of a sudden.

Jason2866 commented 5 years ago

If flash fails something is faulty in hardware. In the case that flash works in general for you If flash fails in genearal you have a hardware problem too ;-)

WaaromZoMoeilijk commented 5 years ago

The flash doesn't fail... Note that it happend without me doing anything "automagically" After i noticed the sensors had been gone, i reflashed, which just worked, selected the right module, and still nothing, can't be that 4 individual sensors are failing all at once...

Jason2866 commented 5 years ago

A fatal error occurred: ESP8266 ROM does not support function erase_flash. ??!! After erase flash command there has to be a message successfull and the time needed for erasing Since this is missing something goes wrong during erase and probably flashing tasmota too

You will have to remove the TX jumper in the board to avoid the ATMega328P to interfere in the upload process.

WaaromZoMoeilijk commented 5 years ago

I'm gratefull for your help, but please read closely.

Also retrying it with esptool on linux i get this error:

root@wzm-PC:~# esptool --port /dev/ttyUSB0 **erase_flash**
esptool.py v2.1
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266
Enabling default SPI flash mode...
Erasing flash (this may take a while)...

A fatal error occurred: ESP8266 ROM does not support function erase_flash.

So this is only the erase command, not the write command.

Using windows ESPtool/ESPeasy successfully writes sonoff.bin, with a flash erase that succeeds as the logs out put.

So I have a fully functioning tasmota device, only the sensors don't show up in the webgui/console status 8

And good point, i have removed TX jumper before flashing, as the docs state.

Edit: Also managed to do a successful flash with esptool on linux, where the write command also takes care of a erase flash, that succeeds.

joba-1 commented 5 years ago

Hi, the output just states the more or less obvious: you cannot write (or erase) Read Only Memory. Maybe it helps if you add -vvv to the esptool command to find out more background. Best also on linux, where it works so we can compare.

WaaromZoMoeilijk commented 5 years ago

@joba-1 Yes thanks, but again this is not the issue as the write commands perfectly erase the device. Flash works fine because i tried different versions and they show up properly in the info page at the webui

Jason2866 commented 5 years ago

If everything is okay, it is fine...

WaaromZoMoeilijk commented 5 years ago

If everything is okay, it is fine...

Yes it would be, but its not...

ascillato commented 5 years ago

If you have already erased the flash and flashed again successfully, and you have selected the correct module in module config, and the issue just happens without any change, seems to be a hardware issue.

Please, check with a DMM if the sensors are receiving voltage.

WaaromZoMoeilijk commented 5 years ago

If you have already erased the flash and flashed again successfully, and you have selected the correct module in module config, and the issue just happens without any change, seems to be a hardware issue.

Please, check with a DMM if the sensors are receiving voltage.

Will do, will report back in a sec

@ascillato Ok everything has power:

Dust sensor: 4.8v Light sensor: 4.3v Temp/humid sensor: 4.9v Noise sensor: 2.4v

seems alright doesn't it? Any further advice?

edit, ive set the correct module to SC (21) just to clarify

mike2nl commented 5 years ago

@ezraholm50 Possible a stupid question:

https://camo.githubusercontent.com/987437f46e7aea63e96e87b0bf315d7ddb1fc80c/68747470733a2f2f7075752e73682f765a5a52492f666633366666393234342e6a7067

or here: https://github.com/arendst/Sonoff-Tasmota/wiki/Sonoff-SC

WaaromZoMoeilijk commented 5 years ago

Hey Mike, thanks for the heads up, yeah there on there the right way! No stupid questions, could all possibly be the solution, though this time it aint.

ascillato commented 5 years ago

@ezraholm50

You have erased and reflashed it, you have checked voltages, you have put back the jumpers after flashing, so, as it fails just suddendly without anything changed from you, seems to be a type of hardware issue.

Let's check the console for more debugging. Please, use the command weblog 4 in the console and restart your device. Please, then post the full output of the console. Thanks.

Tontze commented 5 years ago

Hm, you are talking about jumpers, not jumper. In docs you remove only TX jumper for flashing purposes, not both ?

I have similar problems tho, all sensors updates only once, when i add power to the module. Not even when i reboot device, only when i unplug/plug in power ...

WaaromZoMoeilijk commented 5 years ago

@Tontze I've tried every option now, only TX off, both off, both on, nothing seems to make a difference.

@ascillato Thanks for your help, here is the output after a restart with weblog 4

00:00:00 CFG: Loaded from flash at F9, Count 64
00:00:00 APP: Set Baudrate to 19200
00:00:00 SRC: Restart
00:00:00 Project sonoff Sonoff SC Version 6.4.1(release-sensors)-2_3_0
00:00:00 SER: Transmit AT+START
00:00:00 WIF: Checking connection...
00:00:00 WIF: Attempting connection...
00:00:00 WIF: Patch issue 2186
00:00:00 WIF: Connecting to AP1 HASS in mode 11N as sonoffsc-7808...
00:00:01 WIF: Checking connection...
00:00:01 WIF: Attempting connection...
00:00:02 WIF: Checking connection...
00:00:02 WIF: Attempting connection...
00:00:03 WIF: Checking connection...
00:00:03 WIF: Attempting connection...
00:00:04 WIF: Checking connection...
00:00:04 WIF: Connected
00:00:04 DNS: Initialized
00:00:04 HTP: Web server active on sonoffsc-7808.local with IP address 192.168.6.106
00:00:05 MQT: Attempting connection...
00:00:05 MQT: Connected
00:00:05 MQT: sonoffsc/tele/LWT = Online (retained)
00:00:05 MQT: sonoffsc/cmnd/POWER = 
00:00:05 MQT: Subscribe to sonoffsc/cmnd/#
00:00:05 MQT: Subscribe to sonoffs/cmnd/#
00:00:05 MQT: Subscribe to cmnd/DVES_FD1E80_fb/#
00:00:05 MQT: sonoffsc/tele/INFO1 = {"Module":"Sonoff SC","Version":"6.4.1(release-sensors)","FallbackTopic":"cmnd/DVES_FD1E80_fb/","GroupTopic":"sonoffs"}
00:00:06 MQT: sonoffsc/tele/INFO2 = {"WebServerMode":"Admin","Hostname":"sonoffsc-7808","IPAddress":"192.168.6.106"}
00:00:06 MQT: sonoffsc/tele/INFO3 = {"RestartReason":"Software/System restart"}
00:00:06 MQT: homeassistant/light/FD1E80_LI_1/config =  (retained)
00:00:06 MQT: homeassistant/switch/FD1E80_RL_1/config =  (retained)
00:00:06 MQT: homeassistant/light/FD1E80_LI_2/config =  (retained)
00:00:06 MQT: homeassistant/switch/FD1E80_RL_2/config =  (retained)
00:00:06 MQT: homeassistant/light/FD1E80_LI_3/config =  (retained)
00:00:06 MQT: homeassistant/switch/FD1E80_RL_3/config =  (retained)
00:00:06 MQT: homeassistant/light/FD1E80_LI_4/config =  (retained)
00:00:06 MQT: homeassistant/switch/FD1E80_RL_4/config =  (retained)
00:00:06 MQT: homeassistant/light/FD1E80_LI_5/config =  (retained)
00:00:06 MQT: homeassistant/switch/FD1E80_RL_5/config =  (retained)
00:00:06 MQT: homeassistant/light/FD1E80_LI_6/config =  (retained)
00:00:06 MQT: homeassistant/switch/FD1E80_RL_6/config =  (retained)
00:00:06 MQT: homeassistant/light/FD1E80_LI_7/config =  (retained)
00:00:06 MQT: homeassistant/switch/FD1E80_RL_7/config =  (retained)
00:00:06 MQT: homeassistant/light/FD1E80_LI_8/config =  (retained)
00:00:06 MQT: homeassistant/switch/FD1E80_RL_8/config =  (retained)
00:00:10 APP: Boot Count 37
00:00:10 CFG: Saved to flash at F8, Count 65, Bytes 3584
00:00:14 MQT: sonoffsc/tele/STATE = {"Time":"1970-01-01T00:00:14","Uptime":"0T00:00:14","SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"Wifi":{"AP":1,"SSId":"HASS","BSSId":"02:4E:26:12:37:B4","Channel":1,"RSSI":58}}
00:00:17 APP: (UTC) Fri Jan 25 19:50:50 2019, (DST) Sun Mar 31 02:00:00 2019, (STD) Sun Oct 27 03:00:00 2019
20:50:57 WIF: Checking connection...
20:50:57 WIF: Connected
20:51:17 WIF: Checking connection...
20:51:17 WIF: Connected
20:51:28 CMD: status 8
20:51:28 SRC: WebConsole from 192.168.3.3
20:51:28 RSL: Received Topic /status, Data Size 1, Data 8
20:51:28 RSL: Group 0, Index 1, Command STATUS, Data 8
20:51:28 MQT: sonoffsc/stat/STATUS8 = {"StatusSNS":{"Time":"2019-01-25T20:51:28"}}

Ive also entered status 8, its just the same as it was when i posted the issue. It doesnt really show anything more, right?

ascillato commented 5 years ago

Thanks for share.

The ESP is sending the START to the other MCU, but the other is not responding.

Please, re check the jumpers, may be they are lose or there is something in the path of the the TX from the MCU to the ESP8266.

WaaromZoMoeilijk commented 5 years ago

Hmm nothing seems out of the ordinary. Anything else i can try? Reflash the other chip?

ascillato commented 5 years ago

So, please check with a DMM if the track of TX from the mcu to the esp8266 is ok. Also check that there is VCC and GND on tha mcu. If all that is ok, sorry but that mcu is dead. I don't know about flashing that other. Sorry.

WaaromZoMoeilijk commented 5 years ago

Guess i'll have to leave it at that, there 4.9 volt flowing through both rx and TX and every VCC and GND are ok...

Any idea if i can salvage parts of other sonoffs? Thanks anyway so far!

ascillato commented 5 years ago

On free gpios you can add other sensors.

Sorry that this ends up without solution due to hardware issue.

If you feel there is nothing else to do, you can close the issue. Anyway, you can reopen it if you find another tip.

WaaromZoMoeilijk commented 5 years ago

Thanks!!

Tontze commented 5 years ago

reopen this please, i have done some research with my sonoff sc. I came in the same exact situation as ezra, status8 doesnt output all it should, and weblog lvl4 shows :

`21:14:36 SER: Received AT+UPDATE="humidity":,"temperature":,"light":,"noise":,"dusty":

21:14:36 SER: Transmit AT+SEND=fail`

and it should show :

14:15:31 SER: Received AT+UPDATE="humidity":87,"temperature":23,"light":9,"noise":2,"dusty":1

after this i reflashed sonoff sc original firmware, and all sensor worked normally...

reflashed back to tasmota, everything worked normally, but then i changed mqtt settings, and again same situation, no sensor updates. Unplugged power few times, and working again ? Some instability in the air ?

joba-1 commented 5 years ago

what does your status4 say? I see heap 12 in the other log, which always meant instability for me. -- iphone so i typo

Tontze commented 5 years ago

10:02:51 CMD: status4 10:02:51 SRC: WebConsole from 192.168.8.100 10:02:51 RSL: Received Topic /status4, Data Size 0, Data 10:02:51 RSL: Group 0, Index 4, Command STATUS, Data 10:02:51 MQT: stat/sonoff/STATUS = {"Status":{"Module":21,"FriendlyName":["Sonoff"],"Topic":"sonoff","ButtonTopic":"0","Power":0,"PowerOnState":3,"LedState":1,"SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0}} 10:02:57 SER: Received AT+STATUS

WaaromZoMoeilijk commented 5 years ago

@Tontze original as in itead firmware? Could you share the firmware ill tru it out... there is still hope, i guess..!

mike2nl commented 5 years ago

@Tontze when you have the original firmware, please open an issue on:

Tontze commented 5 years ago

Ezra i will upload it to sonoff firmware page after i get access to do so :)

Also i suggest you try to do power cycle (not restart) for your SC. Mine doesnt come up right after restart, only when power cycle.

WaaromZoMoeilijk commented 5 years ago

@Tontze in the link mike posted? Thanks could you give a heads up? By power cycle you mean remove the power plug?

WaaromZoMoeilijk commented 5 years ago

You can also use this, spun up a temp upload folder on my server.

https://nextcloud.waaromzomoeilijk.nl/s/ Passwd: sonoffSC6666

Tontze commented 5 years ago

yeah, remove power plug and plug it back.

Tontze commented 5 years ago

You can also use this, spun up a temp upload folder on my server.

https://nextcloud.waaromzomoeilijk.nl/s/ Passwd: sonoffSC6666

Sent to your email found from github

WaaromZoMoeilijk commented 5 years ago

Lost the details of that email for now.. haha. Please send to sonoff@waaromzomoeilijk.nl Thanks

edit: link seems broken:

https://nextcloud.waaromzomoeilijk.nl/s/x6fJWETSyxYKNiZ Passwd: sonoffSC6666

WaaromZoMoeilijk commented 5 years ago

Ok some i came up with this: https://www.itead.cc/wiki/File:FWTRX-TAMCUSC-SONOFFSC-ATMEGA328P.zip#filelinks

I'll give it a shot to try to reflash the ATMEGA328P chip

So far I've:

But i cant get it to flash yet... Any idea?

mike2nl commented 5 years ago

@ezraholm50

  1. It's the Missing Bootloader

The board which you have/can select in Arduino IDE is the "Arduino Mini".

Here is the link for you. Some other people had the same issue: https://github.com/xoseperez/sonoffsc/issues/19

That link helps you to get the bootloader on the ATMEGA because he is without one from iTead. First you have to get the bootloader running.

There is a USB stick that can flash ATMEL chips. A USBASP. Serach for that term there.

For the sonoff sc there more then one version. They have v1.0, v1.1, v1.1.1, v1.2 and v2.0 Difference is the DHT sesnor type. Some are on a cable, some directly solderd into the PCB and some on a jumper connector.

At the end...here is the link to a page where it all begans... http://tinkerman.cat/sonoff-sc-with-mqtt-and-domoticz-support/ On this site search for ´Flashing the ATMega328P´ there you find the way to flash when you have a bootloader running. Not all sonoff sc ATMEGA´s have a bootloader. That´s chinese development. Cheap and fast.

Last but not least a link to a respository for a sonoff sc with a better sensor. The DHT22. But that all is for much more experienced user !!! https://github.com/xoseperez/sonoffsc

And another very good link for burning the bootloader. Search for: Burning the Bootloader https://www.arduino.cc/en/Tutorial/ArduinoToBreadboard or this link which is better descrbed: https://www.instructables.com/id/How-to-Burn-the-Arduino-BootLoader-on-to-a-AtMega3/ These links are not for the small chip you have, but it gives you an idea what todo.

When that all is not working for you or you think its to much then use the "Arduino Mini" in Arduino IDE and try to flash again.

arendst commented 5 years ago

While looking at your status 0 info I see you have Seriallog set to 4.

As the comms between the esp and the Atmega uses this same serial interface it is most obvious you won't get any reasonable response from the Atmega.

Set seriallog to 0 and reboot. If no succes, turn off power, wait 10 seconds and turn power back on. A correct comms interface between esp and ATmega looks like this:

00:00:00 CFG: Loaded from flash at FB, Count 303
00:00:00 CFG: Saved to flash at FB, Count 304, Bytes 3584
00:00:00 SRC: Restart
00:00:00 Project sonoff Sc Version 6.4.1.11(sonoff)-2_5_0_BETA3
00:00:00 SER: Transmit AT+START
00:00:00 WIF: Checking connection...
00:00:00 WIF: Attempting connection...
00:00:00 WIF: Connecting to AP2 indebuurt2 in mode 11N as sc...
00:00:01 WIF: Checking connection...
00:00:01 WIF: Attempting connection...
00:00:02 WIF: Checking connection...
00:00:02 WIF: Attempting connection...
00:00:02 SER: Received AT+UPDATE="humidity":79,"temperature":26,"light":10,"noise":4,"dusty":1
00:00:02 SER: Transmit AT+SEND=ok
00:00:03 WIF: Checking connection...
00:00:03 WIF: Attempting connection...
00:00:04 WIF: Checking connection...
00:00:04 WIF: Connected
00:00:04 HTP: Web server active on sc with IP address 192.168.2.205
00:00:04 APP: (UTC) Sun Jan 27 14:36:54 2019, (DST) Sun Mar 31 02:00:00 2019, (STD) Sun Oct 27 03:00:00 2019
15:36:56 MQT: Attempting connection...
15:36:56 MQT: Connected
15:36:56 MQT: tele/sc/LWT = Online (retained)
15:36:56 MQT: cmnd/sc/POWER = 
15:36:56 MQT: Subscribe to cmnd/sc/#
15:36:56 MQT: Subscribe to cmnd/sonoffs/#
15:36:56 MQT: Subscribe to cmnd/DVES_F8B22E2E_fb/#
15:36:56 MQT: tele/sc/INFO1 = {"Module":"Sonoff SC","Version":"6.4.1.11(sonoff)","FallbackTopic":"cmnd/DVES_F8B22E2E_fb/","GroupTopic":"sonoffs"}
15:36:56 MQT: tele/sc/INFO2 = {"WebServerMode":"Admin","Hostname":"sc","IPAddress":"192.168.2.205"}
15:36:56 MQT: tele/sc/INFO3 = {"RestartReason":"Software/System restart"}
15:37:00 APP: Boot Count 122
15:37:00 CFG: Saved to flash at FA, Count 305, Bytes 3584
15:37:02 SER: Received AT+STATUS?
15:37:02 SER: Transmit AT+STATUS=4
15:37:04 MQT: tele/sc/STATE = {"Time":"2019-01-27T15:37:04","Uptime":"0T00:00:14","Vcc":3.486,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"Wifi":{"AP":2,"SSId":"indebuurt2","BSSId":"00:22:6B:FE:8E:20","Channel":6,"RSSI":100}}
15:37:04 MQT: tele/sc/SENSOR = {"Time":"2019-01-27T15:37:04","SonoffSC":{"Temperature":26,"Humidity":79,"Light":10,"Noise":40,"AirQuality":100},"TempUnit":"C"}
15:37:05 SER: Received AT+UPDATE="humidity":79,"temperature":26,"light":10,"noise":3,"dusty":1
15:37:05 SER: Transmit AT+SEND=ok
15:38:17 SER: Received AT+STATUS?
15:38:17 SER: Transmit AT+STATUS=4
15:38:43 SER: Received AT+UPDATE="humidity":79,"temperature":26,"light":10,"noise":4,"dusty":1
15:38:43 SER: Transmit AT+SEND=ok
WaaromZoMoeilijk commented 5 years ago

@arendst thanks for your reply, I guess this tells me the comms between the 2 is broken somewhere then:

00:00:00 CFG: Loaded from flash at F8, Count 12
00:00:00 APP: Boot Count 6
00:00:00 SRC: Restart
00:00:00 Project sonoff Sonoff (Topic sonoff, Fallback DVES_FD1E80, GroupTopic sonoffs) Version 6.2.1-2_3_0
00:00:00 SER: Transmit AT+START
00:00:00 CFG: Saved to flash at F7, Count 13, Bytes 3584
00:00:00 WIF: Checking connection...
00:00:00 WIF: Attempting connection...
00:00:00 WIF: Patch issue 2186
00:00:00 WIF: Connecting to AP1 WaaromZoMoeilijk-HASS in mode 11N as sonoff-7808...
00:00:01 WIF: Checking connection...
00:00:01 WIF: Attempting connection...
00:00:02 WIF: Checking connection...
00:00:02 WIF: Attempting connection...
00:00:03 WIF: Checking connection...
00:00:03 WIF: Attempting connection...
00:00:04 WIF: Checking connection...
00:00:04 WIF: Attempting connection...
00:00:05 WIF: Checking connection...
00:00:05 WIF: Connected
00:00:05 DNS: Initialized
00:00:05 HTP: Web server active on sonoff-7808.local with IP address 192.168.6.147
00:00:05 MQT: Attempting connection...
00:00:06 DNS: Query done. MQTT services found 0
00:00:06 MQT: Connect failed to :1883, rc -2. Retry in 10 sec
00:00:13 APP: (UTC) Sun Jan 27 16:18:07 2019, (DST) Sun Mar 31 02:00:00 2019, (STD) Sun Oct 27 03:00:00 2019
17:18:11 MQT: Attempting connection...
17:18:12 DNS: Query done. MQTT services found 0
17:18:12 MQT: Connect failed to :1883, rc -2. Retry in 10 sec
17:18:21 WIF: Checking connection...
17:18:21 WIF: Connected
17:18:22 HTP: Main Menu
17:18:22 HTP: Console
17:18:23 MQT: Attempting connection...
17:18:24 DNS: Query done. MQTT services found 0
17:18:24 MQT: Connect failed to :1883, rc -2. Retry in 10 sec
17:18:35 MQT: Attempting connection...
17:18:36 DNS: Query done. MQTT services found 0
17:18:36 MQT: Connect failed to :1883, rc -2. Retry in 10 sec

Status 0 & 8


17:20:21 CMD: status 0
17:20:21 SRC: WebConsole from 192.168.3.3
17:20:21 RSL: Received Topic /status, Data Size 1, Data 0
17:20:21 RSL: Group 0, Index 1, Command STATUS, Data 0
17:20:21 RSL: stat/sonoff/STATUS = {"Status":{"Module":21,"FriendlyName":["Sonoff"],"Topic":"sonoff","ButtonTopic":"0","Power":0,"PowerOnState":3,"LedState":1,"SaveData":1,"SaveState":1,"ButtonRetain":0,"PowerRetain":0}}
17:20:21 RSL: stat/sonoff/STATUS1 = {"StatusPRM":{"Baudrate":19200,"GroupTopic":"sonoffs","OtaUrl":"http://sonoff.maddox.co.uk/tasmota/sonoff.bin","RestartReason":"Software/System restart","Uptime":"0T00:02:27","StartupUTC":"2019-01-27T16:17:54","Sleep":0,"BootCount":6,"SaveCount":13,"SaveAddress":"F7000"}}
17:20:21 RSL: stat/sonoff/STATUS2 = {"StatusFWR":{"Version":"6.2.1","BuildDateTime":"2018-09-09T16:50:26","Boot":6,"Core":"2_3_0","SDK":"1.5.3(aec24ac9)"}}
17:20:21 RSL: stat/sonoff/STATUS3 = {"StatusLOG":{"SerialLog":0,"WebLog":4,"SysLog":4,"LogHost":"","LogPort":514,"SSId":["WaaromZoMoeilijk-HASS",""],"TelePeriod":300,"SetOption":["00008009","55818000","00000000"]}}
17:20:21 RSL: stat/sonoff/STATUS4 = {"StatusMEM":{"ProgramSize":471,"Free":532,"Heap":14,"ProgramFlashSize":1024,"FlashSize":1024,"FlashMode":3,"Features":["00000809","0FDAE794","000003A0","23B617CE","00000000"]}}
17:20:21 RSL: stat/sonoff/STATUS5 = {"StatusNET":{"Hostname":"sonoff-7808","IPAddress":"192.168.6.147","Gateway":"192.168.6.1","Subnetmask":"255.255.255.0","DNSServer":"192.168.3.5","Mac":"BC:DD:C2:FD:1E:80","Webserver":2,"WifiConfig":5}}
17:20:21 RSL: stat/sonoff/STATUS6 = {"StatusMQT":{"MqttHost":"","MqttPort":1883,"MqttClientMask":"DVES_%06X","MqttClient":"DVES_FD1E80","MqttUser":"DVES_USER","MqttType":1,"MAX_PACKET_SIZE":1000,"KEEPALIVE":15}}
17:20:21 RSL: stat/sonoff/STATUS7 = {"StatusTIM":{"UTC":"Sun Jan 27 16:20:21 2019","Local":"Sun Jan 27 17:20:21 2019","StartDST":"Sun Mar 31 02:00:00 2019","EndDST":"Sun Oct 27 03:00:00 2019","Timezone":1,"Sunrise":"08:27","Sunset":"17:38"}}
17:20:21 RSL: stat/sonoff/STATUS10 = {"StatusSNS":{"Time":"2019-01-27T17:20:21"}}
17:20:21 RSL: stat/sonoff/STATUS11 = {"StatusSTS":{"Time":"2019-01-27T17:20:21","Uptime":"0T00:02:27","Vcc":3.213,"Wifi":{"AP":1,"SSId":"WaaromZoMoeilijk-HASS","RSSI":64,"APMac":"02:4E:26:12:37:B4"}}}
17:20:29 CMD: status 8
17:20:29 SRC: WebConsole from 192.168.3.3
17:20:29 RSL: Received Topic /status, Data Size 1, Data 8
17:20:29 RSL: Group 0, Index 1, Command STATUS, Data 8
17:20:29 RSL: stat/sonoff/STATUS8 = {"StatusSNS":{"Time":"2019-01-27T17:20:29"}}
17:20:30 WIF: Checking connection...
17:20:30 WIF: Connected
17:20:33 MQT: Attempting connection...
17:20:34 DNS: Query done. MQTT services found 0
17:20:34 MQT: Connect failed to :1883, rc -2. Retry in 10 sec
WaaromZoMoeilijk commented 5 years ago

@arendst I see no support @ sensors for Sharp’s GP2Y1010AU0F dust sensor that is in the SC, is that because the ATMEGA handles it? Could i flash a d1 mini with tasmota and get it up and running that way perhaps? Just the dust sensor and Temp/hum that im interested in of the SC...

http://www.esp8266learning.com/wemos-dust-sensor-example.php

Jason2866 commented 5 years ago

For temp and hum there is a much better sensor -> BME280 (supported) For a good dust sensor take the SDS011 (supported)

WaaromZoMoeilijk commented 5 years ago

Yeah, i know, but i want to salvage the crap i have around ^^ anyway thanks so far. If anyone has some suggestions to fix the SC, i'll be glad to try it out, still!

ascillato2 commented 5 years ago

Sorry that your device ends up to be broken. Sometimes that happens. Anyway the alternative that Jason have explained is really good, better than buying another sonoff sc.

Thanks for all the testings. If you need any more help, please just ask here o in the Tasmota Support Chat.

Tontze commented 5 years ago

@ezraholm50 If you still can try original firmware, i have now sent it to github page mentioned before. OP will propably put it there when he/she receives it.

WaaromZoMoeilijk commented 5 years ago

@Tontze Great, will try it out! thanks!

Tontze commented 5 years ago

And i can confirm that setting log levels to zero, means that sonoff sc will boot as it should :) No need to replug power.

Tontze commented 5 years ago

@ezraholm50 Out of curiosity, did you try original firmware ?

Joshfindit commented 5 years ago

Odd, possibly related, issue as it may come down to communication between the ATMega328P and recent versions of Tasmota :

On 6.5.0, the SENSOR values do not change. They seem to update once at boot, then not again until the next full power-cycle. Have tested it with an uptime of multiple days.

Console log:

23:44:46 CMD: Syslog 4
23:44:46 SRC: WebConsole from 192.168.7.100
23:44:46 RSL: Received Topic /Syslog, Data Size 1, Data 4
23:44:46 RSL: Group 0, Index 1, Command SYSLOG, Data 4
23:44:46 MQT: DVES_68A1A2_SC/stat/RESULT = {"SysLog":"4 (Active 4)"}
23:44:47 MQT: DVES_68A1A2_SC/tele/STATE = {"Time":"2019-06-17T23:44:47","Uptime":"0T00:04:26","Vcc":3.112,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"Wifi":{"AP":1,"SSId":"The Fro","BSSId":"AC:22:0B:CE:C3:50","Channel":6,"RSSI":100,"LinkCount":1,"Downtime":"0T00:00:04"}}
23:44:47 MQT: DVES_68A1A2_SC/tele/SENSOR = {"Time":"2019-06-17T23:44:47","SonoffSC":{"Temperature":17.0,"Humidity":41.0,"Light":10,"Noise":60,"AirQuality":100},"TempUnit":"C"}
23:44:47 CFG: Saved to flash at F8, Count 36, Bytes 3584
23:44:47 WIF: Checking connection...
23:44:47 WIF: Connected
23:44:47 SER: Received AT+UPDATE="humidity":,"temperature":,"light":,"noise":,"dusty":
23:44:47 SER: Transmit AT+SEND=fail
23:44:55 MQT: DVES_68A1A2_SC/tele/HASS_STATE = {"Version":"6.5.0(release-sonoff)","BuildDateTime":"2019-03-19T12:24:10","Core":"2_3_0","SDK":"1.5.3(aec24ac9)","Module":"Sonoff SC","RestartReason":"Power on","Uptime":"0T00:04:34","WiFi LinkCount":1,"WiFi Downtime":"0T00:00:04","MqttCount":1,"BootCount":19,"SaveCount":36,"IPAddress":"192.168.7.84","RSSI":"100","LoadAvg":19}
23:44:57 MQT: DVES_68A1A2_SC/tele/STATE = {"Time":"2019-06-17T23:44:57","Uptime":"0T00:04:36","Vcc":3.113,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"Wifi":{"AP":1,"SSId":"The Fro","BSSId":"AC:22:0B:CE:C3:50","Channel":6,"RSSI":100,"LinkCount":1,"Downtime":"0T00:00:04"}}
23:44:57 MQT: DVES_68A1A2_SC/tele/SENSOR = {"Time":"2019-06-17T23:44:57","SonoffSC":{"Temperature":17.0,"Humidity":41.0,"Light":10,"Noise":60,"AirQuality":100},"TempUnit":"C"}
23:44:57 SER: Received AT+STATUS?
23:44:57 SER: Transmit AT+STATUS=4
23:45:00 SER: Received AT+UPDATE="humidity":,"temperature":,"light":,"noise":,"dusty":
23:45:00 SER: Transmit AT+SEND=fail
23:45:05 MQT: DVES_68A1A2_SC/tele/HASS_STATE = {"Version":"6.5.0(release-sonoff)","BuildDateTime":"2019-03-19T12:24:10","Core":"2_3_0","SDK":"1.5.3(aec24ac9)","Module":"Sonoff SC","RestartReason":"Power on","Uptime":"0T00:04:44","WiFi LinkCount":1,"WiFi Downtime":"0T00:00:04","MqttCount":1,"BootCount":19,"SaveCount":36,"IPAddress":"192.168.7.84","RSSI":"100","LoadAvg":19}
23:45:07 MQT: DVES_68A1A2_SC/tele/STATE = {"Time":"2019-06-17T23:45:07","Uptime":"0T00:04:46","Vcc":3.114,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"Wifi":{"AP":1,"SSId":"The Fro","BSSId":"AC:22:0B:CE:C3:50","Channel":6,"RSSI":100,"LinkCount":1,"Downtime":"0T00:00:04"}}
23:45:07 MQT: DVES_68A1A2_SC/tele/SENSOR = {"Time":"2019-06-17T23:45:07","SonoffSC":{"Temperature":17.0,"Humidity":41.0,"Light":10,"Noise":60,"AirQuality":100},"TempUnit":"C"}