stefanbode / Sonoff-Tasmota

Provide ESP8266 based itead Sonoff with Web, MQTT and OTA firmware using Arduino IDE, enhanced with I2C options
GNU General Public License v3.0
128 stars 41 forks source link

SetOption80 1 HangUp the Device #198

Closed onkeldittmayer closed 4 years ago

onkeldittmayer commented 4 years ago

Is it possible, that since the integration of the Shuttercode to arendst Sonoff the SetOption80 doesn't work anymore? When i compile the blank Stefanbode-fork and set the Option80 to 1 the hole Device stops responding... i compiled three times (success) with Atom.

flashtel commented 4 years ago

I've tested on both the merged code and the latest Stephan code and it is working. I've been running it for a few days now on shutters running many times a day. It has been stable. I've compiled with both Atom and Arduino IDE.

flashtel commented 4 years ago

The only issue is the stat messages are different between the two. shutteropen1 (Theo) vs ShutterOpen1 (Stephan) and them there is a difference in the tele messages if your using rules shutter1 (Theo) vs Shutter-1 (Stephan)

If you want to use the main code, you need in user_config_override.h

define USE_SHUTTER

I also use

define MODULE SONOFF_4CHPRO // [Module] Select default model

define OTA_URL "http://10.0.xx.xxx:80/ota/" PROJECT ".4chpro.bin" // [OtaUrl]

define MQTT_GRPTOPIC "sonoffs.4chpro"

Then you can do bulk upgrades, which I have just done tonight.

In platformio.ini I make these mods

board = esp8285

platform = ${core_2_5_2.platform} build_flags = ${core_2_5_2.build_flags}

default_envs = sonoff

flashtel commented 4 years ago

backlog SETOPTION80 1; SETOPTION63 1; interlock on; interlock 1,2,3,4; SHUTTERRELAY2 3; topic house/bathroom;

backlog SHUTTEROPENDURATION1 32; SHUTTERCLOSEDURATION1 32; SHUTTEROPENDURATION2 14; SHUTTERCLOSEDURATION2 14;

bjeram commented 4 years ago

I also have a problem after I set: SetOption80 the Sonoff Dual R2 starts to reboot. From the serial log message looks like after trying to apply the configuration. It might be that there is some leftovers configuration from the previous installation. I need to investigate a bit more: erase the whole flash before flashing, give a try to original Tasamoaot, ....

I use: Arduino Esp8266 core pre 2.6.x for Tasmota (mqtt reconnects fixed)

onkeldittmayer commented 4 years ago

How many days does it run? This fork was updated 3 days ago.... i just try it once again. set Setoption80 to 1 doesn't work for me. After a restart Tasmota doesn't come back. Curious: i find a W-Lan network: ESP-100D1D but can't connect... very strange.

The Theo develop Code work with shutter and option80 1 so first i'll play with these.

bjeram commented 4 years ago

I tried with the version that was updated 3 days ago. What do you see on the serial output? BTW: what HW do you use? How do you build (plafromio?) ?

meingraham commented 4 years ago

@onkeldittmayer

Yes, this feature was just recently ported to the main branch. If it says 3 days, then yes, that's right; this week.

Did you compile your own binary?

ESP-100D1D usually indicates corrupted flash contents. You'll need to erase_flash and upload Tasmota again.

stefanbode commented 4 years ago

I’m off this weekend. Therefore cannot compile and recheck again. Anyhow setoption80 did not change at all. Therefore it must work. Can give more details Monday afternoon

onkeldittmayer commented 4 years ago

@bjeram have to check the serial output. i build with Atom and platformio. I flash the Moeshouse 2 way 2 gang MS-104B Relay via an Arduino UNO (with no IC on it). @meingraham yes, but i also build the raw fresh bode code and got the same issue.

like i said: Theos code work... let me check serial out...

Edit Serial Out: after setting setoption80 to 1 and restart the following seems to repeat over and over again:

ets Jan 8 2013,rst cause:1, boot mode:(3,7)

load 0x4010f000, len 1384, room 16 tail 8 chksum 0x2d csum 0x2d v645464ca ~ld

00:00:00 CFG: aus Flash geladen am F8, zählen 12 00:00:00 SHT: Accuracy digits: 0

Exception (0): epc1=0x4000dce5 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

stack>>>

ctx: cont sp: 3ffffc50 end: 3fffffc0 offset: 01a0 3ffffdf0: 3ffffe10 3ffffe00 00000008 4021103a
3ffffe00: 00000000 00000000 00000000 00000005
3ffffe10: 3fff1a68 00000032 3ffef4c4 00000064
3ffffe20: 3fff1a68 3ffef440 3ffef440 4021c961
3ffffe30: 3fffff40 3fffff30 00000014 3ffe8304
3ffffe40: 00000004 00000009 00000001 402462c9
3ffffe50: 3fff0fd5 3fff1a68 00000003 3fff1d68
3ffffe60: 3fffff30 3ffe8304 00000000 ffffffd5
3ffffe70: 3fff1788 3fff1a68 00000014 ffff0208
3ffffe80: 3ffef440 3fff1a68 3fff2a2c 00000000
3ffffe90: 00000000 00000032 00004e20 00000032
3ffffea0: 3fff2a40 00000000 00000000 00000000
3ffffeb0: 00000000 00000020 00000010 00000005
3ffffec0: 00000001 3fff1a68 00000000 40224763
3ffffed0: 3fff1762 00000008 00000003 4020e72d
3ffffee0: 00000001 00000044 00000000 00000005
3ffffef0: 00000001 00000048 00000003 4020d145
3fffff00: 3fff180e 00000062 00000008 4021782c
3fffff10: ffffff11 000000ff 00000000 00ff3815
3fffff20: 3fffff00 3fffff30 0000000c 40201a0d
3fffff30: 3fff180a 00000001 00000062 00000000
3fffff40: 00000d1d 3fff1bd4 00000000 3fff1d68
3fffff50: 3fff177d 3fff1a68 3fff1bcd 4021e564
3fffff60: 6f6e6f73 fe006666 feefeffe feefeffe
3fffff70: feefeffe feefeffe feefeffe feefeffe
3fffff80: feefeffe feefeffe feefeffe feefeffe
3fffff90: feefeffe feefeffe feefeffe 3fff2eb8
3fffffa0: 3fffdad0 00000000 3fff2e78 40240660
3fffffb0: feefeffe feefeffe 3ffe8720 40100865
<<<stack<<<

bjeram commented 4 years ago

after setting setoption80 to 1 and restart the following seems to repeat over and over again:

ets Jan 8 2013,rst cause:1, boot mode:(3,7)

...... 00:00:00 CFG: aus Flash geladen am F8, zählen 12 00:00:00 SHT: Accuracy digits: 0

I can see the same, so it looks like it is a problem to load/apply configuration. More logs from me:

11:27:45 RSL: stat/sonoff/RESULT = {"SetOption80":"ON"} 11:27:46 CFG: Saved to flash at F4, Count 16, Bytes 4096 11:27:57 HTP: Main Menu 11:28:00 HTP: Restart 11:28:00 SRC: WebGui from (IP unset) 11:28:02 APP: Restarting

ets Jan 8 2013,rst cause:1, boot mode:(3,5)

load 0x4010f000, len 1384, room 16 tail 8 chksum 0x2d csum 0x2d v8b899c12 ~ld

00:00:00 CFG: Loaded from flash at F4, Count 16 00:00:00 SHT: Accuracy digits: 0

ihavenonick commented 4 years ago

Ich kann es bestätigen, sobald Deine Fork größer 6.6.0.10 mit Core 2.5.2, oder Core Pre läuft ist der Shelly 2, oder Shelly 2.5 nach dem setzten der setoption 80 tot und hängt in einer Bootschleife.

stefanbode commented 4 years ago

I can see that: 00:00:00 SHT: Accuracy digits: 0is reported. This should be 00:00:00 SHT: Accuracy digits: 1. This assumes there is strange data in the configuration. Please do a "reset 2" to ensure everything is back to default. At least after the first reboot there is no "0" allowed.

stefanbode commented 4 years ago

There is a fix coming in a minute. DIV0 exception is fixed. Also, update the BIN files