github thomluther/anker-solix-api v2.2.0

latest releases: v3.7.0, v3.6.3, v3.6.2...
21 months ago

Enhancements:

  • Added rssi info for Wifi signal strength of devices, #137
    • The rssi value is reported as absolute dBm instead of relative signal strength index
    • It will be used to calculate the Wifi signal strength percentage between >= -65 dBm (100%) and <= -95 dBm (0%) if this is not provided
    • Not every device reports a value for rssi field, but signal strength percentage may be used
  • Reintroduced OTA update info fields to indicate whether an update is available for a device, #138
    • Using different ota_batch endpoint which seems to provide more relevant OTA information including available new version numbers
    • Only a single query is required for a list of devices
    • Children device OTA information is also available (e.g. SB2 battery packs)
    • HELP NEEDED: Further exports are required to get examples of response structures for various available updates, see #138
  • Added partial support for smart plugs, #124
    • Plug power and plug energy is now provided on a device level
    • Total plug power and energy is provided with the system
    • Smart Plug usage mode is fully supported
  • New blend plan is supported with the SB2 schedule, #124
    • The blend_plan is only used for smart plug usage mode to add a user defined base load to the measured smart plug power
    • It is not verified which plan setting will be used when all plugs lost connection to the SB2 during smart plug mode.
      • Either the blend_plan setting or the custom_rate_plan setting may be used
      • The custom_rate_plan setting is also used when the smart meter lost connection while in smart meter usage mode.
    • The set_sb2_home_load helper method was enhanced to support an optional plan parameter to define the plan name that should be modified
    • If no plan name is provided, the modifications will be applied to the active plan according to the active / provided usage mode
    • HELP NEEDED: Further Api testing and exploration of various endpoints/parameters is required get information about other smart plug settings, see #107 and #124. The community need to find Api information such as:
      • Plug switch setting
      • Plug timer
      • Plug schedule
  • Enhanced Export class to support additional endpoints, #136
    • charging_energy_service endpoints as used for Power Panels and only supported on non EU cloud server
    • charging_hes_svc endpoints as used for Home Energy Systems like X1
    • The export queries for various endpoints are grouped, and various groups can be enforced by the export_system.py tool
    • By default, only the relevant groups for the found systems/devices will be queried
    • HELP NEEDED: Further Api testing, exploration of various endpoints/parameters and more system exports of X1 or Power Panel systems is required to get more information and understand the Api structures for adding Api support of such power systems
  • Enhanced solarbank_monitor.py to show the added fields for smart plugs and show known information of smart plug devices

Fixes:

  • Correct assignment of Wifi signal strength to devices with additional device_sn fields now provided in get_wifi_list responses
  • Removed previous OTA queries from export tool since they were not working for various devices

Breaking changes:

  • Refactored code to simplify introduction of various Api client types #130
    • Created separate class to handle an Api connection in the session.py module,
    • A new class AnkerSolixBaseApi was introduced with common attributes and methods that may be used by different Api client types
    • The AnkerSolixApi class is now expanding the AnkerSolixBaseApi class and is using an instance of the new AnkerSolixApiSession class as apisession
    • This allows connection instance sharing across different Api classes when new classes will be developed to support other Anker Solix device types
    • Separating different Api classes is required since some endpoint families are not supported on each cloud server.
    • Different endpoint families may require different structures for their regular information polling routines as well as for their internal data caches
    • Added new account cache dictionary to AnkerSolixBaseApi class, which will be used in future as cache for cross system information and account details of the used AnkerSolixApiSession instance
      • The account cache is automatically updated with the various poller methods, it has no separate poller method
  • Code that utilizes this version of Anker Solix Api library, may need updates for former Api properties or methods that had to be moved to the new apisession instance used within the Api to manage the connection.
    • All exec modules in this repo have been updated to use the refactored Api classes
    • The HA integration will be updated as well when bumping to this Api library
  • All documentation have been updated for the new structure, including the example code.

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

NewReleases is sending notifications on new releases.