Page 2 of 4

Re: Universal WiFi Interface

Posted: Mon Feb 17, 2020 5:48 pm
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.

Re: Universal WiFi Interface

Posted: Mon Feb 17, 2020 8:07 pm
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.

Re: Universal WiFi Interface

Posted: Tue Feb 18, 2020 12:09 pm
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.

Re: Universal WiFi Interface

Posted: Tue Feb 18, 2020 2:01 pm
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

Re: Universal WiFi Interface

Posted: Tue Feb 18, 2020 2:34 pm
by Bigpie
: made it easier to split the string. Got some other changes I'd like to make, but after that. Open to suggestions.

Re: Universal WiFi Interface

Posted: Tue Feb 18, 2020 2:50 pm
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.

Re: Universal WiFi Interface

Posted: Tue Feb 25, 2020 4:11 pm
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.

Re: Universal WiFi Interface

Posted: Tue Feb 25, 2020 4:47 pm
by bulletbug
This looks very cool. I'm excited to try it out. Thank you for making it.

Re: Universal WiFi Interface

Posted: Tue Feb 25, 2020 6:41 pm
by Jack Bauer
Looks excellent. Link to your repo?

Re: Universal WiFi Interface

Posted: Tue Feb 25, 2020 7:17 pm
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);
}

Re: Universal WiFi Interface

Posted: Tue Feb 25, 2020 8:54 pm
by Bigpie
I'll do PR when I get laptop out in the morning.

Does the update server allow code update and spiffs?

Re: Universal WiFi Interface

Posted: Tue Feb 25, 2020 9:13 pm
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)

Re: Universal WiFi Interface

Posted: Tue Feb 25, 2020 9:34 pm
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-)

Re: Universal WiFi Interface

Posted: Tue Feb 25, 2020 11:35 pm
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?

Re: Universal WiFi Interface

Posted: Wed Feb 26, 2020 8:15 am
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?

Re: Universal WiFi Interface

Posted: Wed Feb 26, 2020 9:41 am
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?

Re: Universal WiFi Interface

Posted: Wed Feb 26, 2020 10:16 am
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

Re: Universal WiFi Interface

Posted: Wed Feb 26, 2020 10:32 am
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.

Re: Universal WiFi Interface

Posted: Wed Feb 26, 2020 11:17 am
by Dilbert
Ok that is sorted, I had pulled it from the wrong GIT hub. Looks great.

Re: Universal WiFi Interface

Posted: Wed Feb 26, 2020 2:13 pm
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!?

Re: Universal WiFi Interface

Posted: Wed Feb 26, 2020 3:13 pm
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.

Re: Universal WiFi Interface

Posted: Wed Feb 26, 2020 4:19 pm
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)

Re: Universal WiFi Interface

Posted: Wed Feb 26, 2020 4:33 pm
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

Re: Universal WiFi Interface

Posted: Wed Feb 26, 2020 7:36 pm
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...... :)

Re: Universal WiFi Interface

Posted: Wed Feb 26, 2020 8:54 pm
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.