Adding Ikea control outlet to Home Assistant without Ikea Hub

Hello,

I have successfully installed Home Assistant and in the log-file of zigbee2mqtt I can see that a TRADFRI control outlet has been connected. I am not using the Ikea hub. The outlet is directly connected through a CC2531 USB dongle. How can I add this outlet to Home Assistant so that I can switch it on and off?
Is there some more configuration I need to do?

Regards,

Wamor

Hello,

Today I started Homeassistant again and to my surprise I see the Tradfri control outlet is connected to the Homeassistant Overview screen (see below).

Annotation%202019-02-21%20205030

When I press one of the switches I would expect that the control-outlet is switching on or off but nothing happens. The outlet is connected through a CC2531 dongle.
Is there still some extra configuration I need to do to make this work?

Thank you and best regards,

Wamor

You could try manually adding the switch in your configuration.yaml. This is what I use and I can control it without any issues without a Ikea bridge using zigbee2mqtt with the CC2531 dongle:

switch:
  - platform: "mqtt"
    name: Ikea Tradfri Outlet
    state_topic: "zigbee2mqtt/<your-zigbee-identifier>"
    availability_topic: "zigbee2mqtt/bridge/state"
    payload_off: "OFF"
    payload_on: "ON"
    value_template: "{{ value_json.state }}"
    command_topic: "zigbee2mqtt/<your-zigbee-identifier>/set"

Hello fahr,

Thanks for your quick reply.
On my system I got 2 configuration.yaml files: 1 in the config-folder and 1 in the share/zigbee2mqtt.
Which file should I change? I changed the 1 in the config-folder but without succes.

Regards,

Wamor

It would be in your config folder to add a sensor, not the share/zigbee2mqtt. After modifying the configuraiton.yaml file did you restart home-assistant? Can you see the sensor in the dev tab?

Hello fahr,

Again thank you for you response.
Yes, I did restart home-assistant but still no luck.
Please let me explain how I have things configured.
In the overview-screen I see the below screen:
Annotation%202019-02-22%20221536
Under the Development tools-Events I have the below screen:


My configuration.yaml in share/zigbee2mqtt-foler has the following information:

homeassistant: false
mqtt:
base_topic: zigbee2mqtt
server: mqtt://homeassistant:1883
permit_join: true
serial:
port: /dev/ttyACM0

According to your information I have added the following lines to the configuration.yaml in the config-folder:

switch:

  • platform: “mqtt”
    name: Ikea Tradfri Outlet
    state_topic: “zigbee2mqtt/0xd0cf5efffe7b5415”
    availability_topic: “zigbee2mqtt/bridge/state”
    payload_off: “OFF”
    payload_on: “ON”
    value_template: “{{ value_json.state }}”
    command_topic: “zigbee2mqtt/0xd0cf5efffe7b5415/set”

I hope this all makes sense and that you can help me? I am still puzzling how to get homeassistant working with Ikea devices with using the hub. If you still need more info. please let me know.

Regards,

Wamor

That does look correct to me. Anything in the logs when toggling the outlet? For what it’s worth, this is what my lovelace yaml looks like for the card to toggle the light I have plugged into the outlet:

- type: glance
  show_state: true
  entities:
    - entity: switch.kitchen_ikea_tradfri_outlet
      name: Cabinet
      icon: mdi:track-light
      tap_action:
        action: toggle

I would like to connect an IKEA TRADFRI switch and need some clarification on the solutions herein.

  1. Do I need the MQTT add-on installed?

  2. How can I lookup the zigbee identifier for my tradfri?