Universal WiFi Interface

Discussion about various user interfaces such as web interface, displays and apps
User avatar
Bigpie
Posts: 1585
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: Universal WiFi Interface

Post by Bigpie »

I've got it rolling now.

It can accept serial input in the format t:90,p:50,ect or individually t:90
The chart config if such that you just configure the min and max values and the data prefix as above and it'll update.
I also got fed up having to switch wifi so it can now (compile time at the moment) either join a wifi network or act as a access point.

I'll be doing a PR for my changes when it's a little more polished.
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
User avatar
joromy
Posts: 371
Joined: Fri Jun 28, 2019 12:56 pm
Has thanked: 1 time
Been thanked: 3 times

Re: Universal WiFi Interface

Post by joromy »

johu wrote: Sat Feb 15, 2020 7:04 pm Do it.
I can easily flash a CAN mapping when sending out "my" boards and all others could just flash another hex file.
Does this deserve it's own forum section under hardware (or software)?

https://openinverter.org/wiki/Main_Page ... er_CAN_std.
Thomas A. Edison “I have not failed. I've just found 10,000 ways that won't work"
User avatar
Bigpie
Posts: 1585
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: Universal WiFi Interface

Post by Bigpie »

I've created a PR to add the edit chart page, still not 'pretty' but functional so the user can setup gauges without recompiling and flashing. Let me know how you get on with it.
Attachments
Screenshot 2020-02-18 at 12.07.38 pm.png
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
User avatar
joromy
Posts: 371
Joined: Fri Jun 28, 2019 12:56 pm
Has thanked: 1 time
Been thanked: 3 times

Re: Universal WiFi Interface

Post by joromy »

Bigpie wrote: Tue Feb 18, 2020 12:09 pm I've created a PR to add the edit chart page, still not 'pretty' but functional so the user can setup gauges without recompiling and flashing. Let me know how you get on with it.
Looks nice, but dos not work for me..
I have changed the baud to 115200.
Have set up two gauges: Volt v and SOC s in setup.
Sending v306,s68* from both serial traffic generator (PC) and from BMS (Teensy3.2)

This is what I get on traffic generator:
<-v306,s68*
->adding: v306 v306#0D#0Aadding: s68 s68#0D#0A

The gauges are there, but no value.
If I go back to your previous version. is works

BTW the setup icon is a little hidden behind the gauge, in my phone.

Edit:
Sorry, it WORKS!
Stupid me, did not see you changed to : after prefix :D
Thomas A. Edison “I have not failed. I've just found 10,000 ways that won't work"
User avatar
Bigpie
Posts: 1585
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: Universal WiFi Interface

Post by Bigpie »

: made it easier to split the string. Got some other changes I'd like to make, but after that. Open to suggestions.
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
User avatar
joromy
Posts: 371
Joined: Fri Jun 28, 2019 12:56 pm
Has thanked: 1 time
Been thanked: 3 times

Re: Universal WiFi Interface

Post by joromy »

Bigpie wrote: Tue Feb 18, 2020 2:34 pm : made it easier to split the string. Got some other changes I'd like to make, but after that. Open to suggestions.
"Open to suggestions" you said it...
Adding:
Digital readout, gauges are nice, but number readout can be good to.

Text readout, like: READY, RUN, CHARGING, ON/OFF etc.

And off course input, configurable icon (text box)
And maybe an input field, sending custom commands to serial, this would be heaven for me since I now have all my modules on CAN bus.
Thomas A. Edison “I have not failed. I've just found 10,000 ways that won't work"
User avatar
Bigpie
Posts: 1585
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: Universal WiFi Interface

Post by Bigpie »

I've pushed some changed to my repo. I've not done a PR to Damiens repo.

Changes:
- /admin page can now select to either join a network or create an AP
- The chart config page now has selectable display types of "Text" or "Gauge"
- The display page now requests all the data in a single request and no longer requests data again until the previous request has been returned.

Upcoming:
- Ability to write arbitrary commands out to serial from the edit page
- Ability to add buttons to write out specified commands to serial to the main page.
Attachments
Screenshot 2020-02-25 at 4.02.03 pm.png
Screenshot 2020-02-25 at 4.02.18 pm.png
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
bulletbug
Posts: 94
Joined: Thu Sep 26, 2019 5:12 pm
Location: West Jordan, Utah USA

Re: Universal WiFi Interface

Post by bulletbug »

This looks very cool. I'm excited to try it out. Thank you for making it.
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: Universal WiFi Interface

Post by Jack Bauer »

Looks excellent. Link to your repo?
I'm going to need a hacksaw
User avatar
dima
Posts: 157
Joined: Sun Dec 09, 2018 9:35 pm
Location: Canada

Re: Universal WiFi Interface

Post by dima »

I recommend adding these 3 lines of code for future "easy web updates" there will be a new page /update

Code: Select all

#include <ESP8266HTTPUpdateServer.h>
ESP8266HTTPUpdateServer updater;

void setup()
{
	//.....
	updater.setup(&server);
}
User avatar
Bigpie
Posts: 1585
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: Universal WiFi Interface

Post by Bigpie »

I'll do PR when I get laptop out in the morning.

Does the update server allow code update and spiffs?
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
User avatar
dima
Posts: 157
Joined: Sun Dec 09, 2018 9:35 pm
Location: Canada

Re: Universal WiFi Interface

Post by dima »

Bigpie wrote: Tue Feb 25, 2020 8:54 pm Does the update server allow code update and spiffs?
Yes .bin files. Use esp8266 library v2.6.3 (previous versions had issues)
User avatar
joromy
Posts: 371
Joined: Fri Jun 28, 2019 12:56 pm
Has thanked: 1 time
Been thanked: 3 times

Re: Universal WiFi Interface

Post by joromy »

Bigpie wrote: Tue Feb 25, 2020 4:11 pm I've pushed some changed to my repo. I've not done a PR to Damiens repo.
Very nice have tested it on ESP01, Olimex mod, and ESP12E.
Works on all of them.

Can you add text size, words like "connected" is very dominant.
And background color. It's very bright if I drive at night.... 8-)
Thomas A. Edison “I have not failed. I've just found 10,000 ways that won't work"
Dilbert
Posts: 410
Joined: Mon Aug 12, 2019 7:21 pm
Location: Dublin, Ireland
Been thanked: 4 times

Re: Universal WiFi Interface

Post by Dilbert »

Strange one here, maybe someone else has seen it. Flashed file system and application to the esp module. On start up I check the flash file system and all the files are there. When I access index.html I only get the page header which is pulled in from a java script function, but nothing else prints.

Is there some limitation on the esp the doesn’t allow multiple sockets open at the same time?
User avatar
Bigpie
Posts: 1585
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: Universal WiFi Interface

Post by Bigpie »

I've got an ESP01S that exhibits strange behaviour with the SPIFFs filesystem but I've no idea why. I'm assuming the flash is bad.

I think the ESP can handle only one request at a time.

Do you get any output from the browser console? What does the network tab look like in developer tools?
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
User avatar
Bigpie
Posts: 1585
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: Universal WiFi Interface

Post by Bigpie »

joromy wrote: Tue Feb 25, 2020 9:34 pm
Bigpie wrote: Tue Feb 25, 2020 4:11 pm I've pushed some changed to my repo. I've not done a PR to Damiens repo.
Very nice have tested it on ESP01, Olimex mod, and ESP12E.
Works on all of them.

Can you add text size, words like "connected" is very dominant.
And background color. It's very bright if I drive at night.... 8-)
Is a brightness slider any use?
Attachments
Screenshot 2020-02-26 at 9.40.51 am.png
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
Dilbert
Posts: 410
Joined: Mon Aug 12, 2019 7:21 pm
Location: Dublin, Ireland
Been thanked: 4 times

Re: Universal WiFi Interface

Post by Dilbert »

Bigpie wrote: Wed Feb 26, 2020 8:15 am I've got an ESP01S that exhibits strange behaviour with the SPIFFs filesystem but I've no idea why. I'm assuming the flash is bad.

I think the ESP can handle only one request at a time.

Do you get any output from the browser console? What does the network tab look like in developer tools?
Had a look in developer mode, it is definitely exchanging information, it seems to be msising solid-gauge.js?

GET http://192.168.4.1/solid-gauge.js net::ERR_ABORTED 404 (Not Found)
DevTools failed to parse SourceMap: http://192.168.4.1/highcharts.js.map
DevTools failed to parse SourceMap: http://192.168.4.1/highcharts-more.js.map
old:6 GET http://192.168.4.1/solid-gauge.js net::ERR_ABORTED 404 (Not Found)
highcharts.js:14 Uncaught Error: Highcharts error #17: www.highcharts.com/errors/17/?missingMo ... solidgauge
missingModuleFor: solidgauge
User avatar
Bigpie
Posts: 1585
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: Universal WiFi Interface

Post by Bigpie »

Oops, I've inadvertently removed the solid-gauge.js, I'll reinstate but in the meantime you can copy it from the V2 folder.

On a sidenote, I'm only updating V1, I'm thinking it makes sense to remove the 2 versions and just maintain a single version going forward.
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
Dilbert
Posts: 410
Joined: Mon Aug 12, 2019 7:21 pm
Location: Dublin, Ireland
Been thanked: 4 times

Re: Universal WiFi Interface

Post by Dilbert »

Ok that is sorted, I had pulled it from the wrong GIT hub. Looks great.
User avatar
joromy
Posts: 371
Joined: Fri Jun 28, 2019 12:56 pm
Has thanked: 1 time
Been thanked: 3 times

Re: Universal WiFi Interface

Post by joromy »

Bigpie wrote: Wed Feb 26, 2020 9:41 am
joromy wrote: Tue Feb 25, 2020 9:34 pm And background color. It's very bright if I drive at night.... 8-)
Is a brightness slider any use?
Maybe, stock LCD display/gauges in a car, do that.
Still black background, it's much cooler....

Edit:
That may not be necessary, when i think of it, the phone should have brightness slider/control!?
Thomas A. Edison “I have not failed. I've just found 10,000 ways that won't work"
User avatar
Bigpie
Posts: 1585
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: Universal WiFi Interface

Post by Bigpie »

I'm playing around with the update server, I'm able to update the firmware with a binary upload, but I cannot get my spiffs binary to be accepted.

Update error: ERROR[10]: Magic byte is wrong, not 0xE9

I'm creating the binary (MOD-WIFI-ESP8266) with:

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

**EDIT** Updated Library and now have options for firmware and filesystem upload.
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
User avatar
dima
Posts: 157
Joined: Sun Dec 09, 2018 9:35 pm
Location: Canada

Re: Universal WiFi Interface

Post by dima »

I still don't understand, what is this whole "universal" interface for? some kind of BMS? whats pushing all the UART messages (doesn't seem like Johannes inverter)
User avatar
Kevin Sharpe
Posts: 1345
Joined: Fri Dec 14, 2018 9:24 pm
Location: Ireland and US
Been thanked: 4 times

Re: Universal WiFi Interface

Post by Kevin Sharpe »

dima wrote: Wed Feb 26, 2020 4:19 pm I still don't understand, what is this whole "universal" interface for? some kind of BMS? whats pushing all the UART messages (doesn't seem like Johannes inverter)
does this help?

"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"

viewtopic.php?f=5&t=530#p6345
This is a personal post and I disclaim all responsibility for any loss or damage which any person may suffer from reliance on the information and material in this post or any opinion, conclusion or recommendation in the information and material.
User avatar
joromy
Posts: 371
Joined: Fri Jun 28, 2019 12:56 pm
Has thanked: 1 time
Been thanked: 3 times

Re: Universal WiFi Interface

Post by joromy »

dima wrote: Wed Feb 26, 2020 4:19 pm I still don't understand, what is this whole "universal" interface for?
I understand it very much.
Not to offend anyone, but there are of lot of half finished solutions, for a central unit/display. Have searched for something since I started with the openinverter build.

In theory is't simple:
One unit (may have a display) with wifi and several CAN interfaces. connected to all other modules via CAN bus, then it's "just" software to get a total solution for monitoring and configuring, of all modules, that can be used on both PC and phone (web).

Your web interface for the inverter, very good, but that is only for the inverter...
The nextion display for the Simp BMS, only for the BMS, only one way communication, no configuration.
PowerWatcher Display for Tesla, with some strange hardware, uses RS485 modules????......

It's probably more, please tell me if I have missed some.

Do you want to have a wifi module and serial interafce on all the differnt modules in your car?
Or a centralized unit?

May not be possible, many strong minds, that want to do it their own way.
But I have a dream, we can make wonderful things...... :)
Thomas A. Edison “I have not failed. I've just found 10,000 ways that won't work"
Dilbert
Posts: 410
Joined: Mon Aug 12, 2019 7:21 pm
Location: Dublin, Ireland
Been thanked: 4 times

Re: Universal WiFi Interface

Post by Dilbert »

An extension of what the guys are working on would be if we could use this web-interface and allow it to read off the CAN bus. So when we configure the gauges, rather than setting the serial identifier, we set the CAN identifier, data type, and byte location.

For this task we could use the ESP32, with much the same code that is here, but just allow it to pull the data off the CAN network. This would also have the advantage of working with any vehicle network, even the open inverter boards. You would only need to solder the CAN transceiver onto the ESP32 to get this working.
Post Reply