homieiot / homie-esp8266

💡 ESP8266 framework for Homie, a lightweight MQTT convention for the IoT
http://homieiot.github.io/homie-esp8266
MIT License
1.36k stars 308 forks source link

Sketches not working on esp8266-01 (SOLVED) #135

Closed gubagu closed 8 years ago

gubagu commented 8 years ago

Marvin man fuckin' amzing project, and the heavy lifting you've done WOW !!!

I run the Homi server it worked just out of the box. Connected it to my MQTT broker - everything worked out of the box. Then I installed the example code on on of my esp8266-01 and nothing happened. It did not create AP as it is said in the getting started manual and the serial had also nothing to say. Once i got some error stack output but that was once.

What could it be?

Tell me if you need additional info on the issue.

Thanks in advance man.

Cheerz, Guby

benzino77 commented 8 years ago

https://homie-esp8266.readme.io/docs/built-in-led Try to disable led feedback

gubagu commented 8 years ago

@benzino77 will try and let you know. Cheerz mate

euphi commented 8 years ago

Activate Logging to Serial in the setup() function.


Serial.begin(115200);
homie.setLogging(true);

See, if there are any error messages when booting ConfigurationMode.

gubagu commented 8 years ago

Hey @benzino77 here is the output when trying to compile :

Arduino: 1.6.10 (Windows 10), Board: "NodeMCU 0.9 (ESP-12 Module), 80 MHz, 115200, 4M (1M SPIFFS)"

C:\Users\User\AppData\Local\Temp\arduino_modified_sketch_360\LightOnOff.ino: In function 'void setup()':

LightOnOff:24: error: 'class HomieInternals::HomieClass' has no member named 'disableLedFeedback'

   Homie.disableLedFeedback(); // before Homie.setup()
         ^

exit status 1
'class HomieInternals::HomieClass' has no member named 'disableLedFeedback'

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
marvinroger commented 8 years ago

The documentation linked above is for the upcoming v2. The current documentation is there: https://github.com/marvinroger/homie-esp8266/blob/v1.5.0/docs/9.-Troubleshooting.md :)

Le 24 août 2016 10:21 PM, "gubagu" notifications@github.com a écrit :

Hey @benzino77 https://github.com/benzino77 here is the output when trying to compile :

Arduino: 1.6.10 (Windows 10), Board: "NodeMCU 0.9 (ESP-12 Module), 80 MHz, 115200, 4M (1M SPIFFS)"

C:\Users\Zarro\AppData\Local\Temp\arduino_modified_sketch_360\LightOnOff.ino: In function 'void setup()':

LightOnOff:24: error: 'class HomieInternals::HomieClass' has no member named 'disableLedFeedback'

Homie.disableLedFeedback(); // before Homie.setup() ^

exit status 1 'class HomieInternals::HomieClass' has no member named 'disableLedFeedback'

This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/marvinroger/homie-esp8266/issues/135#issuecomment-242195087, or mute the thread https://github.com/notifications/unsubscribe-auth/AA8eNfnRP0mLydZb6p1Kh-zjavqVIvgoks5qjKezgaJpZM4Jr5sO .

gubagu commented 8 years ago

@marvinroger this got me little bit further...

2016-08-24 23_34_55-com3

Tried the LightOnOff sketch with Homie.enableLogging(true) & Homie.enableBuiltInLedIndicator(false) on two different esp8266 modules. With the same result. Have a look @ the pic. On one of them the CH_PAD and the vcc are shortened. Forgot to mention red led is ON. Blue led is dead.

marvinroger commented 8 years ago
#include "FS.h"

void setup() {
  Serial.begin(115200);
  Serial.println("");
  delay(1000);
  Serial.println("Mounting FS...");

  if (!SPIFFS.begin()) {
    Serial.println("Failed to mount file system");
    return;
  }

  if (!SPIFFS.format()) {
    Serial.println("Failed to format");
  } else {
    Serial.println("File system formatted");
  }
}

void loop() {
}
#include <Homie.h>

void setup() {
  Serial.begin(115200);
  Serial.println();
  Serial.println();
  Homie.enableBuiltInLedIndicator(false);
  Homie.disableResetTrigger();
  Homie.setFirmware("test", "1.0.0");
  Homie.setup();
}

void loop() {
  Homie.loop();
}

Does your serial monitor print something then?

gubagu commented 8 years ago

Hey there, Both sketches have the same result - the same as in my previous post. Interestingly the FS is not working that's weird. Any other library or sketch from the examples and the ones i write work just fine. My module is has the ESP8266EX chip.

clough42 commented 8 years ago

@gubagu It looks like you're compiling for an ESP12 module with a 4MB (32Mb) flash chip. Most ESP-01 modules come with either 512KB (4Mb) or 1MB (8Mb) flash.

I had a similar problem until I switched board definitions to a 512KB ESP01.

gubagu commented 8 years ago

Hey @clough42 indeed that was it ! Thanks a bunch !