after working for about a year on your library, I have made several major improvements and changes to it and I was wondering whether you’d be interested in them.
got rid of C++ strings, reworked everything to use char arrays, so no heap fragmentation at least from that anymore
rewrote the tcp list function to send the fauxmo device list (json) as chunked response, fully non blocking, device per device with request->beginChunkedResponse. in my scenario, i wasn’t able to send responses larger than about 1.9k (and then the asyncwebserver did simply cut it off) so 3 fauxmo devices was the absolute max, I could use. Now I’ve got 10 devices and detection and control is still working.
changed the interface to pass the whole request to fauxmo.process. this was necessary to achieve point 2.
i have customized it to work solely with an external server (espasyncwebserver, for sure), so I also removed some functions and stuff which were needed for the internal server. might need to reimplement that but shouldn’t be a big issue.
I’m still noticing some random crashes when alexa discovers where the memory runs out (allocation failed, exception 29) and I guess that’s due to the fact that all alexa devices I have (about 8 ) query the poor ESP8266 at once and when using an external webserver, the max connection/client limit is not enforced. will look into that later.
it was a sh*tload of work until I realized that the asyncwebserver just cuts off the JSON device list response if it is too long. and it was another sh*tload of work to figure out how to make it non blocking and async but still chunked and “thread safe”.
but now, it is done :slight_smile:
btw. i’m also planning to implement color support so i can integrate that library into my 8 channel PWM led stripe dimmer.
Original report by Lucas Neumann (Bitbucket: fiakergulaschsaft, ).
Hi
after working for about a year on your library, I have made several major improvements and changes to it and I was wondering whether you’d be interested in them.
request->beginChunkedResponse
. in my scenario, i wasn’t able to send responses larger than about 1.9k (and then the asyncwebserver did simply cut it off) so 3 fauxmo devices was the absolute max, I could use. Now I’ve got 10 devices and detection and control is still working.i have customized it to work solely with an external server (espasyncwebserver, for sure), so I also removed some functions and stuff which were needed for the internal server. might need to reimplement that but shouldn’t be a big issue.
I’m still noticing some random crashes when alexa discovers where the memory runs out (allocation failed, exception 29) and I guess that’s due to the fact that all alexa devices I have (about 8 ) query the poor ESP8266 at once and when using an external webserver, the max connection/client limit is not enforced. will look into that later.
it was a sh*tload of work until I realized that the asyncwebserver just cuts off the JSON device list response if it is too long. and it was another sh*tload of work to figure out how to make it non blocking and async but still chunked and “thread safe”.
but now, it is done :slight_smile:
btw. i’m also planning to implement color support so i can integrate that library into my 8 channel PWM led stripe dimmer.