Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for controlling Microinterver export to Grid Cutoff #39

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions esphome config 10-8-2023.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1044,3 +1044,25 @@ select:
"Selling first": 0
"Zero export to load": 1
"Zero export to CT": 2

- platform: modbus_controller
use_write_multiple: true
modbus_controller_id: ${modbus_controller_id}
name: "sun12k-Combined Mi. Export to Grid Cutoff"
address: 178
value_type: U_WORD
optionsmap:
# Explainer:
# Export to Grid Cutoff Disable, Gen Peak Shaving Disable, Grid Peak Shaving Enable, On Grid Always On Disable, External Relay Disable, Loss of lithium battery report fault Enable
# 60090 in bits: 1110101010111010, and in bytes: 11101010, 10111010
# The bytes are swapped, so 1110101010111010 becomes 1010111010101011, and matches the manual
# 11: Export to Grid Cutoff Disable
# 10: Gen Peak Shaving Disable
# 10: Grid Peak Shaving Enable
# 10: On Grid Always On Disable
# 10: External Relay Disable
# 11: Loss of lithium battery report fault Enable
"Mode 1": 60090 # 1110101010111010: Export to Grid Cutoff Disable, Gen Peak Shaving Disable, Grid Peak Shaving Enable, On Grid Always On Disable, External Relay Disable, Loss of lithium battery report fault Enable
"Mode 2": 60091 # 1110101010111011: Export to Grid Cutoff Enable, Gen Peak Shaving Disable, Grid Peak Shaving Enable, On Grid Always On Disable, External Relay Disable, Loss of lithium battery report fault Enable
"Mode 3": 60074 # 1110101010101010: Export to Grid Cutoff Disable, Gen Peak Shaving Disable, Grid Peak Shaving Disable, On Grid Always On Disable, External Relay Disable, Loss of lithium battery report fault Enable
"Mode 4": 60075 # 1110101010101011: Export to Grid Cutoff Enable, Gen Peak Shaving Disable, Grid Peak Shaving Disable, On Grid Always On Disable, External Relay Disable, Loss of lithium battery report fault Enable