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

Improvement/add three phase definitions #18

Merged
merged 5 commits into from
Jan 5, 2025

Conversation

maslyankov
Copy link
Owner

@maslyankov maslyankov commented Jan 3, 2025

Priority Load and Grid Balance Sensor Definitions Update

Description

This PR updates the sensor definitions for Priority Load and Grid Balance settings in the three-phase inverter models. The changes improve the register usage by properly implementing all available bits as per the documentation.

Changes

  • Updated register 141 to use all available bits (Related issue: Asymmetric Phase Feeding Definition kellerza/sunsynk#376):
    • Bits 0-1: Priority Load mode (Battery First/Load First)
    • Bits 2-3: Passive Grid Balance (Disabled/Enabled)
    • Bits 4-5: Active Grid Balance (Disabled/Enabled)
  • Each setting uses its own bitmask to operate independently
  • Maintains backward compatibility with existing Priority Load functionality
  • Uses consistent bit patterns (10 for first option, 11 for second option)
  • This PR also fixes wrong definition of Battery Wakeup setting
  • Initial sensors for Gen (Generator) monitoring, soon for control and config

Technical Details

  • Each setting uses SelectRWSensor with appropriate bitmasks
  • Bitmask values:
    • Priority Load: 0b11 << 0
    • Passive Grid Balance: 0b11 << 2
    • Active Grid Balance: 0b11 << 4
  • All settings share register 141 but operate on different bits

Documentation

The implementation follows the inverter documentation which specifies:

  • Bits 0-1: Priority mode selection
  • Bits 2-3: Passive grid-connected power balance
  • Bits 4-5: Active grid-connection power balance

This update provides better control over grid balance features while maintaining existing functionality.

…Passive Grid Balance, and Active Grid Balance with appropriate options and bitmasks
…'Enabled' and 'Disabled' states instead of 'Open' and 'Close'
@maslyankov maslyankov self-assigned this Jan 3, 2025
…for L1, L2, and L3 voltage and current measurements, improving clarity and accuracy in three-phase monitoring.
@maslyankov maslyankov merged commit 9065027 into main Jan 5, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant