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
683 stars 634 forks source link

[Device Support Request] IKEA of Sweden Remote Control N2 #2841

Closed HawkanForce closed 2 days ago

HawkanForce commented 6 months ago

Problem description

I just bought a Ikea Styrbar E2002. It paris but shows no entities or only battery and identify. Tried to reconfigure, remove, restart an readd. It does not show firmware version, and shows to use Quirkv1 (dont know how to remove or change quirks)

Solution description

just to get it to work :)

Screenshots/Video

image

Device signature

<details><summary>Device signature</summary>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{
  "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, 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=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)",
  "endpoints": {
    "1": {
      "profile_id": "0x0104",
      "device_type": "0x0820",
      "input_clusters": [
        "0x0000",
        "0x0001",
        "0x0003",
        "0x0020",
        "0x1000",
        "0xfc57"
      ],
      "output_clusters": [
        "0x0003",
        "0x0005",
        "0x0006",
        "0x0008",
        "0x0019",
        "0x1000"
      ]
    }
  },
  "manufacturer": "IKEA of Sweden",
  "model": "Remote Control N2",
  "class": "zhaquirks.ikea.fourbtnremote.IkeaTradfriRemoteV1"
}

Diagnostic information

Diagnostic information ```json { "home_assistant": { "installation_type": "Home Assistant OS", "version": "2023.12.3", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.11.6", "docker": true, "arch": "x86_64", "timezone": "Europe/Helsinki", "os_name": "Linux", "os_version": "6.1.63-haos", "supervisor": "2023.11.6", "host_os": "Home Assistant OS 11.2", "docker_version": "24.0.7", "chassis": "embedded", "run_as_root": true }, "custom_components": { "blitzortung": { "version": "1.0.1", "requirements": [ "paho-mqtt>=1.5.0" ] }, "hacs": { "version": "1.33.0", "requirements": [ "aiogithubapi>=22.10.1" ] }, "auto_backup": { "version": "1.4.1", "requirements": [] }, "xiaomi_miot": { "version": "0.7.13", "requirements": [ "construct>=2.10.56", "python-miio>=0.5.6", "micloud>=0.3" ] }, "nordpool": { "version": "0.0.14", "requirements": [ "nordpool>=0.2", "backoff" ] }, "philips_android_tv": { "version": "1.0.0", "requirements": [ "wakeonlan" ] }, "localtuya": { "version": "5.2.1", "requirements": [] }, "xiaomi_cloud_map_extractor": { "version": "v2.2.0", "requirements": [ "pillow", "pybase64", "python-miio", "requests", "pycryptodome" ] }, "waste_collection_schedule": { "version": "1.44.0", "requirements": [ "icalendar", "recurring_ical_events", "icalevents", "bs4", "lxml" ] }, "frigate": { "version": "4.0.0", "requirements": [ "pytz==2022.7" ] }, "scheduler": { "version": "v0.0.0", "requirements": [] }, "met_next_6_hours_forecast": { "version": "v1.1.1", "requirements": [] } }, "integration_manifest": { "domain": "zha", "name": "Zigbee Home Automation", "after_dependencies": [ "onboarding", "usb" ], "codeowners": [ "@dmulcahey", "@adminiuga", "@puddly", "@TheJulianJES" ], "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", "universal_silabs_flasher" ], "requirements": [ "bellows==0.37.3", "pyserial==3.5", "pyserial-asyncio==0.6", "zha-quirks==0.0.107", "zigpy-deconz==0.22.2", "zigpy==0.60.1", "zigpy-xbee==0.20.1", "zigpy-zigate==0.12.0", "zigpy-znp==0.12.0", "universal-silabs-flasher==0.0.15", "pyserial-asyncio-fast==0.11" ], "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": "0403", "pid": "6015", "description": "*conbee*", "known_devices": [ "Conbee III" ] }, { "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": "_uzg-01._tcp.local.", "name": "uzg-01*" }, { "type": "_slzb-06._tcp.local.", "name": "slzb-06*" } ], "is_built_in": true }, "data": { "ieee": "**REDACTED**", "nwk": 1297, "manufacturer": "IKEA of Sweden", "model": "Remote Control N2", "name": "IKEA of Sweden Remote Control N2", "quirk_applied": true, "quirk_class": "zhaquirks.ikea.fourbtnremote.IkeaTradfriRemoteV1", "quirk_id": null, "manufacturer_code": 4476, "power_source": "Battery or Unknown", "lqi": null, "rssi": null, "last_seen": "2023-12-17T12:33:37", "available": true, "device_type": "EndDevice", "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=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)", "endpoints": { "1": { "profile_id": "0x0104", "device_type": "0x0820", "input_clusters": [ "0x0000", "0x0001", "0x0003", "0x0020", "0x1000", "0xfc57" ], "output_clusters": [ "0x0003", "0x0005", "0x0006", "0x0008", "0x0019", "0x1000" ] } }, "manufacturer": "IKEA of Sweden", "model": "Remote Control N2" }, "active_coordinator": false, "entities": [], "neighbors": [], "routes": [], "endpoint_names": [ { "name": "NON_COLOR_CONTROLLER" } ], "user_given_name": null, "device_reg_id": "e807c1953279bac2a3c48a8f48732339", "area_id": null, "cluster_details": { "1": { "device_type": { "name": "NON_COLOR_CONTROLLER", "id": 2080 }, "profile_id": 260, "in_clusters": { "0x0000": { "endpoint_attribute": "basic", "attributes": { "0x0004": { "attribute_name": "manufacturer", "value": "IKEA of Sweden" }, "0x0005": { "attribute_name": "model", "value": "Remote Control N2" } }, "unsupported_attributes": {} }, "0x0001": { "endpoint_attribute": "power", "attributes": { "0x0021": { "attribute_name": "battery_percentage_remaining", "value": 200 }, "0x0033": { "attribute_name": "battery_quantity", "value": 2 }, "0x0034": { "attribute_name": "battery_rated_voltage", "value": 15 }, "0x0031": { "attribute_name": "battery_size", "value": 4 }, "0x0020": { "attribute_name": "battery_voltage", "value": 0 } }, "unsupported_attributes": {} }, "0x0003": { "endpoint_attribute": "identify", "attributes": {}, "unsupported_attributes": {} }, "0x0020": { "endpoint_attribute": "poll_control", "attributes": { "0x0000": { "attribute_name": "checkin_interval", "value": 13200 } }, "unsupported_attributes": {} }, "0x1000": { "endpoint_attribute": "lightlink", "attributes": {}, "unsupported_attributes": {} }, "0xfc57": { "endpoint_attribute": "manufacturer_specific", "attributes": {}, "unsupported_attributes": {} } }, "out_clusters": { "0x0003": { "endpoint_attribute": "identify", "attributes": {}, "unsupported_attributes": {} }, "0x0005": { "endpoint_attribute": "scenes", "attributes": {}, "unsupported_attributes": {} }, "0x0006": { "endpoint_attribute": "on_off", "attributes": {}, "unsupported_attributes": {} }, "0x0008": { "endpoint_attribute": "level", "attributes": {}, "unsupported_attributes": {} }, "0x0019": { "endpoint_attribute": "ota", "attributes": {}, "unsupported_attributes": {} }, "0x1000": { "endpoint_attribute": "lightlink", "attributes": {}, "unsupported_attributes": {} } } } } } } ```

Logs

Logs ```python [Paste the logs here] ```

Custom quirk

Custom quirk ```python [Paste your custom quirk here] ```

Additional information

No response

MattWestb commented 6 months ago

The device looks OK and the system is only getting the version then the device is requesting OTA but is coming in some hours but you can also reading it on the basic cluster (SW version). If you have doing reconfigure and was waking up the device and was getting green checks on all it shall working OK. But i think the best is letting it doing OTA update then its on shipping version and not the last production ones (after OTA you need deleting it and waiting one minute and then adding it new for working OK).

HawkanForce commented 6 months ago

Thanks for the quick response. The reconfig shows green for binding and reporting (and got green for battery once too) but now all orange. I'll let it sit for a couple of hours if it sorts itself out

image

MattWestb commented 6 months ago

They can being tricky getting reconfigured but normally its being OK or one restart of HA. But better getting OTA update done so not need doing all more times.

HawkanForce commented 6 months ago

It shows button presses in the log now, but the ota doesn't seem to install. At one time it did show the firmware version as 0x00010024 and others seemed to have problems with the OTA for that one aswell so I'll try to poke a bit with that. image

TheJulianJES commented 6 months ago

It paris but shows no entities or only battery and identify.

That's expected. You won't get an entity for the button presses. You should get a zha_event on a button press though. Like mentioned, reconfiguring (whilst pressing buttons to wake the device) should help with this.

It shows button presses in the log now

That's the expected behavior then. You can use device automation triggers (trigger: device) in automations with the different button presses then.

HawkanForce commented 6 months ago

Today I somehow got the 2.4.5 firmware installed, but it no longer shows button presses in the logbook, it has switched to zhaquirks.ikea.fourbtnremote.IkeaTradfriRemoteV2 image

I really do not know what I am doing :) All other Zigbee devices have worked right out of the box but these Ikea ones seem to be giving at least me a bit of a workout

MattWestb commented 6 months ago

Deleting it from the device card and waiting one minute or restarting HA and adding it new. Then its OK paired do one reconfigure from the device card and waking up the device so i can reviving the commands.

HawkanForce commented 6 months ago

deleted - waited and added new. Got the interview scan_interview the I went to the device, removed the battery for a while and took reconfig reconfig tried a restart afterwards also image

AllardKatan commented 6 months ago

This sort of corresponds to my experience with the Ikea remotes. Getting them to work requires a lot waiting plus of trial and error (or more information than I could find). Once they work though, they stay good. If someone has more in-depth knowledge and/or knows a link to a good how-to guide for pairing Ikea remotes to ZHA, that would be great. Because they are cheap, easy to get and reliable once they start working.

HawkanForce commented 6 months ago

Ok thanks, I'll try again tomorrow see if I get lucky :)

MattWestb commented 6 months ago

If its in the network but not waking up OK the best is removing the battery and putting it back and reseeding the reconfigure. If getting all green it shall being OK and also they is doing checkins every 55 minutes. Also restart HA can helping but takes times and is little tricky.

HawkanForce commented 6 months ago

For a while I got left and right button presses to work image and now I got the device added. But no button presses work. I'll leave it overnight and restart HA in the morning and continue. Maybe these are some babysteps atleast :) readytouse

henri98 commented 6 months ago

Im facing issues with binding groups in ZHA since firmware version 0x02040005. Does this work for you?

HawkanForce commented 6 months ago

I Henri, I have not gotten it to work :/

MattWestb commented 6 months ago

Group binding is not supported after firmware 1.0.024 (over one year old "news") and if running on that or older its working. https://github.com/zigpy/zigpy/discussions/660#discussioncomment-4497890

HawkanForce commented 6 months ago

I'm a noob and don't understand much like group bindings etc but I'll try to read the thread you posted maybe I learn something :) I'll try to downgrade the firmware also that was in the post. Let's see what happens. edit: or maybe I can't downgrade as I do not have any special equipment...

MattWestb commented 6 months ago

All IKEA controller that i have trying is blocked for firmware downgrade with OTA (also written in the Zigbee certificate) so must do it with SWD-Probe and flashing the old firmware with it.

HawkanForce commented 6 months ago

Is it a brick otherwise? Maybe just better to give it to someone using ikea hub and buying another button. All other Zigbee devices have worked so easily so I thought all zigbee would be easy. So a lesson learned atleast :) Thanks for all the help

MattWestb commented 6 months ago

Its depends what you like using it for. Controlling lights with direct binding / device is working OK and also using the events for doing automatons only binding the remote to Zigbee groups is not working on the production firmware (that is bad for all light systems).

Then you can getting commands from the remote is not one brick only little tricky getting OK configurated.

PS: Binding is making the commands is working also then the host system is not online / not working OK and is great for light systems.

HawkanForce commented 6 months ago

So I can check for button presses despite them not showing in the log for the device? I will the button presses just to run different automations so I guess the group bindings does not affect me

github-actions[bot] commented 1 week 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.