kanflo / opendps

Give your DPS5005 the upgrade it deserves
MIT License
877 stars 124 forks source link

esp8266 proxy Arduino variant #155

Open danielkucera opened 4 years ago

danielkucera commented 4 years ago

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.

JackNewman12 commented 4 years ago

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.

kanflo commented 4 years ago

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.

danielkucera commented 4 years ago

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

kanflo commented 4 years ago

That would work. With one client only ;)

danielkucera commented 4 years ago

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

danielkucera commented 4 years ago

@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
kanflo commented 4 years ago

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