Leggin / dirigera

This repository provides an unofficial Python client for controlling the IKEA Dirigera Smart Home Hub.
MIT License
99 stars 19 forks source link

Support for 3rd party devices #1

Closed fpb closed 1 year ago

fpb commented 1 year ago

First of all, thank you for your work on supporting the Dirigera hub.

I tried your code in my setup and, since I have products from other brands, the code fails because not all attributes are present.

Here is the attributes dictionary that the hub stores for a SONOFF ZBMINI relay device:

{'customName': 'Ceiling', 'model': '01MINIZB', 'manufacturer': 'SONOFF', 'firmwareVersion': '', 'hardwareVersion': '', 'serialNumber': '9035EAFFFE8924F1', 'isOn': False, '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'}

As you can see, there is no 'startupOnOff'. This is a simple zigbee relay switch with just basic on/off functionality.

Congratulations for your efforts!

Leggin commented 1 year ago

Hi thanks for the input! I will try to make the necessary updates asap  👍

fpb commented 1 year ago

I just created a pull request as requested in the README.md Meanwhile, I can give json dumps of my devices if you wish.

Leggin commented 1 year ago

Thanks for the PR! New version is released. Yeah sure I appreciate the device jsons

fpb commented 1 year ago

Here are my devices dump!

By the way, I wrote small server (a gateway to the Dirigera hub) that exposes a very simple API to my devices so that I can control them from my Shelly wall switches. I need this server because the Dirigera token is quite long and the shelly devices are limited to sending http requests with headers no longer than 128 bytes.

So, my local server exposes this REST api:

[single press on the wall switch] /room_name/lamp_name/toggle

[long press on the wall switch] /room_name/lamp_name/dim -> cycles through levels from brightest to dimmest

[double press on the wall switch] /room_name/lamp_name/cool -> cycles through temperatures from warmer to cooler (wraps around)

[double press on the wall switch] /room_name/lamp_name/nextcolor -> cycles through several colours (closely follows the Ikea remotes behaviour)

I found it quite useful to repeat names for the bulbs since they can be disambiguated using the room names. So, a search for a lamp takes the room name and the lamp name. 🙂

I replace white spaces with underscores on the urls and the server puts the spaces back before calling the Dirigera api. It is running on a Raspberry pi 3.

Maybe you can consider adding a “room_name” to your Light class…

All the best!

On 6 Apr 2023 at 12:15:18, Leggin @.***> wrote:

Thanks for the PR https://github.com/Leggin/dirigera/pull/2! New version is released. Yeah sure I appreciate the device jsons

— Reply to this email directly, view it on GitHub https://github.com/Leggin/dirigera/issues/1#issuecomment-1498900179, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADPR73VY2GLZVQQXZP2TDTW72QUNANCNFSM6AAAAAAWUXU32A . You are receiving this because you authored the thread.Message ID: @.***>

Leggin commented 1 year ago

I refactored the devices a little bit, lamp is now inheriting from device. Therefore the lamp_id is now replaced with device_id. All devices now have:

I'm not sure if you sent your devices dump correctly, I can't see anything?

Greetings!

fpb commented 1 year ago

I replied through email with an attached file. It seems that it was filtered out. Here they are:

[
  {
    "id": "cd8529fe-77d7-4710-9862-e41a4b825418_1",
    "type": "controller",
    "deviceType": "lightController",
    "createdAt": "2023-04-04T13:50:17.000Z",
    "isReachable": true,
    "lastSeen": "2023-04-06T03:06:22.000Z",
    "attributes": {
      "customName": "Comando do Diogo",
      "model": "TRADFRI on/off switch",
      "manufacturer": "IKEA of Sweden",
      "firmwareVersion": "2.3.079",
      "hardwareVersion": "1",
      "serialNumber": "EC1BBDFFFEA7D4B5",
      "productCode": "E1743",
      "batteryPercentage": 87,
      "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": "72aa0575-917a-40a4-b557-970aa45e8bde",
      "name": "Diogos bedroom",
      "color": "ikea_blue_no_63",
      "icon": "rooms_bed"
    },
    "deviceSet": [],
    "remoteLinks": [],
    "isHidden": false
  },
  {
    "id": "de584e58-b7da-4ec5-b40e-e85022052758_1",
    "type": "light",
    "deviceType": "light",
    "createdAt": "2023-03-31T23:30:25.000Z",
    "isReachable": true,
    "lastSeen": "2023-04-06T17:14:36.000Z",
    "customIcon": "products_light_pin",
    "attributes": {
      "customName": "Light 1",
      "model": "TRADFRI bulb GU10 WS 400lm",
      "manufacturer": "IKEA of Sweden",
      "firmwareVersion": "2.3.087",
      "hardwareVersion": "1",
      "serialNumber": "90FD9FFFFE900343",
      "productCode": "",
      "isOn": false,
      "startupOnOff": "startPrevious",
      "lightLevel": 33,
      "startUpCurrentLevel": -1,
      "colorTemperature": 2732,
      "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": "6003c431-c137-4295-9de9-29096ac8e9b6",
      "name": "Office",
      "color": "ikea_brown_no_41",
      "icon": "rooms_office_chair"
    },
    "deviceSet": [],
    "remoteLinks": [
      "c8a5c45e-4f83-47a6-be6d-5e534c5e5c81_1"
    ],
    "isHidden": false
  },
  {
    "id": "fcb3b54e-c9aa-44c6-903d-6d5235556dca_1",
    "type": "light",
    "deviceType": "light",
    "createdAt": "2023-04-01T09:55:30.000Z",
    "isReachable": true,
    "lastSeen": "2023-04-06T14:13:55.000Z",
    "attributes": {
      "customName": "Ceiling",
      "model": "01MINIZB",
      "manufacturer": "SONOFF",
      "firmwareVersion": "",
      "hardwareVersion": "",
      "serialNumber": "9035EAFFFE8924F1",
      "isOn": false,
      "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"
      ]
    },
    "room": {
      "id": "56347556-96fc-43f6-a05f-bbce1b2f6ad7",
      "name": "Entrance",
      "color": "ikea_yellow_no_28",
      "icon": "rooms_home"
    },
    "deviceSet": [],
    "remoteLinks": [],
    "isHidden": false
  },
  {
    "id": "e3b5b5ab-70f1-4bcd-bceb-fadd11c355f0_1",
    "type": "light",
    "deviceType": "light",
    "createdAt": "2023-04-01T01:22:30.000Z",
    "isReachable": true,
    "lastSeen": "2023-04-06T16:42:59.000Z",
    "attributes": {
      "customName": "Console",
      "model": "TRADFRI bulb E27 WW 806lm",
      "manufacturer": "IKEA of Sweden",
      "firmwareVersion": "2.3.093",
      "hardwareVersion": "2",
      "serialNumber": "680AE2FFFE10AB7C",
      "productCode": "LED1836G9",
      "isOn": false,
      "startupOnOff": "startPrevious",
      "lightLevel": 33,
      "startUpCurrentLevel": -1,
      "identifyStarted": "2023-04-05T18:54:00.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": "56347556-96fc-43f6-a05f-bbce1b2f6ad7",
      "name": "Entrance",
      "color": "ikea_yellow_no_28",
      "icon": "rooms_home"
    },
    "deviceSet": [],
    "remoteLinks": [
      "c0cbd4e1-642f-4b10-8fb0-08a8129d9d7a_1"
    ],
    "isHidden": false
  },
  {
    "id": "bf1b1bf8-33bf-4ef1-8d2c-cd5186320c8d_1",
    "type": "light",
    "deviceType": "light",
    "createdAt": "2023-04-04T13:51:47.000Z",
    "isReachable": true,
    "lastSeen": "2023-04-06T10:22:15.000Z",
    "customIcon": "lighting_pendant_light",
    "attributes": {
      "customName": "Ceiling",
      "model": "TRADFRI bulb E27 WS opal 980lm",
      "manufacturer": "IKEA of Sweden",
      "firmwareVersion": "2.3.095",
      "hardwareVersion": "1",
      "serialNumber": "D0CF5EFFFE20E856",
      "productCode": "LED1545G12E27EU",
      "isOn": false,
      "startupOnOff": "startPrevious",
      "lightLevel": 100,
      "startUpCurrentLevel": -1,
      "colorTemperature": 2702,
      "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": "72aa0575-917a-40a4-b557-970aa45e8bde",
      "name": "Diogos bedroom",
      "color": "ikea_blue_no_63",
      "icon": "rooms_bed"
    },
    "deviceSet": [],
    "remoteLinks": [
      "cd8529fe-77d7-4710-9862-e41a4b825418_1"
    ],
    "isHidden": false
  },
  {
    "id": "fb517351-7275-4756-a7d9-ac054dccb21c_1",
    "type": "light",
    "deviceType": "light",
    "createdAt": "2023-04-01T01:32:52.000Z",
    "isReachable": true,
    "lastSeen": "2023-04-06T01:42:43.000Z",
    "customIcon": "products_light_pin",
    "attributes": {
      "customName": "Front light 3",
      "model": "TRADFRI bulb GU10 WS 400lm",
      "manufacturer": "IKEA of Sweden",
      "firmwareVersion": "2.3.087",
      "hardwareVersion": "1",
      "serialNumber": "90FD9FFFFE92DE98",
      "productCode": "",
      "isOn": false,
      "startupOnOff": "startPrevious",
      "lightLevel": 10,
      "startUpCurrentLevel": -1,
      "colorTemperature": 2710,
      "colorTemperatureMin": 4000,
      "colorTemperatureMax": 2202,
      "startupTemperature": -1,
      "colorMode": "temperature",
      "identifyStarted": "2023-04-01T02:28:42.000Z",
      "identifyPeriod": 5,
      "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": "46d2242b-7135-4f77-a4e0-6c658a1653b6",
      "name": "Living room",
      "color": "ikea_yellow_no_24",
      "icon": "rooms_sofa"
    },
    "deviceSet": [],
    "remoteLinks": [
      "6b7082a1-7763-4d78-85ca-f559d512ae31_1"
    ],
    "isHidden": false
  },
  {
    "id": "7c30c74a-ca48-454f-b4e1-e37308805036_1",
    "type": "light",
    "deviceType": "light",
    "createdAt": "2023-04-01T04:23:46.000Z",
    "isReachable": false,
    "lastSeen": "2023-04-05T14:34:04.000Z",
    "attributes": {
      "customName": "Light 14",
      "model": "TRADFRI bulb E14 CWS opal 600lm",
      "manufacturer": "IKEA of Sweden",
      "firmwareVersion": "2.3.086",
      "hardwareVersion": "1",
      "serialNumber": "CCCCCCFFFEC5F24B",
      "productCode": "LED1624G9E14EU",
      "isOn": false,
      "startupOnOff": "startOn",
      "lightLevel": 18,
      "startUpCurrentLevel": -1,
      "colorHue": 29.9981689453125,
      "colorSaturation": 0.6496062992125984,
      "colorMode": "color",
      "identifyStarted": "2000-01-01T00:00:00.000Z",
      "identifyPeriod": 0,
      "permittingJoin": false,
      "otaStatus": "updateAvailable",
      "otaState": "readyToCheck",
      "otaProgress": 0,
      "otaPolicy": "autoUpdate",
      "otaScheduleStart": "00:00",
      "otaScheduleEnd": "00:00"
    },
    "capabilities": {
      "canSend": [],
      "canReceive": [
        "customName",
        "isOn",
        "lightLevel",
        "colorHue",
        "colorSaturation"
      ]
    },
    "room": {
      "id": "46d2242b-7135-4f77-a4e0-6c658a1653b6",
      "name": "Living room",
      "color": "ikea_yellow_no_24",
      "icon": "rooms_sofa"
    },
    "deviceSet": [],
    "remoteLinks": [],
    "isHidden": false
  },
  {
    "id": "51caabb3-1d55-4d32-8d79-ea03da1b0fca_1",
    "type": "light",
    "deviceType": "light",
    "createdAt": "2023-04-01T01:43:25.000Z",
    "isReachable": true,
    "lastSeen": "2023-04-06T01:42:43.000Z",
    "customIcon": "products_light_pin",
    "attributes": {
      "customName": "Rear light 3",
      "model": "TRADFRI bulb GU10 WS 400lm",
      "manufacturer": "IKEA of Sweden",
      "firmwareVersion": "2.3.087",
      "hardwareVersion": "1",
      "serialNumber": "90FD9FFFFE839324",
      "productCode": "",
      "isOn": false,
      "startupOnOff": "startPrevious",
      "lightLevel": 6,
      "startUpCurrentLevel": -1,
      "colorTemperature": 2132,
      "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": "46d2242b-7135-4f77-a4e0-6c658a1653b6",
      "name": "Living room",
      "color": "ikea_yellow_no_24",
      "icon": "rooms_sofa"
    },
    "deviceSet": [],
    "remoteLinks": [
      "6b7082a1-7763-4d78-85ca-f559d512ae31_1"
    ],
    "isHidden": false
  },
  {
    "id": "e1c615d4-7412-4ecf-bdc5-b21a8a7d0c88_1",
    "relationId": "e1c615d4-7412-4ecf-bdc5-b21a8a7d0c88",
    "type": "gateway",
    "deviceType": "gateway",
    "createdAt": "2023-02-10T12:43:52.970Z",
    "isReachable": true,
    "lastSeen": "2023-04-06T16:21:00.515Z",
    "attributes": {
      "customName": "Dirigera",
      "model": "DIRIGERA Hub for smart products",
      "manufacturer": "IKEA of Sweden",
      "firmwareVersion": "2.256.5",
      "hardwareVersion": "P2.5",
      "serialNumber": "e1c615d4-7412-4ecf-bdc5-b21a8a7d0c88",
      "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": "PT",
      "userConsents": [
        {
          "name": "analytics",
          "value": "disabled"
        },
        {
          "name": "diagnostics",
          "value": "enabled"
        }
      ],
      "logLevel": 3,
      "coredump": false,
      "timezone": "Europe/Lisbon",
      "nextSunSet": "2023-04-06T19:05:00.000Z",
      "nextSunRise": "2023-04-07T06:14:00.000Z",
      "countryCode": "XZ",
      "coordinates": {
        "latitude": 38.666666666666664,
        "longitude": -9.230612634017806,
        "accuracy": -1
      },
      "isOn": false
    },
    "capabilities": {
      "canSend": [],
      "canReceive": [
        "customName",
        "permittingJoin",
        "userConsents",
        "logLevel",
        "time",
        "timezone",
        "countryCode",
        "coordinates"
      ]
    },
    "deviceSet": [],
    "remoteLinks": []
  },
  {
    "id": "4a8a102f-cb22-4e89-83c6-9497e8c6f000_1",
    "type": "light",
    "deviceType": "light",
    "createdAt": "2023-04-04T23:56:39.000Z",
    "isReachable": true,
    "lastSeen": "2023-04-06T01:46:02.000Z",
    "customIcon": "products_light_pin",
    "attributes": {
      "customName": "Rear light 1",
      "model": "TRADFRI bulb GU10 WS 400lm",
      "manufacturer": "IKEA of Sweden",
      "firmwareVersion": "2.3.087",
      "hardwareVersion": "1",
      "serialNumber": "90FD9FFFFE7BF426",
      "productCode": "",
      "isOn": false,
      "startupOnOff": "startPrevious",
      "lightLevel": 6,
      "startUpCurrentLevel": -1,
      "colorTemperature": 2732,
      "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": "46d2242b-7135-4f77-a4e0-6c658a1653b6",
      "name": "Living room",
      "color": "ikea_yellow_no_24",
      "icon": "rooms_sofa"
    },
    "deviceSet": [],
    "remoteLinks": [
      "6b7082a1-7763-4d78-85ca-f559d512ae31_1"
    ],
    "isHidden": false
  },
  {
    "id": "e80b507c-f0bd-4617-9088-26030f3fc93a_1",
    "type": "light",
    "deviceType": "light",
    "createdAt": "2023-04-01T01:28:44.000Z",
    "isReachable": true,
    "lastSeen": "2023-04-06T01:42:43.000Z",
    "customIcon": "products_light_pin",
    "attributes": {
      "customName": "Front light 1",
      "model": "TRADFRI bulb GU10 WS 400lm",
      "manufacturer": "IKEA of Sweden",
      "firmwareVersion": "2.3.087",
      "hardwareVersion": "1",
      "serialNumber": "90FD9FFFFE6FB0DF",
      "productCode": "",
      "isOn": false,
      "startupOnOff": "startPrevious",
      "lightLevel": 6,
      "startUpCurrentLevel": -1,
      "colorTemperature": 2132,
      "colorTemperatureMin": 4000,
      "colorTemperatureMax": 2202,
      "startupTemperature": -1,
      "colorMode": "temperature",
      "identifyStarted": "2023-04-01T02:28:09.000Z",
      "identifyPeriod": 5,
      "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": "46d2242b-7135-4f77-a4e0-6c658a1653b6",
      "name": "Living room",
      "color": "ikea_yellow_no_24",
      "icon": "rooms_sofa"
    },
    "deviceSet": [],
    "remoteLinks": [
      "6b7082a1-7763-4d78-85ca-f559d512ae31_1"
    ],
    "isHidden": false
  },
  {
    "id": "11736c9c-5c6b-4282-9ed7-2d4c6c30120b_1",
    "type": "light",
    "deviceType": "light",
    "createdAt": "2023-03-31T23:34:01.000Z",
    "isReachable": true,
    "lastSeen": "2023-04-06T14:26:56.000Z",
    "customIcon": "products_light_pin",
    "attributes": {
      "customName": "Light 2",
      "model": "TRADFRI bulb GU10 WS 400lm",
      "manufacturer": "IKEA of Sweden",
      "firmwareVersion": "2.3.087",
      "hardwareVersion": "1",
      "serialNumber": "90FD9FFFFE8E8BFD",
      "productCode": "",
      "isOn": false,
      "startupOnOff": "startPrevious",
      "lightLevel": 41,
      "startUpCurrentLevel": -1,
      "colorTemperature": 2132,
      "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": "6003c431-c137-4295-9de9-29096ac8e9b6",
      "name": "Office",
      "color": "ikea_brown_no_41",
      "icon": "rooms_office_chair"
    },
    "deviceSet": [],
    "remoteLinks": [
      "c8a5c45e-4f83-47a6-be6d-5e534c5e5c81_1"
    ],
    "isHidden": false
  },
  {
    "id": "e050e735-a73c-42a6-9ef7-484ab7ec04d3_1",
    "type": "light",
    "deviceType": "light",
    "createdAt": "2023-04-01T02:39:32.000Z",
    "isReachable": true,
    "lastSeen": "2023-04-06T14:00:25.000Z",
    "customIcon": "lighting_table_lamp",
    "attributes": {
      "customName": "Daddys light",
      "model": "TRADFRI bulb E14 WS globe 470lm",
      "manufacturer": "IKEA of Sweden",
      "firmwareVersion": "1.1.003",
      "hardwareVersion": "1",
      "serialNumber": "F4B3B1FFFE43287A",
      "productCode": "LED2101G4",
      "isOn": false,
      "startupOnOff": "startPrevious",
      "lightLevel": 1,
      "startUpCurrentLevel": -1,
      "colorTemperature": 2202,
      "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": "d70f52eb-99d6-4929-aeb9-d8533c46be2f",
      "name": "Bedroom",
      "color": "ikea_white_no_20",
      "icon": "rooms_bed"
    },
    "deviceSet": [],
    "remoteLinks": [
      "b6e2355e-bb06-4eed-88b0-1390aeb09adc_1"
    ],
    "isHidden": false
  },
  {
    "id": "c8a5c45e-4f83-47a6-be6d-5e534c5e5c81_1",
    "type": "controller",
    "deviceType": "lightController",
    "createdAt": "2023-03-31T23:23:06.000Z",
    "isReachable": true,
    "lastSeen": "2023-04-05T21:21:18.000Z",
    "attributes": {
      "customName": "Office remote",
      "model": "TRADFRI on/off switch",
      "manufacturer": "IKEA of Sweden",
      "firmwareVersion": "",
      "hardwareVersion": "1",
      "serialNumber": "EC1BBDFFFEE874DC",
      "productCode": "E1743",
      "batteryPercentage": 87,
      "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": "6003c431-c137-4295-9de9-29096ac8e9b6",
      "name": "Office",
      "color": "ikea_brown_no_41",
      "icon": "rooms_office_chair"
    },
    "deviceSet": [],
    "remoteLinks": [],
    "isHidden": false
  },
  {
    "id": "c0cbd4e1-642f-4b10-8fb0-08a8129d9d7a_1",
    "type": "sensor",
    "deviceType": "motionSensor",
    "createdAt": "2023-04-01T02:37:48.000Z",
    "isReachable": true,
    "lastSeen": "2023-04-05T16:25:50.000Z",
    "attributes": {
      "customName": "Sensor 1",
      "model": "TRADFRI motion sensor",
      "manufacturer": "IKEA of Sweden",
      "firmwareVersion": "24.4.5",
      "hardwareVersion": "1",
      "serialNumber": "BC33ACFFFE29E262",
      "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",
            "offset": 30
          }
        }
      }
    },
    "capabilities": {
      "canSend": [
        "isOn",
        "lightLevel"
      ],
      "canReceive": [
        "customName"
      ]
    },
    "room": {
      "id": "56347556-96fc-43f6-a05f-bbce1b2f6ad7",
      "name": "Entrance",
      "color": "ikea_yellow_no_28",
      "icon": "rooms_home"
    },
    "deviceSet": [],
    "remoteLinks": [],
    "isHidden": false
  },
  {
    "id": "0e1d7c16-3055-4d01-8e68-08fa82c59b43_11",
    "type": "light",
    "deviceType": "light",
    "createdAt": "2023-04-05T00:20:12.000Z",
    "isReachable": true,
    "lastSeen": "2023-04-06T01:42:23.000Z",
    "customIcon": "lighting_floor_lamp",
    "attributes": {
      "customName": "Sofa light",
      "model": "LTA001",
      "manufacturer": "Signify Netherlands B.V.",
      "firmwareVersion": "1.101.2",
      "hardwareVersion": "2",
      "serialNumber": "00178801061C603C",
      "productCode": "",
      "isOn": false,
      "startupOnOff": "startPrevious",
      "lightLevel": 50,
      "startUpCurrentLevel": -1,
      "colorTemperature": 2398,
      "colorTemperatureMin": 6535,
      "colorTemperatureMax": 2202,
      "startupTemperature": -1,
      "colorMode": "temperature",
      "identifyStarted": "2023-04-05T00:21:42.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": "46d2242b-7135-4f77-a4e0-6c658a1653b6",
      "name": "Living room",
      "color": "ikea_yellow_no_24",
      "icon": "rooms_sofa"
    },
    "deviceSet": [],
    "remoteLinks": [],
    "isHidden": false
  },
  {
    "id": "da5e7fe5-a4b1-49da-8aff-a969bdef9329_1",
    "type": "light",
    "deviceType": "light",
    "createdAt": "2023-04-04T13:02:31.000Z",
    "isReachable": true,
    "lastSeen": "2023-04-06T01:48:15.000Z",
    "customIcon": "products_light_pin",
    "attributes": {
      "customName": "Ceiling",
      "model": "TRADFRI bulb GU10 WW 400lm",
      "manufacturer": "IKEA of Sweden",
      "firmwareVersion": "2.3.093",
      "hardwareVersion": "2",
      "serialNumber": "BC33ACFFFE0E2313",
      "productCode": "LED1837R5",
      "isOn": false,
      "startupOnOff": "startPrevious",
      "lightLevel": 1,
      "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": "d70f52eb-99d6-4929-aeb9-d8533c46be2f",
      "name": "Bedroom",
      "color": "ikea_white_no_20",
      "icon": "rooms_bed"
    },
    "deviceSet": [],
    "remoteLinks": [],
    "isHidden": false
  },
  {
    "id": "825da60c-8f61-44f0-9a86-c40e96e61bd9_1",
    "type": "light",
    "deviceType": "light",
    "createdAt": "2023-03-31T23:36:50.000Z",
    "isReachable": true,
    "lastSeen": "2023-04-06T17:19:36.000Z",
    "customIcon": "products_light_pin",
    "attributes": {
      "customName": "Light 3",
      "model": "TRADFRI bulb GU10 WS 400lm",
      "manufacturer": "IKEA of Sweden",
      "firmwareVersion": "2.3.087",
      "hardwareVersion": "1",
      "serialNumber": "90FD9FFFFE85FCBF",
      "productCode": "",
      "isOn": false,
      "startupOnOff": "startPrevious",
      "lightLevel": 41,
      "startUpCurrentLevel": -1,
      "colorTemperature": 2132,
      "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": "6003c431-c137-4295-9de9-29096ac8e9b6",
      "name": "Office",
      "color": "ikea_brown_no_41",
      "icon": "rooms_office_chair"
    },
    "deviceSet": [],
    "remoteLinks": [
      "c8a5c45e-4f83-47a6-be6d-5e534c5e5c81_1"
    ],
    "isHidden": false
  },
  {
    "id": "e60cdddc-1d9c-4aab-b2b9-fb48e4eed44f_1",
    "type": "light",
    "deviceType": "light",
    "createdAt": "2023-04-01T12:47:42.000Z",
    "isReachable": true,
    "lastSeen": "2023-04-05T22:28:13.000Z",
    "customIcon": "lighting_cone_pendant",
    "attributes": {
      "customName": "Center",
      "model": "01MINIZB",
      "manufacturer": "SONOFF",
      "firmwareVersion": "",
      "hardwareVersion": "",
      "serialNumber": "9035EAFFFE582910",
      "isOn": false,
      "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"
      ]
    },
    "room": {
      "id": "46d2242b-7135-4f77-a4e0-6c658a1653b6",
      "name": "Living room",
      "color": "ikea_yellow_no_24",
      "icon": "rooms_sofa"
    },
    "deviceSet": [],
    "remoteLinks": [],
    "isHidden": false
  },
  {
    "id": "6b7082a1-7763-4d78-85ca-f559d512ae31_1",
    "type": "controller",
    "deviceType": "lightController",
    "createdAt": "2023-04-01T01:26:48.000Z",
    "isReachable": true,
    "lastSeen": "2023-04-06T09:23:44.000Z",
    "attributes": {
      "customName": "Remote 2",
      "model": "Remote Control N2",
      "manufacturer": "IKEA of Sweden",
      "firmwareVersion": "2.4.5",
      "hardwareVersion": "1",
      "serialNumber": "04CD15FFFE58561E",
      "productCode": "E2001",
      "batteryPercentage": 90,
      "isOn": false,
      "lightLevel": 1,
      "permittingJoin": false,
      "otaStatus": "upToDate",
      "otaState": "readyToCheck",
      "otaProgress": 0,
      "otaPolicy": "autoUpdate",
      "otaScheduleStart": "00:00",
      "otaScheduleEnd": "00:00"
    },
    "capabilities": {
      "canSend": [
        "isOn",
        "lightLevel"
      ],
      "canReceive": [
        "customName"
      ]
    },
    "room": {
      "id": "46d2242b-7135-4f77-a4e0-6c658a1653b6",
      "name": "Living room",
      "color": "ikea_yellow_no_24",
      "icon": "rooms_sofa"
    },
    "deviceSet": [],
    "remoteLinks": [],
    "isHidden": false
  },
  {
    "id": "b6e2355e-bb06-4eed-88b0-1390aeb09adc_1",
    "type": "controller",
    "deviceType": "lightController",
    "createdAt": "2023-04-01T09:46:31.000Z",
    "isReachable": true,
    "lastSeen": "2023-04-06T01:52:52.000Z",
    "attributes": {
      "customName": "Remote 3",
      "model": "TRADFRI on/off switch",
      "manufacturer": "IKEA of Sweden",
      "firmwareVersion": "2.3.079",
      "hardwareVersion": "1",
      "serialNumber": "14B457FFFE4DCEBB",
      "productCode": "E1743",
      "batteryPercentage": 74,
      "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": "d70f52eb-99d6-4929-aeb9-d8533c46be2f",
      "name": "Bedroom",
      "color": "ikea_white_no_20",
      "icon": "rooms_bed"
    },
    "deviceSet": [],
    "remoteLinks": [],
    "isHidden": false
  },
  {
    "id": "d76a2728-0180-4442-9acd-50d2b4ccdba1_1",
    "type": "light",
    "deviceType": "light",
    "createdAt": "2023-04-01T01:30:53.000Z",
    "isReachable": true,
    "lastSeen": "2023-04-06T01:42:43.000Z",
    "customIcon": "products_light_pin",
    "attributes": {
      "customName": "Front light 2",
      "model": "TRADFRI bulb GU10 WS 400lm",
      "manufacturer": "IKEA of Sweden",
      "firmwareVersion": "2.3.087",
      "hardwareVersion": "1",
      "serialNumber": "90FD9FFFFE8A5BA1",
      "productCode": "",
      "isOn": false,
      "startupOnOff": "startPrevious",
      "lightLevel": 10,
      "startUpCurrentLevel": -1,
      "colorTemperature": 2710,
      "colorTemperatureMin": 4000,
      "colorTemperatureMax": 2202,
      "startupTemperature": -1,
      "colorMode": "temperature",
      "identifyStarted": "2023-04-01T02:28:22.000Z",
      "identifyPeriod": 5,
      "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": "46d2242b-7135-4f77-a4e0-6c658a1653b6",
      "name": "Living room",
      "color": "ikea_yellow_no_24",
      "icon": "rooms_sofa"
    },
    "deviceSet": [],
    "remoteLinks": [
      "6b7082a1-7763-4d78-85ca-f559d512ae31_1"
    ],
    "isHidden": false
  },
  {
    "id": "bdeffdac-6afb-423d-bc75-d8e8ec570de2_1",
    "type": "light",
    "deviceType": "light",
    "createdAt": "2023-04-01T01:41:33.000Z",
    "isReachable": true,
    "lastSeen": "2023-04-06T01:42:43.000Z",
    "customIcon": "products_light_pin",
    "attributes": {
      "customName": "Rear light 2",
      "model": "TRADFRI bulb GU10 WS 400lm",
      "manufacturer": "IKEA of Sweden",
      "firmwareVersion": "2.3.087",
      "hardwareVersion": "1",
      "serialNumber": "90FD9FFFFE879441",
      "productCode": "",
      "isOn": false,
      "startupOnOff": "startPrevious",
      "lightLevel": 6,
      "startUpCurrentLevel": -1,
      "colorTemperature": 2132,
      "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": "46d2242b-7135-4f77-a4e0-6c658a1653b6",
      "name": "Living room",
      "color": "ikea_yellow_no_24",
      "icon": "rooms_sofa"
    },
    "deviceSet": [],
    "remoteLinks": [
      "6b7082a1-7763-4d78-85ca-f559d512ae31_1"
    ],
    "isHidden": false
  }
]