Changelog

Changes that affect SDK users. Upgrade with pip install -U idun-guardian-sdk. This file is also published at https://sdk-docs.idunguardian.com/changelog.html.

0.1.26 - 2026-11-25

Recording now works without account pairing when the Guardian is connected over Bluetooth, and a rejected recording start now raises an error.

Do I need to change my code?

Usually no. No method was removed or renamed, and GuardianClient(...) still works as before. Check these points if they apply to you:

  • Rejected start. If the cloud rejects a recording (for example the Guardian is not activated), start_recording() now raises RecordingRejectedError. If the cloud refuses the connection, it raises AuthenticationError. Before, it retried. Code that catches Exception or IdunGuardianError needs no change. See How the SDK chooses the Guardian.

  • Bluetooth connected. Device calls (get_user_info(), hardware version, cognitive insights) now use the Guardian you are connected to, not the Guardian saved on your account. A Guardian that is not registered with IDUN, or has no key, makes these calls fail with APIRequestError (HTTP 403).

  • Device ID mismatch. If start_recording() finds that the cloud and Bluetooth disagree about the Guardian, it now waits 5 seconds, checks once more, and only then raises ValueError. It disconnects Bluetooth before it raises.

  • Report helpers. generate_and_download_sleep_report() and generate_and_download_daytime_report() save the report that the cloud has for the recording. If you generate a report again, they can save the earlier one.

  • New argument. GuardianClient(device_id=...) raises ValueError at once if the value is not 12 hex digits.

Added

  • GuardianClient(device_id="AA:BB:CC:DD:EE:FF"): the Guardian’s MAC, for device calls without a Bluetooth connection. Accepts AA:BB:..., AA-BB-... or 12 hex digits.

  • RecordingRejectedError, with the reason in .code.

  • AuthenticationError is now exported from the package.

Changed

  • When the Guardian is known, the SDK sends its MAC (deviceId, bindingVersion=1) on the recording connection and on device calls. The account does not need to be paired with that Guardian. Without a known MAC, the SDK works as in 0.1.25.

  • The Bluetooth MAC is read on every connect, so a different Guardian is picked up correctly.

  • start_recording() compares the Bluetooth MAC and the cloud device ID without regard to case and separators, and does this before it uploads the hardware version.

  • If start_recording() fails before the recording starts (ValueError, APIRequestError, RecordingRejectedError, AuthenticationError), it disconnects Bluetooth (up to 10 s) and then raises.

Fixed

  • A rejected recording start no longer retries in a loop.

  • disconnect_device() no longer waits forever when the Bluetooth disconnect fails.

  • generate_and_download_* poll the recording’s report route. The deprecation warning on download_sleep_report() is removed.

Known limitations

  • Without a Bluetooth connection and without device_id, device calls use the Guardian saved on your account, as in 0.1.25.

  • Bluetooth errors during start_recording() are logged and do not raise.

0.1.25 - 2026-10-23

Changed

  • The certifi requirement is now >=2026.10.19 (was ^2024.2.2).