# a commented value is like not setting it. only a commented key or no value is treated like not present.
# any value set for a key makes the value a "valid" one.
# a value set with '' (empty) is boolean False!
# if the key is set but has no value, it is treated as boolean False!
# any string values for boolean like True/true and False/false are converted into their boolean equivalent.

# the following keys are MANDATORY

# mqtt config
mqtt_server=<mqtt-address>
mqtt_port=1883
mqtt_username=<mqtt-user>
mqtt_password=<mqtt-password>
mqtt_client_id=solmate_mqtt
mqtt_topic=solmate
mqtt_prefix=eet
mqtt_ha=homeassistant

# use local access if you also want to reboot the solmate.
# get the local domain from your network setup (router, dhcp etc.)
# note: MUTUAL EXCLUSIVE to the internet eet_server_uri entry. only one must be enabled.
# you can also use an IP address like "ws://<solmate-IP-address>:9124/".
# if you only have an IP address but would like to know the FQDN, type `nslookup <solmate-IP-address`.
# if you get a return like `sun2plug.home`, use that one.
# NOTE that using a FQDN is preferred, as an IP address can change...
#eet_server_uri="ws://sun2plug.<your-domain>:9124/"

# subdomain for the local solmate dns name, check your (routers) dns entry for the solmate
# MUST be populated when using local access. not needed when using the server below.
# IMPORTANT: when using an IP address instead an FQDN to access the solmate locally,
# you MUST replace "sun2plug" with the IP address in quotes like "192.168.1.55"
eet_local_subdomain="sun2plug"

# needs an internet connection
# note: MUTUAL EXCLUSIVE to the local eet_server_uri entry. only one must be enabled
eet_server_uri="wss://sol.eet.energy:9124/"

# credentials accessing the solmate, not server URI dependent
eet_serial_number="<solmate-serial-number>"
eet_password="<solmate-password>"
eet_device_id="<solmate-given-name>"


# the following keys are OPTIONAL and do not need to be present
# if the key is not present, the program virtually creates them with their defaults.
# defaults, when available, are added in the example.
#
# IMPORTANT: if the key is added without a value, the value results to ''.
# for defaults:
# - missing or negative values are casted to int with value 0 (just dont do it).
# - wattage values are capped by the program to 800 (800W), min is hardcoded to 0.
# - user min wattage can not exceed user max wattage. in case, min = max.
# - max battery is capped by the program to 90 (90%).
# - timer values are seconds.
# - boost_set_time min is >= 60s (1min) and capped at 10800 (= 3h).

# use only if you have a spare or replacement solmate. you must need to change the pwd though.
# with that, you authenticate to the new solmate but all entities stay linked to the original one
# because of the serial number embedded in the entities config.
# do not overwrite the original serial number key as this will create new entities.
eet_spare_serial_number=

# entity defaults
# these are the currently known default keys and values extracted from the solmates webUI.
# the defaults DO NOT SET the values for the entity but define the RANGE if you send data via MQTT.
# changing wattage is on your own responsibility but is internally limited to 800.
# note that 'default_boost_set_time' is currently not used, but may changed later.
# if:
# injection_wattage is bigger than 800 it is set to 500 (the Solmates default)
#default_boost_set_time=600
default_boost_injection_wattage=500

# if:
# min_injection not in range of 0-800 it is set to 0
# max_injection is bigger than 800 it is set to 800
# min_injection > max_injection, the program sets min_injection to 0
default_user_minimum_injection=0
default_user_maximum_injection=500

# if:
# minimum_battery not in range of 0-90 it is set to 90 (the Solmates default)
default_user_minimum_battery_percentage=0


# general envvars configuring program behaviour, can be omitted for production

# enable/disable printing _response_ data additionally to the console, useful for testing
general_print_response=False

# print logging data to console (conditional) and syslog (always)
# the value is optional and defaults to True
general_console_print=True

# set to True if you want to additionally print a timestamp on console only printouts
general_console_timestamp=False

# globally enable/disable mqtt, useful for testing
general_use_mqtt=True

# set to true if you want to query and printout the API routes.
# the program stops after printing.
# use only when the program ist started from the command line and not via any automation.
general_api_info=False


# the timer values define the waiting time for various events
# the timer values are in seconds

# wait until restarting if a service was offline
timer_offline=600

# restart connection if a connection interrupted
timer_conn_err=10

# the interval the solmate is queried
timer_live=30

# the waiting time after a reboot, may be overruled because the service was offline
timer_reboot=180

# timer as number
# when there are too many consecutive response errors, restart after n attempts
# this gives a total waiting time of: timer_live [s] x timer_attempt_restart
# 3 * 30 = 90s = 1.5min
timer_attempt_restart=3
