edilkamin package
Submodules
edilkamin module
- edilkamin.bluetooth_mac_to_wifi_mac(mac: str) str
Convert Bluetooth MAC address to WiFi MAC address.
Edilkamin devices have BLE MAC addresses that are offset by +2 from their WiFi MAC.
>>> bluetooth_mac_to_wifi_mac("A8:03:2A:FE:D5:0B") 'a8:03:2a:fe:d5:09'
- edilkamin.device_info_get_airkare(info: Dict) bool
Get airkare status from cached info.
- edilkamin.device_info_get_alarm_reset(info: Dict) bool
Get alarm reset value from cached info.
- edilkamin.device_info_get_autonomy_time(info: Dict) int
Get autonomy time from cached info.
- edilkamin.device_info_get_chrono_mode(info: Dict) bool
Get chrono mode status from cached info.
- edilkamin.device_info_get_easy_timer(info: Dict) int
Get easy timer value from cached info.
- edilkamin.device_info_get_environment_temperature(info: Dict) int
Get environment temperature value from cached info.
- edilkamin.device_info_get_fan_speed(info: Dict, fan_id: int) int
Get fan id speed value from cached info.
- edilkamin.device_info_get_manual_power_level(info: Dict) int
Get manual power level value from cached info.
- edilkamin.device_info_get_pellet_reserve(info: Dict) bool
Get pellet reserve status from cached info.
- edilkamin.device_info_get_perform_cochlea_loading(info: Dict) bool
Get perform cochlea loading state from cached info.
- edilkamin.device_info_get_relax_mode(info: Dict) bool
Get relax mode status from cached info.
- edilkamin.device_info_get_serial_number(info: Dict) str
Get device serial number from cached info.
Note: Serial numbers may contain binary/control characters from device firmware. Use serial_number_hex() or serial_number_display() for safe string representations.
- edilkamin.device_info_get_standby_mode(info: Dict) bool
Get standby mode status from cached info.
- edilkamin.device_info_get_target_temperature(info: Dict) int
Get target temperature value from cached info.
- edilkamin.discover_devices(convert: bool = True) Tuple[str, ...]
Discover Edilkamin devices using Bluetooth.
Scans for nearby Edilkamin devices and returns their MAC addresses. By default, returns WiFi MAC addresses (used for API calls). Set convert=False to get raw Bluetooth MAC addresses.
Requires the ‘ble’ extra: pip install edilkamin[ble]
- Returns:
Tuple of MAC address strings in format ‘aa:bb:cc:dd:ee:ff’
- edilkamin.discover_devices_helper(devices: Tuple[Dict, ...], convert: bool = True) Tuple[str, ...]
Filter discovered Bluetooth devices for Edilkamin devices.
Given a list of bluetooth addresses/names return the ones matching for Edilkamin.
>>> devices = ( ... {"name": "EDILKAMIN_EP", "address": "01:23:45:67:89:AB"}, ... {"name": "another_device", "address": "AA:BB:CC:DD:EE:FF"}, ... ) >>> discover_devices_helper(devices) ('01:23:45:67:89:a9',)
- edilkamin.serial_number_display(serial: str) str
Get a display-safe version of the serial number.
Removes non-printable characters and strips whitespace, returning only the human-readable portion of the serial number.
- Args:
serial: Raw serial number string (may contain binary data)
- Returns:
Printable characters only, stripped of leading/trailing whitespace
- Example:
>>> raw = "C]7JSS L
- ÿ” # Contains control chars
>>> display = serial_number_display(raw) >>> print(display) C]7JSS L
- edilkamin.serial_number_from_hex(hex_serial: str) str
Convert hex-encoded serial number back to raw string.
- Args:
hex_serial: Hex-encoded serial string
- Returns:
Raw serial number string
- Example:
>>> raw = serial_number_from_hex("1a435d374a53532020204c191a0cc3bf")
- edilkamin.serial_number_hex(serial: str) str
Convert serial number to hex string for safe storage/display.
Serial numbers from Edilkamin devices may contain binary control characters. This function converts the serial to a hex string that is safe to store, display, and transmit.
- Args:
serial: Raw serial number string (may contain binary data)
- Returns:
Hex-encoded string (e.g., “1a435d374a5353…”)
- Example:
>>> raw = "C]7JSS L
- ÿ” # Example with control chars
>>> hex_serial = serial_number_hex(raw) >>> print(hex_serial) 1a435d374a53532020204c191a0cc3bf
- edilkamin.sign_in(username: str, password: str, use_legacy_api: bool = False) str
Sign in and return token.
- Args:
username: Edilkamin account username password: Edilkamin account password use_legacy_api: If True, use old AWS API and access_token.
If False (default), use new API and id_token.
- Returns:
JWT token for API authentication