sanjoyg / dirigera_platform

HomeAssistant Integration for Dirigera Platform
MIT License
72 stars 8 forks source link

JSON Dump with Tredansen, praktlysing blind #4

Closed nromyn closed 4 months ago

nromyn commented 4 months ago

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

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
    }
]```
sanjoyg commented 4 months ago

Perfect thank you, I will get to this soon.

sanjoyg commented 4 months ago

do try the blinds should work as per the JSON. Let me know if the battery % and state should be included as entities against the device. Will appreciate if you let me know

nromyn commented 4 months ago

The bulb problem I had from #3 seems to be fixed now. It’s not picking up the blinds for some reason. I did the setup again (IP + action button), but did not totally reinstall the solution.

I do not know how other solutions report battery and cover position. I think the battery goes into its own entity as a sensor? And the cover is a property.

sanjoyg commented 4 months ago

The cover doesnt have a battery attribute, so would need to add an additional entity to the device. If its useful will make changes to provide additional entity.

nromyn commented 4 months ago

Fixed my missing blinds with #5.

Adding the batteries as a sensor would be excellent. I don’t see the Tradfri switches but I think they’re not in the upstream code.

sanjoyg commented 4 months ago

Thank you for the fix :-) Is there a JSON for the switches, its easy to patch it in to the upstream code

nromyn commented 4 months ago

There’s two in the above dump: 'TRADFRI open/close remote'

sanjoyg commented 4 months ago

ok cool, does the blinds work with the integration?

sanjoyg commented 4 months ago

The JSON shows it has the following capabilities "capabilities": { "canSend": [ "isOn", "lightLevel", "blindsState" ], I assume the lightLevel can be from 1-100. Not sure what values "blindsState" takes or its a read-only value. The current state on the blind shows "stopped".

nromyn commented 4 months ago

I’ll see if I can collect some more data for the switches.

sanjoyg commented 4 months ago

On second thoughts the switch integration may not be required. There is a function call support to set target position of the cover including open close. So what would the blind controller entity do anyway