xoseperez / espurna

Home automation firmware for ESP8266-based devices
http://tinkerman.cat
GNU General Public License v3.0
2.98k stars 635 forks source link

1.6.4 broke sonoff basic #81

Closed xoseperez closed 6 years ago

xoseperez commented 7 years ago

Originally reported by: Tim K (Bitbucket: clueo8, GitHub: clueo8)


I updated to the latest master commit today and did an OTA to both my sonoff basic and my sonoff dual. The upgrade on the dual went okay (I do firmware first, then filesystem), but after doing the firmware successfully on the basic, it would not reconnect to my wifi, forcing me to use the serial again to reflash it to a previous version. I went back to the commit (042ceb9) with the MQTT memory leak fix, but I know I updated a few commits after that and it still worked on my basic. I think something in the past 2-3 days broke the sonoff basic.

xoseperez commented 7 years ago

Opened #82 to track the wifi problema after and OTA update. Closing this.

xoseperez commented 7 years ago

Thank you for the feedback! Still I see some issues with the WIFI not reconnecting after an OTA update... still testing.

xoseperez commented 7 years ago

Original comment by Tim K (Bitbucket: clueo8, GitHub: clueo8):


Basic looks good, but seeing some issues controlling the 2 relays on the dual... may open a new issue for that... didn't exist in 1.6.3, trying 1.6.4 on dual.

xoseperez commented 7 years ago

Original comment by f-fish (Bitbucket: f-fish, GitHub: Unknown):


Agree, usb flashed basic with DS18B20. Liked what I saw on the network side, flashed a POW via OTA, also looking good.

Why did I like this version 1.6.5? Well below 1.6.4 - 150 packet capture - just MQTT's

164ds18bmaster.JPG

See all the tcp errors vs that of 1.6.5 ?

156ds18bmaster.JPG

1.6.5 is clear of errors.

Later Ferdie

xoseperez commented 7 years ago

Original comment by Tim K (Bitbucket: clueo8, GitHub: clueo8):


1.6.5 was able to successfully flash OTA for both the firmware and spiffs to my sonoff basic with DS18B20 enabled; working good so far!

xoseperez commented 7 years ago

Version 1.6.5 is live. Please notice there is a new library dependency (PubSubClient) that requires a small modification in order to work properly with Domotics. If you are using the Arduino IDE, please read the section "Installing libraries from the Library Manager" in https://bitbucket.org/xoseperez/espurna/wiki/ArduinoIDE.md.

xoseperez commented 7 years ago

Original comment by Tim K (Bitbucket: clueo8, GitHub: clueo8):


Will 1.6.5 address the connectivity issues?

xoseperez commented 7 years ago

Original comment by f-fish (Bitbucket: f-fish, GitHub: Unknown):


on 1.6.4 loads of retranmissions etc

164mqtt.JPG

on 1.6.5b much cleaner 1 in like 157 captures

156b.JPG

this was git reset --hard origin/dev HEAD is now at 171febe Processed web interfaces files

Could not duplicate the flash issue on USB - work well each time.

Later Ferdie

xoseperez commented 7 years ago

Original comment by Tim K (Bitbucket: clueo8, GitHub: clueo8):


I don't use domoticz, only mqtt and Alexa and ds18b20

xoseperez commented 7 years ago

The DS18B20 module does send the temperatures to Domoticz. Will release 1.6.5 tonight: it fixes the LED issue and the problems with MQTT.

xoseperez commented 7 years ago

Original comment by f-fish (Bitbucket: f-fish, GitHub: Unknown):


ah wait I need to add the DS18B20 ... are you sending that results to a domoticz server?

Flashed my basic, Git master 1.6.4 via USB .. loaded fine. But let me run add the temp probe so that we are same same for testing. I am not on AC, but keen to see if I can see 1.6.4 working with the probe talking to mqtt. Maybe run a trace on that, then upgrade to 1.6.5b and run a similar trace.

Later Ferdie

xoseperez commented 7 years ago

Original comment by Tim K (Bitbucket: clueo8, GitHub: clueo8):


Git master

xoseperez commented 7 years ago

Original comment by f-fish (Bitbucket: f-fish, GitHub: Unknown):


You you guys pulling from dev / master branch or the download link?

xoseperez commented 7 years ago

Original comment by Jivesinger (Bitbucket: Jivesinger, GitHub: Jivesinger):


Out of curiosity I loaded 1.6.4 back into my sonoff basic and have the following symptoms : -Web page is inaccessible with browser reporting " 192.168.1.50 didn’t send any data. ERR_EMPTY_RESPONSE" -Sonoff connects to wifi and mqtt broker although it dis/reconnects broker every few minutes -Painfully slow to respond to most mqtt posts >10 seconds. Also seems to queue posts. ie nothing for 10 seconds then many in <1 sec ( 1.6.3 is virtually instantaneous ) -Ping times vary wildly between 2 and >100ms ( for comparison 1.6.3 is pretty consistently around 2ms )

xoseperez commented 7 years ago

Original comment by Tim K (Bitbucket: clueo8, GitHub: clueo8):


Yes, I forgot to mention the brief LED flash on startup. It's very brief.

xoseperez commented 7 years ago

Original comment by Jivesinger (Bitbucket: Jivesinger, GitHub: Jivesinger):


Similar issue after uploading sonoff-dht22-debug 1.6.4 to sonoff basic. On power up one very short LED flash then nothing. Can confirm pressing button for any length of time only toggles relay.

Flashed back to 1.6.3 and everything is happy again.

xoseperez commented 7 years ago

Original comment by Tim K (Bitbucket: clueo8, GitHub: clueo8):


No, I use the sonoff-debug-ota with DS18B20 flag set.

xoseperez commented 7 years ago

You said it just toggles the relay? Have you flashed the Sonoff basic with the dual image?

xoseperez commented 7 years ago

Original comment by Tim K (Bitbucket: clueo8, GitHub: clueo8):


I flashed it numerous times and it would always be unresponsive after flashing. Normally the LED light would blink after it restarts but it would not blink at all. I did try erasing and starting fresh with esptool but that didn't help. One thing different with my basic build versus dual is that I have the DS18B20 enabled for it. I can slowly apply commits to see which one breaks it but it really annoying having to take it appart to reflash with the tty. How can I get into AP mode? I've tried holding the button down but it doesn't work; it just toggles the relay even after a long press.

xoseperez commented 7 years ago

The image for the Dual and the Basic is almost identical, and there are no changes on the wifi connection process. Did you try using the AP mode to get into the configuration and check the settings? If you can't or everything looks ok but it still refuses to connect you can try erasing the flash of the sonoff basic, it might have gone corrupted.