Shelly 1 and Internal PIR with manual override from Home Assistant Dashboard

Hi all,

I am pretty new to all this home assistant stuff, however I have managed to get all things working, however this one set up is where I need help and can not find any info.

If you search Shelly 1 with PIR wiring on Google Images, I have that set up.

or click the link below, for the topic which displays the picture…

My set up is:

UK Based 240v
PIR sensor in the hall way
Shelly 1 (set up and connected to home assistant)
No wall switch

In simple when I come in the evening, I walk into the hallway and the PIR sensor activates the lights, on the PIR I have this set to stay on for 10 seconds - no automation at this stage. However if I am talking to say someone at the door, the lights goes out in the hallway after 10 seconds, then I have to dance about to get the lights back on again.

I am trying to have a manual override on the Home Assistant Dashboard (I have an Tablet mounted on the wall in the hall way), where I can just toggle the switch on and off. From this point, my shelly 1 is now connected as the diagram I referred to earlier.

Sounds simple enough, however when I walk into the hallway the sensor turns on the light, I go to the tablet and can see the light is switched on. That is expected, as the sensor turns on the light, now when I leave the hallway, the light turns off as does the dashboard switch, again as expected. I have another tablet in the living room, if I know I will be say in the hallway painting the walls, I decide to turn the dashboard switch on. The hall way light goes on, I walk into the hallway, the light is still on, the sensor detects motion and I hear the relay/click on the PIR sensor, the light is still on, this is fine, but after 10 seconds the PIR sensor relay clicks again, at this point my light has turned off.

You see my problem, the PIR sensor overrides my dashboard switch, so I can not leave the light permanently on. One option is to turn on detached mode on the shelly and just use the dashboard, but I do not want to do that, I need to have both options. Any suggestions?

I am not a coding or home assistant expert so I will need some baby steps, I can not change the PIR and I do not want to flash the shelly 1.

My thoughts are I need to somehow tell the shelly 1 that if the dashboard switch has turned on the light, then the PIR sensor can not override it.

I have played around with some settings and I set the Shelly 1 into detached mode and then set a automation that if the PIR sensor picks up motion then the input sensor in Home assistant will turn on the lights. The lights would not go on via the PIR sensor if no automation was set and put in detached mode.

This makes me think I now need to tell the system to when I turn on the device HA it should ignore the PIR sensors input.sensor readings so the lights stays on until I turn it off again at HA.

But I can not figure it out, am I on the right path?

many thanks in advance

Happy New Year all! Just bumping this thread as I am surprised no one has had this application for an internal or external light. Thanks in advance.

All sorted managed to do it myself, still surprised no one replied as the function I thought was common. Any one need any assistance with this set up, let me know.

Hello J17VXX,

I could kindly use your help. Got almost same problem. I have a garden light attached to a Shelly plus 1 relay. I want to switch this on 2 different switches; PIR and a manual switch. Both operate with a Shelly i4 that communicates to the relay.

When I switch the light on with manual switch I want to overrule the signal from te PIR. In my current set up if I activate the PIR, it will eventually switch of the light after the timer runs out.

So is there an automation to disable one Shelly switch if the other is enabled?

Best regards,

Dik

Hi sorry I don’t use this forum much, not sure if you got your issue resolved, but essentially you need 4 automations, 1x for sensor off (a), 1x for sensor on (b), 1x for light on (c), 1x for light off (d). A bit of a nightmare to test it solved but I do not have access to my HA at present as I am not home.

My light does not have a physical light switch as there is an iPad next to the location of where my light switch would have been so my set up is only power going into my sensor and then wires coming out going to my lights.

First enable all the entities on the device via HA so you can see everything.

Essentially your automations will work with the entity ‘external input’ and ‘input’ I do not use external input as I don’t have a switch so I only use input as I have the PIR sensor connected.

Sorry I don’t have HA in front of me so I can’t be specific, but in simple automation B will go on when ‘input’ is detected from the PIR, with a condition that this will only work is the light is not on already, the action will be to turn on the light.

Do another to turn off the PIR, and when there is no input from the PIR the light will turn off with a condition that the light must be on already.

Create another automation for the external input, same thing one automation for off and one for on.

These will conflict and cause an issue, this is normal then on the light on (external input) automation create an action which turns off the PIR automation. This means the light on will disable the PIR when turned on and when turned off (do this on the light off automation) it will activate the PIR automation.

That should make sense, sorry I am limited to time but rushed a reply without giving it all my time, hope this does helps.

defo need 4x automations to keep it simple and the ‘call service’ in the action area of the automations is key to turn off the PIR automation so the light overrides this.

Please let me know if that makes sense and hopefully works.

I know this is an old post, but, hopefully you still remember how you did it.

So, I have a Shelly 1 wired as in the linked post. I have the Shelly set up in detached mode.

I can turn on the lights manually by using Home Assistant or the Shelly App. However, I can’t for the life of me get any triggers from the PIR to the Shelly or to Home Assistant. I’m not seeing anything in the log so I don’t know what I should be looking out for.

The PIR is set to no light sensitivity (so works day and night), and also low activation sensitivity so triggers whenever it senses movement.

Any help in setting up the Shelly and Home Assistant correctly would be wonderful! Thank you.