Adding ikea switch using zigbee2mqtt miss some channels

  • Platform information:

    • Hardware: x86 server
    • OS: ubuntu, manual install
    • Java Runtime Environment: java-11-openjdk-amd64
    • openHAB version: 3.3.0
  • Issue of the topic:
    I added IKEA ICPSHC24-30EU-IL-1 and zigbee2mqtt detects correctly, and I can switch light on/off through its interface.
    When I add it to openhab, I don’t get any channel to switch it on/off. Reading documentation (IKEA ICPSHC24-30EU-IL-1 control via MQTT | Zigbee2MQTT) I expected state and brightness.
    I don’t know if zigbee2mqtt forgets to announce them, or openhab don’t get them.
    Could some channels be added manually? (and how, never done before)

  • Please post configurations (if applicable):

UID: mqtt:homeassistant_zigbee2mqtt_5F0x0c4314fffe0f8ab6:mqtt-broker:encimeraCuina
label: encimeraCuina
thingTypeUID: mqtt:homeassistant_zigbee2mqtt_5F0x0c4314fffe0f8ab6
configuration:
  topics:
    - sensor/0x0c4314fffe0f8ab6/update_state
    - sensor/0x0c4314fffe0f8ab6/power_on_behavior
    - select/0x0c4314fffe0f8ab6/power_on_behavior
    - binary_sensor/0x0c4314fffe0f8ab6/update_available
    - update/0x0c4314fffe0f8ab6/update
    - light/0x0c4314fffe0f8ab6/light
    - sensor/0x0c4314fffe0f8ab6/linkquality
    - select/0x0c4314fffe0f8ab6/effect
  basetopic: homeassistant
bridgeUID: mqtt:broker:mqtt-broker
  • If logs where generated please post these here using code fences:
de gen. 17 09:53:11 homeserver npm[4024]: Zigbee2MQTT:info  2023-01-17 09:53:11: MQTT publish: topic 'zigbee2mqtt/encimeraCuina', payload '{"device":
{"applicationVersion":17,"dateCode":"20190401","friendlyName":"encimeraCuina","hardwareVersion":2,"ieeeAddr":"0x0c4314fffe0f8ab6","manufacturerID":4476,"man
ufacturerName":"IKEA of Sweden","model":"ICPSHC24-30EU-IL-1","networkAddress":32704,"powerSource":"Mains (single phase)","softwareBuildID":"1.2.245","stackV
ersion":87,"type":"Router","zclVersion":1},"linkquality":75,"power_on_behavior":null,"state":null,"update":{"installed_version":-1,"latest_version":-1,"stat
e":null},"update_available":null}'
de gen. 17 09:53:11 homeserver npm[4024]: Zigbee2MQTT:info  2023-01-17 09:53:11: MQTT publish: topic 'zigbee2mqtt/bridge/response/device/rename', pay
load '{"data":{"from":"0x0c4314fffe0f8ab6","homeassistant_rename":true,"to":"encimeraCuina"},"status":"ok","transaction":"9ve88-7"}'
de gen. 17 09:53:13 homeserver npm[4024]: Zigbee2MQTT:info  2023-01-17 09:53:13: MQTT publish: topic 'homeassistant/light/0x0c4314fffe0f8ab6/light/co
nfig', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"brightness":true,"brightness_scale":254,"command_topic":"zigbee2mqtt/encimeraCuina/s
et","device":{"identifiers":["zigbee2mqtt_0x0c4314fffe0f8ab6"],"manufacturer":"IKEA","model":"TRADFRI driver for wireless control (30 watt) (ICPSHC24-30EU-I
L-1)","name":"encimeraCuina","sw_version":"1.2.245"},"effect":true,"effect_list":["blink","breathe","okay","channel_change","finish_effect","stop_effect"],"
json_attributes_topic":"zigbee2mqtt/encimeraCuina","name":"encimeraCuina","schema":"json","state_topic":"zigbee2mqtt/encimeraCuina","unique_id":"0x0c4314fff
e0f8ab6_light_zigbee2mqtt"}'
de gen. 17 09:53:13 homeserver npm[4024]: Zigbee2MQTT:info  2023-01-17 09:53:13: MQTT publish: topic 'homeassistant/select/0x0c4314fffe0f8ab6/effect/
config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"command_topic":"zigbee2mqtt/encimeraCuina/set/effect","device":{"identifiers":["zi
gbee2mqtt_0x0c4314fffe0f8ab6"],"manufacturer":"IKEA","model":"TRADFRI driver for wireless control (30 watt) (ICPSHC24-30EU-IL-1)","name":"encimeraCuina","sw
_version":"1.2.245"},"enabled_by_default":false,"icon":"mdi:palette","json_attributes_topic":"zigbee2mqtt/encimeraCuina","name":"encimeraCuina effect","opti
ons":["blink","breathe","okay","channel_change","finish_effect","stop_effect"],"unique_id":"0x0c4314fffe0f8ab6_effect_zigbee2mqtt"}'
de gen. 17 09:53:13 homeserver npm[4024]: Zigbee2MQTT:info  2023-01-17 09:53:13: MQTT publish: topic 'homeassistant/sensor/0x0c4314fffe0f8ab6/power_o
n_behavior/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x0c4314fffe0f8ab6"],"manufacturer
":"IKEA","model":"TRADFRI driver for wireless control (30 watt) (ICPSHC24-30EU-IL-1)","name":"encimeraCuina","sw_version":"1.2.245"},"enabled_by_default":fa
lse,"entity_category":"config","icon":"mdi:power-settings","json_attributes_topic":"zigbee2mqtt/encimeraCuina","name":"encimeraCuina power on behavior","sta
te_topic":"zigbee2mqtt/encimeraCuina","unique_id":"0x0c4314fffe0f8ab6_power_on_behavior_zigbee2mqtt","value_template":"{{ value_json.power_on_behavior }}"}'
de gen. 17 09:53:13 homeserver npm[4024]: Zigbee2MQTT:info  2023-01-17 09:53:13: MQTT publish: topic 'homeassistant/select/0x0c4314fffe0f8ab6/power_o
n_behavior/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"command_topic":"zigbee2mqtt/encimeraCuina/set/power_on_behavior","devic
e":{"identifiers":["zigbee2mqtt_0x0c4314fffe0f8ab6"],"manufacturer":"IKEA","model":"TRADFRI driver for wireless control (30 watt) (ICPSHC24-30EU-IL-1)","nam
e":"encimeraCuina","sw_version":"1.2.245"},"entity_category":"config","icon":"mdi:power-settings","json_attributes_topic":"zigbee2mqtt/encimeraCuina","name"
:"encimeraCuina power on behavior","options":["off","on","toggle","previous"],"state_topic":"zigbee2mqtt/encimeraCuina","unique_id":"0x0c4314fffe0f8ab6_powe
r_on_behavior_zigbee2mqtt","value_template":"{{ value_json.power_on_behavior }}"}'
de gen. 17 09:53:13 homeserver npm[4024]: Zigbee2MQTT:info  2023-01-17 09:53:13: MQTT publish: topic 'homeassistant/sensor/0x0c4314fffe0f8ab6/linkqua
lity/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x0c4314fffe0f8ab6"],"manufacturer":"IKE
A","model":"TRADFRI driver for wireless control (30 watt) (ICPSHC24-30EU-IL-1)","name":"encimeraCuina","sw_version":"1.2.245"},"enabled_by_default":false,"e
ntity_category":"diagnostic","icon":"mdi:signal","json_attributes_topic":"zigbee2mqtt/encimeraCuina","name":"encimeraCuina linkquality","state_class":"measu
rement","state_topic":"zigbee2mqtt/encimeraCuina","unique_id":"0x0c4314fffe0f8ab6_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ 
value_json.linkquality }}"}'
de gen. 17 09:53:13 homeserver npm[4024]: Zigbee2MQTT:info  2023-01-17 09:53:13: MQTT publish: topic 'homeassistant/sensor/0x0c4314fffe0f8ab6/update_
state/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x0c4314fffe0f8ab6"],"manufacturer":"IK
EA","model":"TRADFRI driver for wireless control (30 watt) (ICPSHC24-30EU-IL-1)","name":"encimeraCuina","sw_version":"1.2.245"},"enabled_by_default":false,"
entity_category":"diagnostic","icon":"mdi:update","json_attributes_topic":"zigbee2mqtt/encimeraCuina","name":"encimeraCuina update state","state_topic":"zig
bee2mqtt/encimeraCuina","unique_id":"0x0c4314fffe0f8ab6_update_state_zigbee2mqtt","value_template":"{{ value_json['update']['state'] }}"}'
de gen. 17 09:53:13 homeserver npm[4024]: Zigbee2MQTT:info  2023-01-17 09:53:13: MQTT publish: topic 'homeassistant/binary_sensor/0x0c4314fffe0f8ab6/
update_available/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x0c4314fffe0f8ab6"],"manufa
cturer":"IKEA","model":"TRADFRI driver for wireless control (30 watt) (ICPSHC24-30EU-IL-1)","name":"encimeraCuina","sw_version":"1.2.245"},"device_class":"u
pdate","enabled_by_default":false,"entity_category":"diagnostic","json_attributes_topic":"zigbee2mqtt/encimeraCuina","name":"encimeraCuina update available"
,"payload_off":false,"payload_on":true,"state_topic":"zigbee2mqtt/encimeraCuina","unique_id":"0x0c4314fffe0f8ab6_update_available_zigbee2mqtt","value_templa
te":"{{ value_json['update']['state'] == \"available\" }}"}'
de gen. 17 09:53:13 homeserver npm[4024]: Zigbee2MQTT:info  2023-01-17 09:53:13: MQTT publish: topic 'homeassistant/update/0x0c4314fffe0f8ab6/update/
config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"command_topic":"zigbee2mqtt/bridge/request/device/ota_update/update","device":{"id
entifiers":["zigbee2mqtt_0x0c4314fffe0f8ab6"],"manufacturer":"IKEA","model":"TRADFRI driver for wireless control (30 watt) (ICPSHC24-30EU-IL-1)","name":"enc
imeraCuina","sw_version":"1.2.245"},"device_class":"firmware","entity_picture":"https://github.com/Koenkk/zigbee2mqtt/raw/master/images/logo.png","json_attr
ibutes_topic":"zigbee2mqtt/encimeraCuina","latest_version_template":"{{ value_json['update']['latest_version'] }}","latest_version_topic":"zigbee2mqtt/encim
eraCuina","name":"encimeraCuina","payload_install":"{\"id\": \"0x0c4314fffe0f8ab6\"}","state_topic":"zigbee2mqtt/encimeraCuina","unique_id":"0x0c4314fffe0f8
ab6_update_zigbee2mqtt","value_template":"{{ value_json['update']['installed_version'] }}"}'

Thanks

Settings → Things → (Your Thing) → Channels → Add Channel

See Use case: Integrating IKEA Starkvind air purifier into openHAB for an example.

You can add it as a generic MQTT thing see below as an example

UID: mqtt:topic:DockerMQTT:Main_Bedroom_Ceiling_Light
label: Main Bedroom Ceiling Light
thingTypeUID: mqtt:topic
configuration:
  payloadNotAvailable: offline
  availabilityTopic: zigbee2mqtt/Main_Bedroom_Ceiling_Light/availability
  payloadAvailable: online
bridgeUID: mqtt:broker:DockerMQTT
channels:
  - id: Hall_Bulb_Bedroom_linkquality
    channelTypeUID: mqtt:number
    label: Hall Bulb Bedroom Link Quality
    description: null
    configuration:
      stateTopic: zigbee2mqtt/Main_Bedroom_Ceiling_Light/linkquality
  - id: Hall_Bulb_Bedroom_Brightness
    channelTypeUID: mqtt:dimmer
    label: Hall Bulb Bedroom Brightness
    description: null
    configuration:
      commandTopic: zigbee2mqtt/Main_Bedroom_Ceiling_Light/set/brightness
      min: 0
      stateTopic: zigbee2mqtt/Main_Bedroom_Ceiling_Light/brightness
      max: 253.98
      off: enabled
      on: enabled

Thanks. I will try adding channels manually, and things using interface; but thing example is interesting.

Just checked, I don’t see any “add channel” in interface.
Other things has it, but not this. Maybe because it was automatically added?

1 Like

You have to create the thing manually, not using home assistant.
Then you can either do it on your own or use @clinophobic s example by pasting it into your generic mqtt Things YAML.

Have you got the required transformations installed as detailed in the documentation.

Not all features work when using the home assistant mqtt standard.

To add them manually without transformations you will need to edit your zigbee2mqtt configuration yaml. This can be done in frontend if you have given it a port.

If you already have things setup using the home assistant standards set the output in experimental settings to attribute_and_json or add it via configuration.yaml.

experimental:
  output: ttribute_and_json

That way you can add them manually (generic) or via the home assistant auto discovery) best of both worlds :slight_smile:

I have the transformations (I forgot them when I upgraded from openhab2 to openhab3, lesson learned :sweat_smile:), I will try creating the thing manually following the example.
Thanks

1 Like