Skip to content

Commit

Permalink
Switch back to serial! Shunt for now
Browse files Browse the repository at this point in the history
  • Loading branch information
yoannchaudet committed Jan 6, 2024
1 parent d631639 commit 116f202
Showing 1 changed file with 41 additions and 87 deletions.
128 changes: 41 additions & 87 deletions device.shed-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,22 @@ logger:
baud_rate: 0 # Disable UART logging

external_components:
# Example configuration:
# https://github.com/Fabian-Schmidt/esphome-victron_ble/blob/0ec3a15248b52b29a53420dbef27237430c4dd6b/victron_ble.yaml
- source: github://Fabian-Schmidt/esphome-victron_ble

# Bluetooth hub
esp32_ble_tracker:

victron_ble:
- id: smartshunt
mac_address: !secret shed_controller_smartshunt_mac_address
bindkey: !secret shed_controller_smartshunt_encryption_key

- id: smartsolar
mac_address: !secret shed_controller_smartsolar_mac_address
bindkey: !secret shed_controller_smartsolar_encryption_key
# This is a fork of https://github.com/KinDR007/VictronMPPT-ESPHOME
# so I can bring in patches and make improvements as needed (before
# they are contributed back)
- source: github://yoannchaudet/VictronMPPT-ESPHOME

victron:
uart_id: smartshunt_uart
id: smartshunt
throttle: 10s

uart:
# SmartShunt serial
id: smartshunt_uart
rx_pin: GPIO35
baud_rate: 19200
rx_buffer_size: 256

status_led:
#
Expand Down Expand Up @@ -111,52 +112,31 @@ sensor:
#

# SmartShunt (battery interface)
- platform: victron_ble
victron_ble_id: smartshunt
name: "Time remaining"
type: TIME_TO_GO
- platform: victron_ble
victron_ble_id: smartshunt
name: "Battery voltage"
type: BATTERY_VOLTAGE
- platform: victron_ble
victron_ble_id: smartshunt
name: "Battery temperature"
type: TEMPERATURE
- platform: victron_ble
victron_ble_id: smartshunt
name: "Current"
type: BATTERY_CURRENT
- platform: victron_ble
victron_ble_id: smartshunt
name: "Consumed Ah"
type: CONSUMED_AH
- platform: victron_ble
victron_ble_id: smartshunt
name: "State of charge"
type: STATE_OF_CHARGE
- platform: victron
victron_id: smartshunt
battery_voltage:
name: "${name} battery voltage"
battery_current:
name: "${name} battery current"
battery_temperature:
name: "${name} battery temperature"
instantaneous_power:
name: "${name} instantaneous power"
consumed_amp_hours:
name: "${name} consumed amp hours"
state_of_charge:
name: "${name} state of charge"
time_to_go:
name: "${name} time to go"
last_full_charge:
name: "${name} last full charge"
amount_of_discharged_energy:
name: "${name} amount of discharged energy"
amount_of_charged_energy:
name: "${name} amount of charged energy"

# SmartSolar (MPTT controller)
- platform: victron_ble
victron_ble_id: smartsolar
name: "Battery Voltage"
type: BATTERY_VOLTAGE
- platform: victron_ble
victron_ble_id: smartsolar
name: "Battery Current"
type: BATTERY_CURRENT
- platform: victron_ble
victron_ble_id: smartsolar
name: "Yield Today"
type: YIELD_TODAY
- platform: victron_ble
victron_ble_id: smartsolar
name: "PV Power"
type: PV_POWER
- platform: victron_ble
victron_ble_id: smartsolar
name: "Load Current"
type: LOAD_CURRENT
# WIP

text_sensor:
#
Expand All @@ -168,21 +148,8 @@ text_sensor:
# Victron
#

# SmartShunt (battery interface)
- platform: victron_ble
victron_ble_id: smartshunt
name: "Battery Alarm reason"
type: ALARM_REASON

# SmartSolar (MPTT controller)
- platform: victron_ble
victron_ble_id: smartsolar
name: "MPPT state"
type: DEVICE_STATE
- platform: victron_ble
victron_ble_id: smartsolar
name: "MPPT Error reason"
type: CHARGER_ERROR
# WIP

binary_sensor:
#
Expand All @@ -209,18 +176,5 @@ binary_sensor:
# Victron
#

# SmartShunt (battery interface)
- platform: victron_ble
victron_ble_id: smartshunt
name: "Battery has Alarm"
type: ALARM

# SmartSolar (MPTT controller)
- platform: victron_ble
victron_ble_id: smartsolar
name: "MPPT is in Fault state"
type: DEVICE_STATE_FAULT
- platform: victron_ble
victron_ble_id: smartsolar
name: "MPPT has Error"
type: CHARGER_ERROR
# WIP

0 comments on commit 116f202

Please sign in to comment.