- defintion: hold all device templates definitons in yaml files
- charger: all charger templates
- meter: all meter templates
- vehicle: all vehicle templates
- docs: content is generated via
go generate ./...
using the above templates for the evcc documentation page to be used
The following describes each possible element in a yaml file
template
expects a unique template name for the current device class (charger, meter, vehicle are device classes)
products
expects a list of products that work with this template.
Each product contains:
brand
: an optional brand description of the productdescription
: an optional description e.g. of the product model. Expectsgeneric
,de
,en
: an optional description of the product
Either brand
, or description
need to be set.
group
is used to group switchable sockets and generic device support (e.g. SunSpec) templates.
guidedsetup
is enabled when the device has linked templates or >1 usage. It is used with devices that provide multiple meter usages, or meter devices that are typically installed with specific other devices. Mostly used for meter devices that provided multiple usage data with the same user input. These devices are then sorted at the bottom of the product list.
Allows to define a list of meter devices that are typically installed with this device. Enables guidedsetup
mode.
template
expects the linked device template
value
usage
expects the meter usage type this device will be used for
Possible values:
grid
: for grid meterspv
: for pv inverter/meterbattery
: for battery inverter/meter
multiple:true
to define that multiple devices of this template can be added
excludetemplate
defines a linked device template
value. If defined and a device of the linked template is added, then this linked template won't be considered in the flow
Example Use Case: With SMA Home Manager, there can be a SMA Energy Meter used for getting the PV generation or multiple SMA PV inverters. But never both together. So if the used added an SMA Energy Meter, then the flow shoudn't ask for SMA PV inverters.
capabilities
provides an option to define special capabilities of the device as a list of strings
Possible Values:
iso151182
: If the charger supports communicating via ISO15118-2rfid
: If the charger supports RFID1p3p
: If the charger supports 1P/3P-phase switchingsmahems
: If the device can be used as an SMA HEMS device, only used for the SMA Home Manager 2.0 right now
requirements
provides an option to define various requirements / dependencies that need to be setup
evcc
is a list of evcc specific system requirements
Possible Values:
sponsorship
: If the device requires a sponsorship tokeneebus
: If the device is accessed via the eebus protocol and thus requires the corresponding setupmqtt
: If the device a MQTT setup
description
expects language specific texts via de
, en
to provide specific things the user has to do, e.g. minimum firmware versions or specific hardware setup requirements. The content can be multiline and Markdown
uri
is a link providing more help on the requirements
loglevel
defindes the name that can be used in the levels
configuration for adjusting the log level of individual devices/components/...
params
describes the set of parameters the user needs to provide a value for.
preset
reference value of a predefined params set defined in parambaselist.yaml
, so these params don't need to be redefined in each template. The example
and default
values for each predefined value can be overwritten.
name
expects a name for the parameter, which will be used in the render
section to reference the param and provide the user entered value.
Note: There a few default name
values with specific internal meaning and consequences!
Predefined name values:
usage
: specifies a list of meter classes, the device can be used for. Possible values aregrid
,pv
,battery
, andcharger
modbus
: specifies that this device is accessed via modbus. It requires thechoice
property to have a list of possible interface values the device provides. These values can bers485
andtcpip
. The command will use either to ask the appropriate questions and settings. Therender
section needs to include the string{{include "modbus" .}}
in all places where the configuration needs modbus settings.
allineone
: Defines if the different usages are all available in a single device. Enablesguidedsetup
mode.
id
: Device specific default for modbus IDport
: Device specific default for modbus TCPIP portbaudrate
: Device specific default for modbus RS485 baudratecomset
: Device specific default for modbus RS485 comset
description
allows to define user friendly and language specific names via de
, en
, generic
dependencies
allows to define a list of checks, when this param should be presented to the user, if it should be only in special cases
name
referenced the param
name
value
check
defines which kind of check should be performed
Possible values:
empty
: if thevalue
of the referencedparam
name
should be emptynotempty
: if thevalue
of the referencedparam
name
should be NOT emptyequal
: if thevalue
of the referencedparam
name
should match the value of thevalue
property
value
property is used in the equal
check
required: true
defines if the user has to provide a value. Default is false
mask: true
defines if the user input should be masked, e.g. for passwords. Defaut is false
default
defines a default value to be used. For these cases the user can then simply press enter in the CLI.
example
provides an example value, so the user can get an idea of what is expected and what to look out for
type
allows to define the value type to let the CLI verify the user provided content
Possible values:
string
: for string values (default)bool
: fortrue
andfalse
values. Ifhelp
is provided, than that help text is presented as the questionnumber
: for int valuesfloat
: for float valuesstringlist
: for a list of strings, e.g.used for defining a list ofidentifiers
forvehicles
chargemodes
: for a selection of charge modes (includingNone
which results in the param not being set)
advanced
allows to specify if the param should only be asked if the cli is run with --advanced
. Mostly used for non required params that are meant for users with advanced needs and knowledge.
help
expects language specific help texts via generic
(language independent), de
, en
render
contains the internal device configuration. All param
name
values can be used as a template variable, e.g. {{ .host }}
for a param named host
. The content is a go template, so all of go template feature can be used, e.g. {{- if ... }}
statements, etc.