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?

Hi, did yoy fine a solution? I am in the same position.

Not directly. I added it through my SmartThings hub.

You need a zigbee coordinator to connect the outlet to HA. Can be a zigbee CC2531 stick with zigbee2mqtt, a deconz stick with phoscon, an ikea or hue hub, or as above a smarthings hub.

Thanks, I add it with deconz stick. No I have a new problem. The main purpose to install the tradfri outlet was to expand my zigbee network. Although everything seems correct my xiaomi switch still can’t operate in the room I want. 2 meters away it works. Right there I have install the tradfri outlet. I don’t know why this is happening.

From what I understand simply adding a device that acts like a router (like the ikea tradfri switch) won’t cause existing end devices (like your Xioami switch) to start connecting to the new router. It seems they are sticky to the device the router or coordinator originally connected to and will not start to connect to a new router.

I fortunately added my xioami zigbee devices after I had my tradfri outlets in place but you have to basically forget your entire zigbee network and add devices one by one. You want to add your xioami devices that you want to connect to route through your tradfri ikea outlet last and you should do this as far away from your coordinator as possible so that it does route through the outlet and not your coordinator.

Again I haven’t done this but I’ve read about this issue of stickiness with xioami devices not wanting to connect to a new router. I’d do some googling to find more information from people who have actually done this though before resetting your zigbee network.

Finally I manage to connected the switch with the help of the forum. I had to install the switch again as a light switch in deconz (not as a switch) after the setup of the outlet (which was again as a light)
However I have to try a lot of times to make this happen but eventually I did. Not recommended though because it is not a straightforward set up.