opendps icon indicating copy to clipboard operation
opendps copied to clipboard

esp8266 proxy Arduino variant

Open danielkucera opened this issue 5 years ago • 7 comments

Hi,

what would you say about rewriting esp proxy to Arduino framework in PlatformIO? I see 3 advantages:

  1. easier to build (using PlatformIO)
  2. no need to store wifi credentials in binary thanks to: https://github.com/tzapu/WiFiManager
  3. easy automated builds: https://docs.platformio.org/en/latest/ci/travis.html

I can try to do this if you help me understand the current code.

danielkucera avatar Sep 11 '19 08:09 danielkucera

I agree with all of your points. I enjoy working with PlatformIO and it would make life significantly easier for anyone wanting to work on the esp code. It also means we could remove the esp-open-rtos submodule since platformIO will handle all the dependencies for us.

JackNewman12 avatar Sep 11 '19 08:09 JackNewman12

I am all for a complete rewrite. It should be rather straight forward. Currently the proxy uses UDP and that needs to be changed for TCP. The proxy does just that, forwards traffic between a socket and a UART.

kanflo avatar Sep 11 '19 22:09 kanflo

Could something like this +- fit? https://github.com/danielkucera/esp8266-arduino-ebus/blob/master/src/main.cpp

danielkucera avatar Sep 11 '19 23:09 danielkucera

That would work. With one client only ;)

kanflo avatar Sep 12 '19 22:09 kanflo

Preliminary version at https://github.com/danielkucera/esp8266-opendps Also depends on #160

danielkucera avatar Sep 15 '19 14:09 danielkucera

@kanflo , do you insist on using uHej? I would prefer mDNS, like this:

$ ./dpsctl.py -d tcp:esp-opendps.local -o off -q
Func       : cv (off)
  current  : 2000
  voltage  : 5000
V_in       : 32.34 V
V_out      : 0.01 V
I_out      : 0.000 A

danielkucera avatar Sep 15 '19 15:09 danielkucera

mDNS is fine, it would be a wasted effort to port uHej to Arduino ;)

kanflo avatar Sep 19 '19 20:09 kanflo