I am using a home automation system to permanently monitor and adjust the charge current of my OpenEVSE.
I wasn't fully satisfied with the wifi option because
As I didn't find any ad-hoc solution to wire the OpenEVSE to my Ethernet network, I gathered info and parts to make mine. Here I decided to share my experience.
I bought a cheap TCP232-T2 module, lost half a day trying to use it setup software which never worked, ended-up using the setup options of the virtual comport appliance instead to set the device to my need:
The "TCP Server" protocol is crucial.
The BaudRate and COM Parameters should match the OpenEVSE ones, generally as pictured.
The network settings are up to your choices.
The OpenEVSE outputs 5V on its serial pins but the TCP232 is designed for 3.3V only so I tinkered a little bit with connectors, wires and resistors I had around.
I reused the Ubec from the Wifi kit. Ground is already connected between the Ubec 0V and the OpenEVSE GND, so no need to wire it.
I 3D-printed an enclosure to insulate and secure the TCP232 in the box.
I routed the ethernet cable through a PG in the box and crimped a RJ45 connector.
The manufacturer of the TCP232 is providing software solutions for windows, but my home automation runs on a raspberry pi under raspbian gnu/linux.
I found the following netcat commands to fulfil my needs:
Get max current "Pilot" setpoint ($GE rapi command):
echo '$GE' | netcat -C -w 1 192.168.1.51 10000
Set max current "Pilot" setpoint ($SC xx rapi command), example for 10A:
echo '$SC 10' | netcat -C -w 1 192.168.1.51 10000
Get actual charge current value ($GG rapi command):
echo '$GG' | netcat -C -w 1 192.168.1.51 10000
I "pipe" the rapi command to netcat.
Of course you may extend the principle to any rapi command.
The -C option adds CrLf to each command, needed by the TCP232.
The -w 1 sets a timeout of 1s before ending the tcp session.
There are different netcat versions that may not support these options, or have different switches, please check yours.
The IP and port just match the earlier made settings of my TCP232.
I think the most valuable info from my project is there.
I hope my english is OK.
Any mistake in this post? There are better ways to achieve the same goal; Any idea in mind, please comment!
Thanks for sharing, very cool project...
Hi! Great project! Did you make any changes to the OpenEVSE firmware? Is any Ethernet module with UART support suitable for these purposes? I want to buy this: http://ali.onl/10KT
I didn't change anything on the openevse firmware. I'm just using the original RAPI commands.
I didn't test any other ethernet module than the TCP232-T2.
It seems to me that the module from your link is ethernet to SPI, not UART; but I might be wrong as I don't read Russian.
I too suffered connectivity reliability issues with the WiFi module on my OpenEVSE, so I followed your lead and USR-TCP232-T2 module.
Like your example, the TCP232 module is powered by the Ubec but in my case I've used a 15k & 10k resistor to achieve 3v to the module's RX pin. I don't have a scope so can't measure the signal voltage, but the maths work out.
I've configured the module with the same options as you defined, and I can happily communicate with the module over the network. However, after connecting it to my OpenEVSE v5 board I'm not getting any response from the OpenEVSE.
I've checked continuity across the system and everything looks good. Any ideas?
Also, what's the significance of the RemoteIP value?
Thanks in advance :)
Actually, I just fixed it - realised I was probably dropping the voltage a bit too much @ 3v. Just swapped them out for 3.6K & 7.5K resistors which should give me 3.378v....and it worked!
Cool that you solved your issue.
I suspect the TCP232 input impedance to be a bit low, that's why I chose low resistor values.
You're on the right track!
Yup working a treat - managed to adapt my code easily too!
Thanks again for your instructions. :)
As I remember, the 5V/3.3V support is about the power supply, not about the logic signals, double check in the pdf manual if available.
I don't sell the enclosure, but you can find the stl file attached here. I de-soldered the front pins on my TCP232 board to fit it in the enclosure.
The PG choice might depend on you cable diameter and your location, but this one looks quite OK I guess: https://www.banggood.com/Waterproof-12mm-M12X1_5-IP68-Cable-Gland-Compression-TRS-Stuffing-Locknut-p-986732.html
I don't sell the enclosure, but find it here attached as a STL file. I removed the front pins from mine to fit it in.
I used a PG I had lying around, but this one looks OK too.