From 1a1b8c68716df763cc6980c1e4591c77c6d38db5 Mon Sep 17 00:00:00 2001 From: Kolbi Date: Wed, 29 Jan 2025 21:23:26 +0100 Subject: [PATCH] Update example config and README (#19) --- README.md | 30 ++++++++++++++++++++++++++++-- config.ini.example | 44 +++++++++----------------------------------- 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index 759dac2..e9a13e1 100644 --- a/README.md +++ b/README.md @@ -184,14 +184,40 @@ POWER_OUTPUT_ALIAS = Alias.0.power_out ``` ### HomeAssistant - +```ini +[HOMEASSISTANT] +IP = 192.168.1.105 +PORT = 8123 +# Use HTTPS - if empty False is Fallback +HTTPS = ""|True|False +ACCESSTOKEN = YOUR_ACCESS_TOKEN +# The alias of the sensor that provides both current power input & output +CURRENT_POWER_ENTITY = ""|sensor.current_power +# If False or Empty the power is not calculated - if empty False is Fallback +POWER_CALCULATE = ""|True|False +# The alias of the sensor that provides the current power input. +POWER_INPUT_ALIAS = ""|sensor.power_input +# The alias of the sensor that provides the current power output. +POWER_OUTPUT_ALIAS = ""|sensor.power_output +# Is a Path Prefix needed? +API_PATH_PREFIX = ""|/core +``` +Example: Variant 1 with a combined input & output sensor +```ini +[HOMEASSISTANT] +IP = 192.168.1.105 +PORT = 8123 +HTTPS = True +ACCESSTOKEN = YOUR_ACCESS_TOKEN +CURRENT_POWER_ENTITY = sensor.current_power +``` +Example: Variant 2 with separate input & output sensors ```ini [HOMEASSISTANT] IP = 192.168.1.105 PORT = 8123 HTTPS = True ACCESSTOKEN = YOUR_ACCESS_TOKEN -CURRENT_POWER_ENTITY = sensor.current_power POWER_CALCULATE = True POWER_INPUT_ALIAS = sensor.power_input POWER_OUTPUT_ALIAS = sensor.power_output diff --git a/config.ini.example b/config.ini.example index 80b1e1a..7f340fd 100644 --- a/config.ini.example +++ b/config.ini.example @@ -1,43 +1,17 @@ [GENERAL] -# By default, the script will sum the power values of all phases and report them as a single value on phase 1. To disable this behavior, add the following configuration to the `config.ini` file -DISABLE_SUM_PHASES = False -# Setting this to true, disables the powermeter test at the beginning of the script. +# Comma-separated list of device types to emulate (ct001, shellypro3em, shellyemg3, shellyproem50) +DEVICE_TYPE = ct001 +# Skip initial powermeter test on startup SKIP_POWERMETER_TEST = False -# By default, the script sends an absolute value of the measured power. This seems to be necessary for the storage system, since it can't handle negative values (results in an integer overflow). Set this to true to clamp the values to 0 instead of sending the absolute value. +# Sum power values of all phases and report on phase 1 (ct001 only and default is False) +DISABLE_SUM_PHASES = False +# Send absolute values (necessary for storage system) (ct001 only and default is False) DISABLE_ABSOLUTE_VALUES = False -# Sets the interval at which the script sends new power values to the B2500 in seconds. The original Smart Meter sends new values every second. +# Interval for sending power values in seconds (ct001 only and default is 1) POLL_INTERVAL = 1 -#[SHELLY_1PM] -#TYPE = 1PM -#IP = 192.168.1.100 -#USER = username -#PASS = password -#METER_INDEX = meter1 - -#[SHELLY_PLUS1PM] -#TYPE = PLUS1PM -#IP = 192.168.1.100 -#USER = username -#PASS = password -#METER_INDEX = meter1 - -#[SHELLY_EM] -#TYPE = EM -#IP = 192.168.1.100 -#USER = username -#PASS = password -#METER_INDEX = meter1 - -#[SHELLY_3EM] -#TYPE = 3EM -#IP = 192.168.1.100 -#USER = username -#PASS = password -#METER_INDEX = meter1 - -#[SHELLY_3EMPRO] -#TYPE = 3EMPro +#[SHELLY] +#TYPE = 1PM #PLUS1PM #EM #3EM #3EMPRO #IP = 192.168.1.100 #USER = username #PASS = password