Rule to stop shutters closing

I'm trying to create a rule to stop my balcony fire shutters closing when the balcony door is open (so it doesn't crash into the door; has happened). I have a contact sensor on the door, and have tried both:

When Contact sensor is open, stop the shutters.
When Contact sensor is open, have the shutters at 100% (open)

It works is the state of the Contact sensor changes whilst the shutters are active, but doesn't if the door is opened (Contact sensor is open) before the shutters are triggered to close.

What’s the rule to close the shutters? Sounds like you need either a required expression or conditional to prevent it from running when the door is open.

I actually intended to have it to disable the shutter control when the door is open, so there is no rule to close the shutters per se, as that's manual (or app) triggered directly (using a Zigbee curtain/shutter relay).

Wanted the use the Contact Sensor like a safety interlock to prevent the switch from operating when the door is in the open position.

What type of switch driver are you using and what are its attributes? This will only work if you can disable the inputs from the relay. If you can de-couple them, then you can set up Rule Machine or Room Lighting to control the shutters.

Just using the built-in Generic Zigbee Shade driver; this is a Tuya device that is compatible with the generic driver. Can't see anywhere in the driver that allows you to look for a flag, hence using RM to get around it.

May be best just to setup a virtual button device and manage the control within HE using the button and a related Button Controller or RM rule, i.e. instead of controlling the shade in a rule, press a button, which will trigger a BC / RM rule that can include the logic for whether to actually send the command or not. For any other controls like dashboards, etc, you can also make use of the button.

Oh, sorry, I just noticed you are already doing that in RM...? Maybe? I would not expect an inter-device dependency like what you want to be introduced into the driver, those kinds of arrangements are typically handled through apps or at least a parent device in very specific use cases (probably not this one).

Yes. I think the problem is RM allows a momentary trigger, but not a prolonged event, that is the shutter will open when the contact is open (trigger is the change of state) but does not keep the shutter in the opened position after that (no further change of state from open).

I think it can replicate what I want if I have the RM keep checking the state of the contact sensor and open the shutters, but that would be very inefficient.

Not sure I follow...

I see you were looking for two aspects to using the contact sensor, one being preventing the shutters from being controlled while the door is open. I think that is more what I was trying to solve with the button controller, which I would expect to work the way you need it to.

I'm guessing your reference to polling the contact sensor is to try and stop the shutters while they are closing if the door is opened. Is that right?

Yes, that would work, and is relatively easy (in fact that's where I originally started from, as I could ask the rule to check the state of the Contact before activating the closing of the shutter), but as there are also physical switches (for WAF) that is connected to the relay, it quickly fell down as the physical switches by-passes the RM virtual button.

That is correct, but I think that causes excessive polling, and could lead to the shutters going down, then going up, then reverse again ad nauseam, as I found out when I made a mistake with a RM rule to create a virtual 3-way switch...

If from what you are describing the physical switches control the shutters directly, then yes, it will be difficult to produce a "nice" outcome. Not to say it would be impossible, but the shutters jerking into action to only stop and go back up would not be ideal, even if we could make the rule stop at that point.

I would see if you could get a physical switch, either a fixture on the wall or potentially a remote style, that connects to Hubitat and controls the shutters that way, allowing you to intervene with logic in a rule. If you are wanting the option of a fallback if your HE hub is unavailable, then maybe the "smart" switch or remote has to be an addition, and your existing fixture is the fallback, without the smarts.

What is the actual device used with the relay? There might be a different driver in the community that would work. Tuya obviously produces a lot, so knowing the specific device you have would be helpful.

The relay comes up as:

  • manufacturer: _TZ3210_ol1uhvza
  • model: TS130F

Have just thought of a different way to get around it with RM, so will try it this evening. I think if the relay checks with HE before activating the shutter, I can have HE check the state of Contact, and prevent activation of the shutter if it's open, and that may work to do what I want.

The more I play around with RM, the more interesting it gets as there is more than one way to skin the cat.

1 Like

Have now come to the conclusion that the safest way to do what I want is not with RM per se, but to use a separate relay to cut power to the shutter controller relay when the door Contact is in the Open position. I found that sometimes there is a slight delay to RM action, and that can cause the shutters to close onto the open door.

That sounds a lot simpler. I'm guessing you will have an option of manual override, i.e. if the contact sensor is not communicating for any reason with HE?

Yes; will not have a switch or button on the dashboard, but will have to directly use the driver's page, so that it cannot be accidentally over-ridden.

Pretty old-fashioned way of doing it, except wirelessly.

1 Like

What if HE is down....? (Just playing devil's advocate... or whatever the right term would be to try and not sound annoying :slight_smile: )

Fair comment; I don't usually need to use the shutter, only in case of very hot days. I was actually looking at automating when the shutters came down (I have 2, the other is on a sliding door, so no real problems), but had to make sure it didn't come down on the door.

Worst case is a quick re-wire to by-pass... Felt putting in a switch inside the wall too OTT, even though I thought of it.

1 Like