toblum / McLighting

The ESP8266 based multi-client lighting gadget

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wifi config gone after reboot

benvandijk84 opened this issue · comments

Hi,

First of all, i'd really like this project.
So tried to get it working with my Wemos D1 mini pro.
After uploading an connecting the LED strip monitor shows me the following output:

Couldn't find config.json
*WM: Adding parameter
*WM: strip_size
*WM: Adding parameter
*WM: led_pin
*WM: 
*WM: AutoConnect
*WM: Connecting as wifi client...
*WM: Using last saved values, should be faster
*WM: Connection result: 
*WM: 0
Entered config mode
192.168.4.1
WemosKast
*WM: 
*WM: Configuring access point... 
*WM: WemosKast
*WM: AP IP address: 
*WM: 192.168.4.1
*WM: HTTP server started
Saving Strip cfg: Failed!
{"pixel_count":119,"rgb_order":82,"pin":14}
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Sent config page
*WM: Request redirected to captive portal
*WM: Handle root
*WM: WiFi save
*WM: Parameter
*WM: strip_size
*WM: 119
*WM: Parameter
*WM: led_pin
*WM: 14
*WM: Sent wifi save page
*WM: Connecting to new AP
*WM: Connecting as wifi client...
*WM: Connection result: 
*WM: 3
Should save config
connected...yeey :)
Open http://192.168.7.13/ to open McLighting.
Use http://WemosKast.local/ when you have Bonjour installed.
New users: Open http://192.168.7.13/upload to upload the webpages first.

E1.31 mode setup complete.
Couldn't find "/stripstate.json"
 Failure!
readEEPROM(): 
*WM: freeing allocated params!
SET_MODE: 0 0
Saving Strip cfg: Failed!
{"pixel_count":119,"rgb_order":82,"pin":14}
writeEEPROM(): STA| 1|  0|196|196|255|  0|  0
handleFileRead: /uistate.json
WS: [0] Connected from 192.168.2.18 url: /
WS: [0] get Text: $
WS: Get status info: {"mode":1,"ws2812fx_mode":0,"ws2812fx_mode_name":"Static","speed":196,"brightness":196,"color":[255,0,0]}
WS: [0] get Text: =off
WS: Activated mode [2]!
Saving cfg: Failed!
 Failure!
writeEEPROM(): STA| 2|  0|196|196|255|  0|  0

This is what I configured in the definitions file:

//#define USE_WS2812FX_DMA       // LED_PIN is ignored & set to RX/GPIO3  Uses WS2812FX, see: https://github.com/kitesurfer1404/WS2812FX
//#define USE_WS2812FX_UART1     // LED_PIN is ignored & set to D4/GPIO2  Uses WS2812FX, see: https://github.com/kitesurfer1404/WS2812FX
//#define USE_WS2812FX_UART2     // LED_PIN is ignored & set to TX/GPIO1  Uses WS2812FX, see: https://github.com/kitesurfer1404/WS2812FX

// Neopixel
#define LED_PIN 14       // LED_PIN (14 / D5) where neopixel / WS2811 strip is attached
#define NUMLEDS 119       // Number of leds in the strip
//#define LED_TYPE_WS2811  // Uncomment if LED type uses 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
#define BUILTIN_LED 2    // ESP-12F has the built in LED on GPIO2, see https://github.com/esp8266/Arduino/issues/2192
#define BUTTON 4         // Input pin (4 / D2) for switching the LED strip on / off, connect this PIN to ground to trigger button.

#define HOSTNAME "FancyHostname"   // Friendly hostname

#define HTTP_OTA             // If defined, enable ESP8266HTTPUpdateServer OTA code.
#define ENABLE_OTA         // If defined, enable Arduino OTA code.
//#define ENABLE_AMQTT         // If defined, enable Async MQTT code, see: https://github.com/marvinroger/async-mqtt-client
#define ENABLE_MQTT        // If defined, enable MQTT client code, see: https://github.com/toblum/McLighting/wiki/MQTT-API
#define ENABLE_HOMEASSISTANT // If defined, enable Homeassistant integration, ENABLE_MQTT or ENABLE_AMQTT must be active
#define ENABLE_BUTTON        // If defined, enable button handling code, see: https://github.com/toblum/McLighting/wiki/Button-control
//#define MQTT_HOME_ASSISTANT_SUPPORT // If defined, use AMQTT and select Tools -> IwIP Variant -> Higher Bandwidth
#define ENABLE_LEGACY_ANIMATIONS // Dont disable this for now
#define ENABLE_E131              // E1.31 implementation
#define USE_HTML_MIN_GZ             //comment for using index.htm & edit.htm from SPIFFs instead of PROGMEM
//#define CUSTOM_WS2812FX_ANIMATIONS  //uncomment and put animations in "custom_ws2812fx_animations.h" 

So what happens is that the config is gone after a reboot.
Drives me crazy, so any help would be nice :)

Thanks in advance