Giter Club home page Giter Club logo

dirigera_platform's Introduction

IKEA Dirigera Hub Integration

This custom components help integrating HomeAssistant with the new IKEA Dirigera hub. This integration is a scaffolding on the great work done by Nicolas Hilberg at https://github.com/Leggin/dirigera

Supports

  • Lights
  • Outlets
  • Open/Close Sensors
  • Motion Sensor
  • Environment Sensor
  • FYRTUR Blinds
  • STYRBAR Remotes
  • AirPurifier
  • STARKVIND AirPurifier
  • VALLHORN Motion Sensors
  • Scenes

Pre-requisite

  1. Identify the IP of the gateway - Usually looking at the client list in your home router interface will give that.

Installing

  • Like all add-on installation goto the "HACS" option in the left menu bar in home assistant
  • Select Integration and add custom repository and enter this repositoy

Using the integration

  1. One you get to add integration and get to the configuration screen, the IP of the gateway will be requested. IMPORTANT Before hitting enter be near the IKEA Dirigera hub as post entering IP a request to press the action button on the hub

  2. Once you get the screen requesting to press the action button, physically press the button once and then click on submit

  3. If the IP is right and action button has been pressed, then the integration will be added and all devices registered will be shown. At this time the following device types are supported a. Lights b. Outlets c. Motion Sensor d. VindStyrka Environment Sensor e. Blinds
    f. STYRBAR Remotes
    g. AirPurifier

    In addition you'll find the scenes added as individual entities. Go to the "Entities" to find them as they're not part of any device. Use the "Activate" button to trigger a scene.

Testing installation with mock

  1. If you enter the IP as "mock" then mock bulbs and outlet will be added.
  2. Once you verify that the bulbs and outlets are added feel free to delete the integration

Here is how it looks

  1. After you have downloaded the integration from HACS and go to Setting -> Integration -> ADD INTEGRATION to add the dirigera integration, the following screen will come up

To test the integration, enter the IP as "mock". The check-box indicates if the bulbs/lights associated with a device-set should be visible as entities or not

The integration would prompt to press the action button on the hub

Since this is mock, we would get a success message

Once this is complete you would see two bulbs and two outlets appearing.

Raising Issue

Now I dont have access to all sensors, hence what will be useful is when you raise an issue also supply to the JSON that the hub returns. To get the JSON do the following

  • Go to Developer -> Service and invoke dirigera_platform.dump_data without any parameters
  • Look at the HASS log which would have the JSON.
  • If you see any platform errors include that as well

Detailed Instructions

dirigera_platform's People

Contributors

c503ghosh avatar sanjoyg avatar slajob avatar bjorncs avatar nromyn avatar

Stargazers

Pierpaolo avatar  avatar Sami Masad avatar  avatar Casper avatar  avatar  avatar  avatar Sumeda avatar  avatar Andreas Ebert avatar Yukai Huang avatar Nuno Cid da Ponte avatar  avatar  avatar  avatar  avatar  avatar  avatar Kevin F avatar Stefan Post avatar Peter Gebruers avatar Nicolas Hilberg avatar David Marks avatar Verdi R-D avatar  avatar  avatar Francisco Coelho avatar Hugo Karlsson avatar  avatar Konstantin Kraus avatar Björn Hutmacher avatar  avatar  avatar Torulf Danielsson avatar Julian Silden Langlo avatar Dzmitry Panamarenka avatar Søren Larsen Pedersen avatar Antonín Skala avatar  avatar  avatar  avatar Johannes Smit avatar  avatar Sidney avatar Dat Nardo avatar Alex de Lannee avatar Daniel Münch avatar Conor avatar  avatar Axiom avatar  avatar Oscar Björkman avatar  avatar

Watchers

Björn Hutmacher avatar Daniel Münch avatar Antonín Skala avatar  avatar  avatar

dirigera_platform's Issues

Show battery level in device list

Hi,

Thank you for all the effort you have (and are) putting into making this integration available to all of us! It is working like a charm.

One thing that I have been missing is the ability to see the battery level for remotes etc. in the device list. I suspect the reason it does not show up is that the "Battery" entity on dirigera_platform devices is reported under "Sensors" rather than under "Diagnostic". Is this something that would be possible to change without too much effort?

Again, thank you for providing this integration!

Best regards,
Soren

slow reaction time for light changes

I am using groups of lights. When I reduce the brightness of those groups there is a notable and tbh kinda annoying delay in dimming/turning on/off the lights using this add on. When I use the IKEA Home Smart app the lights react almost with no noticeable latency.

Is there some kind of delay coded into the HA addon to not stress the hub with too fast incoming requests? If so, is it possible to reduce it somehow? I believe the hub can handle requests much faster than that.

Here's a video of the reaction time:
https://github.com/sanjoyg/dirigera_platform/assets/12232058/f733279b-8db9-4854-8f3e-af99a283107a

Json DUMP for blinds (KADRILJ roller blind)

Hi,
Here is a json you requested for:

{
  "id": "87808a3f-b5db-4c47-a528-5bdd1dbd8860_1",
  "type": "blinds",
  "device_type": "blinds",
  "created_at": "2023-11-19T10:11:32+00:00",
  "is_reachable": true,
  "last_seen": "2024-02-28T19:32:31+00:00",
  "attributes": {
    "custom_name": "Kitchen blind",
    "model": "KADRILJ roller blind",
    "manufacturer": "IKEA of Sweden",
    "firmware_version": "24.4.13",
    "hardware_version": "1",
    "serial_number": "680AE2FFFED1887D",
    "product_code": "E1752-140",
    "ota_status": "upToDate",
    "ota_state": "readyToCheck",
    "ota_progress": 0,
    "ota_policy": "autoUpdate",
    "ota_schedule_start": "00:00:00",
    "ota_schedule_end": "00:00:00",
    "blinds_current_level": 100,
    "blinds_target_level": 100,
    "blinds_state": "stopped"
  },
  "capabilities": {
    "can_send": [],
    "can_receive": ["customName", "blindsCurrentLevel", "blindsTargetLevel", "blindsState"]
  },
  "room": {
    "id": "a40bc2b4-ffe6-4b63-9612-9d0dc8d9a394",
    "name": "Kitchen",
    "color": "ikea_blue_no_58",
    "icon": "rooms_kitchen"
  },
  "device_set": [],
  "remote_links": ["3d754a71-86b4-46f2-9885-85ddb32dbb35_1"],
  "is_hidden": false
}

Remote support not working

I see in the description that "STYRBAR Remotes" should be working but I can't find it anywhere in the HA. After I enter IP address and press action button I only see the bulbs on the list and I don't see a remote. I make sure that the remote I own is STYRBAR (the square one with 2 arrow buttons and 2 dim/light buttons).

Here is what I see in HA:
Screenshot 2024-03-11 at 23 24 08

I'm pretty new to HA so I'm not really sure where should I be able to see the remote but I can't find it anywhere. I run HA in docker container and I don't see any logs connected to remotes. Any tips how to get this working?

JSON Dump with Tredansen, praktlysing blind

I have created a dump from my Dirigera, which has the following objects connected:

  • 2x TREDANSEN cellular blinds + in-box Tradfri blinds remote
  • 2x PRAKTLYSING cellular blinds + in-box Tradfri blinds remote
  • 2x signal repeaters
  • 2x Philips Hue Bulbs (just to make things complicated)

Hope this is helpful!

[
    {'id': 'b96b023f-a0ed-46bc-9dfb-267a25ee7c6f_1', 'type': 'controller', 'deviceType': 'blindsController', 'createdAt': '2024-02-18T23: 25: 57.000Z', 'isReachable': True, 'lastSeen': '2024-02-23T16: 52: 56.000Z', 'attributes': {'customName': 'Remote 1', 'model': 'TRADFRI open/close remote', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '24.4.6', 'hardwareVersion': '1', 'serialNumber': '2C1165FFFE9DD056', 'productCode': 'E1766', 'batteryPercentage': 75, 'isOn': False, 'lightLevel': 1, 'blindsCurrentLevel': 0, 'blindsState': '', 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00: 00', 'otaScheduleEnd': '00: 00'
        }, 'capabilities': {'canSend': ['isOn', 'lightLevel', 'blindsState'
            ], 'canReceive': ['customName'
            ]
        }, 'room': {'id': 'e48d6681-82ba-49f9-96fd-3a6123b336ec', 'name': 'Living room', 'color': 'ikea_green_no_65', 'icon': 'rooms_sofa'
        }, 'deviceSet': [], 'remoteLinks': [], 'isHidden': False
    },
    {'id': 'dc58ecb9-eef1-45b7-a3e2-f67f3cbf2746_1', 'type': 'repeater', 'deviceType': 'repeater', 'createdAt': '2024-02-19T20: 19: 36.000Z', 'isReachable': True, 'lastSeen': '2024-02-23T11: 53: 40.000Z', 'attributes': {'customName': 'Bedroom', 'model': 'TRADFRI Signal Repeater', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.3.086', 'hardwareVersion': '1', 'serialNumber': '8CF681FFFE3500FE', 'productCode': 'E1746', 'identifyStarted': '2000-01-01T00: 00: 00.000Z', 'identifyPeriod': 0, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00: 00', 'otaScheduleEnd': '00: 00'
        }, 'capabilities': {'canSend': [], 'canReceive': ['customName'
            ]
        }, 'room': {'id': '9db4fea3-ad77-4b8c-be16-1c6996331315', 'name': 'Master bedroom', 'color': 'ikea_beige_1', 'icon': 'rooms_bed'
        }, 'deviceSet': [], 'remoteLinks': [], 'isHidden': False
    },
    {'id': 'e462355c-cfcf-47dc-8523-f83e652dfa60_11', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-02-19T20: 13: 11.000Z', 'isReachable': True, 'lastSeen': '2024-02-23T11: 59: 50.000Z', 'customIcon': 'lighting_nightstand_light', 'attributes': {'customName': 'Lamp 1', 'model': 'LCA005', 'manufacturer': 'Signify Netherlands B.V.', 'firmwareVersion': '1.104.2', 'hardwareVersion': '1', 'serialNumber': '001788010CE3E9A3', 'productCode': '', 'isOn': True, 'startupOnOff': 'startOn', 'lightLevel': 100, 'colorHue': 26.9989013671875, 'colorSaturation': 0.3464566929133858, 'colorTemperature': 2202, 'colorTemperatureMin': 6535, 'colorTemperatureMax': 2000, 'startupTemperature': 2732, 'colorMode': 'color', 'identifyStarted': '2000-01-01T00: 00: 00.000Z', 'identifyPeriod': 0, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00: 00', 'otaScheduleEnd': '00: 00'
        }, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'colorTemperature', 'colorHue', 'colorSaturation'
            ]
        }, 'room': {'id': '9db4fea3-ad77-4b8c-be16-1c6996331315', 'name': 'Master bedroom', 'color': 'ikea_beige_1', 'icon': 'rooms_bed'
        }, 'deviceSet': [], 'remoteLinks': [], 'isHidden': False
    },
    {'id': '62c60532-2f64-487e-a619-032904dcf20e_1', 'type': 'blinds', 'deviceType': 'blinds', 'createdAt': '2024-02-19T17: 28: 55.000Z', 'isReachable': True, 'lastSeen': '2024-02-23T11: 53: 30.000Z', 'attributes': {'customName': 'Blind 3', 'model': 'TREDANSEN block-out cellul blind', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '24.4.13', 'hardwareVersion': '1', 'serialNumber': '0C4314FFFE0B007B', 'productCode': 'E2022', 'batteryPercentage': 100, 'blindsTargetLevel': 0, 'blindsCurrentLevel': 0, 'blindsState': 'stopped', 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00: 00', 'otaScheduleEnd': '00: 00'
        }, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'blindsCurrentLevel', 'blindsTargetLevel', 'blindsState'
            ]
        }, 'room': {'id': '9db4fea3-ad77-4b8c-be16-1c6996331315', 'name': 'Master bedroom', 'color': 'ikea_beige_1', 'icon': 'rooms_bed'
        }, 'deviceSet': [], 'remoteLinks': ['9e46c615-30d3-4470-8e64-9a6c42ece522_1'
        ], 'isHidden': False
    },
    {'id': 'c05a3047-f0a3-4d70-9f66-e43ef6c3eb8f_1', 'type': 'blinds', 'deviceType': 'blinds', 'createdAt': '2024-02-20T18: 51: 17.000Z', 'isReachable': True, 'lastSeen': '2024-02-23T11: 53: 17.000Z', 'attributes': {'customName': 'Blind 4', 'model': 'TREDANSEN block-out cellul blind', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '24.4.13', 'hardwareVersion': '1', 'serialNumber': 'B4E3F9FFFE8BF2A9', 'productCode': 'E2022', 'batteryPercentage': 99, 'blindsTargetLevel': 0, 'blindsCurrentLevel': 0, 'blindsState': 'stopped', 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00: 00', 'otaScheduleEnd': '00: 00'
        }, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'blindsCurrentLevel', 'blindsTargetLevel', 'blindsState'
            ]
        }, 'room': {'id': '9db4fea3-ad77-4b8c-be16-1c6996331315', 'name': 'Master bedroom', 'color': 'ikea_beige_1', 'icon': 'rooms_bed'
        }, 'deviceSet': [], 'remoteLinks': ['9e46c615-30d3-4470-8e64-9a6c42ece522_1'
        ], 'isHidden': False
    },
    {'id': 'a508a376-aaa1-4522-ab5b-67158fb5d396_1', 'type': 'blinds', 'deviceType': 'blinds', 'createdAt': '2024-02-18T22: 03: 14.000Z', 'isReachable': True, 'lastSeen': '2024-02-23T11: 53: 33.000Z', 'attributes': {'customName': 'Window 2', 'model': 'PRAKTLYSING cellular blind', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '24.4.13', 'hardwareVersion': '1', 'serialNumber': '2C1165FFFEA94E2A', 'productCode': 'E2021', 'batteryPercentage': 100, 'blindsTargetLevel': 0, 'blindsCurrentLevel': 0, 'blindsState': 'stopped', 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00: 00', 'otaScheduleEnd': '00: 00'
        }, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'blindsCurrentLevel', 'blindsTargetLevel', 'blindsState'
            ]
        }, 'room': {'id': 'e48d6681-82ba-49f9-96fd-3a6123b336ec', 'name': 'Living room', 'color': 'ikea_green_no_65', 'icon': 'rooms_sofa'
        }, 'deviceSet': [], 'remoteLinks': ['b96b023f-a0ed-46bc-9dfb-267a25ee7c6f_1'
        ], 'isHidden': False
    },
    {'id': 'd6b78184-9bc8-4266-87de-12b151de3bf6_1', 'relationId': 'd6b78184-9bc8-4266-87de-12b151de3bf6', 'type': 'gateway', 'deviceType': 'gateway', 'createdAt': '2023-12-14T14: 08: 09.692Z', 'isReachable': True, 'lastSeen': '2024-02-23T17: 03: 00.305Z', 'attributes': {'customName': 'Home', 'model': 'DIRIGERA Hub for smart products', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.505.2', 'hardwareVersion': 'P2.5', 'serialNumber': 'd6b78184-9bc8-4266-87de-12b151de3bf6', 'identifyStarted': '2000-01-01T00: 00: 00.000Z', 'identifyPeriod': 0, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoDownload', 'otaScheduleStart': '00: 00', 'otaScheduleEnd': '00: 00', 'permittingJoin': False, 'backendConnected': False, 'backendConnectionPersistent': False, 'backendOnboardingComplete': True, 'backendRegion': 'us-east-1', 'backendCountryCode': 'CA', 'userConsents': [
                {'name': 'analytics', 'value': 'enabled'
                },
                {'name': 'diagnostics', 'value': 'enabled'
                }
            ], 'logLevel': 3, 'coredump': False, 'timezone': 'America/Toronto', 'nextSunSet': None, 'nextSunRise': None, 'homestateValue': 'home', 'homestateLastChanged': '2023-12-14T09: 08: 09-05: 00', 'countryCode': 'XZ', 'isOn': False
        }, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'permittingJoin', 'userConsents', 'logLevel', 'time', 'timezone', 'countryCode', 'coordinates'
            ]
        }, 'deviceSet': [], 'remoteLinks': []
    },
    {'id': '215b8f6f-f263-440d-a4d4-607a23ef64df_1', 'type': 'repeater', 'deviceType': 'repeater', 'createdAt': '2024-02-19T20: 22: 22.000Z', 'isReachable': True, 'lastSeen': '2024-02-23T11: 53: 40.000Z', 'attributes': {'customName': 'Living room', 'model': 'TRADFRI Signal Repeater', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.3.086', 'hardwareVersion': '1', 'serialNumber': '0C4314FFFEF7937C', 'productCode': 'E1746', 'identifyStarted': '2000-01-01T00: 00: 00.000Z', 'identifyPeriod': 0, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00: 00', 'otaScheduleEnd': '00: 00'
        }, 'capabilities': {'canSend': [], 'canReceive': ['customName'
            ]
        }, 'room': {'id': 'e48d6681-82ba-49f9-96fd-3a6123b336ec', 'name': 'Living room', 'color': 'ikea_green_no_65', 'icon': 'rooms_sofa'
        }, 'deviceSet': [], 'remoteLinks': [], 'isHidden': False
    },
    {'id': '31784070-708d-47e2-8951-0ba251ff6ea9_1', 'type': 'blinds', 'deviceType': 'blinds', 'createdAt': '2024-02-18T22: 03: 10.000Z', 'isReachable': True, 'lastSeen': '2024-02-23T11: 53: 11.000Z', 'attributes': {'customName': 'Window 1', 'model': 'PRAKTLYSING cellular blind', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '24.4.13', 'hardwareVersion': '1', 'serialNumber': '2C1165FFFEABCF6D', 'productCode': 'E2021', 'batteryPercentage': 99, 'blindsTargetLevel': 0, 'blindsCurrentLevel': 0, 'blindsState': 'stopped', 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00: 00', 'otaScheduleEnd': '00: 00'
        }, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'blindsCurrentLevel', 'blindsTargetLevel', 'blindsState'
            ]
        }, 'room': {'id': 'e48d6681-82ba-49f9-96fd-3a6123b336ec', 'name': 'Living room', 'color': 'ikea_green_no_65', 'icon': 'rooms_sofa'
        }, 'deviceSet': [], 'remoteLinks': ['b96b023f-a0ed-46bc-9dfb-267a25ee7c6f_1'
        ], 'isHidden': False
    },
    {'id': '908e9e1f-ec84-40f9-925e-3e265957e615_11', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-02-19T19: 58: 06.000Z', 'isReachable': True, 'lastSeen': '2024-02-23T11: 53: 00.000Z', 'customIcon': 'lighting_nightstand_light', 'attributes': {'customName': 'Lamp 2', 'model': 'LCA005', 'manufacturer': 'Signify Netherlands B.V.', 'firmwareVersion': '1.104.2', 'hardwareVersion': '1', 'serialNumber': '001788010CE3EC2B', 'productCode': '', 'isOn': False, 'startupOnOff': 'startOn', 'lightLevel': 100, 'colorHue': 27.9986572265625, 'colorSaturation': 0.6299212598425197, 'colorTemperature': 4016, 'colorTemperatureMin': 6535, 'colorTemperatureMax': 2000, 'startupTemperature': 2732, 'colorMode': 'color', 'identifyStarted': '2000-01-01T00: 00: 00.000Z', 'identifyPeriod': 0, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00: 00', 'otaScheduleEnd': '00: 00'
        }, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'colorTemperature', 'colorHue', 'colorSaturation'
            ]
        }, 'room': {'id': '9db4fea3-ad77-4b8c-be16-1c6996331315', 'name': 'Master bedroom', 'color': 'ikea_beige_1', 'icon': 'rooms_bed'
        }, 'deviceSet': [], 'remoteLinks': [], 'isHidden': False
    },
    {'id': '9e46c615-30d3-4470-8e64-9a6c42ece522_1', 'type': 'controller', 'deviceType': 'blindsController', 'createdAt': '2024-02-18T23: 26: 48.000Z', 'isReachable': True, 'lastSeen': '2024-02-23T16: 52: 56.000Z', 'attributes': {'customName': 'Remote 2', 'model': 'TRADFRI open/close remote', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '24.4.6', 'hardwareVersion': '1', 'serialNumber': '2C1165FFFEB66FF4', 'productCode': 'E1766', 'batteryPercentage': 90, 'isOn': False, 'lightLevel': 1, 'blindsCurrentLevel': 0, 'blindsState': '', 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00: 00', 'otaScheduleEnd': '00: 00'
        }, 'capabilities': {'canSend': ['isOn', 'lightLevel', 'blindsState'
            ], 'canReceive': ['customName'
            ]
        }, 'room': {'id': '9db4fea3-ad77-4b8c-be16-1c6996331315', 'name': 'Master bedroom', 'color': 'ikea_beige_1', 'icon': 'rooms_bed'
        }, 'deviceSet': [], 'remoteLinks': [], 'isHidden': False
    }
]```

Vindstyrka Enviroment Sensor broken

with the newest version of this addon my enviroment sensor is broken

here the logs:

2024-04-11 21:05:34.571 ERROR (MainThread) [custom_components.dirigera_platform] error encountered running update on : Luftsensor
2024-04-11 21:05:34.571 ERROR (MainThread) [custom_components.dirigera_platform] 'ikea_vindstyrka_device' object has no attribute 'hass'
2024-04-11 21:05:34.571 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.luftsensor_temperature fails
Traceback (most recent call last):
  File "/config/custom_components/dirigera_platform/sensor.py", line 93, in async_update
    self._json_data = await self.hass.async_add_executor_job(self._hub.get_environment_sensor_by_id, self._json_data.id)
                            ^^^^^^^^^
AttributeError: 'ikea_vindstyrka_device' object has no attribute 'hass'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 951, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1268, in async_device_update
    await self.async_update()
  File "/config/custom_components/dirigera_platform/sensor.py", line 175, in async_update
    await self._ikea_env_device.async_update()
  File "/config/custom_components/dirigera_platform/sensor.py", line 100, in async_update
    raise HomeAssistantError(ex, DOMAIN, "hub_exception")
homeassistant.exceptions.HomeAssistantError: (AttributeError("'ikea_vindstyrka_device' object has no attribute 'hass'"), 'dirigera_platform', 'hub_exception')
2024-04-11 21:05:34.574 ERROR (MainThread) [custom_components.dirigera_platform] error encountered running update on : Luftsensor
2024-04-11 21:05:34.574 ERROR (MainThread) [custom_components.dirigera_platform] 'ikea_vindstyrka_device' object has no attribute 'hass'
2024-04-11 21:05:34.575 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.luftsensor_humidity fails
Traceback (most recent call last):
  File "/config/custom_components/dirigera_platform/sensor.py", line 93, in async_update
    self._json_data = await self.hass.async_add_executor_job(self._hub.get_environment_sensor_by_id, self._json_data.id)
                            ^^^^^^^^^
AttributeError: 'ikea_vindstyrka_device' object has no attribute 'hass'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 951, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1268, in async_device_update
    await self.async_update()
  File "/config/custom_components/dirigera_platform/sensor.py", line 175, in async_update
    await self._ikea_env_device.async_update()
  File "/config/custom_components/dirigera_platform/sensor.py", line 100, in async_update
    raise HomeAssistantError(ex, DOMAIN, "hub_exception")
homeassistant.exceptions.HomeAssistantError: (AttributeError("'ikea_vindstyrka_device' object has no attribute 'hass'"), 'dirigera_platform', 'hub_exception')
2024-04-11 21:05:34.576 ERROR (MainThread) [custom_components.dirigera_platform] error encountered running update on : Luftsensor
2024-04-11 21:05:34.576 ERROR (MainThread) [custom_components.dirigera_platform] 'ikea_vindstyrka_device' object has no attribute 'hass'
2024-04-11 21:05:34.576 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.luftsensor_current_pm2_5 fails
Traceback (most recent call last):
  File "/config/custom_components/dirigera_platform/sensor.py", line 93, in async_update
    self._json_data = await self.hass.async_add_executor_job(self._hub.get_environment_sensor_by_id, self._json_data.id)
                            ^^^^^^^^^
AttributeError: 'ikea_vindstyrka_device' object has no attribute 'hass'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 951, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1268, in async_device_update
    await self.async_update()
  File "/config/custom_components/dirigera_platform/sensor.py", line 175, in async_update
    await self._ikea_env_device.async_update()
  File "/config/custom_components/dirigera_platform/sensor.py", line 100, in async_update
    raise HomeAssistantError(ex, DOMAIN, "hub_exception")
homeassistant.exceptions.HomeAssistantError: (AttributeError("'ikea_vindstyrka_device' object has no attribute 'hass'"), 'dirigera_platform', 'hub_exception')
2024-04-11 21:05:34.578 ERROR (MainThread) [custom_components.dirigera_platform] error encountered running update on : Luftsensor
2024-04-11 21:05:34.578 ERROR (MainThread) [custom_components.dirigera_platform] 'ikea_vindstyrka_device' object has no attribute 'hass'
2024-04-11 21:05:34.578 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.luftsensor_max_measured_pm2_5 fails
Traceback (most recent call last):
  File "/config/custom_components/dirigera_platform/sensor.py", line 93, in async_update
    self._json_data = await self.hass.async_add_executor_job(self._hub.get_environment_sensor_by_id, self._json_data.id)
                            ^^^^^^^^^
AttributeError: 'ikea_vindstyrka_device' object has no attribute 'hass'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 951, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1268, in async_device_update
    await self.async_update()
  File "/config/custom_components/dirigera_platform/sensor.py", line 175, in async_update
    await self._ikea_env_device.async_update()
  File "/config/custom_components/dirigera_platform/sensor.py", line 100, in async_update
    raise HomeAssistantError(ex, DOMAIN, "hub_exception")
homeassistant.exceptions.HomeAssistantError: (AttributeError("'ikea_vindstyrka_device' object has no attribute 'hass'"), 'dirigera_platform', 'hub_exception')
2024-04-11 21:05:34.579 ERROR (MainThread) [custom_components.dirigera_platform] error encountered running update on : Luftsensor
2024-04-11 21:05:34.580 ERROR (MainThread) [custom_components.dirigera_platform] 'ikea_vindstyrka_device' object has no attribute 'hass'
2024-04-11 21:05:34.580 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.luftsensor_min_measured_pm2_5 fails
Traceback (most recent call last):
  File "/config/custom_components/dirigera_platform/sensor.py", line 93, in async_update
    self._json_data = await self.hass.async_add_executor_job(self._hub.get_environment_sensor_by_id, self._json_data.id)
                            ^^^^^^^^^
AttributeError: 'ikea_vindstyrka_device' object has no attribute 'hass'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 951, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1268, in async_device_update
    await self.async_update()
  File "/config/custom_components/dirigera_platform/sensor.py", line 175, in async_update
    await self._ikea_env_device.async_update()
  File "/config/custom_components/dirigera_platform/sensor.py", line 100, in async_update
    raise HomeAssistantError(ex, DOMAIN, "hub_exception")
homeassistant.exceptions.HomeAssistantError: (AttributeError("'ikea_vindstyrka_device' object has no attribute 'hass'"), 'dirigera_platform', 'hub_exception')
2024-04-11 21:05:34.581 ERROR (MainThread) [custom_components.dirigera_platform] error encountered running update on : Luftsensor
2024-04-11 21:05:34.581 ERROR (MainThread) [custom_components.dirigera_platform] 'ikea_vindstyrka_device' object has no attribute 'hass'
2024-04-11 21:05:34.581 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.luftsensor_voc_index fails
Traceback (most recent call last):
  File "/config/custom_components/dirigera_platform/sensor.py", line 93, in async_update
    self._json_data = await self.hass.async_add_executor_job(self._hub.get_environment_sensor_by_id, self._json_data.id)
                            ^^^^^^^^^
AttributeError: 'ikea_vindstyrka_device' object has no attribute 'hass'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 951, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1268, in async_device_update
    await self.async_update()
  File "/config/custom_components/dirigera_platform/sensor.py", line 175, in async_update
    await self._ikea_env_device.async_update()
  File "/config/custom_components/dirigera_platform/sensor.py", line 100, in async_update
    raise HomeAssistantError(ex, DOMAIN, "hub_exception")
homeassistant.exceptions.HomeAssistantError: (AttributeError("'ikea_vindstyrka_device' object has no attribute 'hass'"), 'dirigera_platform', 'hub_exception')

Fyrtur blinds spamming log with error

THe blinds seem to work okay, I can raise and lower them. But they keep spamming the HA log with this, over and over again:
2024-03-14 09:18:40.052 ERROR (SyncWorker_19) [custom_components.dirigera_platform] error encountered running update on : xxxxxxxxxx 2024-03-14 09:18:40.053 ERROR (SyncWorker_19) [custom_components.dirigera_platform] 6 validation errors for EnvironmentSensor File "/config/custom_components/dirigera_platform/cover.py", line 126, in update File "/config/custom_components/dirigera_platform/dirigera_lib_patch.py", line 54, in get_blinds_by_id File "/usr/local/lib/python3.12/site-packages/dirigera/devices/environment_sensor.py", line 36, in dict_to_environment_sensor return EnvironmentSensor(dirigeraClient=dirigera_client, **data) File "/config/custom_components/dirigera_platform/cover.py", line 130, in update homeassistant.exceptions.HomeAssistantError: (ValidationError(model='EnvironmentSensor', errors=[{'loc': ('attributes', 'currentTemperature'), 'msg': 'field required', 'type': 'value_error.missing'}, {'loc': ('attributes', 'currentRH'), 'msg': 'field required', 'type': 'value_error.missing'}, {'loc': ('attributes', 'currentPM25'), 'msg': 'field required', 'type': 'value_error.missing'}, {'loc': ('attributes', 'maxMeasuredPM25'), 'msg': 'field required', 'type': 'value_error.missing'}, {'loc': ('attributes', 'minMeasuredPM25'), 'msg': 'field required', 'type': 'value_error.missing'}, {'loc': ('attributes', 'vocIndex'), 'msg': 'field required', 'type': 'value_error.missing'}]), 'dirigera_platform', 'hub_exception')

The instructions to dump json did not work, or I am trying to find the json in the wrong place. What exactly is the "HASS logs"?

Failing to add mock devices

I am failing to make the mock devices work.

I get the following log entry for the devices:

Logger: homeassistant.setup
Source: setup.py:403
First occurred: 21:43:27 (20 occurrences)
Last logged: 22:35:57

Unable to prepare setup for platform 'dirigera_platform.light': Platform not found (cannot import name 'Attributes' from 'dirigera.devices.device' (/usr/local/lib/python3.11/site-packages/dirigera/devices/device.py)).
Unable to prepare setup for platform 'dirigera_platform.switch': Platform not found (cannot import name 'Attributes' from 'dirigera.devices.device' (/usr/local/lib/python3.11/site-packages/dirigera/devices/device.py)).
Unable to prepare setup for platform 'dirigera_platform.binary_sensor': Platform not found (cannot import name 'Attributes' from 'dirigera.devices.device' (/usr/local/lib/python3.11/site-packages/dirigera/devices/device.py)).
Unable to prepare setup for platform 'dirigera_platform.sensor': Platform not found (cannot import name 'Attributes' from 'dirigera.devices.device' (/usr/local/lib/python3.11/site-packages/dirigera/devices/device.py)).
Unable to prepare setup for platform 'dirigera_platform.cover': Platform not found (cannot import name 'Attributes' from 'dirigera.devices.device' (/usr/local/lib/python3.11/site-packages/dirigera/devices/device.py)).

JSON Dump of Starkvind air purifier

Here's a dump of one of my Starkvind air purifiers that you asked for @sanjoyg:

{
      "id":"7cef9a41-6253-4608-a99a-6968fa8956a7_1",
      "type":"airPurifier",
      "deviceType":"airPurifier",
      "createdAt":"2023-10-03T15:47:01.000Z",
      "isReachable":true,
      "lastSeen":"2024-02-27T17:49:02.000Z",
      "attributes":{
         "customName":"Luftreiniger Schlafzimmer",
         "model":"STARKVIND Air purifier table",
         "manufacturer":"IKEA of Sweden",
         "firmwareVersion":"1.1.001",
         "hardwareVersion":"1",
         "serialNumber":"CC86ECFFFE83299A",
         "productCode":"E2006",
         "fanMode":"auto",
         "fanModeSequence":"lowMediumHighAuto",
         "motorState":10,
         "motorRuntime":746614,
         "filterElapsedTime":191955,
         "filterAlarmStatus":false,
         "filterLifetime":259200,
         "childLock":false,
         "statusLight":true,
         "currentPM25":25,
         "identifyStarted":"2000-01-01T00:00:00.000Z",
         "identifyPeriod":0,
         "permittingJoin":false,
         "otaStatus":"upToDate",
         "otaState":"readyToCheck",
         "otaProgress":0,
         "otaPolicy":"autoUpdate",
         "otaScheduleStart":"00:00",
         "otaScheduleEnd":"00:00"
      },
      "capabilities":{
         "canSend":[
            
         ],
         "canReceive":[
            "customName",
            "fanMode",
            "fanModeSequence",
            "motorState",
            "childLock",
            "statusLight"
         ]
      },
      "room":{
         "id":"37b3a4a8-c360-4055-9e56-9185d4a09491",
         "name":"Schlafzimmer\\xa0",
         "color":"ikea_pink_no_8",
         "icon":"rooms_bed"
      },
      "deviceSet":[
         
      ],
      "remoteLinks":[
         
      ],
      "isHidden":false
   }

I described the values that the canReceive attributes can handle in the air_purifier.py that I wrote for leggin/dirigera repository (https://github.com/Leggin/dirigera/blob/main/src/dirigera/devices/air_purifier.py)

EDIT:
The *time attributes are minutes, btw. I forgot to comment that in the device code.
Also the "fanModeSequence":"lowMediumHighAuto" thing.. it's receivable but I didn't find any values you can use with it, tbh. i believe it can be ignored in the integration since not even the IKEA Home Smart App is giving any options to set it to

Issues since 1.4.2

Since update 1.4.2
I have these two errors

Ten błąd pochodzi z niestandardowej integracji.

Rejestrator: custom_components.dirigera_platform
Źródło: custom_components/dirigera_platform/hub_event_listener.py:79
integracja: IKEA Dirigera Hub Integration (dokumentacja, Problemy)
Pierwsze zdarzenie: 15:52:28 (8 zdarzenia)
Ostatnio zalogowany: 15:54:58

Failed to set attribute key: colorMode converted to color_mode on device: 33ce7f5e-e0f2-4f0a-9e7f-f77a805382a2_1
Failed to set attribute key: colorMode converted to color_mode on device: 36fee6ac-4395-44c2-acac-a0ef7a2c9cc0_1
Failed to set attribute key: colorMode converted to color_mode on device: 085bd163-c0b0-40a4-bb31-8091328d6ce3_1
Failed to set attribute key: colorMode converted to color_mode on device: c8c88287-41d6-407a-b087-fcea6f3b0332_1
Failed to set attribute key: colorMode converted to color_mode on device: d613d6b7-098e-4bdd-adff-16cc16aaf161_1

Ten błąd pochodzi z niestandardowej integracji.

Rejestrator: custom_components.dirigera_platform
Źródło: custom_components/dirigera_platform/hub_event_listener.py:80
integracja: IKEA Dirigera Hub Integration (dokumentacja, Problemy)
Pierwsze zdarzenie: 15:52:28 (8 zdarzenia)
Ostatnio zalogowany: 15:54:58

"LightAttributes" object has no field "color_mode"

Devices managed in _sets_ in Ikea Home Smart are unnamed

My imported GU10s are missing the original name except for one single device, which is my only GU10 not grouped in a device set in the Ikea Home Smart app. They were briefly named IKEA Dirigera Hub : 10.0.0.3 before settling to Unnamed device. The other imported Ikea devices were correctly named including 3rd party devices.

Screenshot 2024-03-29 at 19 53 22

dirigera-devices.json

1.4.1 - set support -no lights included in the set

I have a set ( chandelier) that consists of 4 Ikea bulbs.
Since this version, I can see it now in HA.

But unfortunately, the bulbs that are part of this set disappeared from HA and I cannot control them separately

Is it possible to expose both, the set and the light which are part of the set ? And control them separately?

dump json

2024-04-12 17:01:09.972 INFO (SyncWorker_27) [custom_components.dirigera_platform] === START Devices JSON === 2024-04-12 17:01:09.972 INFO (SyncWorker_27) [custom_components.dirigera_platform] -------------- 2024-04-12 17:01:10.261 INFO (SyncWorker_27) [custom_components.dirigera_platform] [{'id': 'd613d6b7-098e-4bdd-adff-16cc16aaf161_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-03-05T18:42:33.000Z', 'isReachable': False, 'lastSeen': '2024-04-12T16:53:53.000Z', 'attributes': {'customName': 'Światło 4', 'model': 'TRADFRI bulb E27 WS opal 1000lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.3.095', 'hardwareVersion': '1', 'serialNumber': '680AE2FFFE11D61A', 'productCode': 'LED1732G11E27', 'isOn': True, 'startupOnOff': 'startOn', 'lightLevel': 100, 'startUpCurrentLevel': -1, 'colorTemperature': 4000, 'colorTemperatureMin': 4000, 'colorTemperatureMax': 2202, 'startupTemperature': -1, 'colorMode': 'temperature', 'identifyStarted': '2024-03-05T18:43:58.000Z', 'identifyPeriod': 15, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'colorTemperature']}, 'room': {'id': 'da936cc0-f77b-48b6-83b5-7809a394f5d7', 'name': 'Salon', 'color': 'ikea_blue_no_63', 'icon': 'rooms_sofa'}, 'deviceSet': [{'id': '12f5e91a-bcb2-4dfb-841a-ba093c0a9e64', 'name': 'Żyrandol Salon', 'icon': 'lighting_chandelier'}], 'remoteLinks': [], 'isHidden': False}, {'id': 'b4a1385d-c3ac-491c-bde4-6b81733a0d47_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-03-05T19:00:31.000Z', 'isReachable': False, 'lastSeen': '2024-04-12T16:52:06.000Z', 'attributes': {'customName': 'Światło 5', 'model': 'TRADFRIbulbGU10WS345lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '1.0.012', 'hardwareVersion': '1', 'serialNumber': '9035EAFFFE30B3B8', 'productCode': 'LED2005R5', 'isOn': True, 'startupOnOff': 'startOn', 'lightLevel': 100, 'startUpCurrentLevel': -1, 'colorTemperature': 3717, 'colorTemperatureMin': 4000, 'colorTemperatureMax': 2202, 'startupTemperature': -1, 'colorMode': 'temperature', 'identifyStarted': '2000-01-01T00:00:00.000Z', 'identifyPeriod': 0, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'colorTemperature']}, 'room': {'id': '51349cda-556c-4d2c-a0f0-983a06699b84', 'name': 'Julia', 'color': 'ikea_pink_no_8', 'icon': 'rooms_play_area'}, 'deviceSet': [], 'remoteLinks': ['45a42119-2f56-4326-8b80-907af9b064f4_1'], 'isHidden': False}, {'id': '085bd163-c0b0-40a4-bb31-8091328d6ce3_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-03-05T18:42:30.000Z', 'isReachable': False, 'lastSeen': '2024-04-12T16:53:53.000Z', 'attributes': {'customName': 'Światło 2', 'model': 'TRADFRI bulb E27 WS opal 1000lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.3.095', 'hardwareVersion': '1', 'serialNumber': 'CCCCCCFFFE3C7738', 'productCode': 'LED1732G11E27', 'isOn': True, 'startupOnOff': 'startOn', 'lightLevel': 100, 'startUpCurrentLevel': -1, 'colorTemperature': 4000, 'colorTemperatureMin': 4000, 'colorTemperatureMax': 2202, 'startupTemperature': -1, 'colorMode': 'temperature', 'identifyStarted': '2024-03-05T18:43:58.000Z', 'identifyPeriod': 15, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'colorTemperature']}, 'room': {'id': 'da936cc0-f77b-48b6-83b5-7809a394f5d7', 'name': 'Salon', 'color': 'ikea_blue_no_63', 'icon': 'rooms_sofa'}, 'deviceSet': [{'id': '12f5e91a-bcb2-4dfb-841a-ba093c0a9e64', 'name': 'Żyrandol Salon', 'icon': 'lighting_chandelier'}], 'remoteLinks': [], 'isHidden': False}, {'id': '33ce7f5e-e0f2-4f0a-9e7f-f77a805382a2_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-03-05T19:00:35.000Z', 'isReachable': False, 'lastSeen': '2024-04-12T16:51:58.000Z', 'attributes': {'customName': 'Światło 7', 'model': 'TRADFRI bulb GU10 WS 400lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.3.095', 'hardwareVersion': '1', 'serialNumber': 'EC1BBDFFFE467F3F', 'productCode': 'LED1737R5GU10', 'isOn': True, 'startupOnOff': 'startOn', 'lightLevel': 100, 'startUpCurrentLevel': -1, 'colorTemperature': 3703, 'colorTemperatureMin': 4000, 'colorTemperatureMax': 2202, 'startupTemperature': -1, 'colorMode': 'temperature', 'identifyStarted': '2000-01-01T00:00:00.000Z', 'identifyPeriod': 0, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'colorTemperature']}, 'room': {'id': '51349cda-556c-4d2c-a0f0-983a06699b84', 'name': 'Julia', 'color': 'ikea_pink_no_8', 'icon': 'rooms_play_area'}, 'deviceSet': [], 'remoteLinks': ['45a42119-2f56-4326-8b80-907af9b064f4_1'], 'isHidden': False}, {'id': '36fee6ac-4395-44c2-acac-a0ef7a2c9cc0_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-03-05T18:42:22.000Z', 'isReachable': False, 'lastSeen': '2024-04-12T16:53:51.000Z', 'attributes': {'customName': 'Światło 1', 'model': 'TRADFRI bulb E27 WS opal 1000lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.3.095', 'hardwareVersion': '1', 'serialNumber': '000D6FFFFE5ADEE7', 'productCode': 'LED1732G11E27', 'isOn': True, 'startupOnOff': 'startOn', 'lightLevel': 100, 'startUpCurrentLevel': -1, 'colorTemperature': 4000, 'colorTemperatureMin': 4000, 'colorTemperatureMax': 2202, 'startupTemperature': -1, 'colorMode': 'temperature', 'identifyStarted': '2024-03-05T18:43:58.000Z', 'identifyPeriod': 15, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'colorTemperature']}, 'room': {'id': 'da936cc0-f77b-48b6-83b5-7809a394f5d7', 'name': 'Salon', 'color': 'ikea_blue_no_63', 'icon': 'rooms_sofa'}, 'deviceSet': [{'id': '12f5e91a-bcb2-4dfb-841a-ba093c0a9e64', 'name': 'Żyrandol Salon', 'icon': 'lighting_chandelier'}], 'remoteLinks': [], 'isHidden': False}, {'id': '678aacf3-ceb1-46b4-8938-eb16634d25d6_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-03-05T19:00:31.000Z', 'isReachable': False, 'lastSeen': '2024-04-12T16:52:05.000Z', 'attributes': {'customName': 'Światło 6', 'model': 'TRADFRI bulb GU10 WS 400lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.3.095', 'hardwareVersion': '1', 'serialNumber': 'CCCCCCFFFEDDF64C', 'productCode': 'LED1737R5GU10', 'isOn': True, 'startupOnOff': 'startOn', 'lightLevel': 100, 'startUpCurrentLevel': -1, 'colorTemperature': 3703, 'colorTemperatureMin': 4000, 'colorTemperatureMax': 2202, 'startupTemperature': -1, 'colorMode': 'temperature', 'identifyStarted': '2000-01-01T00:00:00.000Z', 'identifyPeriod': 0, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'colorTemperature']}, 'room': {'id': '51349cda-556c-4d2c-a0f0-983a06699b84', 'name': 'Julia', 'color': 'ikea_pink_no_8', 'icon': 'rooms_play_area'}, 'deviceSet': [], 'remoteLinks': ['45a42119-2f56-4326-8b80-907af9b064f4_1'], 'isHidden': False}, {'id': 'd9572831-60bc-4e89-8f03-2a3a3a24be31_1', 'relationId': 'd9572831-60bc-4e89-8f03-2a3a3a24be31', 'type': 'gateway', 'deviceType': 'gateway', 'createdAt': '2023-12-15T15:44:20.614Z', 'isReachable': True, 'lastSeen': '2024-04-12T15:01:00.445Z', 'attributes': {'customName': 'Dom', 'model': 'DIRIGERA Hub for smart products', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.556.0', 'hardwareVersion': 'P2.5', 'serialNumber': 'd9572831-60bc-4e89-8f03-2a3a3a24be31', 'identifyStarted': '2000-01-01T00:00:00.000Z', 'identifyPeriod': 0, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoDownload', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00', 'permittingJoin': False, 'backendConnected': True, 'backendConnectionPersistent': True, 'backendOnboardingComplete': True, 'backendRegion': 'eu-central-1', 'backendCountryCode': 'PL', 'userConsents': [{'name': 'analytics', 'value': 'enabled'}, {'name': 'diagnostics', 'value': 'enabled'}], 'logLevel': 3, 'coredump': False, 'timezone': 'Europe/Warsaw', 'nextSunSet': '2024-04-12T17:29:00.000Z', 'nextSunRise': '2024-04-13T03:43:00.000Z', 'homestate': 'home', 'countryCode': 'XZ', 'coordinates': {'latitude': 52.306306306306304, 'longitude': 20.98133894019359, 'accuracy': -1}, 'isOn': False}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'permittingJoin', 'userConsents', 'logLevel', 'time', 'timezone', 'countryCode', 'coordinates']}, 'deviceSet': [], 'remoteLinks': []}, {'id': '45a42119-2f56-4326-8b80-907af9b064f4_1', 'type': 'controller', 'deviceType': 'lightController', 'createdAt': '2024-03-05T19:03:05.000Z', 'isReachable': True, 'lastSeen': '2024-04-12T13:02:11.000Z', 'attributes': {'customName': 'Pilot Julia', 'model': 'TRADFRI remote control', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '24.4.5', 'hardwareVersion': '1', 'serialNumber': 'EC1BBDFFFE8C6358', 'productCode': 'E1810', 'batteryPercentage': 50, 'isOn': False, 'lightLevel': 1, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00', 'circadianPresets': []}, 'capabilities': {'canSend': ['isOn', 'lightLevel'], 'canReceive': ['customName']}, 'room': {'id': '51349cda-556c-4d2c-a0f0-983a06699b84', 'name': 'Julia', 'color': 'ikea_pink_no_8', 'icon': 'rooms_play_area'}, 'deviceSet': [], 'remoteLinks': [], 'isHidden': False}, {'id': 'c8c88287-41d6-407a-b087-fcea6f3b0332_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-03-05T18:42:31.000Z', 'isReachable': False, 'lastSeen': '2024-04-12T16:53:34.000Z', 'attributes': {'customName': 'Światło 3', 'model': 'TRADFRI bulb E27 WS opal 1000lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.3.095', 'hardwareVersion': '1', 'serialNumber': 'CCCCCCFFFE3C7DEA', 'productCode': 'LED1732G11E27', 'isOn': True, 'startupOnOff': 'startOn', 'lightLevel': 100, 'startUpCurrentLevel': -1, 'colorTemperature': 4000, 'colorTemperatureMin': 4000, 'colorTemperatureMax': 2202, 'startupTemperature': -1, 'colorMode': 'temperature', 'identifyStarted': '2024-03-05T18:43:58.000Z', 'identifyPeriod': 15, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'colorTemperature']}, 'room': {'id': 'da936cc0-f77b-48b6-83b5-7809a394f5d7', 'name': 'Salon', 'color': 'ikea_blue_no_63', 'icon': 'rooms_sofa'}, 'deviceSet': [{'id': '12f5e91a-bcb2-4dfb-841a-ba093c0a9e64', 'name': 'Żyrandol Salon', 'icon': 'lighting_chandelier'}], 'remoteLinks': [], 'isHidden': False}] 2024-04-12 17:01:10.262 INFO (SyncWorker_27) [custom_components.dirigera_platform] -------------- 2024-04-12 17:01:10.262 INFO (SyncWorker_27) [custom_components.dirigera_platform] === END Devices JSON ===

Badring watersensor

Can you add the Badring watersensor please?
I would love to help supplying the json but I fail to get it or understand how to get it. I do have the Badring watersensor at home now, so if you have more detailed instructions, let me know.

Parasoll slow response

I notice with the Parasoll doorsensor, that not every event is captured via Dirigera integration or it comes with a delay. In the IKEA iPhone App I see the door open and close actions immediately.
Is there some sort of delay implemented maybe? When I open the door and close it fast, no change is recorded in HA. In the IKEA app the change is there.
Next to that I see the following in the debug logs, so maybe more is going on?
2024-04-17 17:53:08.243 DEBUG (Thread-2) [custom_components.dirigera_platform] rcvd message : {"id":"891622ef-1e1e-4695-8d61-8039e0b83342","time":"2024-04-17T15:53:08.000Z","specversion":"3.150.0","source":"urn:com:ikea:homesmart:iotc:zigbee","type":"deviceStateChanged","data":{"id":"35342df4-c2f1-4f38-a34e-4b8704e9ebd3_1","type":"sensor","deviceType":"motionSensor","createdAt":"2024-04-15T11:37:10.000Z","isReachable":true,"lastSeen":"2024-04-17T17:50:08.000Z","attributes":{"isDetected":false,"sensorConfig":{"scheduleOn":false,"onDuration":120,"schedule":{"onCondition":{"time":"22:00"},"offCondition":{"time":"06:00"}}},"circadianPresets":[]},"remoteLinks":[]}}
2024-04-17 17:53:08.243 DEBUG (Thread-2) [custom_components.dirigera_platform] Setting 35342df4-c2f1-4f38-a34e-4b8704e9ebd3_1 reachable as True
2024-04-17 17:53:08.244 DEBUG (Thread-2) [custom_components.dirigera_platform] device type of message motionSensor
2024-04-17 17:53:08.245 DEBUG (Thread-2) [custom_components.dirigera_platform] setting is_detected to False
2024-04-17 17:53:08.245 DEBUG (Thread-2) [custom_components.dirigera_platform] attribute sensorConfig not in list of device type motionSensor, ignoring update...
2024-04-17 17:53:08.245 DEBUG (Thread-2) [custom_components.dirigera_platform] attribute circadianPresets not in list of device type motionSensor, ignoring update...

Error while setting up dirigera_platform platform for sensor

After setting up the integration I get the following error in the logs.

Also only my lights are showing up. The SOMRIG shortcut button is not. (the STYRBAR Remote control also not, but this seems to be expected.)

Error while setting up dirigera_platform platform for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 350, in _async_setup_platform await asyncio.shield(awaitable) File "/config/custom_components/dirigera_platform/sensor.py", line 55, in async_setup_entry hub_controllers = await hass.async_add_executor_job(hub.get_controllers) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/dirigera/hub/hub.py", line 237, in get_controllers return [dict_to_controller(controller, self) for controller in controllers] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/dirigera/devices/controller.py", line 34, in dict_to_controller return Controller(dirigeraClient=dirigera_client, **data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pydantic/main.py", line 341, in __init__ raise validation_error pydantic.error_wrappers.ValidationError: 1 validation error for Controller room field required (type=value_error.missing)

Light bulbs not found; error in the log

Logger: homeassistant.components.light
Source: helpers/entity_platform.py:344
Integration: Light (documentation, issues)
First occurred: 19:41:39 (1 occurrences)
Last logged: 19:41:39

Error while setting up dirigera_platform platform for light
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 344, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/dirigera_platform/light.py", line 44, in async_setup_entry
hub_lights = await hass.async_add_executor_job(hub.get_lights)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/deps/lib/python3.12/site-packages/dirigera/hub/hub.py", line 137, in get_lights
return [dict_to_light(light, self) for light in lights]
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/deps/lib/python3.12/site-packages/dirigera/devices/light.py", line 109, in dict_to_light
return Light(
^^^^^^
File "/usr/local/lib/python3.12/site-packages/pydantic/main.py", line 341, in init
raise validation_error
pydantic.error_wrappers.ValidationError: 1 validation error for Light
room
field required (type=value_error.missing)

Error installing

I added the repo on HACS, and when I go to add the IKEA Dirigera integration, I get an error:

error_dirigera

And in the logs I see:

2024-05-17 14:10:25.324 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading flow for integration dirigera_platform: No module named 'dirigera'

Non-IKEA sensors support?

Hi. It is possible to connect non-IKEA sensors to the Dirigera hub. Like a smoke detector for instance.
Will these foreign sensors be visible as a device/entity? Or could that be made possible with some custom settings/forms/configs?
I am about to buy a smoke detector and connect it to the Dirigera hub, would be a pity if I would not get it into HA.

No screen config

I did as described in the documentation, and I was able to install the integration, however I cannot get to the configuration screen.
So I can't save the IP address.
Home assistant v2024.1.5
HACS v1.34.0

How to use Remote Controllers in HA?

With the newest version, all paired remotes appeared as sensor entities in HA, but only showing the battery info:
image
How does it really work? Are they being treated as HA events?

Parasoll Open/Close sensor entity missing

Hi,
Parasoll Door/Window sensor does not seem to expose sensor for open/close status. The only sensor will only reflect if device is online with on regardless of open/close status. Is it possible to add open/close sensor entity?
Screen Shot 2024-03-05 at 21 57 55 PM

JSON dump:

[custom_components.dirigera_platform] [{'id': 'b6f5fdf9-e443-4c91-a14e-8c7fc875194d_1', 'relationId': 'b6f5fdf9-e443-4c91-a14e-8c7fc875194d', 'type': 'gateway', 'deviceType': 'gateway', 'createdAt': '2023-12-14T14:08:11.961Z', 'isReachable': True, 'lastSeen': '2024-03-05T20:35:00.475Z', 'attributes': {'customName': 'Ikea Housy', 'model': 'DIRIGERA Hub for smart products', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.505.2', 'hardwareVersion': 'P2.5', 'serialNumber': 'b6f5fdf9-e443-4c91-a14e-8c7fc875194d', 'identifyStarted': '2023-12-14T14:08:14.000Z', 'identifyPeriod': 65534, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoDownload', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00', 'permittingJoin': False, 'backendConnected': True, 'backendConnectionPersistent': True, 'backendOnboardingComplete': True, 'backendRegion': 'eu-central-1', 'backendCountryCode': 'ES', 'userConsents': [{'name': 'analytics', 'value': 'disabled'}, {'name': 'diagnostics', 'value': 'enabled'}], 'logLevel': 3, 'coredump': False, 'timezone': 'Europe/Madrid', 'nextSunSet': '2024-03-06T17:48:00.000Z', 'nextSunRise': '2024-03-06T06:18:00.000Z', 'homestateValue': 'home', 'homestateLastChanged': '2023-12-14T14:08:11Z', 'countryCode': 'XZ', 'coordinates': {'latitude': 41.4126408, 'longitude': 2.2175444, 'accuracy': -1}, 'isOn': False}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'permittingJoin', 'userConsents', 'logLevel', 'time', 'timezone', 'countryCode', 'coordinates']}, 'deviceSet': [], 'remoteLinks': []}, {'id': '49aed858-cc63-42c2-add1-43696d155962_1', 'type': 'sensor', 'deviceType': 'openCloseSensor', 'createdAt': '2024-02-26T16:58:28.000Z', 'isReachable': True, 'lastSeen': '2024-03-05T21:34:38.000Z', 'customIcon': 'placement_door', 'attributes': {'customName': 'Parasoll door sensor', 'firmwareVersion': '1.0.19', 'hardwareVersion': '1', 'manufacturer': 'IKEA of Sweden', 'model': 'PARASOLL Door/Window Sensor', 'productCode': 'E2013', 'serialNumber': '3C2EF5FFFE4210BE', 'batteryPercentage': 85, 'identifyPeriod': 0, 'identifyStarted': '2000-01-01T00:00:00.000Z', 'isOpen': False, 'permittingJoin': False}, 'capabilities': {'canSend': [], 'canReceive': ['customName']}, 'room': {'id': 'b2d74682-83b0-4b45-87be-b3ced9c2651c', 'name': 'Entrance', 'color': 'ikea_yellow_no_31', 'icon': 'rooms_door'}, 'deviceSet': [], 'remoteLinks': [], 'isHidden': False}]

Thanks.

LightAttributes object has no attribute hue

Hi, I'm getting the following error about LightAttributes not containing the object hue while trying to setup my TRADFRI light bulbs.

Logger: homeassistant.components.light
Source: helpers/entity_platform.py:533
Integration: Light (documentation, issues)
First occurred: 10:55:03 PM (1 occurrences)
Last logged: 10:55:03 PM

Error adding entities for domain light with platform dirigera_platform
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/homeassistant/helpers/entity_platform.py", line 533, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/local/lib/python3.12/site-packages/homeassistant/helpers/entity_platform.py", line 782, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/local/lib/python3.12/site-packages/homeassistant/helpers/entity.py", line 1325, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/local/lib/python3.12/site-packages/homeassistant/helpers/entity.py", line 989, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/local/lib/python3.12/site-packages/homeassistant/helpers/entity.py", line 1110, in _async_write_ha_state
    state, attr, capabilities, shadowed_attr = self.__async_calculate_state()
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/homeassistant/helpers/entity.py", line 1049, in __async_calculate_state
    attr.update(self.state_attributes or {})
                ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/homeassistant/components/light/__init__.py", line 1121, in state_attributes
    color_mode = self._light_internal_color_mode if _is_on else None
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/homeassistant/components/light/__init__.py", line 903, in _light_internal_color_mode
    if ColorMode.HS in supported and self.hs_color is not None:
                                     ^^^^^^^^^^^^^
  File "/config/custom_components/dirigera_platform/light.py", line 117, in hs_color
    return (self._json_data.attributes.hue, self._json_data.attributes.saturation)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'LightAttributes' object has no attribute 'hue'

Trigger scenes

The HA integration for Philips Hue can trigger Hue defined scenes through a service call. Having the same functionality for Dirigera is conventient for smart home setups where most or all lighting is managed by the Ikea ecosystem. The functionality for triggering scenes is already available through the underlying Dirigera integration.

Invalid supported color modes

I get below message in HA logs

Rejestrator: homeassistant.components.light
Źródło: components/light/__init__.py:1165
integracja: Światło (dokumentacja, Problemy)
Pierwsze zdarzenie: 14:50:01 (7 zdarzenia)
Ostatnio zalogowany: 14:50:01

None (<class 'custom_components.dirigera_platform.light.ikea_bulb'>) sets invalid supported color modes [<ColorMode.BRIGHTNESS: 'brightness'>, <ColorMode.COLOR_TEMP: 'color_temp'>], this will stop working in Home Assistant Core 2025.3, please create a bug report at https://github.com/sanjoyg/dirigera_platform

Error with vindstyrka env sensor

while loading the dirigera devices I get this error for my vindstyrka environment sensor:

Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:344
Integration: Sensor (documentation, issues)
First occurred: 17:49:44 (1 occurrences)
Last logged: 17:49:44

Error while setting up dirigera_platform platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 344, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/dirigera_platform/sensor.py", line 55, in async_setup_entry
env_sensors.append(ikea_vindstyrka_temperature(env_device))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/dirigera_platform/sensor.py", line 159, in init
super().init(ikea_env_device, "TEMP", "Temperature")
File "/config/custom_components/dirigera_platform/sensor.py", line 131, in init
self._unique_id = self._ikea_env_device.unique_id() + id_suffix
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'str' object is not callable

though that might be from the fact, that I have the latest dirigera (1.0.9) installed?

JSON dump:

{
      "id":"1468825a-6725-440f-9606-97e7b0834024_1",
      "type":"sensor",
      "deviceType":"environmentSensor",
      "createdAt":"2023-09-17T10:51:59.000Z",
      "isReachable":true,
      "lastSeen":"2024-02-27T17:53:49.000Z",
      "attributes":{
         "customName":"Luftsensor",
         "model":"VINDSTYRKA",
         "manufacturer":"IKEA of Sweden",
         "firmwareVersion":"1.0.11",
         "hardwareVersion":"1",
         "serialNumber":"30FB10FFFEDF8CC0",
         "productCode":"E2112",
         "currentTemperature":21,
         "currentRH":47,
         "currentPM25":41,
         "maxMeasuredPM25":999,
         "minMeasuredPM25":0,
         "vocIndex":36,
         "identifyStarted":"2000-01-01T00:00:00.000Z",
         "identifyPeriod":0,
         "permittingJoin":false,
         "otaStatus":"upToDate",
         "otaState":"readyToCheck",
         "otaProgress":0,
         "otaPolicy":"autoUpdate",
         "otaScheduleStart":"00:00",
         "otaScheduleEnd":"00:00"
      },
      "capabilities":{
         "canSend":[
            
         ],
         "canReceive":[
            "customName"
         ]
      },
      "room":{
         "id":"1a846fdc-317c-4d94-8722-cb0196256a16",
         "name":"Wohnzimmer",
         "color":"ikea_green_no_66",
         "icon":"rooms_arm_chair"
      },
      "deviceSet":[
         
      ],
      "remoteLinks":[
         
      ],
      "isHidden":false
   }

TRADFRI motion sensor

Thank you for the project appears to be working fine, however I notice that the TRADFRI motion sensor is persistently off despite it turning lights on and off.

image

Not sure if it's something that's easy to sort or if I could be of any assitance here, but would gladly help if I can. Thank you

2024-04-17 20:27:12.374 INFO (SyncWorker_55) [custom_components.dirigera_platform] === START Devices JSON ===
2024-04-17 20:27:12.374 INFO (SyncWorker_55) [custom_components.dirigera_platform] --------------
2024-04-17 20:27:12.642 INFO (SyncWorker_55) [custom_components.dirigera_platform] [{'id': '2ef1a5bf-b275-41bb-a381-e1b4c7ba73a9_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2023-10-21T19:19:46.000Z', 'isReachable': True, 'lastSeen': '2024-04-17T12:10:33.000Z', 'attributes': {'customName': 'Porch light ', 'model': 'STOFTMOLN ceiling/wall lamp WW24', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '1.0.006', 'hardwareVersion': '1', 'serialNumber': '6C5CB1FFFEB129D7', 'productCode': 'T2035', 'isOn': False, 'startupOnOff': 'startPrevious', 'lightLevel': 100, 'startUpCurrentLevel': -1, 'identifyStarted': '2000-01-01T00:00:00.000Z', 'identifyPeriod': 0, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel']}, 'room': {'id': '0968ebf6-a5fd-4bb0-95b0-ec58a3334176', 'name': 'Porch', 'color': 'ikea_orange_no_11', 'icon': 'rooms_coat_hanger'}, 'deviceSet': [], 'remoteLinks': ['0ad8786c-53e2-4b70-8fb7-e8f7bdd5e3e3_1', '7cc9d39b-6345-4fef-85ed-72c461878f8e_1'], 'isHidden': False}, {'id': 'dc65f52d-baf7-4419-97a6-b80dd65a1996_1', 'relationId': 'dc65f52d-baf7-4419-97a6-b80dd65a1996', 'type': 'gateway', 'deviceType': 'gateway', 'createdAt': '2023-08-01T14:40:13.399Z', 'isReachable': True, 'lastSeen': '2024-04-17T19:27:00.380Z', 'attributes': {'customName': 'Almondell', 'model': 'DIRIGERA Hub for smart products', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.556.0', 'hardwareVersion': 'P2.5', 'serialNumber': 'dc65f52d-baf7-4419-97a6-b80dd65a1996', 'identifyStarted': '2024-04-11T02:48:30.000Z', 'identifyPeriod': 65534, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoDownload', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00', 'permittingJoin': False, 'backendConnected': True, 'backendConnectionPersistent': True, 'backendOnboardingComplete': True, 'backendRegion': 'eu-west-1', 'backendCountryCode': 'GB', 'userConsents': [{'name': 'analytics', 'value': 'disabled'}, {'name': 'diagnostics', 'value': 'enabled'}], 'logLevel': 3, 'coredump': False, 'timezone': 'Europe/London', 'nextSunSet': '2024-04-18T19:27:00.000Z', 'nextSunRise': '2024-04-18T05:01:00.000Z', 'homestate': 'home', 'countryCode': 'XZ', 'coordinates': {'latitude': 55.909909909909906, 'longitude': -3.4718298862129346, 'accuracy': -1}, 'isOn': False}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'permittingJoin', 'userConsents', 'logLevel', 'time', 'timezone', 'countryCode', 'coordinates']}, 'deviceSet': [], 'remoteLinks': []}, {'id': '691ac046-5225-419b-b806-7bce80dcce9d_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2023-10-23T19:05:11.000Z', 'isReachable': True, 'lastSeen': '2024-04-17T12:04:39.000Z', 'attributes': {'customName': 'Front Light left ', 'model': 'TRADFRI bulb GU10 WW 400lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.3.093', 'hardwareVersion': '2', 'serialNumber': '84BA20FFFEC76F8A', 'productCode': 'LED1837R5', 'isOn': False, 'startupOnOff': 'startPrevious', 'lightLevel': 100, 'startUpCurrentLevel': -1, 'identifyStarted': '2000-01-01T00:00:00.000Z', 'identifyPeriod': 0, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel']}, 'room': {'id': '0968ebf6-a5fd-4bb0-95b0-ec58a3334176', 'name': 'Porch', 'color': 'ikea_orange_no_11', 'icon': 'rooms_coat_hanger'}, 'deviceSet': [{'id': 'c8e59cca-f28d-4861-83c5-780a45c76ea1', 'name': 'Front light ', 'icon': 'lighting_wall_lamp'}], 'remoteLinks': ['0ad8786c-53e2-4b70-8fb7-e8f7bdd5e3e3_1'], 'isHidden': False}, {'id': '03933f88-23b8-49b1-b99e-e4d33e6ae5c2_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2023-10-22T14:38:44.000Z', 'isReachable': True, 'lastSeen': '2024-04-17T09:01:41.000Z', 'attributes': {'customName': 'Ceiling light ', 'model': 'STOFTMOLN ceiling/wall lamp WW37', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '1.0.006', 'hardwareVersion': '1', 'serialNumber': '90395EFFFE0C9711', 'productCode': 'T2037', 'isOn': False, 'startupOnOff': 'startPrevious', 'lightLevel': 100, 'startUpCurrentLevel': -1, 'identifyStarted': '2023-10-24T18:35:11.000Z', 'identifyPeriod': 15, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel']}, 'room': {'id': 'a6663ac4-6ea3-4dca-889d-81ed5ee2a227', 'name': 'Living room', 'color': 'ikea_green_no_65', 'icon': 'rooms_sofa'}, 'deviceSet': [], 'remoteLinks': [], 'isHidden': False}, {'id': '03f97b72-9f5a-4bf8-ab64-d1e0d0095bdb_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-01-03T13:27:25.000Z', 'isReachable': True, 'lastSeen': '2024-04-17T20:13:16.000Z', 'customIcon': 'products_ceiling_light', 'attributes': {'customName': 'Downstairs ', 'model': 'STOFTMOLN ceiling/wall lamp WW24', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '1.0.006', 'hardwareVersion': '1', 'serialNumber': '30FB10FFFE22F4B4', 'productCode': 'T2035', 'isOn': False, 'startupOnOff': 'startPrevious', 'lightLevel': 100, 'startUpCurrentLevel': -1, 'identifyStarted': '2000-01-01T00:00:00.000Z', 'identifyPeriod': 0, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel']}, 'room': {'id': '0968ebf6-a5fd-4bb0-95b0-ec58a3334176', 'name': 'Porch', 'color': 'ikea_orange_no_11', 'icon': 'rooms_coat_hanger'}, 'deviceSet': [], 'remoteLinks': ['a70155e0-1f2a-4781-8fb6-a16f5c81efa6_1', '0ad8786c-53e2-4b70-8fb7-e8f7bdd5e3e3_1', '7cc9d39b-6345-4fef-85ed-72c461878f8e_1'], 'isHidden': False}, {'id': 'e3d91dc1-d285-4f51-b9c6-f6a4a547552c_1', 'type': 'controller', 'deviceType': 'lightController', 'createdAt': '2024-04-12T08:08:02.000Z', 'isReachable': True, 'lastSeen': '2024-04-17T06:51:12.000Z', 'attributes': {'customName': 'Living Room switch ', 'firmwareVersion': '1.0.57', 'hardwareVersion': '1', 'manufacturer': 'IKEA of Sweden', 'model': 'RODRET Dimmer', 'productCode': 'E2201', 'serialNumber': '6C5CB1FFFE8E7315', 'batteryPercentage': 100, 'isOn': False, 'lightLevel': 1, 'permittingJoin': False, 'otaPolicy': 'autoUpdate', 'otaProgress': 0, 'otaScheduleEnd': '00:00', 'otaScheduleStart': '00:00', 'otaState': 'readyToCheck', 'otaStatus': 'upToDate', 'circadianPresets': []}, 'capabilities': {'canSend': ['isOn', 'lightLevel'], 'canReceive': ['customName']}, 'room': {'id': 'a6663ac4-6ea3-4dca-889d-81ed5ee2a227', 'name': 'Living room', 'color': 'ikea_green_no_65', 'icon': 'rooms_sofa'}, 'deviceSet': [], 'remoteLinks': [], 'isHidden': False}, {'id': '0ad8786c-53e2-4b70-8fb7-e8f7bdd5e3e3_1', 'type': 'controller', 'deviceType': 'lightController', 'createdAt': '2024-04-12T09:50:47.000Z', 'isReachable': True, 'lastSeen': '2024-04-17T08:34:28.000Z', 'attributes': {'customName': 'Porch switch ', 'firmwareVersion': '1.0.57', 'hardwareVersion': '1', 'manufacturer': 'IKEA of Sweden', 'model': 'RODRET Dimmer', 'productCode': 'E2201', 'serialNumber': '6C5CB1FFFE81B4EC', 'batteryPercentage': 100, 'isOn': False, 'lightLevel': 1, 'permittingJoin': False, 'otaPolicy': 'autoUpdate', 'otaProgress': 0, 'otaScheduleEnd': '00:00', 'otaScheduleStart': '00:00', 'otaState': 'readyToCheck', 'otaStatus': 'upToDate', 'circadianPresets': []}, 'capabilities': {'canSend': ['isOn', 'lightLevel'], 'canReceive': ['customName']}, 'room': {'id': '0968ebf6-a5fd-4bb0-95b0-ec58a3334176', 'name': 'Porch', 'color': 'ikea_orange_no_11', 'icon': 'rooms_coat_hanger'}, 'deviceSet': [], 'remoteLinks': [], 'isHidden': False}, {'id': 'b0998c68-344f-4f90-acc7-6d87c39b8194_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2023-10-23T19:04:09.000Z', 'isReachable': True, 'lastSeen': '2024-04-17T12:05:18.000Z', 'attributes': {'customName': 'Front Light right ', 'model': 'TRADFRI bulb GU10 WW 400lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.3.093', 'hardwareVersion': '2', 'serialNumber': '943469FFFE636275', 'productCode': 'LED1837R5', 'isOn': False, 'startupOnOff': 'startPrevious', 'lightLevel': 100, 'startUpCurrentLevel': -1, 'identifyStarted': '2000-01-01T00:00:00.000Z', 'identifyPeriod': 0, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel']}, 'room': {'id': '0968ebf6-a5fd-4bb0-95b0-ec58a3334176', 'name': 'Porch', 'color': 'ikea_orange_no_11', 'icon': 'rooms_coat_hanger'}, 'deviceSet': [{'id': 'c8e59cca-f28d-4861-83c5-780a45c76ea1', 'name': 'Front light ', 'icon': 'lighting_wall_lamp'}], 'remoteLinks': ['0ad8786c-53e2-4b70-8fb7-e8f7bdd5e3e3_1'], 'isHidden': False}, {'id': '7cc9d39b-6345-4fef-85ed-72c461878f8e_1', 'type': 'controller', 'deviceType': 'lightController', 'createdAt': '2024-04-12T10:01:54.000Z', 'isReachable': True, 'lastSeen': '2024-04-17T08:46:35.000Z', 'attributes': {'customName': 'Downstairs switch ', 'firmwareVersion': '1.0.57', 'hardwareVersion': '1', 'manufacturer': 'IKEA of Sweden', 'model': 'RODRET Dimmer', 'productCode': 'E2201', 'serialNumber': '5CC7C1FFFE88DE67', 'batteryPercentage': 100, 'isOn': False, 'lightLevel': 1, 'permittingJoin': False, 'otaPolicy': 'autoUpdate', 'otaProgress': 0, 'otaScheduleEnd': '00:00', 'otaScheduleStart': '00:00', 'otaState': 'readyToCheck', 'otaStatus': 'upToDate', 'circadianPresets': []}, 'capabilities': {'canSend': ['isOn', 'lightLevel'], 'canReceive': ['customName']}, 'room': {'id': '0968ebf6-a5fd-4bb0-95b0-ec58a3334176', 'name': 'Porch', 'color': 'ikea_orange_no_11', 'icon': 'rooms_coat_hanger'}, 'deviceSet': [], 'remoteLinks': [], 'isHidden': False}, {'id': 'a70155e0-1f2a-4781-8fb6-a16f5c81efa6_1', 'type': 'sensor', 'deviceType': 'motionSensor', 'createdAt': '2024-01-11T19:31:33.000Z', 'isReachable': True, 'lastSeen': '2024-04-17T20:11:16.000Z', 'attributes': {'customName': 'Sensor 1', 'model': 'TRADFRI motion sensor', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '24.4.5', 'hardwareVersion': '1', 'serialNumber': '142D41FFFE208EC9', 'productCode': 'E1745', 'batteryPercentage': 90, 'isOn': False, 'lightLevel': 1, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00', 'sensorConfig': {'scheduleOn': True, 'onDuration': 120, 'schedule': {'onCondition': {'time': 'sunset', 'offset': -30}, 'offCondition': {'time': 'sunrise'}}}, 'circadianPresets': []}, 'capabilities': {'canSend': ['isOn', 'lightLevel'], 'canReceive': ['customName']}, 'room': {'id': '0968ebf6-a5fd-4bb0-95b0-ec58a3334176', 'name': 'Porch', 'color': 'ikea_orange_no_11', 'icon': 'rooms_coat_hanger'}, 'deviceSet': [], 'remoteLinks': [], 'isHidden': False}, {'id': 'e9843419-b56b-4cee-a3af-1645b495271a_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2023-10-21T19:10:59.000Z', 'isReachable': True, 'lastSeen': '2024-04-17T14:29:29.000Z', 'customIcon': 'products_ceiling_light', 'attributes': {'customName': 'Table light ', 'model': 'STOFTMOLN ceiling/wall lamp WW37', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '1.0.006', 'hardwareVersion': '1', 'serialNumber': '3425B4FFFE7B506B', 'productCode': 'T2037', 'isOn': False, 'startupOnOff': 'startPrevious', 'lightLevel': 86, 'startUpCurrentLevel': -1, 'identifyStarted': '2000-01-01T00:00:00.000Z', 'identifyPeriod': 0, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel']}, 'room': {'id': 'a6663ac4-6ea3-4dca-889d-81ed5ee2a227', 'name': 'Living room', 'color': 'ikea_green_no_65', 'icon': 'rooms_sofa'}, 'deviceSet': [], 'remoteLinks': ['e3d91dc1-d285-4f51-b9c6-f6a4a547552c_1'], 'isHidden': False}]
2024-04-17 20:27:12.642 INFO (SyncWorker_55) [custom_components.dirigera_platform] --------------
2024-04-17 20:27:12.642 INFO (SyncWorker_55) [custom_components.dirigera_platform] === END Devices JSON ===

JSON Dump of STARKVIND Table air purifier

As mentioned in the other STARKVIND issue (#6 (comment)), my STARKVIND table (https://www.ikea.com/au/en/p/starkvind-table-with-air-purifier-stained-oak-veneer-white-smart-40461971/) isn't showing in Home Assistant.

Here's the relevant bit from the JSON dump

    {
        'id': '979e33c7-2d25-458a-9178-1bcac4e06b77_1',
        'type': 'airPurifier',
        'deviceType': 'airPurifier',
        'createdAt': '2023-01-21T16: 44: 36.000Z',
        'isReachable': True,
        'lastSeen': '2024-03-25T07: 45: 49.000Z',
        'attributes': {
            'customName': 'Airpurifier1',
            'model': 'STARKVINDAirpurifiertable',
            'manufacturer': 'IKEAofSweden',
            'firmwareVersion': '1.1.001',
            'hardwareVersion': '1',
            'serialNumber': 'XXXXXXXXXXXXXXXXX',
            'productCode': 'E2006',
            'fanMode': 'off',
            'fanModeSequence': 'lowMediumHighAuto',
            'motorState': 0,
            'motorRuntime': 396238,
            'filterElapsedTime': 116489,
            'filterAlarmStatus': False,
            'filterLifetime': 259200,
            'childLock': False,
            'statusLight': True,
            'currentPM25': 0,
            'identifyStarted': '2000-01-01T00: 00: 00.000Z',
            'identifyPeriod': 0,
            'permittingJoin': False,
            'otaStatus': 'upToDate',
            'otaState': 'readyToCheck',
            'otaProgress': 0,
            'otaPolicy': 'autoUpdate',
            'otaScheduleStart': '00: 00',
            'otaScheduleEnd': '00: 00'
        },
        'capabilities': {
            'canSend': [
                
            ],
            'canReceive': [
                'customName',
                'fanMode',
                'fanModeSequence',
                'motorState',
                'childLock',
                'statusLight'
            ]
        },
        'room': {
            'id': 'd89b082e-e2c8-4898-81b6-e952b0e5ab7d',
            'name': 'DiningRoom',
            'color': 'ikea_yellow_no_24',
            'icon': 'rooms_arm_chair'
        },
        'deviceSet': [
            
        ],
        'remoteLinks': [
            
        ],
        'isHidden': False
    }

The other bits on the Dirigera hub (including a VINDSTYRKA sensor and some light globes) work fine, I just get an error for the air purifier table.

Errors showing in the Home Assistant logs;

Error adding entity None for domain sensor with platform dirigera_platform
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 576, in _async_add_entities
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 725, in _async_add_entity
    device = dev_reg.async_get(self.hass).async_get_or_create(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: homeassistant.helpers.device_registry.DeviceRegistry.async_get_or_create() argument after ** must be a mapping, not SensorDeviceClass

--

Error while setting up dirigera_platform platform for fan
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 350, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/dirigera_platform/fan.py", line 48, in async_setup_entry
    hub_air_purifiers = await hass.async_add_executor_job(hub.get_air_purifiers)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/dirigera/hub/hub.py", line 129, in get_air_purifiers
    return [dict_to_air_purifier(air_p, self) for air_p in airpurifiers]
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/dirigera/devices/air_purifier.py", line 77, in dict_to_air_purifier
    return AirPurifier(
           ^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pydantic/main.py", line 341, in __init__
    raise validation_error
pydantic.error_wrappers.ValidationError: 1 validation error for AirPurifier
attributes -> fanMode
  value is not a valid enumeration member; permitted: 'low', 'medium', 'high', 'auto' (type=type_error.enum; enum_values=[<FanModeEnum.LOW: 'low'>, <FanModeEnum.MEDIUM: 'medium'>, <FanModeEnum.HIGH: 'high'>, <FanModeEnum.AUTO: 'auto'>])

Light status updates are very slow (e.g. when changing brightness)

I recently have a IKEA Dirigera hub and moved all my Tradfri lights from my old Tradfri hub to this new hub.
I run Home Assistant on a Raspberry Pi4 and use the latest version of the Dirigera platform.

When I turn on/off a light (or change brightness) via the IKEA Smart app or IKEA remote, then in HA I see that the status of the light is updated very slowly, can take several seconds. With my old Tradfri hub I didn't have these issues, the HA Tradfri component was rather fast.

I don't see real errors in the logging, except for one error every time when I change a light, generated by hub_event_listener.py line 107, which should be info iso error logging I guess:

Logger: custom_components.dirigera_platform
Source: custom_components/dirigera_platform/hub_event_listener.py:107
integration: IKEA Dirigera Hub Integration (documentation, issues)
First occurred: 16:58:03 (1 occurrences)
Last logged: 16:58:03

id='95a165f4-a7cb-4db5-9f35-9fbc9907ddc2_1' relation_id=None type='light' device_type='light' created_at=datetime.datetime(2024, 5, 9, 15, 30, 43, tzinfo=datetime.timezone.utc) is_reachable=True last_seen=datetime.datetime(2024, 5, 15, 16, 51, 59, tzinfo=datetime.timezone.utc) attributes=LightAttributes(custom_name='Lamp tv right', model='TRADFRI bulb E27 WS opal 980lm', manufacturer='IKEA of Sweden', firmware_version='2.3.095', hardware_version='1', serial_number='000B57FFFE9AD822', product_code='LED1545G12', ota_status='upToDate', ota_state='readyToCheck', ota_progress=0, ota_policy='autoUpdate', ota_schedule_start=datetime.time(0, 0), ota_schedule_end=datetime.time(0, 0), startup_on_off=<StartupEnum.START_ON: 'startOn'>, is_on=True, light_level=3, color_temperature=2202, color_temperature_min=4000, color_temperature_max=2202, color_hue=None, color_saturation=None) capabilities=Capabilities(can_send=[], can_receive=['customName', 'isOn', 'lightLevel', 'colorTemperature']) room=Room(id='f24519ce-712b-461e-8cac-7cf286ef119e', name='Room 3', color='ikea_yellow_no_24', icon='rooms_arm_chair') device_set=[] remote_links=['c0bfdc16-8af7-466d-8586-6148c995a9a6_1'] is_hidden=False dirigera_client=<dirigera.hub.hub.Hub object at 0x7f826f69c0>

It's strange that nobody else reported similar issues. So maybe I'm doing something wrong ?
The Dirigera hub works fine via the IKEA Smart app (on IOS and on Android). But it's very slow via the HA Dirigera platform.

Not full spectrum of color temp of smart bulbs

I have 3 types of IKEA smart bulbs
-TRADFRI bulb E27 WS opal 1000lm
-TRADFRI bulb GU10 WS 400lm
-TRADFRIbulbGU10WS345lm

And I have added them in two different ways ( to compare)

  • via this addon
  • and matter

The problem is that with this addon the bulbs entities support less color temp range than via matter.
Printscreen below, of the same bulb added via 2 different integrations ( this addon light with _1, matter _1_2). Can you please extend the range to the proper one?

image

HA status not updated

When operating a door/window sensor, the HA status is not updated. I see next errors in the logging:

=============

Logger: homeassistant.helpers.frame
Source: helpers/frame.py:190
First occurred: 17:38:46 (1 occurrences)
Last logged: 17:38:46

Detected that custom integration 'dirigera_platform' calls async_write_ha_state from a thread at custom_components/dirigera_platform/base_classes.py, line 81: listener.async_schedule_update_ha_state(force_refresh), please report it to the author of the 'dirigera_platform' custom integration

=============

This error originated from a custom integration.

Logger: custom_components.dirigera_platform
Source: custom_components/dirigera_platform/hub_event_listener.py:118
integration: IKEA Dirigera Hub Integration (documentation, issues)
First occurred: 17:38:46 (1 occurrences)
Last logged: 17:38:46

error processing hub event

===========

This error originated from a custom integration.

Logger: custom_components.dirigera_platform
Source: custom_components/dirigera_platform/hub_event_listener.py:119
integration: IKEA Dirigera Hub Integration (documentation, issues)
First occurred: 17:38:46 (1 occurrences)
Last logged: 17:38:46

{"id":"e3379a28-9b21-41b4-89f3-89b6553952a8","time":"2024-05-19T15:38:46.000Z","specversion":"3.150.0","source":"urn:com:ikea:homesmart:iotc:zigbee","type":"deviceStateChanged","data":{"id":"bac3c013-4bba-427c-9b10-2c58b8cff1e3_1","type":"sensor","deviceType":"openCloseSensor","createdAt":"2024-05-16T16:55:14.000Z","isReachable":true,"lastSeen":"2024-05-19T17:38:46.000Z","attributes":{"isOpen":true},"remoteLinks":[]}}

==========

This error originated from a custom integration.

Logger: custom_components.dirigera_platform
Source: custom_components/dirigera_platform/hub_event_listener.py:120
integration: IKEA Dirigera Hub Integration (documentation, issues)
First occurred: 17:38:46 (1 occurrences)
Last logged: 17:38:46

Detected that custom integration 'dirigera_platform' calls async_write_ha_state from a thread at custom_components/dirigera_platform/base_classes.py, line 81: listener.async_schedule_update_ha_state(force_refresh). Please report it to the author of the 'dirigera_platform' custom integration.

========

Also when I switch a light on/off the HA status is not updated. Next error when turning a light off:

========

Logger: homeassistant.helpers.frame
Source: helpers/frame.py:190
First occurred: 18:48:14 (1 occurrences)
Last logged: 18:48:14

Detected that custom integration 'dirigera_platform' calls async_write_ha_state from a thread at custom_components/dirigera_platform/hub_event_listener.py, line 115: entity.async_schedule_update_ha_state(False), please report it to the author of the 'dirigera_platform' custom integration

=========

This error originated from a custom integration.

Logger: custom_components.dirigera_platform
Source: custom_components/dirigera_platform/hub_event_listener.py:118
integration: IKEA Dirigera Hub Integration (documentation, issues)
First occurred: 18:48:14 (1 occurrences)
Last logged: 18:48:14

error processing hub event

========

This error originated from a custom integration.

Logger: custom_components.dirigera_platform
Source: custom_components/dirigera_platform/hub_event_listener.py:119
integration: IKEA Dirigera Hub Integration (documentation, issues)
First occurred: 18:48:14 (1 occurrences)
Last logged: 18:48:14

{"id":"a336de1d-d212-447a-8be7-ba89028a180a","time":"2024-05-19T16:48:14.000Z","specversion":"3.150.0","source":"urn:com:ikea:homesmart:iotc:zigbee","type":"deviceStateChanged","data":{"id":"6afe28e4-fd52-41d6-a3a4-8c68a30098f5_1","type":"light","deviceType":"light","createdAt":"2024-05-11T18:26:18.000Z","isReachable":true,"lastSeen":"2024-05-19T18:48:14.000Z","attributes":{"isOn":false},"remoteLinks":["ceeafbc0-f9f5-4586-8eaa-fa9d587ae4cf_1"]}}

==========

This error originated from a custom integration.

Logger: custom_components.dirigera_platform
Source: custom_components/dirigera_platform/hub_event_listener.py:120
integration: IKEA Dirigera Hub Integration (documentation, issues)
First occurred: 18:48:14 (1 occurrences)
Last logged: 18:48:14

Detected that custom integration 'dirigera_platform' calls async_write_ha_state from a thread at custom_components/dirigera_platform/hub_event_listener.py, line 115: entity.async_schedule_update_ha_state(False). Please report it to the author of the 'dirigera_platform' custom integration.

========

Vallhorn motion sensor always reported as "clear"

Thanks for this integration. I installed this to incorporate a Vallhorn motion sensor to some automations, but unfortunately it's always reported as "clear" when e.g. the Google Home app correctly reports the activity.

I've dumped the JSON with and without motion being detected and I noticed that this sensor does not use the isOn attribute, but the isDetected one instead. Here's the dump while I'm standing in front of the sensor:

{
   "id":[redacted],
   "relationId":[redacted],
   "type":"sensor",
   "deviceType":"motionSensor",
   "createdAt":"2024-03-29T02:18:45.000Z",
   "isReachable":true,
   "lastSeen":"2024-03-30T12:13:56.000Z",
   "attributes":{
      "customName":[redacted],
      "firmwareVersion":"1.0.64",
      "hardwareVersion":"1",
      "manufacturer":"IKEA of Sweden",
      "model":"VALLHORN Wireless Motion Sensor",
      "productCode":"E2134",
      "serialNumber":[redacted],
      "batteryPercentage":87,
      "isOn":false,
      "isDetected":true,
      "motionDetectedDelay":20,
      "identifyPeriod":0,
      "identifyStarted":"2000-01-01T00:00:00.000Z",
      "permittingJoin":false,
      "sensorConfig":{
         "scheduleOn":false,
         "onDuration":600,
         "schedule":{
            "onCondition":{
               "time":"22:00"
            },
            "offCondition":{
               "time":"06:00"
            }
         }
      },
      "circadianPresets":[
         
      ]
   },
   "capabilities":{
      "canSend":[
         
      ],
      "canReceive":[
         "customName"
      ]
   },
   "room":{
      [redacted]
   },
   "deviceSet":[
      
   ],
   "remoteLinks":[
      
   ],
   "isHidden":false
}

Note the isDetected attribute set to true, which is false when the view is clear. Is there a quick way to patch my installation to use this attribute while a proper fix is implemented?

Motion Sensor not working

Automation for turning on lights based on motion sensors causes the following error:
2024-03-09 13:32:39.599 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up dirigera_platform platform for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 350, in _async_setup_platform await asyncio.shield(awaitable) File "/config/custom_components/dirigera_platform/sensor.py", line 55, in async_setup_entry hub_controllers = await hass.async_add_executor_job(hub.get_controllers) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/dirigera/hub/hub.py", line 237, in get_controllers return [dict_to_controller(controller, self) for controller in controllers] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/dirigera/devices/controller.py", line 34, in dict_to_controller return Controller(dirigeraClient=dirigera_client, **data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pydantic/main.py", line 341, in __init__ raise validation_error pydantic.error_wrappers.ValidationError: 1 validation error for Controller room field required (type=value_error.missing)

Automation:
image

Toggling lights manually works.
Home Assistant runs in Docker container.

Sometimes getting MaxRetryError in a long running light automation

I have a HA automation to simulate sunrise effect using a light bulb which is connected via Dirigera.
This automation turns on the light and adjust the brightness twice per minute over 40 mins period.
Most of the time the automation fails at a random time while adjusting the brightness.

This error originated from a custom integration.

Logger: custom_components.dirigera_platform
Source: custom_components/dirigera_platform/light.py:177
integration: IKEA Dirigera Hub Integration (documentation, issues)
First occurred: 8:33:05 AM (1 occurrences)
Last logged: 8:33:05 AM

error encountered turning on : Bed light
This error originated from a custom integration.

Logger: custom_components.dirigera_platform
Source: custom_components/dirigera_platform/light.py:178
integration: IKEA Dirigera Hub Integration (documentation, issues)
First occurred: 8:33:05 AM (1 occurrences)
Last logged: 8:33:05 AM

HTTPSConnectionPool(host='192.168.0.14', port=8443): Max retries exceeded with url: /v1/devices/aa9eb7ac-ecc1-4914-b8a9-26c5d2302298_1 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0xffff803f25a0>: Failed to establish a new connection: [Errno 101] Network unreachable'))
Logger: homeassistant.components.script.1709568633936
Source: helpers/script.py:1805
integration: Script (documentation, issues)
First occurred: 8:33:05 AM (3 occurrences)
Last logged: 8:33:05 AM

Lamp Wake Up: Repeat at step 2: If at step 3: Error executing script. Error for call_service at pos 1: (ConnectionError(MaxRetryError("HTTPSConnectionPool(host='192.168.0.14', port=8443): Max retries exceeded with url: /v1/devices/aa9eb7ac-ecc1-4914-b8a9-26c5d2302298_1 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0xffff803f25a0>: Failed to establish a new connection: [Errno 101] Network unreachable'))")), 'dirigera_platform', 'hub_exception')
Lamp Wake Up: Repeat at step 2: Error executing script. Error for if at pos 3: (ConnectionError(MaxRetryError("HTTPSConnectionPool(host='192.168.0.14', port=8443): Max retries exceeded with url: /v1/devices/aa9eb7ac-ecc1-4914-b8a9-26c5d2302298_1 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0xffff803f25a0>: Failed to establish a new connection: [Errno 101] Network unreachable'))")), 'dirigera_platform', 'hub_exception')
Lamp Wake Up: Error executing script. Error for repeat at pos 2: (ConnectionError(MaxRetryError("HTTPSConnectionPool(host='192.168.0.14', port=8443): Max retries exceeded with url: /v1/devices/aa9eb7ac-ecc1-4914-b8a9-26c5d2302298_1 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0xffff803f25a0>: Failed to establish a new connection: [Errno 101] Network unreachable'))")), 'dirigera_platform', 'hub_exception')
Logger: homeassistant.components.automation.light_alarm
Source: helpers/script.py:1805
integration: Automation (documentation, issues)
First occurred: 8:33:05 AM (1 occurrences)
Last logged: 8:33:05 AM

Light Alarm: Error executing script. Error for call_service at pos 1: (ConnectionError(MaxRetryError("HTTPSConnectionPool(host='192.168.0.14', port=8443): Max retries exceeded with url: /v1/devices/aa9eb7ac-ecc1-4914-b8a9-26c5d2302298_1 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0xffff803f25a0>: Failed to establish a new connection: [Errno 101] Network unreachable'))")), 'dirigera_platform', 'hub_exception')
Logger: homeassistant.components.automation.light_alarm
Source: components/automation/__init__.py:687
integration: Automation (documentation, issues)
First occurred: 8:33:05 AM (1 occurrences)
Last logged: 8:33:05 AM

Error while executing automation automation.light_alarm: (ConnectionError(MaxRetryError("HTTPSConnectionPool(host='192.168.0.14', port=8443): Max retries exceeded with url: /v1/devices/aa9eb7ac-ecc1-4914-b8a9-26c5d2302298_1 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0xffff803f25a0>: Failed to establish a new connection: [Errno 101] Network unreachable'))")), 'dirigera_platform', 'hub_exception')
helpers/script.py
alias: Lamp Wake Up
sequence:
  - service: light.turn_on
    data:
      brightness: "{{ min_brightness }}"
      color_temp: "{{ max_mireds }}"
    target:
      entity_id: "{{ target_light }}"
  - repeat:
      until:
        - condition: or
          conditions:
            - condition: template
              value_template: "{{ is_state(target_light, 'off') }}"
            - condition: template
              value_template: "{{ state_attr(target_light, 'brightness') >= max_brightness }}"
            - condition: template
              value_template: >-
                {{ (((as_timestamp(now()) - start_time) / individual_step) |
                round(0, "ceil")) > steps }}
      sequence:
        - variables:
            steps_to_now: |-
              {{ ((as_timestamp(now()) - start_time) / individual_step) |
                round(0, "ceil") }}
            brightness: >-
              {{ min_brightness + (bright_step * steps_to_now) | round(0,
              'ceil') }}
            mireds: "{{ max_mireds - (mireds_step * steps_to_now) }}"
        - delay:
            seconds: "{{ individual_step }}"
        - if:
            - condition: template
              value_template: "{{ is_state(target_light, 'on') }}"
          then:
            - service: light.turn_on
              data:
                brightness: "{{ brightness }}"
              target:
                entity_id: "{{ target_light }}"
  - if:
      - condition: and
        conditions:
          - condition: template
            value_template: "{{ light_timeout != 0 }}"
          - condition: template
            value_template: "{{ is_state(target_light, 'on') }}"
    then:
      - delay:
          minutes: "{{ light_timeout }}"
      - service: light.turn_on
        data:
          brightness: "{{ min_brightness }}"
        target:
          entity_id: "{{ target_light }}"
      - service: light.turn_off
        data: {}
        target:
          entity_id: "{{ target_light }}"
description: Turn on lamps brighter based on wake time
fields:
  min_mireds:
    description: Minimum mireds value. This is the end value - most white
    selector:
      color_temp: null
    required: true
    default: 200
    name: Min Mireds
    example: 200
  max_mireds_selector:
    description: >-
      Maximum mireds value. This is the start value. If the light is on the
      current value from the state of the light will be used and this will be
      ignored.
    example: 400
    selector:
      color_temp: null
    default: 400
    required: true
    name: Max Mireds
  max_brightness_pct:
    description: Maximum brightness in percent.
    example: 80
    selector:
      number:
        min: 1
        max: 100
    default: 80
    required: true
    name: Max brightness
  alarm_length:
    description: >-
      This is the start to finish time. Take this into account when setting up
      the automation this script is called by.
    example: 10
    selector:
      number:
        min: 1
        max: 60
    default: 10
    required: true
    name: Alarm Length
  steps_per_minute:
    description: How many steps per minute
    example: 4
    selector:
      number:
        min: 1
        max: 12
    default: 12
    name: Steps Per minute
    required: true
  target_light:
    description: A single light or group
    example: light.master_lamp
    selector:
      entity:
        filter:
          domain: light
    name: Target Light
    required: true
  light_timeout:
    description: >-
      Minutes to delay after Max Brightness has been reached to turn the light
      back off. Value of 0 disables the timeout
    example: 5
    selector:
      number:
        min: 0
        max: 60
    default: 5
    name: Light Timeout
    required: true
variables:
  steps: "{{ alarm_length * steps_per_minute }}"
  min_brightness: |-
    {% if state_attr(target_light, 'brightness') == None %}
      3
    {% else %}
      {{ state_attr(target_light, 'brightness') }}
    {% endif %}
  max_brightness: "{{ max_brightness_pct * 2.55 }}"
  max_mireds: |-
    {% if state_attr(target_light, 'color_temp') == None %}
      {{ max_mireds_selector }}
    {% else %}
      {{ state_attr(target_light, 'color_temp') }}
    {% endif %}
  mireds_step: "{{ (max_mireds - min_mireds) / steps }}"
  bright_step: "{{ (max_brightness - min_brightness) / steps }}"
  start_time: "{{ as_timestamp(now()) }}"
  individual_step: "{{ 60 / steps_per_minute }}"
mode: parallel
bulb info
Firmware: 1.0.021 Up-to-date
Model: TRADFRI bulb E27 CWS 806lm
Product ID: LED1924G9
Serial number: F082C0FFFE3DE067
Manufacturer: IKEA of Sweden

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.