Page 1 of 1

OI -> Web Interface Strings

Posted: Tue Apr 15, 2025 12:05 pm
by Mitchy
Does the OI library allow sending dynamic strings over as a param, rather than a pre-defined string?

An example is to assemble a string indicating cell balancing,
Rather than having 16 cell balance indicators and param tags defined,
Dynamically make a string with -X-XX---XX---X-XX

Another example is retrieving hex coded ASCII, converting to ASCII and displaying the assembled string over the interface.

Maybe weak examples, but hopefully they signify what I'm hoping to accomplish.

Re: OI -> Web Interface Strings

Posted: Tue Apr 15, 2025 2:35 pm
by Mitchy
Haven't yet tried STRINGIFY
but if anyone has any examples other than the version string, Would be interested to see it's usage.

Re: OI -> Web Interface Strings

Posted: Wed Apr 16, 2025 5:23 am
by johu
No.
You'd have to hack up a custom json command and put your string in the "value" field, like is done with serialnumber. That will only work over UART though, not CAN, as the latter only downloads the json once.
Might be better to use integer values, then introduce special handling to the web interface if this is just a one-off

Re: OI -> Web Interface Strings

Posted: Wed Apr 16, 2025 5:41 am
by Mitchy
No problem!

Trying to hack some selectable Coding and Serial Number detection for the VW stuff:
Have some rough code to pull some items, leaning heavily on Michaels OVMS plugin, as it seems to lay the steps out pretty well:
https://docs.openvehicles.com/en/latest ... EADME.html