zigpy / zha-device-handlers

ZHA device handlers bridge the functionality gap created when manufacturers deviate from the ZCL specification, handling deviations and exceptions by parsing custom messages to and from Zigbee devices.
Apache License 2.0
705 stars 651 forks source link

[Device Support Request] IKEA E2112 Vindstyrka Air Sensor. #2274

Closed MattWestb closed 10 months ago

MattWestb commented 1 year ago

Is your feature request related to a problem? Please describe. Some functions is not ZCL R8 compatible and is not working. Describe the solution you'd like Adding support for missing functions in ZHA

Device signature ```yaml { "node_descriptor": "NodeDescriptor(logical_type=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=4476, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)", "endpoints": { "1": { "profile_id": 260, "device_type": "0x0302", "in_clusters": [ "0x0000", "0x0003", "0x0004", "0x0402", "0x0405", "0x042a", "0xfc57", "0xfc7c", "0xfc7e" ], "out_clusters": [ "0x0003", "0x0019", "0x0020", "0x0202" ] }, "242": { "profile_id": 41440, "device_type": "0x0061", "in_clusters": [], "out_clusters": [ "0x0021" ] } }, "manufacturer": "IKEA of Sweden", "model": "VINDSTYRKA", "class": "zigpy.device.Device" } ```
Diagnostic information ```yaml { "home_assistant": { "installation_type": "Home Assistant Supervised", "version": "2023.3.4", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.10.10", "docker": true, "arch": "armv7l", "timezone": "Europe/Vienna", "os_name": "Linux", "os_version": "5.15.93-sunxi", "supervisor": "2023.03.1", "host_os": "Armbian 23.02.2 Jammy", "docker_version": "23.0.1", "chassis": "", "run_as_root": true }, "custom_components": { "zha_toolkit": { "version": "0.0.0", "requirements": [ "packaging>=20.8" ] }, "remote_homeassistant": { "version": "3.6", "requirements": [] } }, "integration_manifest": { "domain": "zha", "name": "Zigbee Home Automation", "after_dependencies": [ "onboarding", "usb" ], "codeowners": [ "@dmulcahey", "@adminiuga", "@puddly" ], "config_flow": true, "dependencies": [ "file_upload" ], "documentation": "https://www.home-assistant.io/integrations/zha", "iot_class": "local_polling", "loggers": [ "aiosqlite", "bellows", "crccheck", "pure_pcapy3", "zhaquirks", "zigpy", "zigpy_deconz", "zigpy_xbee", "zigpy_zigate", "zigpy_znp" ], "requirements": [ "bellows==0.34.10", "pyserial==3.5", "pyserial-asyncio==0.6", "zha-quirks==0.0.94", "zigpy-deconz==0.19.2", "zigpy==0.53.2", "zigpy-xbee==0.16.2", "zigpy-zigate==0.10.3", "zigpy-znp==0.9.3" ], "usb": [ { "vid": "10C4", "pid": "EA60", "description": "*2652*", "known_devices": [ "slae.sh cc2652rb stick" ] }, { "vid": "1A86", "pid": "55D4", "description": "*sonoff*plus*", "known_devices": [ "sonoff zigbee dongle plus v2" ] }, { "vid": "10C4", "pid": "EA60", "description": "*sonoff*plus*", "known_devices": [ "sonoff zigbee dongle plus" ] }, { "vid": "10C4", "pid": "EA60", "description": "*tubeszb*", "known_devices": [ "TubesZB Coordinator" ] }, { "vid": "1A86", "pid": "7523", "description": "*tubeszb*", "known_devices": [ "TubesZB Coordinator" ] }, { "vid": "1A86", "pid": "7523", "description": "*zigstar*", "known_devices": [ "ZigStar Coordinators" ] }, { "vid": "1CF1", "pid": "0030", "description": "*conbee*", "known_devices": [ "Conbee II" ] }, { "vid": "10C4", "pid": "8A2A", "description": "*zigbee*", "known_devices": [ "Nortek HUSBZB-1" ] }, { "vid": "0403", "pid": "6015", "description": "*zigate*", "known_devices": [ "ZiGate+" ] }, { "vid": "10C4", "pid": "EA60", "description": "*zigate*", "known_devices": [ "ZiGate" ] }, { "vid": "10C4", "pid": "8B34", "description": "*bv 2010/10*", "known_devices": [ "Bitron Video AV2010/10" ] } ], "zeroconf": [ { "type": "_esphomelib._tcp.local.", "name": "tube*" }, { "type": "_zigate-zigbee-gateway._tcp.local.", "name": "*zigate*" }, { "type": "_zigstar_gw._tcp.local.", "name": "*zigstar*" }, { "type": "_slzb-06._tcp.local.", "name": "slzb-06*" } ], "is_built_in": true }, "data": { "ieee": "**REDACTED**", "nwk": 45252, "manufacturer": "IKEA of Sweden", "model": "VINDSTYRKA", "name": "IKEA of Sweden VINDSTYRKA", "quirk_applied": false, "quirk_class": "zigpy.device.Device", "manufacturer_code": 4476, "power_source": "Mains", "lqi": 206, "rssi": -60, "last_seen": "2023-03-14T14:11:45", "available": true, "device_type": "Router", "signature": { "node_descriptor": "NodeDescriptor(logical_type=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=4476, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)", "endpoints": { "1": { "profile_id": 260, "device_type": "0x0302", "in_clusters": [ "0x0000", "0x0003", "0x0004", "0x0402", "0x0405", "0x042a", "0xfc57", "0xfc7c", "0xfc7e" ], "out_clusters": [ "0x0003", "0x0019", "0x0020", "0x0202" ] }, "242": { "profile_id": 41440, "device_type": "0x0061", "in_clusters": [], "out_clusters": [ "0x0021" ] } } }, "active_coordinator": false, "entities": [ { "entity_id": "button.ikea_of_sweden_vindstyrka_identify", "name": "IKEA of Sweden VINDSTYRKA" }, { "entity_id": "sensor.ikea_of_sweden_vindstyrka_temperature", "name": "IKEA of Sweden VINDSTYRKA" }, { "entity_id": "sensor.ikea_of_sweden_vindstyrka_particulate_matter", "name": "IKEA of Sweden VINDSTYRKA" }, { "entity_id": "sensor.ikea_of_sweden_vindstyrka_humidity", "name": "IKEA of Sweden VINDSTYRKA" } ], "neighbors": [ { "device_type": "Coordinator", "rx_on_when_idle": "On", "relationship": "Parent", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x0000", "permit_joining": "Unknown", "depth": "0", "lqi": "215" } ], "routes": [ { "dest_nwk": "0x0000", "route_status": "Active", "memory_constrained": false, "many_to_one": true, "route_record_required": false, "next_hop": "0x0000" } ], "endpoint_names": [ { "name": "TEMPERATURE_SENSOR" }, { "name": "unknown 97 device_type of 0xa1e0 profile id" } ], "user_given_name": "IKEA VINDSTYRKA", "device_reg_id": "3f828a4feac677050c05527fc54d0bb5", "area_id": "living_room", "cluster_details": { "1": { "device_type": { "name": "TEMPERATURE_SENSOR", "id": 770 }, "profile_id": 260, "in_clusters": { "0x0000": { "endpoint_attribute": "basic", "attributes": { "0x0000": { "attribute_name": "zcl_version", "value": 8 }, "0x0002": { "attribute_name": "stack_version", "value": 106 }, "0x0004": { "attribute_name": "manufacturer", "value": "IKEA of Sweden" }, "0x0005": { "attribute_name": "model", "value": "VINDSTYRKA" }, "0x4000": { "attribute_name": "sw_build_id", "value": "1.0.010" } }, "unsupported_attributes": {} }, "0x0003": { "endpoint_attribute": "identify", "attributes": {}, "unsupported_attributes": {} }, "0x0004": { "endpoint_attribute": "groups", "attributes": {}, "unsupported_attributes": {} }, "0x0402": { "endpoint_attribute": "temperature", "attributes": { "0x0000": { "attribute_name": "measured_value", "value": 2500 } }, "unsupported_attributes": {} }, "0x0405": { "endpoint_attribute": "humidity", "attributes": { "0x0000": { "attribute_name": "measured_value", "value": 4400 } }, "unsupported_attributes": {} }, "0xfc57": { "endpoint_attribute": "manufacturer_specific", "attributes": {}, "unsupported_attributes": {} }, "0xfc7c": { "endpoint_attribute": "manufacturer_specific", "attributes": {}, "unsupported_attributes": {} }, "0x042a": { "endpoint_attribute": "pm25", "attributes": { "0x0000": { "attribute_name": "measured_value", "value": 740.0 } }, "unsupported_attributes": {} }, "0xfc7e": { "endpoint_attribute": "manufacturer_specific", "attributes": {}, "unsupported_attributes": {} } }, "out_clusters": { "0x0003": { "endpoint_attribute": "identify", "attributes": {}, "unsupported_attributes": {} }, "0x0019": { "endpoint_attribute": "ota", "attributes": {}, "unsupported_attributes": {} }, "0x0020": { "endpoint_attribute": "poll_control", "attributes": {}, "unsupported_attributes": {} }, "0x0202": { "endpoint_attribute": "fan", "attributes": {}, "unsupported_attributes": {} } } }, "242": { "device_type": { "name": "unknown", "id": 97 }, "profile_id": 41440, "in_clusters": {}, "out_clusters": { "0x0021": { "endpoint_attribute": "green_power", "attributes": {}, "unsupported_attributes": {} } } } } } } ```
Additional logs ``` Nothing HERE !!! ```

Additional context From CSA-IOT cert: Zigbee 3.0 Vindstyrka Air Sensor SKU E2112 Firmware Version 1.0.11 Hardware Version 1 Certificate ID ZIG23024ZB331492-24 Certified Date 02/23/2023

The device is shipped with firmware 1.0.010 but the new have not being pushed to TF or DG but is very likely being done very soon (I shall trying sniffing it with Dirigea if its possible then the Zigbee module is debug locked so the device is sitting in "caranteen" for not getting updated alone).

Its looks being very nice ZCL standard cluster but the VOC is not working and the fan is being used for steering starkvind if being direct pared with it and i think it shall being possible doing the same with ZHA or using its command for other fan devices. Z2M have making the most work so worth looking what the device can do but i think they have missing some parts and some can being done better in ZHA :-))

The device is working OK for the moment so i trying focus on catching the OTA firmware so we is getting one if users need it and later getting full support for the device.

MattWestb commented 1 year ago

Then looking i was finding one older version that early devices can being shipped with.

CSA-IOT certed Firmware Versions:

1.0.009
06/14/2022

1.0.010
08/08/2022

1.0.11
02/23/2023

I only having the 1.0.010 and dont knowing if the other is working the same way.

just-oblivious commented 1 year ago

Cluster 0xfc7e in endpoint 1 provides a measurement in the range of 0-500 that correlates with the tVOC trend display on the unit itself.

See also: https://community.home-assistant.io/t/ikea-vindstyrka-zigbee-air-quality-sensor/549747/3?u=donny007x

MattWestb commented 1 year ago

I was adding 0xFC7F and 0xFC80 cluster for Symfonisk 2 and we need doing the same for this device and we also need looking if Zigbee is having one standard cluster for tVOC in the ZCL R8 and also if Matter ZCL is having some update on it but they is not having adding all classes and can coming later (IKEA is very heavy in CSA-IOT / Matter aliens and is using functions that is not in the standard but is coming).

My device is siting in carantene for not getting OTA updates from Dirigera but if some is having one connected to Dirigera and getting update pleas informing my and i trying sniffing it and making one OTA file that we can using in ZHA (i only have one chance getting all packages and then i must baying one more device for getting the missing packages). I dont know ind TF is having support for or if getting it but is no OTA released in the open feed.

I is having little mush in the pipe that must being fixed but i trying helping as much i can with knowledge for getting good support for this device.

Also the fan control is interesting then the device is using it then connecting to Starkvind for steering the fan speed and can being used to controlling other devices but i think it shall being bounded to devices fan cluster and we shall getting it working in ZHA if its possible. But i dont have any Strakvind and i was testing flashing the OTA firmware on one Zigbee module but it looks not starting OK then its not having all hardware its need for working OK so wee need some with one Starkvind later for testing.

just-oblivious commented 1 year ago

The ZCL R8 doc specifies a standard cluster ID for PM2.5 (0x042A, listed under "Concentration Measurement"), but not one for tVOC. I couldn't find anything in the Matter Clusters on air quality sensing.

The Sensirion SEN54 sensor module inside VINDSTYRKA reports a "VOC index" on a scale of 0-500, which matches the bounds reported by the attribute. So it looks like we're getting the processed value directly from the sensor: https://sensirion.com/media/documents/02232963/6294E043/Info_Note_VOC_Index.pdf

MattWestb commented 1 year ago

Was looking if Matter have implanting the sensor cluster but i was not finding PM2.5 and tVOC so its not in the pipe for next update of ZCL for Zigbee and Matter.

How have HA implanting it for other sensors ? Some sensors that is being tracked https://github.com/zigpy/zigpy/discussions/691. How have Z2M mapping it in HA ?

MattWestb commented 1 year ago

New version 1.0.11 looks having the same end point and cluster setting:

{
  "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.Router: 1>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 142>, manufacturer_code=4476, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)",
  "endpoints": {
    "1": {
      "profile_id": 260,
      "device_type": "0x0302",
      "in_clusters": [
        "0x0000",
        "0x0003",
        "0x0004",
        "0x0402",
        "0x0405",
        "0x042a",
        "0xfc57",
        "0xfc7c",
        "0xfc7e"
      ],
      "out_clusters": [
        "0x0003",
        "0x0019",
        "0x0020",
        "0x0202"
      ]
    },
    "242": {
      "profile_id": 41440,
      "device_type": "0x0061",
      "in_clusters": [],
      "out_clusters": [
        "0x0021"
      ]
    }
  },
  "manufacturer": "IKEA of Sweden",
  "model": "VINDSTYRKA",
  "class": "vindstyrka.IkeaVINDSTYRKA"
}

I was sniffing the upgrade but i was loosing 2 package so i cant doing one OTA file but i shall fixing it in one other way (sad for IKEA getting one updated device back that was broken of there OTA update ;-)) ) so users without Dirigear can getting there devices updated.

MattWestb commented 1 year ago

The OTA file is posted in the IKEA OTA discussion if some like testing it with ZHA. I cant testing it then i only having one and its now updated and cant doing one more time. The signing is OK so the device shall flashing it OK and being safe as its one original signed OTA file.

github-actions[bot] commented 10 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

jpizquierdo commented 1 month ago

Any news?

JohnNeville commented 1 week ago

Why did this get closed? There is a PR open specifically for this issue https://github.com/zigpy/zha-device-handlers/pull/2315