OI -> Web Interface Strings

Discussion about various user interfaces such as web interface, displays and apps
Post Reply
Mitchy
Posts: 107
Joined: Sun Nov 14, 2021 12:16 pm
Has thanked: 3 times
Been thanked: 53 times

OI -> Web Interface Strings

Post 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.
Mitchy
Posts: 107
Joined: Sun Nov 14, 2021 12:16 pm
Has thanked: 3 times
Been thanked: 53 times

Re: OI -> Web Interface Strings

Post 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.
User avatar
johu
Site Admin
Posts: 6618
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 342 times
Been thanked: 1484 times
Contact:

Re: OI -> Web Interface Strings

Post 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
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Mitchy
Posts: 107
Joined: Sun Nov 14, 2021 12:16 pm
Has thanked: 3 times
Been thanked: 53 times

Re: OI -> Web Interface Strings

Post 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
Post Reply