github thomluther/anker-solix-api v3.9.1
3.9.1

3 hours ago

Enhancements:

  • Enhanced and fixed A1722/A1723 PPS control #348, #349 (Thanks @buliwyf42)

    • All device controls have now been mapped and confirmed to be working
  • Enhanced A91B2 charger control #353 (Thanks @kb1ibt)

    • More fields and all device controls have now been mapped
    • All controls can be used in the monitor tools
  • Solarbank PPS F3000 enhancements and fixes #350, #351 (Thanks @nertwork)

    • Api and MQTT responses field mapping mixed the PV channel fields from Api
      • This was now corrected to properly map the Api channels
    • The 0100 status request command was mapped to the device since standard 0040 command is not working
    • Added schedule and usage mode polling from Api for Solarbank PPS systems
    • TOU plan modifications are now supported with the updated Api helper 'set_sb2_use_time' method
    • Usage mode can be toggled between smartmeter and tou mode with the Api helper 'set_sb2_home_load' method
  • Added support to test complex PPS schedule related commands

    • Schedules are more complex and use helpers to convert a list or dictionary structure into the bytearray as needed for the MQTT command
    • The Monitor and MQTT Monitor tools now allow modifications of such schedule based fields for PPS Custom Mode schedules and PPS AC Output toggle schedules when using the MQTT command option
    • The provided input structure (string) is converted into a dict or list and verified by the converter helper
    • Note that the converter may assume defaults if the expected fields are missing in the structure
    • Example for PPS custom mode schedule
{
  'groups': [
    {
      'index': 0, 'weekdays': ['mon', 'tue', 'wed', 'thu', 'fri'], 
      'ranges': [
        {'load_type': 1, 'start_time': '00:00', 'end_time': '06:00'},
        {'load_type': 2, 'start_time': '06:00', 'end_time': '12:00'}
      ]
    },
    {
      'index': 1, 'weekdays': ['sat', 'sun'], 
      'ranges': [
        {'load_type': 2, 'start_time': '00:00', 'end_time': '01:00'}
      ]
    }
  ]
}
  • Example for PPS AC output toggle schedule
{
  'slots': [
    {'active': True, 'weekdays': ['mon', 'tue', 'wed', 'thu', 'fri', 'sun'], 'switch': 1, 'time': '00:30'},
    {'active': True, 'weekdays': [], 'switch': 1, 'time': '14:15'},
    {'active': True, 'weekdays': [], 'switch': 1, 'time': '16:40'},
    {'active': True, 'weekdays': ['wed'], 'switch': 0, 'time': '23:10'},
    {'active': False, 'weekdays': [], 'switch': 0, 'time': '18:30'}
  ]
}
  • Updated mqtt_pps to support extraction of values from schedule objects that depend on local device daytime

    • For custom mode schedules, the active load type setting is extracted if the mode is active
    • For AC output toggle schedules, the next toggle time slot parameters are extracted, depending on the defined weekday repeats of the slot
      • Whether the slot is active
      • At what time it will be applied
      • And which switch setting will be applied
    • Note: Slots without repeat are considered daily for the extraction. The device will automatically deactivate slots without repeats once they have occurred.
  • Added support to query stand alone PPS device energy stats

    • Gen 2 type PPS may support energy stat history in the App (C1000, C2000, S2000)
    • This history data is stored in the Api cloud and can be queried (also for shared devices)
    • Added required endpoints and regular polling with energy_detaills poller method
    • Added device energy history export support to the energy_csv executable
    • The intraday energy history can be used to determine the timezone offset to the api client timezone
      • This becomes essential to consider proper time slots when the client is modifying schedules of the device which are based on daytime only (without timestamp information)
      • A similar approach is used already with system energy stats
  • Updated export module

    • Added solarbank_pps device types for auto disaster endpoints exports
    • Fixed problem with undefined dev_type during export
    • Added new V2 scene info query for home_backup systems (more V2 endpoints for home backup systems need to be explored by the community)
    • Enhanced parameters of other endpoints
  • Updated monitor tool

    • Updated value display to recent changes in MQTT field names for PPS devices
    • Added device energy support for PPS standalone devices containing details
    • Support complex MQTT command parameter for schedule structures, input requires the whole structure as string

Fixes and other changes:

  • MQTT device subscription may fail if the device binding is in a weird condition

    • The bind types are contained in the relate_type Api response
    • Only devices showing a wifi binding may be eligible for subscription
    • If wifi is missing, the device is now marked as passive MQTT device, which are not being subscribed in general
  • Fixed subscription handling in the MQTT session

    • Async subscription errors have not been flagged properly
    • MQTT devices remained flagged as subscribed, although the subscription never worked
    • Re-subscription attempts therefore were never attempted by the session
    • The topic is now reported as well for a failed subscription
  • Keep refused logins and malformed MQTT messages from breaking the session #354 (Thanks @kb1ibt)

  • ValueError: bytearray(b'\x04') is not a valid DeviceHexDataTypes on Windows #356 (Thanks @chripogh)

    • Problem seem to affect only Windows clients
  • Improved MQTT data for PV total

    • Some messages may only contain individual PV channel power, but no total as reported in other messages
    • This may lead to partial data updates with mismatches of totals to channel breakdown
    • A work around was implemented to calculate the total PV power if only channel breakdown is received in MQTT messages
  • Added extracted values to mqtt_monitor decoded message display

    • This allows direct verification of extracted values, especially for properly converted formats or complex binary fields
    • The extracted values will also be dumped to files with the messages to allow easy review of proper value extraction

Breaking changes:

  • Continuous renaming of MQTT data fields may be required as values are understood, validated and merged across the various devices

Full Changelog: v3.9.0...v3.9.1

Don't miss a new anker-solix-api release

NewReleases is sending notifications on new releases.