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

espurna is very unstable on my device #743

Closed
LubergAlexander opened this issue Mar 31, 2018 · 9 comments
Closed

espurna is very unstable on my device #743

LubergAlexander opened this issue Mar 31, 2018 · 9 comments
Labels
Milestone

Comments

@LubergAlexander
Copy link
Contributor

LubergAlexander commented Mar 31, 2018

Hi,

my settings:
board: https://github.com/ArnieX/swifitch
hardware.h:

#elif defined(SWIFITCH)

#define MANUFACTURER          "SWIFITCH"
#define DEVICE                "SWIFITCH"

#define BUTTON1_PIN         4 // D2
#define BUTTON1_MODE        BUTTON_SWITCH | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH

#define BUTTON1_RELAY       1
#define RELAY1_PIN          5 // D1
#define RELAY1_TYPE         RELAY_TYPE_NORMAL

#define LED1_PIN            12 // D6
#define LED1_PIN_INVERSE    1

platformio.ini:

[env:swifitch]
platform = espressif8266
board = nodemcuv2
framework = arduino
board_flash_mode = dout
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m} -DSWIFITCH -DDHT_SUPPORT=1 -DDHT_PIN=2 -DDHT_TYPE=DHT_CHIP_DHT11
monitor_baud = 115200
extra_scripts = ${common.extra_scripts}

My button on D2 is a regular toggle light switch. I have a DHT11 sensor on pin 2.

build worked fine and I have flashed the firmware. It looks like its working, web ui is available, connected to wifi, the button works correctly, but everything is very unstable, for example, I can toggle the light a few times and then it get stuck, ui becomes unresponsive, sometimes flipping the switch physically helps, sometimes doesn't. After multiple hours of running it quickly toggles the relay sometimes which briefly turns the light on and off.

I tried to debug that by enabling telnet on the UI, but saving options which go through websockets doesn't work, and I can't enable it. The same thing happens with MQTT settings, I tried to set my local mqtt host there, and clicking save does nothing - after refreshing the screen, settings are back to disabled.

Does anyone have an idea why that happens? the chip is the same in most of the supported boards, so I guess I have incorrect build settings? Hardware should be fine because it works stable and correctly with simpler(https://github.com/LubergAlexander/swifitch-software) firmware.

Technical data from main UI screen:
screen shot 2018-03-31 at 9 26 23 am

@xoseperez
Copy link
Owner

Yes, dev branch is currently unstable. I'm working on it.

@xoseperez xoseperez added the bug label Mar 31, 2018
@xoseperez xoseperez added this to the 1.12.5 milestone Mar 31, 2018
@LubergAlexander
Copy link
Contributor Author

I have just tried master branch and it behaves exactly the same, do you have any tips?

@LubergAlexander
Copy link
Contributor Author

@xoseperez also, I have initially flashed it OTA(because the previous firmware had this setup). Do you think it makes sense to disconnect the device and reflash using USB programmer?

@xoseperez
Copy link
Owner

There should be no difference between an OTA-flashed and a wired-flashed device. But I don't recommend using dev version on "production" devices and even less on devices like light bulbs that might require rewiring to recover from a bad flash.

@LubergAlexander
Copy link
Contributor Author

LubergAlexander commented Apr 3, 2018 via email

@K1nslayer
Copy link

Sync back to 1.12.4 it is very stable. Something is bad with 1.12.5.
or get a binary from here:

@LubergAlexander
Copy link
Contributor Author

@xoseperez surprisingly, after I have switched to espressiff8266 1.6.0(arduino core 2.4.0) it works perfectly fine

@xoseperez
Copy link
Owner

There is a problem with the NtpClientLib. I've been debugging it for some days and I've located the precise commit that breaks it but I cannot see the reason why. It but it triggers the Software Watchdog. I'm using a custom fork of the library to bypass this for the moment. Current dev branch should be stable (12ef856).

@xoseperez
Copy link
Owner

Staged for release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants