Detect IKEA tradfri devices going offline/online - Poweron/PowerOff

I have searched but did not find the solution, but would imagine that a lot of people have the same issue, so likely already described but I cant find it and apologies in advance.

I run a lot of IKEA lamps, I use Proxmox, a Sonoff stick, Zigbee2mqtt and node-red. Most things work nicely.

But I have a lamp in a closet that physically is switched(230v) on when the door is opened, I want to automate the lamp so it toggles off when x minutes have passed.

How do I trigger an event when a lamp is powered off/on? Or how can I at least detect it?

Keep the bulb powered and use a magnet sensor on the closet perhaps.

yeah, but I live in a old house with wires in brick walls, and many places where I want to automate lights ar at least detect if they are powered on or not. The closet lamp is just a simple use case.

Keeping them powered and toggling them on and off with a zigbee switch, a magnet sensor and what not will help you accomplish monitoring if they are on or not. The zigbee network will suffer if you power routers (bulbs) on and off. Another approach would be to change your bulbs to non-smart ones and replace the switches / dimmers with smart ones.

1 Like