Gauge Update

Discussion about various user interfaces such as web interface, displays and apps
Post Reply
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Gauge Update

Post by johu »

I just updated the gauge code to linearly distribute the "ticks" across the circumference. Before it could happen if min=0 and max=10 you'd get 0,5,6,6,9,10 instead of 0,2,4,6,8,10 and also the "needle" didn't really line up with the numbers.
Just download gauges.js from github and upload it to your esp8266 with the Browse button in the "Update" section.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
ManuFromParis
Posts: 31
Joined: Sat Feb 15, 2020 6:34 pm
Location: Near Paris

Re: Gauge Update

Post by ManuFromParis »

Hello Johannes,
is it possible to update and/or upload other files to the esp8266.
I'm thinking of an enhanced "gauges.html" with custom buttons for drive modes and regen modes. And a SOC bargraph as well instead of the udc gauge.
911 SC with Tesla SDU & i3 pack
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Gauge Update

Post by johu »

Yes anything can be uploaded until memory is full - go crazy :)
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
ManuFromParis
Posts: 31
Joined: Sat Feb 15, 2020 6:34 pm
Location: Near Paris

Re: Gauge Update

Post by ManuFromParis »

any name ? Custom files shall have a custom prefix to avoid collision with existing files.

I guess re-uploading a file with the same name will replace the old one ? Or .bak files are created on "server" ?
911 SC with Tesla SDU & i3 pack
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Gauge Update

Post by johu »

It will replace the existing one. But you can always find the original files here: https://github.com/jsphuebner/esp8266-web-interface
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
ManuFromParis
Posts: 31
Joined: Sat Feb 15, 2020 6:34 pm
Location: Near Paris

Re: Gauge Update

Post by ManuFromParis »

Thanks, I'm now going to go crazy !
:D
911 SC with Tesla SDU & i3 pack
User avatar
ManuFromParis
Posts: 31
Joined: Sat Feb 15, 2020 6:34 pm
Location: Near Paris

Re: Gauge Update

Post by ManuFromParis »

Another question : is there any kind of script that can be executed on "server" side ?

My idea is to add a password in html pages that are able to modify sensible parameters and leave "read only" pages as they are today (such as gauges).
That password would be stored in a server script.
911 SC with Tesla SDU & i3 pack
User avatar
ManuFromParis
Posts: 31
Joined: Sat Feb 15, 2020 6:34 pm
Location: Near Paris

Re: Gauge Update

Post by ManuFromParis »

FSBrowser.ino looks like that kind of script.
I'm going to look into that.

but this topic suggests php scripts could be executed, that would be perfect !
https://github.com/esp8266/Arduino/issues/3043
911 SC with Tesla SDU & i3 pack
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Gauge Update

Post by johu »

Actually that sounds like the OTA server where esp8266 downloads its update is running php, not the esp8266 itself
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
dima
Posts: 157
Joined: Sun Dec 09, 2018 9:35 pm
Location: Canada

Re: Gauge Update

Post by dima »

ManuFromParis wrote: Tue Sep 01, 2020 8:20 pm Thanks, I'm now going to go crazy !
:D
If interested there is already a good "crazy" starting point here -> https://github.com/dimecho/Open-Inverter-Dashboard
jon volk
Posts: 572
Joined: Wed Apr 10, 2019 7:47 pm
Location: Connecticut
Been thanked: 2 times

Re: Gauge Update

Post by jon volk »

dima wrote: Thu Sep 03, 2020 1:23 am
ManuFromParis wrote: Tue Sep 01, 2020 8:20 pm Thanks, I'm now going to go crazy !
:D
If interested there is already a good "crazy" starting point here -> https://github.com/dimecho/Open-Inverter-Dashboard
Just to add yet another dimension to all this dash stuff, I’m working on a web-Bluetooth interface since I find the WiFi connection can irritating when you have more than one openinverter based product in the car and/or you want to stream music. The BLE allows multiple peripherals at once without hijacking the phones WiFi data stream. I’m in the early stages and just getting a handle on parsing serial data from an HM10 device. So far the only real limitation I’m seeing are 20byte packets
The basic premise is the html and js files are hosted to a standard webpage and the HM10 provides the two way data interface.

Like I said, very early stages haha.
Attachments
EB61B54A-8DE6-4986-B71D-CCD87BC32FF0.jpeg
Formerly 92 E30 BMW Cabrio with Tesla power
User avatar
dima
Posts: 157
Joined: Sun Dec 09, 2018 9:35 pm
Location: Canada

Re: Gauge Update

Post by dima »

jon volk wrote: Thu Sep 03, 2020 7:55 pm So far the only real limitation I’m seeing are 20byte packets
Yes I bumped into that as well, need to explore "stream" option. Otherwise every second you want to update you need to get a new "request/reply" is too slow. This example (without using JQuery): https://gist.github.com/igrigorik/5736866
jon volk
Posts: 572
Joined: Wed Apr 10, 2019 7:47 pm
Location: Connecticut
Been thanked: 2 times

Re: Gauge Update

Post by jon volk »

Thanks, I’ll check that out.
Formerly 92 E30 BMW Cabrio with Tesla power
User avatar
ManuFromParis
Posts: 31
Joined: Sat Feb 15, 2020 6:34 pm
Location: Near Paris

Re: Gauge Update

Post by ManuFromParis »

dima wrote: Thu Sep 03, 2020 1:23 am
ManuFromParis wrote: Tue Sep 01, 2020 8:20 pm Thanks, I'm now going to go crazy !
:D
If interested there is already a good "crazy" starting point here -> https://github.com/dimecho/Open-Inverter-Dashboard
Thanks, I am waiting for custom CAN gauges, so meanwhile I had a draft written, to display main data and shortcut buttons to modify several parameters at once.
It's now uploaded, with customized copies of gauges.js and inverter.js

Basic but efficient display. Odo is based on "turns" but this value still needs to be tuned to real distances. At least I'll have computed data on efficiency (or battery discharge VS actual distance since start)

I am also working on an more elaborated algorithm to compute the remaining range in km, based on a sample of SOCs values during several runs.
To proceed on this algorithm, I shall need a way to store text values in a file. Anyone knows how that could be achieved ?

Maybe I can use this logging stream, emulating Johannes' log js script :
viewtopic.php?f=5&t=127#p1048
Attachments
Capture d’écran 2020-09-06 à 16.23.24.jpg
911 SC with Tesla SDU & i3 pack
m.art.y
Posts: 550
Joined: Sat Jun 06, 2020 6:54 pm
Location: UK
Has thanked: 24 times
Been thanked: 17 times

Re: Gauge Update

Post by m.art.y »

Hi. I just freshly programmed olimex esp8266 wifi and prius gen 3 board. I have not yet got a prius inverter to put the board in. On the web interface I get default parameters to load up. However when I try to open gauges or data logger it just opens a blank page. Does the board need to be in the inverter for gauges and data logger to load or something is missing on the programming side? Thanks :)
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Gauge Update

Post by Isaac96 »

You need to click the little clicky boxes to the right of the parameter names, that selects the variables to graph or plot :)
m.art.y
Posts: 550
Joined: Sat Jun 06, 2020 6:54 pm
Location: UK
Has thanked: 24 times
Been thanked: 17 times

Re: Gauge Update

Post by m.art.y »

Isaac96 wrote: Thu Sep 17, 2020 10:39 pm You need to click the little clicky boxes to the right of the parameter names, that selects the variables to graph or plot :)
That was it, thank you! :)
Post Reply