Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sonoff basic /dual not always directly responces #2225

Closed
NiekN opened this issue Mar 22, 2018 · 11 comments
Closed

Sonoff basic /dual not always directly responces #2225

NiekN opened this issue Mar 22, 2018 · 11 comments

Comments

@NiekN
Copy link

NiekN commented Mar 22, 2018

I programmed a Basic and a Dual Sonoff device with Tasmota
When i'm in the webintreface of the sonoff , you can toggle the relay very easy
But i noticed that it is not always toggling directly. Mostly when i toggle it, it switched after 1 sec , but sometimes it switches after 10sec or so , is that normal ? I also see this when im using the URL commandes in Chrome. Is this a problem because the webinterface is also very slow ?

Im nearby the the router, so the wifi signal should be no problem.

When using ewelink i never had this problem , it switches direcly

@kpcz
Copy link

kpcz commented Mar 22, 2018

Have the same behavior, I think it is related to #1992

@NiekN
Copy link
Author

NiekN commented Mar 22, 2018

it not clear for me , it is solved by using a different MQTT_LIBRARY_TYPE ?
Will it be included in the sonoff.bin file ?

@curzon01
Copy link
Contributor

curzon01 commented Mar 23, 2018

Could be a misunderstanding based on assumtions, so

  • What hardware you are using
    Sonoff Basic/Dual
  • Provide the output of command status 0

Did you flashed a binary from releases or did you build your own from source?

@NiekN
Copy link
Author

NiekN commented Mar 23, 2018

Am using a Sonoff Basic and a Dual (R2)

provide the output of command status 0 ?

i did not made a build of my own, i used this
https://www.youtube.com/watch?v=pVPPiYAo8NI&t=1360s
esptool.exe -vv -cb 115200 -cp COM10 -ca 0x00000 -bz 1M -bm dout -cf sonoff.bin

v5.12.0(latest release) of sonoff.bin

@curzon01
Copy link
Contributor

Commands are explained in Wiki Commands and can be entered (besides the ither methodes described in Wiki) on webinterface under "Console".

On "Console" you can see what's logged

  • try setting the log level for web log to more details using the command WebLog 3
  • stay on webinterface "Console" and observe what's going on

@NiekN
Copy link
Author

NiekN commented Mar 23, 2018

Im still using URL to control the sonoff like
http://myIP/cm?cmnd=POWER%20OFF
http://myIP/cm?cmnd=POWER OFF

im still not into the MQTT commands , i is still unclear for me

You mean on the webpage of the sonoff, to check there the LOG?
But do i have to make a own build ? or is the latest version of sonoff.bin the right one

@curzon01
Copy link
Contributor

You do not need your own build. You can use my suggestion commented above also with your build and yes, simply use "Console" button from webpage of your sonoff to take the command and observe the log.

@NiekN
Copy link
Author

NiekN commented Mar 24, 2018

18:38:59 MQT: Connect failed to domus1:1883, rc -2. Retry in 10 sec
18:39:11 MQT: Attempting connection...
18:39:24 MQT: Connect failed to domus1:1883, rc -2. Retry in 10 sec
18:39:35 MQT: Attempting connection...
18:39:49 MQT: Connect failed to domus1:1883, rc -2. Retry in 10 sec
18:40:01 MQT: Attempting connection...
18:40:15 MQT: Connect failed to domus1:1883, rc -2. Retry in 10 sec
18:40:17 RSL: domoticz/in = {"idx":12,"nvalue":1,"svalue":""}
18:40:17 RSL: stat/sonoff/RESULT = {"POWER1":"ON"}
18:40:17 RSL: stat/sonoff/POWER1 = ON
18:40:21 RSL: domoticz/in = {"idx":12,"nvalue":0,"svalue":""}
18:40:21 RSL: stat/sonoff/RESULT = {"POWER1":"OFF"}
18:40:21 RSL: stat/sonoff/POWER1 = OFF
18:40:25 RSL: domoticz/in = {"idx":13,"nvalue":1,"svalue":""}
18:40:25 RSL: stat/sonoff/RESULT = {"POWER2":"ON"}
18:40:25 RSL: stat/sonoff/POWER2 = ON
18:40:26 MQT: Attempting connection...
18:40:40 MQT: Connect failed to domus1:1883, rc -2. Retry in 10 sec
18:40:40 RSL: domoticz/in = {"idx":13,"nvalue":0,"svalue":""}
18:40:40 RSL: stat/sonoff/RESULT = {"POWER2":"OFF"}
18:40:40 RSL: stat/sonoff/POWER2 = OFF

00:00:00 Project sonoff Sonoff (Topic sonoff, Fallback DVES_980BC3, GroupTopic sonoffs) Version 5.12.0
00:00:00 WIF: Connecting to AP1 myIP in mode 11N as sonoff-3011...
00:00:07 WIF: Connected
00:00:07 DNS: Initialized
00:00:07 HTP: Web server active on sonoff-3011.local with IP address 192.xxx.xxx.xxx
20:24:16 MQT: Attempting connection...
20:24:29 MQT: Connect failed to domus1:1883, rc -2. Retry in 10 sec
20:24:41 MQT: Attempting connection...
20:24:54 MQT: Connect failed to domus1:1883, rc -2. Retry in 10 sec

@NiekN
Copy link
Author

NiekN commented Mar 24, 2018

looks like sonoff is busy with MQTT , which is not working

@curzon01
Copy link
Contributor

temporarly disable MQTT (e.g. using command SetOption3 OFF) - if this solves the problem you can enable MQTT again (SetOption3 ON) and try different MQTT_LIBRARY_TYPE 2 or 3

@NiekN
Copy link
Author

NiekN commented Mar 25, 2018

Hi curzon01

The sonoff is trying to connect to the MQTT broker, if he cannot find it , he retry in 10sec
Every retry gives a hiccup at the webpage/responce of relay.
I had found out that the MQTT broker on the PI was not working . Also some settings in the sonoff where not correct. So i finally got it working

Thx for help anyway

@NiekN NiekN closed this as completed Mar 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants