tube0013 / esphome-stream-server-v2

Custom Component for ESPHome enabling Serial over TCP
33 stars 25 forks source link

"Hot fix" for ESP82XX #2

Open MattWestb opened 1 year ago

MattWestb commented 1 year ago

Adding patch for ESP8XX so its possible compiling the firmware. I do not have the knowledge off writing C++ so i have adding it as comment and the user must comment the ESP32 out and un-commented lines fro ESP82XX for changing arch. Im very sure some one can doing it automatic detecting if ESP 32 or 82XX and dont need my hack.

Looks working OK on my test setup with one "IKEA Marcus2 EZSP 6.10.3.0 one one D1 Mini clone.

PS: Some extra spaces is taken away.

MattWestb commented 1 year ago

Status report from testing:

One WeMos D1 Mini clone with one "Markus EZSP" 6.10.3.0 is the stream server status connected for over one week and the ZHA is running on my laptop (Windows 10 and HA core containered) and have no error reported in the log and looks working fine all the time.

Perhaps shall testing with RCP and see if it also working OK (without hardware flow control then HW is not supported in the ESP hardware) ;-))

I have one more D1 Mini flashed but its being for testing and have not being active all the time.

cenobitedk commented 1 year ago

I believe this part in stream_server.h should also be changed:

// stream_server.h, lines 23-29
#ifdef ARDUINO_ARCH_ESP8266 // -> should be #ifdef USE_ESP8266
#include <ESPAsyncTCP.h>
#else
// AsyncTCP.h includes parts of freertos, which require FreeRTOS.h header to be included first
#include <freertos/FreeRTOS.h>
#include <AsyncTCP.h>
#endif
MattWestb commented 1 year ago

Thanks @cenobitedk for comments on the "PR" !! I is not one code warrior and i dont knowing hos putting the changes in code and getting it working and not braking the current code. I also need testing if its working before posting the updated code and its only possible getting the syntax OK.

Can you pleas posting OK formatted code that is possible putting in current code without braking it then i can doing the testing. Also possible making on pull to my patch https://github.com/MattWestb/esphome-stream-server-v2/tree/patch-1.

Thanks in advance !!