Xknx Versions Save

XKNX - A KNX library written in Python

2.6.0

1 year ago

Connection

  • When ConnectionConfig.individual_address is set and a Keyring is given ConnectionType.AUTOMATIC will try to connect to the host of this address. If not found (in keyfile or discovery) it will raise.
  • Add CEMIFrame counters connection type and timestamp of connection start to ConnectionManager.

Internals

  • Lower log levels for unsupported Telegrams and add more information.
  • Move CEMIFrame parsing from Interface to CEMIHandler.

2.5.0

1 year ago

Connection

  • Use only Interfaces listed in Keyring when ConnectionType.AUTOMATIC is used and a Keyring is configured.
  • Request specific tunnel by individual address for TCP connections when ConnectionConfig.individual_address is set.

Bugfixes

  • Parse Data Secure credentials form Keyring from non-IP-Secure interfaces.
  • Parse Data Secure credentials from Keyrings exported for specific interfaces.
  • Fix callback for Cover target position when called with same value consecutively.
  • Fix Windows TCP transport bug when using IP Secure Tunnelling.
  • Don't create unreferenced asyncio Tasks. xknx.task_registry.background() can now be used to create background tasks.

Protocol

  • Support Extended Connection Request Information (CRI) for requesting a specific individual address on Tunnelling v2.
  • Add Core v2 Error Code definitions.

Cleanups

  • Accept str | os.PathLike for Keyring path. Previously only str.
  • Rename _load_keyring to sync_load_keyring to make it public e.g. when it should be used from an executor.
  • Update CI. Use codespell and flake8-print.

2.4.0

1 year ago

Data Secure

  • Support KNX Data Secure for group communication. Keys are sourced from an ETS keyring file.

Bugfixes

  • Fix wrong string length in keyfile signature verification for multi-byte UTF-8 encoded attribute values.

Internals

  • destination_address in Telegram init is no longer optional.
  • timestamp attribute in Telegram is removed.
  • Rename xknx.secure.ip_secure to xknx.secure.security_primitives.
  • Return bytes from BaseAddress.to_knx() instead of tuple[int, int]. This is used in IndividualAddress and GroupAddress.
  • Add BaseAddress.from_knx() to instantiate from bytes, remove instantiation form tuple[int, int].
  • Refactor APCI to return complete Subclass APCI.from_knx() and removed APCI.resolve_apci().

2.3.0

1 year ago

DPTs

  • Add definitions for DPTs
    • 7.010 "prop_data_type"
    • 8.012 "length_m"
    • 9.009 "air_flow"
    • 9.029 "absolute_humidity"
    • 9.030 "concentration_ugm3"
    • 12.001 "pulse_4_ucount"
    • 12.100 "long_time_period_sec"
    • 12.101 "long_time_period_min"
    • 12.102 "long_time_period_hrs"
    • 13.016 "active_energy_mwh"
    • 14.080 "apparent_power"

IP Secure

  • SecureRouting: verify MAC of received TimerNotify frames.
  • SecureRouting: verify and handle timer value of received SecureWrapper frames after verification of MAC.
  • SecureRouting: Discard received unencrypted RoutingIndication frames.

Internals

  • Move CEMIFrame, CEMIFlags and CEMIMessageCode to xknx.cemi package.
  • Remove CEMIFrame.telegram setter in favour of init_from_telegram() staticmethod; convert from_knx() and from_knx_data_link_layer() to staticmethods returning a CEMIFrame.
  • Remove default values for CEMIFrame constructor.
  • Parse T_Data_Broadcast TPCI. Forward these telegrams to the Management class.
  • KNXIPHeader total_length is 2 bytes long. There are no reserved bytes.
  • Revert handling L_Data.req frames for incoming device management requests.
  • Decouple CEMIFrame handling from IP interface
    • Add CEMIHandler class. This class handles incoming CEMIFrames and dispatches them to the upper layers as Telegram objects and creates CEMIFrames from Telegram objects to be sent to the network.
    • Use CEMIFrame instead of Telegram in KNXIPInterface.

2.2.0

1 year ago

Devices

  • ExposeSensor: Add cooldown option to allow rate-limiting of sent telegrams.
  • ExposeSensor: Add respond_to_read option.

Connection

  • Disconnect when tunnelling sequence number (UDP) gets out of sync.

Internals

  • Add task.done() to TaskRegistry tasks.
  • Decouple KNXIPFrame parsing from CEMIFrame parsing. TunnellingRequest and RoutingIndication now carry the raw cemi frame payload as bytes. This allows decoupled CEMIFrame parsing at a later time (in Interface class rather than in KNXIPTransport class) for better error handling and upcoming features.
  • Make KNXIPFrame body non-optional. Return KNXIPFrame object and remaining bytes from KNXIPFrame.from_knx() staticmethod.
  • Add new logger xknx.cemi for incoming and outgoing CEMIFrames.
  • Remove timestamp and line break in knx and raw logger.

2.1.0

1 year ago

2.1.0 Enhance notification device

Devices

  • Notification: Add respond_to_read option.
  • Notification: Rename self._message to self.remote_value.

2.0.0

1 year ago

Interface changes

  • Removed own_address from XKNX class. ConnectionConfig individual_address can be used to set a source address for routing instead. If set for a secure tunnelling connection, a tunnel with this IA will be read from the knxkeys file.
  • Disable TelegramQueue rate limiting by default.
  • Separate discovery multicast group from routing group. Add multicast_group and multicast_port ConnectionConfig parameters.

Connection and Discovery

  • Use manually configured IP secure tunnel password over loading it from keyring.
  • GatewayScanFilter now also matches secure enabled gateways by default. The secure argument as been replaced by secure_tunnelling and secure_routing arguments. When multiple methods are True a gateway is matched if one of them is supported. Non-secure methods don't match if secure is required for that gateway.
  • Self description queries more information from Core v2 devices via SearchRequestExtended.

Features

  • Add support for python 3.11
  • Add methods to Keyring to get interfaces by individual address (host or tunnel).

Internal

  • Remove InterfaceWithUserIdNotFound and InvalidSignature errors in favor of InvalidSecureConfiguration.
  • Keyring: rename load_key_ring to load_keyring and make it a coroutine.

Management

  • Fix APCI service parsing for 10bit control fileds.
  • Set reasonable default count values for APCI classes.
  • Set xknx.current_address for routing connections so management frames received over Routing are handled properly.
  • Fix wrong length of AuthorizeRequest.
  • Raise sane error messages in Management.

Bugfixes

  • No mutable default arguments. Fixes unexpected behaviour like GatewayScanner not finding all interfaces.

1.2.1

1 year ago

Bugfixes

  • Fix Latency parsing in .knxkeys keyring files

1.2.0

1 year ago

This is our 100th release 🎉

Features

  • We now support KNXnet/IP Secure multicast communication (secure routing) in addition to tunnelling! Thanks to Weinzierl for providing us a router for testing purposes!
  • Parse latency from a .knxkeys keyring files Backbone tag.
  • Use multicast_group from a .knxkeys keyring files MulticastAddress tag (Routing).
  • Support InternalGroupAddress in xknx.tools package.

Protocol

  • Add TimerNotify frame parser

1.1.0

1 year ago

Added

  • Convenience functions for KNX group communication (xknx.tools)

Routing

  • Support flow control for routing

Protocol

  • Add RoutingBusy frame parser
  • Add RoutingLostMessage frame parser