Page 1 of 4

Universal WiFi Interface

Posted: Tue Feb 11, 2020 4:19 pm
by Jack Bauer
So with most of the projects carrying the necessary hardware for the Olimex Wifi module (including new Chademo controller and V5 Tesla charger boards) , I wanted to design a simple and easy to modify wifi interface. As my web programming skills went out of date around 1998 I've been working with a freelance developer. First release now up on Github :

https://github.com/damienmaguire/ESP8266-WiFi-Interface

There are two versions. One updates each gauge individually and one updates them all at once. There is a nice little demo video on the repo. Expect more updates soon and I'll be adding wifi to various projects as we get things debugged.

Re: Universal WiFi Interface

Posted: Wed Feb 12, 2020 10:05 am
by Bigpie
Stick some of the features you are looking for up as issues on github and I'll pick some up. Web programming is my bread and butter these days.

Any reason you're maintaining 2 versions? I would combine.

I've started making changes to my fork for the gauges to be loaded from a config file.

Re: Universal WiFi Interface

Posted: Wed Feb 12, 2020 1:33 pm
by joromy
Nice work!!!
Just tested this on a EPS 01 module, works great.

When is there coming some two way serial functions, would be cool to have some touch input.....

Re: Universal WiFi Interface

Posted: Wed Feb 12, 2020 4:34 pm
by dima
A request from Arber came in to write a "true" universal web interface (originally for Labowski inverter).

Web based TTL over ESP8266. Works nicely with Johannes inverter. https://github.com/dimecho/ESP8266-XTerm

Re: Universal WiFi Interface

Posted: Wed Feb 12, 2020 6:36 pm
by Bigpie
I've added and edit page, I'll create a PR once my ESP8266 arrives and I've tested it. Only using my mock at the minute.

Re: Universal WiFi Interface

Posted: Wed Feb 12, 2020 8:28 pm
by joromy
Bigpie wrote: Wed Feb 12, 2020 6:36 pm I've added and edit page, I'll create a PR once my ESP8266 arrives and I've tested it. Only using my mock at the minute.
Can you share it? Would like to test it, even if it's not finished.

Re: Universal WiFi Interface

Posted: Thu Feb 13, 2020 7:18 am
by Jack Bauer
Thanks for the contributions folks:)

Re: Universal WiFi Interface

Posted: Thu Feb 13, 2020 3:40 pm
by Bigpie
@joromy

My github is https://github.com/jamiejones85/ESP8266-WiFi-Interface but the Arduino side of things isn't finished yet but I'll possibly ditch the current config setup and move the settings into EEPROM in the future.

I'm knocking something together at the moment, but I've only got a ESP6288-01S to play with so very limited SPIFFS space.

Re: Universal WiFi Interface

Posted: Thu Feb 13, 2020 5:31 pm
by dima
Tip:

GZIP all your files.

Include a compression header in Arduino web-server

Code: Select all

server.sendHeader("Content-Encoding", "gzip");
Make the compressed spiffs

Code: Select all

mkspiffs -c ./data/ -b 8192 -p 256 -s 500000 flash-spiffs.bin

Re: Universal WiFi Interface

Posted: Thu Feb 13, 2020 5:57 pm
by joromy
dima wrote: Wed Feb 12, 2020 4:34 pm Web based TTL over ESP8266. Works nicely with Johannes inverter. https://github.com/dimecho/ESP8266-XTerm
Will it fit in a 1MB ESP 01S? I see it can be easily upgraded to 4MB.

I want to use it together with Simp BMS, tesla charger and openinverter. Only for monitoring, so I could delete all config/parameter stuff.
I use a Teensy 4.0 with 3 CAN ports and a ESP 01S, to get all data from charger BMS and inverter via CAN bus.
So I have plenty of memory and processor power, but don't know it it can be shared via serial to the ESP?

I have 2x16 LCD with basic info.
My goal would be to have a phone with browser for more fancy display and gauges...... :o

Re: Universal WiFi Interface

Posted: Fri Feb 14, 2020 4:54 am
by joromy
Bigpie wrote: Wed Feb 12, 2020 10:05 am Stick some of the features you are looking for up as issues on github and I'll pick some up. Web programming is my bread and butter these days.
You don't have an issue tab:?

My first suggestions: It would be nice if you could edit the names and units of the gauges in the config page.
Then they can be used for anything......... Like SOC, very useful in a electric car :)

Re: Universal WiFi Interface

Posted: Fri Feb 14, 2020 10:33 pm
by joromy
Can someone help me with my decimal problem??
This is just a "for fun" project, not very important.... ;)
Capture1.JPG
I get right number of decimals on serial console LCD and web "green arrow"
But on BAT TEMP I get no decimals in web, but right in serial console and LCD "red arrow"

SERIAL2 is where the ESP is connected.

Re: Universal WiFi Interface

Posted: Sat Feb 15, 2020 9:14 am
by Bigpie
Your source on github?

Re: Universal WiFi Interface

Posted: Sat Feb 15, 2020 10:52 am
by joromy
Bigpie wrote: Sat Feb 15, 2020 9:14 am Your source on github?
I dont have it on github, just wanted to play around with your code.
I'm hoping your code will be configurable and useful for my setup, without to much changes, or any changes?
I will follow your github code and give you some feedback.

I still can't see any issue tab, on your github?

Re: Universal WiFi Interface

Posted: Sat Feb 15, 2020 12:53 pm
by Bigpie
Create them on Damien's repo and I'll create pull requests to resolve them.

I assume you are adding data in to the serial string read in by the olimex card? Is the open inverter going to spit this out?

Re: Universal WiFi Interface

Posted: Sat Feb 15, 2020 1:32 pm
by joromy
Bigpie wrote: Sat Feb 15, 2020 12:53 pm I assume you are adding data in to the serial string read in by the olimex card? Is the open inverter going to spit this out?

I have decided to have a main ECU/display unit with wifi, to send/receive data from tesla charger, Simp BMS, openinverter and instrument cluster via CAN bus.
Since there is no communication between these from the "manufacturer" :)
I also need to control heating/cooling this is done by the same ECU.
I have a 2x16 LCD i2c display, but your ESP wifi web server would be a nice feature.

I use a Teensy 4.0 with 3 CAN ports and a ESP 01S.
https://github.com/jomy-tech/Teensy-CAN ... ller-in-EV

Have modified the instrument cluster to CAN bus.
viewtopic.php?f=16&t=433

Re: Universal WiFi Interface

Posted: Sat Feb 15, 2020 3:04 pm
by Bigpie
To make this as universal as possible and useable without too much technical knowledge, I'm thinking that the user should be able to configure the gauges so that you just enter the prefix that's coming in the data and the webserver can split the serial data on comma and serve up the requested prefix for the gauge.

Re: Universal WiFi Interface

Posted: Sat Feb 15, 2020 4:06 pm
by Jack Bauer
Makes sense to me.

Re: Universal WiFi Interface

Posted: Sat Feb 15, 2020 5:27 pm
by joromy
To Johannes, Damien, Dima, Tom, Bigpie and others making openinverter stuff

If we could make a common "openinverter" CAN bus standard.
Then it would be much easier, to put the different products together.
Then all the openinverter products, could have a default CAN bus setting.

I could set up a table in the wiki, for all the openinverter stuff that has CAN bus?
And we could see how it develops.....

I have modified my Tesla charger, Simp BMS and my own stuff to send out CAN messages.
The openinverter already has very extensive CAN bus support, but no standard setting.

Re: Universal WiFi Interface

Posted: Sat Feb 15, 2020 7:04 pm
by johu
Do it.
I can easily flash a CAN mapping when sending out "my" boards and all others could just flash another hex file.

Re: Universal WiFi Interface

Posted: Sat Feb 15, 2020 8:51 pm
by Kevin Sharpe
johu wrote: Sat Feb 15, 2020 7:04 pm Do it.
This is all thats holding back OVMS so agree, do it :)

Re: Universal WiFi Interface

Posted: Sat Feb 15, 2020 10:21 pm
by tom91
joromy wrote: Sat Feb 15, 2020 5:27 pm To Johannes, Damien, Dima, Tom, Bigpie and others making openinverter stuff
So the BMS information is transmitted in a 'common' format used by Victron.

I have shared my/Zero-EV CanBus structure for the driveunit/inverter before.

Attached in the DBC, it does not have the latest BMS canbus info (this only adds info) but should be a good starting point.

If there is any info you feel is missing I can add it to the .dbc file.

Re: Universal WiFi Interface

Posted: Sun Feb 16, 2020 1:21 am
by RE3Rotor
I found this github repo: https://github.com/commaai/opendbc

Re: Universal WiFi Interface

Posted: Sun Feb 16, 2020 2:14 pm
by Bigpie
I'm not able to get any serial data out after "SDK:2.2.1(cfd48f3)/Core:2.5.2=20502000/lwIP⸮" on my MOD-WIFI-ESP8266 any suggestions?

It's serving up my files from SPIFFs and returning data from my new endpoint, but struggling to debug without the Serial IO

Re: Universal WiFi Interface

Posted: Mon Feb 17, 2020 4:26 pm
by dima
Arduino "Debug" serial interferes with the real serial ....therefore you cannot use serial to debug. Make a dynamic web page instead.
arduino_debug_disabled.png