Tasmota/Sonoff on SP1 - multiple WLAN reconnects and Button1 messages & no energy reading

162 views
Skip to first unread message

Jörg Freund

unread,
Oct 5, 2019, 10:33:40 AM10/5/19
to SonoffUsers

Hello,


I did successfully flash a Gosund SP1 OTA.

Switching with the use of the Tasmota/Sonoff web UI works. Connection to my MQTT (mosquito) broker works too.


My problems are:
1)  The switch disconnects every few minutes and reconnects again.


What could be the reason for this? I do believe I have a very stable WLAN at home with many devices connect without any problems (e.g. many shelly 1 and 2.5).
Could this be related to sleep mode? (see message below)
Sometimes after a reboot I see the WEB-UI error message “MINIMAL firmware please upgrade”. 

Again restarting resolves this message.


I flashed “http://thehackbox.org/tasmota/release/sonoff-sensors.bin”.
I used the templates: “Base on ‘Gosund SP1 v23 (55)'” and the configuration: “Module type (Sonoff Basic) ‘Gosund SP1 v23 (55)'”.


2) The device shows 0 for all measurements incl. voltage. Why? Calibration does not help.


3) I did increase log level to 'debug'. I can see the following message every second:  “APP: Button1: multi-press ” (siehe unten). Is this normal? What does it mean?


Thx in advance & regards


message: “Sleep-Mode” & “Voltage = 0”
————————————————————–
12:48:46 MQT: sonoff/tele/STATE = {“Time”:”2019-10-05T12:48:46″,”Uptime”:”0T00:04:50″,”Heap”:12,”SleepMode”:”Dynamic”,”Sleep”:50,”LoadAvg”:19,”POWER”:”OFF”,”Wifi”:{“AP”:1,”SSId”:”…”,”BSSId”:”…”,”Channel”:1,”RSSI”:100,”LinkCount”:1,”Downtime”:”0T00:00:10″}}
12:48:46 MQT: sonoff/tele/SENSOR = {“Time”:”2019-10-05T12:48:46″,”ENERGY”:{“TotalStartTime”:”2019-10-04T14:26:55″,”Total”:0.000,”Yesterday”:0.000,”Today”:0.000,”Period”:0,”Power”:0,”ApparentPower”:0,”ReactivePower”:0,”Factor”:0.00,”Voltage”:0,”Current”:0.000}}


message “APP: Button1 multi-press”
————————————————————–
12:48:38 APP: Button1 multi-press 1
12:48:38 APP: Button1 multi-press 2
12:48:39 APP: Button1 multi-press 3
12:48:39 APP: Button1 multi-press 4
12:48:39 APP: Button1 multi-press 5
12:48:39 APP: Button1 multi-press 6
12:48:39 APP: Button1 multi-press 7
12:48:40 APP: Button1 multi-press 8
12:48:40 APP: Button1 multi-press 9
12:48:40 APP: Button1 multi-press 10
12:48:40 APP: Button1 multi-press 11
12:48:40 APP: Button1 multi-press 12
12:48:40 APP: Button1 multi-press 13
12:48:41 APP: Button1 multi-press 14
12:48:41 APP: Button1 multi-press 15
12:48:41 APP: Button1 multi-press 16
12:48:41 APP: Button1 multi-press 17
12:48:41 APP: Button1 multi-press 18
12:48:41 APP: Button1 multi-press 19
12:48:42 APP: Button1 multi-press 20
12:48:42 APP: Button1 multi-press 21
12:48:42 APP: Button1 multi-press 22
12:48:42 APP: Button1 multi-press 23
12:48:43 APP: Button1 multi-press 24
12:48:43 APP: Button1 multi-press 25
12:48:43 APP: Button1 multi-press 26
12:48:43 APP: Button1 multi-press 27
12:48:43 APP: Button1 multi-press 28
12:48:43 APP: Button1 multi-press 29
12:48:44 APP: Button1 multi-press 30
12:48:44 APP: Button1 multi-press 31
12:48:44 APP: Button1 multi-press 32
12:48:44 APP: Button1 multi-press 33
12:48:44 APP: Button1 multi-press 34
12:48:44 APP: Button1 multi-press 35
12:48:45 APP: Button1 multi-press 36
12:48:45 APP: Button1 multi-press 37
12:48:45 APP: Button1 multi-press 38
12:48:45 APP: Button1 multi-press 39
12:48:45 APP: Button1 multi-press 40
12:48:45 APP: Button1 multi-press 41

Michael Ingraham

unread,
Oct 5, 2019, 10:50:39 AM10/5/19
to SonoffUsers
Probably ESP Core. Try this:

Backlog OTAURL http://thehackbox.org/tasmota/pre-2.6/sonoff.bin; Upgrade 1

Let it cycle through to firmware uploads (with associated reboots). Give it ~5 minutes to complete without interruption.

Jörg Freund

unread,
Oct 5, 2019, 11:27:52 AM10/5/19
to SonoffUsers
HI Michael,
Thx. I did try it. 
But still I get hundreds of messages like the ones below Maybe up to 10 per second.
Multiple wlan disconnects are still there. Maybe one per 5 minutes.

Do you know what these messages "Button1 multi-press" mean?

Thx & regards

PS
I still have no measurements:
Gosund SP1 v23 Module
Sonoff_1
Voltage0 V
Current0.000 A
Power0 W
Apparent Power0 VA
Reactive Power0 VAr
Power Factor0.00
Energy Today0.000 kWh
Energy Yesterday0.000 kWh
Energy Total0.000 kWh


Messages:
16:19:20 APP: Button1 multi-press 53
16:19:20 APP: Button1 multi-press 54
16:19:20 APP: Button1 multi-press 55
16:19:21 APP: Button1 multi-press 56
16:19:21 APP: Button1 multi-press 57
16:19:21 APP: Button1 multi-press 58
16:19:21 APP: Button1 multi-press 59
16:19:21 APP: Button1 multi-press 60
16:19:21 APP: Button1 multi-press 61
16:19:22 APP: Button1 multi-press 62
16:19:22 APP: Button1 multi-press 63
16:19:22 APP: Button1 multi-press 64
16:19:22 APP: Button1 multi-press 65
16:19:22 APP: Button1 multi-press 66
16:19:22 APP: Button1 multi-press 67
16:19:22 APP: Button1 multi-press 68
16:19:22 APP: Button1 multi-press 69
16:19:23 APP: Button1 multi-press 70
16:19:23 APP: Button1 multi-press 71
16:19:23 APP: Button1 multi-press 72
16:19:23 APP: Button1 multi-press 73

Jörg Freund

unread,
Oct 5, 2019, 11:51:11 AM10/5/19
to SonoffUsers
After the flash with pre-2.6:
Anything suspicious?


I see the following logs in the console:
00:00:00 CFG: Loaded from flash at F9, Count 673
00:00:00 SRC: Restart
00:00:00 Project sonoff Sonoff_1 Version 6.6.0.15(6997626-sonoff)-STAGE
00:00:00 WIF: Attempting connection...
00:00:00 WIF: Connecting to AP1 ... in mode 11N as sonoff_1...
00:00:01 WIF: Attempting connection...
00:00:02 WIF: Attempting connection...
00:00:03 WIF: Attempting connection...
00:00:04 APP: Button1 multi-press 1
00:00:04 APP: Button1 multi-press 2
00:00:04 WIF: Connected
00:00:04 HTP: Web server active on sonoff_1 with IP address ...
00:00:04 APP: Button1 multi-press 3
00:00:04 APP: Button1 multi-press 4
16:45:34 APP: Button1 multi-press 5
16:45:34 APP: Button1 multi-press 6
16:45:34 APP: Button1 multi-press 7
16:45:34 NTP: Drift 0, (UTC) Sat Oct 05 15:45:34 2019, (DST) Sun Mar 31 02:00:00 2019, (STD) Sun Oct 27 03:00:00 2019
16:45:34 APP: Button1 multi-press 8
16:45:34 APP: Button1 multi-press 9
16:45:34 APP: Button1 multi-press 10
16:45:34 APP: Button1 multi-press 11
16:45:35 MQT: Attempting connection...
16:45:35 MQT: Connected
16:45:36 MQT: sonoff/tele/LWT = Online (retained)
16:45:36 MQT: sonoff/cmnd/POWER = 
16:45:36 MQT: Subscribe to sonoff/cmnd/#
16:45:36 MQT: Subscribe to sonoffs/cmnd/#
16:45:36 MQT: Subscribe to cmnd/DVES_9C6136_fb/#
16:45:36 MQT: sonoff/tele/INFO1 = {"Module":"Gosund SP1 v23","Version":"6.6.0.15(6997626-sonoff)","FallbackTopic":"cmnd/DVES_9C6136_fb/","GroupTopic":"sonoffs"}
16:45:36 MQT: sonoff/tele/INFO2 = {"WebServerMode":"Admin","Hostname":"sonoff_1","IPAddress":"10.0.1.53"}
16:45:36 MQT: sonoff/tele/INFO3 = {"RestartReason":"Software/System restart"}
16:45:36 MQT: sonoff/stat/RESULT = {"POWER":"ON"}
16:45:36 MQT: sonoff/stat/POWER = ON (retained)
16:45:36 APP: Button1 multi-press 12
16:45:36 APP: Button1 multi-press 13
16:45:36 APP: Button1 multi-press 14
16:45:36 APP: Button1 multi-press 15
16:45:36 APP: Button1 multi-press 16
16:45:36 APP: Button1 multi-press 17
16:45:36 APP: Button1 multi-press 18
16:45:37 MQT: homeassistant/sensor/9C6136_ENERGY_Yesterday/config = {"name":"Sonoff_1 ENERGY Yesterday","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"9C6136_ENERGY_Yesterday","device":{"identifiers":["9C6136"],"connections":[["mac","DC:4F:22:9C:61:36"]]},"~":"sonoff/tele/","unit_of_meas":"kWh","val_tpl":"{{value_json['ENERGY'].Yesterday}}","dev_cla":"power"} (retained)
16:45:37 MQT: homeassistant/sensor/9C6136_ENERGY_Today/config = {"name":"Sonoff_1 ENERGY Today","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"9C6136_ENERGY_Today","device":{"identifiers":["9C6136"],"connections":[["mac","DC:4F:22:9C:61:36"]]},"~":"sonoff/tele/","unit_of_meas":"kWh","val_tpl":"{{value_json['ENERGY'].Today}}","dev_cla":"power"} (retained)
16:45:37 MQT: homeassistant/sensor/9C6136_ENERGY_Power/config = {"name":"Sonoff_1 ENERGY Power","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"9C6136_ENERGY_Power","device":{"identifiers":["9C6136"],"connections":[["mac","DC:4F:22:9C:61:36"]]},"~":"sonoff/tele/","unit_of_meas":"W","val_tpl":"{{value_json['ENERGY'].Power}}","dev_cla":"power"} (retained)
16:45:37 MQT: homeassistant/sensor/9C6136_ENERGY_ApparentPower/config = {"name":"Sonoff_1 ENERGY ApparentPower","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"9C6136_ENERGY_ApparentPower","device":{"identifiers":["9C6136"],"connections":[["mac","DC:4F:22:9C:61:36"]]},"~":"sonoff/tele/","unit_of_meas":" ","val_tpl":"{{value_json['ENERGY'].ApparentPower}}"} (retained)
16:45:37 MQT: homeassistant/sensor/9C6136_ENERGY_ReactivePower/config = {"name":"Sonoff_1 ENERGY ReactivePower","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"9C6136_ENERGY_ReactivePower","device":{"identifiers":["9C6136"],"connections":[["mac","DC:4F:22:9C:61:36"]]},"~":"sonoff/tele/","unit_of_meas":" ","val_tpl":"{{value_json['ENERGY'].ReactivePower}}"} (retained)
16:45:37 MQT: homeassistant/sensor/9C6136_ENERGY_Factor/config = {"name":"Sonoff_1 ENERGY Factor","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"9C6136_ENERGY_Factor","device":{"identifiers":["9C6136"],"connections":[["mac","DC:4F:22:9C:61:36"]]},"~":"sonoff/tele/","unit_of_meas":" ","val_tpl":"{{value_json['ENERGY'].Factor}}"} (retained)
16:45:37 MQT: homeassistant/sensor/9C6136_ENERGY_Voltage/config = {"name":"Sonoff_1 ENERGY Voltage","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"9C6136_ENERGY_Voltage","device":{"identifiers":["9C6136"],"connections":[["mac","DC:4F:22:9C:61:36"]]},"~":"sonoff/tele/","unit_of_meas":"V","val_tpl":"{{value_json['ENERGY'].Voltage}}","dev_cla":"power"} (retained)
16:45:37 MQT: homeassistant/sensor/9C6136_ENERGY_Current/config = {"name":"Sonoff_1 ENERGY Current","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"9C6136_ENERGY_Current","device":{"identifiers":["9C6136"],"connections":[["mac","DC:4F:22:9C:61:36"]]},"~":"sonoff/tele/","unit_of_meas":"A","val_tpl":"{{value_json['ENERGY'].Current}}","dev_cla":"power"} (retained)
16:45:37 MQT: homeassistant/sensor/9C6136_status/config = {"name":"Sonoff_1 status","stat_t":"~HASS_STATE","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","json_attributes_topic":"~HASS_STATE","unit_of_meas":" ","val_tpl":"{{value_json['RSSI']}}","uniq_id":"9C6136_status","device":{"identifiers":["9C6136"],"connections":[["mac","DC:4F:22:9C:61:36"]],"name":"Sonoff_1","model":"Gosund SP1 v23","sw_version":"6.6.0.15(6997626-sonoff)","manufacturer":"Tasmota"},"~":"sonoff/tele/"} (retained)
16:45:38 APP: Button1 multi-press 1
16:45:38 APP: Button1 multi-press 2
16:45:38 APP: Button1 multi-press 3
16:45:38 APP: Button1 multi-press 4
16:45:38 APP: Button1 multi-press 5
16:45:38 APP: Button1 multi-press 6

Michael Ingraham

unread,
Oct 5, 2019, 11:56:16 AM10/5/19
to SonoffUsers
Try ButtonDebounce

Jörg Freund

unread,
Oct 5, 2019, 11:58:39 AM10/5/19
to SonoffUsers
Hi Michael,

sorry - but where shall I try this? In the console? Shall I enter "ButtonDebounce"?
I am really new to this.

Regards

Am Samstag, 5. Oktober 2019 17:56:16 UTC+2 schrieb Michael Ingraham:
Try ButtonDebounce

Michael Ingraham

unread,
Oct 5, 2019, 12:02:22 PM10/5/19
to SonoffUsers
Ah, you have been flying blind with respect to Tasmota. You have some weekend reading now ;-)


But take a look all around.

Jörg Freund

unread,
Oct 5, 2019, 12:22:34 PM10/5/19
to SonoffUsers
Thank you very much for the command overview. I am reading it right now.

What I still do not understand: What is causing this message? No one is pressing a button? Can this come from mqtt?
Is this related to the multiple WLAN reconnects? Or is my WLAN problem different?
Do I have a WLAN problem at all or is it possible that the SP1 just reboots for whatever reason? maybe too many messages?





I also changed the "ButtonDebounce" in the console. 

Michael Ingraham

unread,
Oct 5, 2019, 12:47:45 PM10/5/19
to SonoffUsers
The GPIO input is seeing the voltage on that pin fluctuate and the firmware thinks it's caused by a press of the button. ButtonDebounce "dampens" those changes out so that "false" signal changes are ignored.

Jörg Freund

unread,
Oct 5, 2019, 1:30:10 PM10/5/19
to SonoffUsers
I still do not understand it.
I did set "ButtonDebounce 100". Than the SP1 startet switching off and on (see messages below). No one is pressing a button & no mqtt attached.

The result is:
00:00:00 CFG: Loaded from flash at F6, Count 54
00:00:00 SRC: Restart
00:00:00 Project sonoff Sonoff_1 Version 6.6.0.15(6997626-sonoff)-STAGE
00:00:00 WIF: Attempting connection...
00:00:00 WIF: Connecting to AP1 ... in mode 11N as sonoff_1...
00:00:01 WIF: Attempting connection...
00:00:02 WIF: Attempting connection...
00:00:03 WIF: Attempting connection...
00:00:04 APP: Button1 multi-press 1
00:00:04 WIF: Connected
00:00:04 HTP: Web server active on sonoff_1 with IP address ...
18:27:52 APP: Button1 multi-press 1
18:27:52 NTP: Drift 0, (UTC) Sat Oct 05 17:27:52 2019, (DST) Sun Mar 31 02:00:00 2019, (STD) Sun Oct 27 03:00:00 2019
18:27:52 SRC: Button
18:27:52 RSL: stat/sonoff/RESULT = {"POWER":"ON"}
18:27:52 RSL: stat/sonoff/POWER = ON
18:27:53 CFG: Saved to flash at F5, Count 55, Bytes 4096
18:27:54 APP: Button1 multi-press 1
18:27:54 SRC: Button
18:27:54 RSL: stat/sonoff/RESULT = {"POWER":"OFF"}
18:27:54 RSL: stat/sonoff/POWER = OFF
18:27:55 APP: Button1 multi-press 1
18:27:55 APP: Button1 multi-press 2
18:27:55 CFG: Saved to flash at F4, Count 56, Bytes 4096
18:27:55 SRC: Button
18:27:55 RSL: stat/sonoff/RESULT = {"POWER":"ON"}
18:27:55 RSL: stat/sonoff/POWER = ON
18:27:56 CFG: Saved to flash at FB, Count 57, Bytes 4096
18:27:57 APP: Button1 multi-press 1

Michael Ingraham

unread,
Oct 5, 2019, 1:55:03 PM10/5/19
to SonoffUsers

That improved things. You just need to continue experimenting to find the right value.

Jörg Freund

unread,
Oct 5, 2019, 3:18:19 PM10/5/19
to SonoffUsers
In fact things are getting worse:
The device rebooted after that it did not reconnect to my network but creates its own network "ESP-9C6136" which I cannot connect to.
Error message while trying to connect is: "NETWORK_SELECTION_DISABLED_ASSOCIATION_REJECTION".

What can I do?

Michael Ingraham

unread,
Oct 5, 2019, 3:28:50 PM10/5/19
to SonoffUsers
Yes, this "ESP-9C6136" is not good. That's usually a corrupted flash.

At this point you have to hope that it's intermittent and that you can get it to boot so you can get in and issue a `reset 5` and hope to identify where the issue lays. Otherwise you have to attempt to open the device to flash it via the serial programming interface.

Or return it as defective... which is not too far from the truth as it had the button bounce issue.

Jörg Freund

unread,
Oct 5, 2019, 3:48:02 PM10/5/19
to SonoffUsers
Thx again, Michael.

1) Is there a chance that I have a new HW type that is not compatible with the firmware of the setup "Gosund SP1 v23 (55)" anymore?
2) How can I boot the device again? I am trying to press the button for at leaast 40seconds but this does not help.

Regards

Jörg Freund

unread,
Oct 5, 2019, 4:04:23 PM10/5/19
to SonoffUsers
Is there a chance that I have the "wrong" HW. Because mine has 2 USB.

Jörg Freund

unread,
Oct 5, 2019, 4:30:34 PM10/5/19
to SonoffUsers
Now I realized I do have a gosund SP112 and not an SP1 (and also not an SP111).
Can this lead to all my problems above?
Should I have used "45 BlitzWolf SHP" instaed?

Regards

Michael Ingraham

unread,
Oct 5, 2019, 4:42:09 PM10/5/19
to SonoffUsers
Sometimes a device will cycle and either come up in Wi-Fi Manager (sonoff-xxxx) or go ahead and boot from previous config. If it does that, then try to get into Tasmota and perform a `reset 1`. Then try configuring for the correct device.

If not, you'll need to flash again using a wired connection (open the device and connect wires to the serial programming interface). In this case, start with a complete erase (erase_flash) before uploading the firmware. This is all detailed in the installation Guide in the wiki (right hand navigation bar).

Jörg Freund

unread,
Oct 6, 2019, 1:06:45 PM10/6/19
to SonoffUsers
I guess the device is dead now.

But I realized that I do not have a gosund SP1 but a gosund SP112 (which was wrongly advertised).
Therefore all my problems are only related to the fact that I do not have the correct template yet.

Someone figured out SP112?

Thx & regards

Familie Freund

unread,
Oct 10, 2019, 1:19:10 PM10/10/19
to SonoffUsers
In fact I figured out that the gosund SP112 is identical to the Blitzwolf SHP5.
Therefore I used the template of the SHP5 and it works well:
template: '{"NAME":"SHP5","GPIO":[57,145,56,146,0,22,0,0,0,0,21,0,17],"FLAG":0,"BASE":18}'
Reply all
Reply to author
Forward
0 new messages