Skip to content

Commit

Permalink
Update example config and README (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kolbi authored Jan 29, 2025
1 parent 86f7f23 commit 1a1b8c6
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 37 deletions.
30 changes: 28 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
44 changes: 9 additions & 35 deletions config.ini.example
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 1a1b8c6

Please sign in to comment.