Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added RAPI interface for communication with openEVSE web front-end #39

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

arjanmels
Copy link
Contributor

@arjanmels arjanmels commented Nov 20, 2020

Big pull request which includes:

  • Added YTL meter
  • Added Voltage Measurement
  • Added configuration of energy and voltage measurement
  • Added RAPI (openEVSE) interface
  • Added EV current to display
  • Allow custom registers up to 65535 instead of 255
  • Added Connected state for display
  • Allow entry of maximum circuit current also in non-load balance mode

The RAPI interface can work with the default version of openEVSE: https://github.com/OpenEVSE/ESP32_WiFi_V3.x.
However a version with improved interoperability is available here: https://github.com/arjanmels/ESP32_WiFi_V3.x/tree/feature-smartevse-2 and the gui: https://github.com/arjanmels/openevse_wifi_gui/tree/feature-smartevse

@bobosch
Copy link
Collaborator

bobosch commented Nov 25, 2020

Hi! Thanks for your contribution!

I like

  • The cleanup and the small improvements
  • Some modbus enhancement
  • Most parts of the RAPI integration

But some review is needed

  • The files are encoded with ISO 8859-15 – please keep the encoding
  • I would not include functionality in a define statement. The single printf lines are all debug prints (should be all converted into "DEBUG_PRINT"), but not reused simultaneously to send RAPI replays. Better would be to create a function setState(...) and include some functionality there.
  • The YTL meter implementation changes a lot in the communication code (RS485 settings) and it probably break some other communication with the sensorbox, with other SmartEVSE or with other modbus electric meters. It should be a separate pull request.

BTW: @mstegen restructured the complete modbus communication, there will be many conflicts on the serial communication code.

If you like I could cherry pick or probably copy paste parts of your pull request.

@arjanmels
Copy link
Contributor Author

arjanmels commented Nov 25, 2020

The files are encoded with ISO 8859-15 – please keep the encoding.

Will pay attention for next commits.

I would not include functionality in a define statement. The single printf lines are all debug prints (should be all converted into "DEBUG_PRINT"), but not reused simultaneously to send RAPI replays. Better would be to create a function setState(...) and include some functionality there.

Agree.

The YTL meter implementation changes a lot in the communication code (RS485 settings) and it probably break some other communication with the sensorbox, with other SmartEVSE or with other modbus electric meters. It should be a separate pull request.

I tried to take care to keep it fully compatible, but agree it can/should be seperate pull request.

BTW: @mstegen restructured the complete modbus communication, there will be many conflicts on the serial communication code.
If you like I could cherry pick or probably copy paste parts of your pull request.

If you are willing to, that is perfectly fine with me. Especially if you have a rewrite of the modbus code in the pipeline.

@pascalsaul
Copy link

@arjanmels could you post some instructions how to install this? I guess we need to upload a bin to the sensorbox so the esp32 get programmed. What else we should do?

@arjanmels
Copy link
Contributor Author

arjanmels commented Nov 29, 2020

No this is not using the esp32 of the sensorbox, but one connected to the serial or icd connector.

I used a AdaFruit Huzzah32 board, but in principle any ESP32 board will do.

I used the ICD connector inside the SMARTEVSE enclosure, but you can also use the FTDI connector accessible from the outside: the ESP32 fits inside the DIN enclosure as well and the ICD connector also connects to the MCLR pin (if programmed correctly you can reset the PIC via the MCLR pin, but this requires a change to the PIC config bits and it is optional).

Connections:

SmartEVSE ICD FTDI Huzzah32 GPIO
Reset 1 - A0 GPIO_26
VDD3v3 2 5 3V
GND 3 6 GND
RX 4 3 A1 GPIO_25
TX 5 2 A2 GPIO_34
- 6 -

@pascalsaul
Copy link

@arjanmels I get it :) Do you have a precompiled .bin somewhere uploaded?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants