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

Webpage won't load if one more rest.button() is added to example code #29

Open
MagnusThome opened this issue Feb 7, 2018 · 2 comments
Labels

Comments

@MagnusThome
Copy link

If I run the example code exactly as is (only pwd and ssid changed) on an ESP8266-01 everything works great.

But if I add one more button like in the code below the webbrowser never gets any web page back. I can still do REST calls ("blindly") to turn pins on and off but the webbrowser does not get any html web page data back what so ever.

  // Set the title
  rest.title("aREST UI Demo");

  // Create button to control pin 5
  rest.button(5);
  rest.button(2);                                     // ADDING THIS WILL MAKE WEB PAGE LOAD FAIL

  // Init variables and expose them to REST API
  temperature = 22;
  humidity = 39.1;
  rest.variable("temperature", &temperature);
  rest.variable("humidity", &humidity);

  // Labels
  rest.label("temperature");
  rest.label("humidity");

Interestingly though is that if I do have two buttons but comment out all labels everything works again, except the labels of course.

@MagnusThome MagnusThome changed the title Webpage won't load if one more rest.button() is added Webpage won't load if one more rest.button() is added to example code Feb 8, 2018
@MagnusThome
Copy link
Author

MagnusThome commented Feb 8, 2018

Some more findings.

With any rest.label() included in the code the max number of rest.button() is one.
With no rest.label() included the max number of rest.button() is two

These being the only changes to the demo code apart from ssid and passwd.

Running on an ESP8266-01

@marcoschwartz
Copy link
Owner

Sorry about the bug, we'll check that and release a fix!

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

2 participants