# Trigger on connection/power on to homey or wired small PIR sensor

**URL:** <https://community.homey.app/t/trigger-on-connection-power-on-to-homey-or-wired-small-pir-sensor/94392>\
**Category:** Questions & Help\
**Tags:** z-wave, zigbee, flow, homey-pro\
**Created:** [November 12, 2023, 8:52am UTC](https://community.homey.app/t/trigger-on-connection-power-on-to-homey-or-wired-small-pir-sensor/94392 "2023-11-12T08:52:32Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![BB\_homey](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bb_homey/32/78912_2.png) [@BB\_homey](https://community.homey.app/u/BB_homey)\
**Post date:** [November 12, 2023, 8:52am UTC](https://community.homey.app/t/trigger-on-connection-power-on-to-homey-or-wired-small-pir-sensor/94392/1 "2023-11-12T08:52:32Z")

</div>

Is there a way to set a trigger if a device connects to homey or gets powered on? I have some homey oconnected devices that get only get powered based on a sensor that cannot be connected to Homey.

Situation:  
I have a zigbee light and a zigbee ledstrip that are behind an old fashioned/non-smart PIR sensor. Both turn on/get powered only when the PIR sensor senses movement. The advantage of this ‘stupid’ PIR sensor is that it checks for motion every second and I can set a brightness treshhold and timer (podmeter). Next to that it is cheap and fits nicely in the wall where you normallywould have a light switch. Details of the sensor: [LED PIR Bewegingsmelder/Sensor Inbouw Wand](https://www.ledshop-groenovatie.com/LED-PIR-Bewegingsmelder/Sensor-Tweedraads-Inbouw-Wand)  
Disadvantage is that I can not control/connect to the zigbee devices when they are not on, because they will not have power. I want to change the color and brightness based on the time of the day.

I tried making a flow that triggers on ‘turn on’, waits a few seconds and changes brightness and color. This flow doesn’t get triggered at all. Is there a way to trigger a flow in homey when a device gets powered or connects to homey?

An alternative would be a connected/smart sensor, but so far I have only found 1 smart sensor that checks the environment on motion every second. This is the aeotec multisensor 7 (if powered by USB). It is a bit expensive and too big to replace my PIR sensors in the wall. Do you you know a simple small wired PIR sensor that connects to homey?

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [November 12, 2023, 9:21am UTC](https://community.homey.app/t/trigger-on-connection-power-on-to-homey-or-wired-small-pir-sensor/94392/3 "2023-11-12T09:21:51Z")

</div>

> [@BB\_homey](#):
>
> An alternative would be a connected/smart sensor, but so far I have only found 1 smart sensor that checks the environment on motion every second. This is the aeotec multisensor 7 (if powered by USB). It is a bit expensive and too big to replace my PIR sensors in the wall. Do you you know a simple small wired PIR sensor that connects to homey?

I would suggest something else: disconnect the Zigbee devices from the PIR entirely (and connect them to a permanent power source), and use the PIR output as the input for a Shelly 1. That way, the PIR will “switch” the Shelly and you can use flows to trigger on that switch to turn on/off the Zigbee devices.

Make sure to put the Shelly’s switch input to “Detached”, otherwise it will keep on toggling its internal relay.

---

<div class="post-metadata">

**Author:** ![Rmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rmb/32/79135_2.png) [@Rmb](https://community.homey.app/u/Rmb)\
**Post date:** [November 12, 2023, 10:57am UTC](https://community.homey.app/t/trigger-on-connection-power-on-to-homey-or-wired-small-pir-sensor/94392/4 "2023-11-12T10:57:21Z")

</div>

> [@BB\_homey](#):
>
> An alternative would be a connected/smart sensor, but so far I have only found 1 smart sensor that checks the environment on motion every second.

There is a difference in detection motion every second and sending messages every second. I have motion detectors, sending updates every 1 minute, and lamps connected to HP2023, and the lights switch on within a second.  
States updates every second is a waist of bandwidth and CPU power, and only required when you need On/Off switching intervals of 1 second. I cannot imagine that is your requirement.

---

<div class="post-metadata">

**Author:** ![BB\_homey](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bb_homey/32/78912_2.png) [@BB\_homey](https://community.homey.app/u/BB_homey)\
**Post date:** [November 12, 2023, 11:21am UTC](https://community.homey.app/t/trigger-on-connection-power-on-to-homey-or-wired-small-pir-sensor/94392/5 "2023-11-12T11:21:56Z")

</div>

I am able to control the zigbee devices when they are powered (color and brightness).  
The ledstrip: AduroSmart Eria [https://www.robbshop.nl/adurosmart-eria-ledstrip-3m-zigbee](https://www.robbshop.nl/adurosmart-eria-ledstrip-3m-zigbee)  
GU10 zigbee LED spot: [https://www.amazon.nl/dp/B08T6KQVW9/ref=pe\_28126711\_487102941\_TE\_SCE\_3p\_dp\_1](https://www.amazon.nl/dp/B08T6KQVW9/ref=pe_28126711_487102941_TE_SCE_3p_dp_1)  
producer ID: \_TZ3210\_ejctepku product ID: TS0505B

---

<div class="post-metadata">

**Author:** ![BB\_homey](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bb_homey/32/78912_2.png) [@BB\_homey](https://community.homey.app/u/BB_homey)\
**Post date:** [November 12, 2023, 11:45am UTC](https://community.homey.app/t/trigger-on-connection-power-on-to-homey-or-wired-small-pir-sensor/94392/6 "2023-11-12T11:45:21Z")

</div>

Hi Robert,  
Nice suggestion. I didn’t think about this option.  
For this option I need:  
1 the lights (zigbee led-strip and led spot) to be continiously power. Currently there is only a blue (neutural) and black wire (schakeldraad). No brown wire (phase/live) wire.  
2 The shelly 1 itself should continiously be powered ([Shelly 1 WiFi inbouw schakelaar | Home2Link](https://www.home2link.nl/shelly-1-wifi-inbouw-schakelaar.html)). Behind the current PIR sensor there is no space for the Shelly.  
The first point where the black wire (schakeldraad) from the PIR sensor gets out of the wall/ceiling is at the location of the lights. But at the lights I don’t have a brown (phase) wire.

A way to solve the problems above is to put a brown wire next to the black wire from the PIR to lights and put a shelly next to the light on the ceiling. I don’t think my wife will like it 😉

I have several of these PIR sensors (hallway, toilet, garage, attic, storage room,…), so preferably I get it working with a software/configuration change. When the PIR sensor powers on the zigbee devices they are connecting to Homey automatically. Is there a way to trigger a flow when this happens? I have a Homey Pro 2023.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [November 12, 2023, 12:01pm UTC](https://community.homey.app/t/trigger-on-connection-power-on-to-homey-or-wired-small-pir-sensor/94392/7 "2023-11-12T12:01:56Z")

</div>

> [@BB\_homey](#):
>
> When the PIR sensor powers on the zigbee devices they are connecting to Homey automatically. Is there a way to trigger a flow when this happens?

No, there isn’t, because Homey doesn’t necessarily know if a device is “connected” or not.

---

<div class="post-metadata">

**Author:** ![BB\_homey](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bb_homey/32/78912_2.png) [@BB\_homey](https://community.homey.app/u/BB_homey)\
**Post date:** [November 12, 2023, 12:02pm UTC](https://community.homey.app/t/trigger-on-connection-power-on-to-homey-or-wired-small-pir-sensor/94392/8 "2023-11-12T12:02:39Z")

</div>

Did you connect the sensor directly to the lights without Homey in between? Which sensor do you use?

My requirement: I walk into a room (bathroom, storage, hallway, …) and the lights turn on directly (within 3 seconds). Two minutes after the last motion detection the lights turn off again.  
For my bathroom I have an additional requirement: The brightness of the lights depend on the time of the day.

I have a working solution for my bathroom: Aeotec multisensor 7 with zigbee dimmer.  
I did this with a flow in the Homey that triggers on the multisensor motion and turns on the zigbee dimmer and brightness is set based on the time.  
I assume here that data/sensing information is send very frequently from the sensor to homey and homey turns on the lights if needed.

---

<div class="post-metadata">

**Author:** ![Rmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rmb/32/79135_2.png) [@Rmb](https://community.homey.app/u/Rmb)\
**Post date:** [November 12, 2023, 12:25pm UTC](https://community.homey.app/t/trigger-on-connection-power-on-to-homey-or-wired-small-pir-sensor/94392/9 "2023-11-12T12:25:12Z")

</div>

> [@BB\_homey](#):
>
> Did you connect the sensor directly to the lights without Homey in between?

No, of course not. Otherwise a flow is impossible.  
I use KaKu AWST-6000 and others, light dimmers, hue and wall outlets. As trigger I use Zone Activity.  
As soon as motion is detected, the sensor sends a message.
