Giter Club home page Giter Club logo

led_stripe_dynamic_web_conf's People

Contributors

tobi01001 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

led_stripe_dynamic_web_conf's Issues

Implement Startup Effect choice

Implement a selectable "default" mode for starting up...
This would be different from saving the last state in case of resets / restarts in the sense to always start with a default configuration.

This would be useful for applications where power is supplied by e.g. a switch and parameters are rarely modified... (would enable a kind of "offline" use).

Implement Parameter for the Palette Distribution

Currently, we usually try to distrbute the color palette over the complete segment. But we could also implement a value how the palette should be distributed over the segment length.
e.g.:
100 --> complete palette from beginning to end
200 --> two times the complete palette
50 --> half of the palette (could look well with mirrored segments)

Add option to just "save and restart"

Currently there are two options being parsed: One for resetting to default values and another to perform a facotry reset (also deletes WiFi config...).

Further, when no or the wrong parameter is provided, the webserver does not send an answer.

Enhancement:

  • Add another else if where the current state gets saved and the device restarted (for whatever reason).
  • Add a final else where a default resopnse is sent, mentioning the available options (or redirecting to the main page).

void handleResetRequest(AsyncWebServerRequest * request)
{
// received a reset request
// lets check which one is valid
if (request->getParam(F("rst"))->value() == F("FactoryReset"))
{
request->send(200, F("text/plain"), F("Will now Reset to factory settings. You need to connect to the WLAN AP afterwards...."));
ledCtrlDoResets = LED_CTRL_RESET_FACTORY;
}
else if (request->getParam(F("rst"))->value() == F("Defaults"))
{
request->send(200, F("text/plain"), F("Strip was reset to the default values..."));
ledCtrlDoResets = LED_CTRL_RESET_DEFAULTS;
}
}

Add support for different languages

Currelty a mix of German and English. Would be good to have

  • English only and as default

  • other languages "optional" selected via complile flag.

  • need to be checked how to differentiate the web page language... (i.e. button labels)

Speed to be set / stored per effect

As suggested in #16 may effects look different depending on the speed selected.

Possible enhancement in there:

  • set and store speed for each effect (so every effect could be individually controlled)
  • speed factor for each effect (could effect dependen value which acts as parameter for the speed e.g. 1% to 200%) - benefit: global speed control still possible / effective | drawback: even more controls...

Option for Receiving OTA from a server

Currently, Arduino OTA is used. Maybe, when the system is idle we could check now and then if a new firmware is available.
Further, we could check directly during boot if a new firmware is available.

No need to provide values with the /all webserver call

Currently, the json returning all fields with the /all call includes the current values.
As the web page does call the /allvalues afterwards anyway, one of both is rather redundant / obsolete...

Idea:

  • as the /all is currently only serving a file, we could make this file rather static (only written when the crc does not match / SW was updated) and not providing the values. The /allvalues call will then return the values for all the fields

Hostname for Webserver

Implementation of a (configurable) hostname, also serving as name for the device (to be able distinguish between many not only on IP).

WiFi Handling with Knob Control

The handling when WiFi connection is lost and during re-connection seems to be not working correctly.
At least once, the ESP was locked up completely / reconnection seemed not to work.

Therefore:

  • maybe add a general parameter to Knob Control to be able to disable WiFi completely.
  • maybe add a "soft reboot" option
  • check and correct the handling in case WiFi is lost.
  • Maybe implement a increasing reconnect interval (to not try to connect too often) / complete timeout required?

LEDs sometimes not completely switched off

Sometimes I find one or the other strip as being still lid even if it should be completely off.
Missed to check the /status information from the web interface but on one of the LEDs with display, the power state was "off" and the leds still lid.

To be investigated and fixed accordingly.

User definable palette

As suggested in #16:

Enhancement to implement a custom palette which could be defined by the user on the web page?

Maybe with Colors in HEX-format and e.g. 8 fields...

wifi disconnect counter should also count backwards

The use of this "diconnect counter" just counts upwards but gives no indication about the "quality".

wifi_disconnect_counter++;

We should increase by at least four at every check where WiFi is not connected and decrease by one when connected.

Like:

if (WiFi.status() != WL_CONNECTED)
    {
      DEBUGPRNT("Lost Wifi Connection. Counter is " + String(wifi_err_counter));
      wifi_err_counter+=2;
      wifi_disconnect_counter+=4;
    }
    else
    {
      if(wifi_disconnect_counter > 0)
      {
        wifi_disconnect_counter--;
      }
      if(wifi_err_counter > 0)
      {
        wifi_err_counter--;
      }
    }

Also this check is unnecessary here in the loop as this is done during WiFi-Setup:

if(WiFi.getMode() != WIFI_STA)

Idea:
Finally, maybe we can also submit wifi signal strength and channel?

AsyncEditor

Switch to AsyncWebserver internal "edit" functionality. This works mostly in the AsyncEdit branch but needs some improvements:

  • switch Async to LittleFS
  • list directories
  • ...
  • may require a fork or local copy of the asyncWebserver library

Enhance Web Page

As suggested in #16 the web application could be split in more pages than just the "index".

This could make the look and feel more structured.
Challenges: Content may be required to be put on several objects or would need a flag for indicating the type of parameter.

Calculation of Active LEDs not functioning / could be enhanced

Du to the modification of calculating segments and writing the data in d10b14a
, there is less data in the leds array if there are more than one segment(s).

This leads to a wrong calculation of the active LEDs in the following calculation:

for (uint16_t i = 0; i < strip->getStripLength(); i++)
{
if (strip->leds[i])
num_leds_on++;
}

Idea:

  1. correct by only looping through the first segment and multiplying by the number of segments.
  2. provide this as function in the library in case it is needed more often (also makes the code look cleaner).

Change Field handling to uint32_t

Changing the Fields to uint32_t could enable the management of setting and getting the solidColor directly. To be checked if there is a certain "tradeoff".

Manipulate with arrays

Hello. May be someone can tell me how I can change pixel order in this project?
I have setup, where lighting algorithm need to draw not 1-2-3-4-5-...-NUM_LEDS, but in other order (5-3-6-1-2-8-...).
May be you can say - where I need to paste order changing function?
Example:

const uint8_t otherOrder[NUM_LEDS] = { 106, 89, 209, 47, 166, 154, 50, 217, 75, 116, 200, 33} 
...

 for (uint8_t i = 0; i < NUM_LEDS; i++) {
    uint8_t j = otherOrder[i];
    leds[j] = someRenderingFunct();
  }

Thanks!

WebPage simplyfy

Hello! Sorry for pore English.
I think webpage is very hard to manipulate.
May be it would be great if put some settings to additional webpage? For example - there may be such settings as: Color blend type, Color temperature, Reverse, Current limit, Reset default values, FPS and may be some others.
For now - webpage is very hard, as for me.

And one more "to do": it would be great if we are able to save settings for effects. For example, if we set SPEED as 120 - it great looks with RAINBOW effect. But not good with some other.
May be make "speed_coefficient" var for each effects and we would ne able to change SPEED more "looks good" for each effect.

Also, playlist with different setting - great additional functionality, but it need too much code, as I know. But, may be someone can help witn this (I'm not programmer).

Dynamic pallete with three or four colorPIckers - great funct too.
Thanks. You make great project.

WiFi Error Counter cannot reach 40 / WIFI check time only a 10th of the #define

As the error counter is reset during WiFi Setup, it cannot reach 40 (which provokes a reset in

if(wifi_err_counter > 40)
)

Therefore, this line needs to be removed:

Init value will still be zero:

uint8_t wifi_err_counter = 0;

The same should apply to the disconnect - counter in

wifi_disconnect_counter = 0;

If not reset during setupWiFi, it will correctly show the disconnects since the last reboot (and populate this via status request).

Friendly Names for Parameters for web interface and fhem

Currently, the parameters do have a "friendly label" but no friendly name (e.g. the Effect selection is just xxx./set?mo=). To create dynamic menues and readings in e.g. the fhem module, it would be better to have friendly names as well:
e.g.

  • colorPalette instead of pa
  • effect instead of mo
    ...

This way, the setting and status return can also be simplyfied...

Playlist with selectable effects

As suggested in #16 there could be a playlist where effects could be selected and ordered.

Currently this is easily possible with external control (i.e. calls to the web-page).

Could be a feature for a future release.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.