Best method for Repeatability/fast logic

I'm looking for the best method to do the following

I have the following working and tested using an industrial PLC and ladder logic. Now I want to move it to the HE world.

I'm new the HE, so pls explain in detail.

What I need:
When a "command" from the dash board or a switch (example a virtual switch) changes from [open] to [close], I need logic to toggle a relay (R1) from [off] to [on] then wait 250 milisec then toggle (R1) back to [off], then wait again 1100 milisec, then (R1) from [off] to [on] then wait again 250 milisec then toggle (R1) back [off],

Then repeat each time the command changes

Can this be done in rule machine, and if so, would the repeatability be the same each time the "command" is sent?

Is rule machine the best route? If not, what should I use?

I would recommend a small custom app in Groovy. Also, I must caution you that unless you have built get a robust mesh (be your devices zigbee or zwave), getting timing on the order of 250 ms to work reproducibly will be difficult.

3 Likes

Maybe I am wrong, but I think the Rule isn't the issue here. It is the radios and the Zwave or Zigbee network (and the device itself) that can potentially introduce delays.

2 Likes

that's why I'm asking you guys. When done in a plc, the repeatability is 100%

Maybe describe what you are trying to do, even if it is in generic terms. It sounds like some type of manufacturing process to me.

1 Like

Hubitat doesn’t have an RTOS. So I would not expect it to perform like an industrial PLC.

1 Like

No its timing to control a garage door position. Most if not all garage doors can either be "opened or "closed" from the remote. Using the inside garage button you can stop the garage door somewhat in the same position with lots of luck.

I rewired my garage door, added a PLC and logic to solve that problem. I created a "vent" mode. My wife loves it. Works flawless. Well I'm trying to use the HE product to be the same. The HE, (really the device hardware timing is never the same.

How are you controlling your garage door?

I have a app to send a command to the PLC.

How do you connect to the PLC? And which app?

Anyway - if you connect to the PLC, why not leave the timing logic on it?

The PLC does all the timing and outputs, the PLC just needs an input command. The input can come from any wifi/plug app, or z-wave, zigbee output.

I have friends that would like my vent mode app on their a garage. So im looking for IOT solution such as the HE. a PLC can be expensive when adding, hardware, programming, testing and labor to implement.

My goal was to use a HE and one z-wave dry contact to do what I'm doing with the PLC,

with the PLC, I can adjust the vent position to whatever I want, 2", 3", 4" etc just with timing in milisec

This is not practical.

1 Like

I think you can do a vent position, but you aren't getting those exact openings like a PLC can do.

It will be fairly random only because of the random delays in Z-wave/Zigbee and even the (assuming) smart relay that you would be using to signal the door opener.

It sure would be nice if MyQ could do this natively, and in fact maybe this is a feature request to them.

1 Like