Skip to content

Installing Tradfri outlet in Openhab with Zigbee2MQTT

zigbee2mqtt openhab tradfri

You must have FRIENDLY_NAME enabled in zigbee2mqtt configuration.yaml. If you followed my tutorial install zigbee2mqtt openhabian Then you can use the following.

Go to the Zigbee2mqtt folder.

cd /opt/zigbee2mqtt/data

Edit configuration.yaml. file

sudo nano configuration.yaml.
tradfri outlet in  Openhab zigbee2mqtt friendly name

Here you can edit the friendly names of your zigbee2mqtt devices. Ctrl +X to exit and save.

Thing example Tradfri outlet

Thing topic WalloutletCoffeeDevice "Koffie" @ "DiningRoom" {
        Channels:
            Type switch : state "state" [ stateTopic = "zigbee2mqtt/WalloutletCoffeeDevice/state", commandTopic = "zigbee2mqtt/WalloutletCoffeeDevice/set/state", on="ON", off="OFF" ]
            Type string : update_available "update_available"     [ stateTopic="zigbee2mqtt/WalloutletCoffeeDevice/update_available"]   
            Type number : linkquality      "linkquality"     [ stateTopic="zigbee2mqtt/WalloutletCoffeeDevice/linkquality" ]   
            Type datetime : last_seen "last_seen" [ stateTopic="zigbee2mqtt/WalloutletCoffeeDevice/last_seen" ]

Items example Tradfri outlet

    Thing topic WalloutletCoffeeDevice "Koffie" @ "DiningRoom" {
        Channels:
            Type switch : state "state" [ stateTopic = "zigbee2mqtt/WalloutletCoffeeDevice/state", commandTopic = "zigbee2mqtt/WalloutletCoffeeDevice/set/state", on="ON", off="OFF" ]
            Type string : update_available "update_available"     [ stateTopic="zigbee2mqtt/WalloutletCoffeeDevice/update_available"]   
            Type number : linkquality      "linkquality"     [ stateTopic="zigbee2mqtt/WalloutletCoffeeDevice/linkquality" ]   
            Type datetime : last_seen "last_seen" [ stateTopic="zigbee2mqtt/WalloutletCoffeeDevice/last_seen" ]

Leave a Reply