the total cards have been trimmed at the bottom as the card's last child
has its margin-bottom removed (set to "auto"). that is desired as it
places the text in the middle of the cards. however, the battery total
cards are different, as they show two values each, which are arranged by
div.flex-fill containers, which are the children of the cards rather
than the h2 tags as in all other totals cards.
avoids inline style and removes right padding such that the value and
its unit move closed together, replicating the design of the inverter
channel info tables.
in the settings view we hide the "login with cert" setting while TLS is
disabled, so we should also hide that info in the info view when TLS is
disabled.
if we hide elements (which is done using style="display:none;"), they
are still part of the DOM and mess with CSS rules that shall apply to
the last element of a card or the last row of a table.
if the last child in a card (div.card > div.card-body) adds bottom
marging, we don't want the card to add more space through its
padding-bottom. most cards have children that add sufficient space
at the bottom anyways.
avoid hidden (but existing) or simply redundant DOM elements from
messing with the style sheet, which uses :last-child in particular to
fix up the margin on the bottom of cards.
when using v-if on a div element, the div will be part of the DOM in
case the condition is true. if we group elements to use v-if on the
group, we shall use a template element, so the group elements appear
as siblings of the other elements.
in particular, these spurious div do not mess up our CSS patch that sets
the bottom margin for the last child in a card to "auto".
it would be nice to have this in the header of the accordion, which is
hard, but doable. however, clicking the button then also toggles the
accordion, which is unacceptable. preventing that seems non-trivial, as
the @click.stop() is not enough. also, nesting interactive elements is
simply bad practice. the button can also go to the right of header, with
reasonable effort, but the corner radii are then messed up and would
need to react interactively (accordion collapsed or not), which is also
a pain.
we now "float" the reset button to the right, add a nice icon, and give
the button some space so it at least looks like it belongs there.
the cards in all information views still used a div.card-body around the
table, which added a margin on all sides of the table. to achieve a
unified look, these cards and tables now look the same as the inverter
channel cards.
we don't need a margin at the bottom of tables in general. not sure why
this is even a thing in bootstrap. this change, in particular, makes the
space between a table and a parent card symmetric on all sides.
this change tries to achieve a pleasing look of input forms by
right-aligning the texts of labels. the input form now looks similar
to a table, achieving a cleaner look, especially for forms where the
labels have varying text lenghts.
the absorption and float voltage setting is retrieved from connected
Victron Ve.Direct MPPTs using the HEX protocol. the values are
displayed in the live view, published to MQTT, and added to Home
Assistent auto-discovery.
This changes the custom current limit so the custom limit is only
applied when any of:
- SoC is valid and not ignored and SoC < threshold
- Voltage is valid and Voltage < threshold
- Voltage is invalid
Independently, if "Use Battery-Reported limit" is enabled and valid, it
is applied (unless a lower custom limit already was applied).
a battery temperature value measured by a Victron smart battery sense
and communicated to a connected Victron MPPT charge controller will now
appear in the live view card.
If the default type is an int, setting to a fractional value is not possible.
Presumably this is because in
`target.DischargeCurrentLimit = source["discharge_current_limit"] | BATTERY_DISCHARGE_CURRENT_LIMIT;`
the JSON library uses the default to force the expected type and on type mismatch the default is used.
As per https://arduinojson.org/v7/api/jsonvariant/or/:
`defaultValue: the value to return if the JsonVariant is null or incompatible with the requested type.`
* Allow scaleValue() for 32bit values
* Victron: Implement CAN message 0x360
This one-byte message is set to 0xff to request charging below a
certain SoC threshold (10% in my tests).
* Pytes: Add support for native CAN protocol
The recently added PytesCanReceiver.cpp implements the Victron CAN protocol.
This change additionally adds support for the native Pytes CAN
protocol messages.
Features only supported in Pytes protocol:
- High-resolution state of charge / full and remaining mAh
- Charge cycle counter
- Balancing state
Features only supported in Victron protocol:
- FW version
- Serial number
Note that the only known way to select the native Pytes protocol is
via the serial console (Cisco-compatible cables work):
```
login config
setprt PYTES
logout
```
to return to Victron protocol use:
```
login config
setprt VICTRON
logout
```
to return to DIP-switch based protocol setting:
```
login config
setprt DIP
logout
```