Page 1 of 1

Gauge Update

Posted: Wed Oct 30, 2019 3:50 pm
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.

Re: Gauge Update

Posted: Sun Aug 30, 2020 4:33 pm
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.

Re: Gauge Update

Posted: Mon Aug 31, 2020 8:10 pm
by johu
Yes anything can be uploaded until memory is full - go crazy :)

Re: Gauge Update

Posted: Tue Sep 01, 2020 7:22 pm
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" ?

Re: Gauge Update

Posted: Tue Sep 01, 2020 7:27 pm
by johu
It will replace the existing one. But you can always find the original files here: https://github.com/jsphuebner/esp8266-web-interface

Re: Gauge Update

Posted: Tue Sep 01, 2020 8:20 pm
by ManuFromParis
Thanks, I'm now going to go crazy !
:D

Re: Gauge Update

Posted: Tue Sep 01, 2020 8:44 pm
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.

Re: Gauge Update

Posted: Tue Sep 01, 2020 9:04 pm
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

Re: Gauge Update

Posted: Wed Sep 02, 2020 4:32 am
by johu
Actually that sounds like the OTA server where esp8266 downloads its update is running php, not the esp8266 itself

Re: Gauge Update

Posted: Thu Sep 03, 2020 1:23 am
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

Re: Gauge Update

Posted: Thu Sep 03, 2020 7:55 pm
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.

Re: Gauge Update

Posted: Sat Sep 05, 2020 3:16 pm
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

Re: Gauge Update

Posted: Sat Sep 05, 2020 4:47 pm
by jon volk
Thanks, I’ll check that out.

Re: Gauge Update

Posted: Sun Sep 06, 2020 2:34 pm
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

Re: Gauge Update

Posted: Thu Sep 17, 2020 9:28 pm
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 :)

Re: Gauge Update

Posted: Thu Sep 17, 2020 10:39 pm
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 :)

Re: Gauge Update

Posted: Sat Sep 19, 2020 10:28 am
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! :)