Smartthings Relay Sequencing (UK)

I am hoping the community can help me.

I need to hack/hardwire a remote, and connect it to a relay board in order to integrate a 2.4ghz device into Smartthings.

What I need to do is:

  • hardwire the remote to a relay board
  • control this relay board somehow via smartthings, with sequencing.
  • for example, one press of a control in smartthings would send a command, and then one relay would activate, and then 0.5seconds, or 1 seconds later a second relay would operate

Can anyone point me in the direction of the hardware and software that might be needed for this?

Many thanks in advance

You didn’t say what country you are in, and the device selection does vary. :sunglasses:

If you are in North America, Zooz (the house brand for the smartest House) has a popular in-line relay with good smartthings integration:

They also have staff who participate in this forum if you have any questions


That said, it’s very important to understand that any mesh network, such as zigbee or Z wave, cannot enforce sequencing. Messages can and do bounce around the mesh and may take different paths. So two messages sent very close together may arrive in the opposite order from what you expect. Most zwave manufacturers say they cannot guarantee sequencing for anything closer than one minute apart.

That’s not to say that community members don’t use these devices for those kinds of use cases. For example, there are quite a few lighting systems which require pattern presses, like three quick presses followed by one long press to change color or something similar. Often the pattern has to be completed in less than five seconds. There are people who have been able to set up this kind of pattern using Webcore and find that it is mostly successful, although every once in a while it may fail.

I just mention that because if there is a safety issue if your particular pattern fails, then I would not try to use a mesh-based device. Instead, look for Wi-Fi, which does enforce sequencing because it’s continuous connection rather than mesh.

BTW, if you’re not familiar with Webcore, it’s a community created rules engine which is essentially a scripting language for smartthings. Very popular for community members with good technical backgrounds. They have their own forum and lots of people who will be glad to help you set up “pistons“ (that’s what they call their rules) if you get stuck. while the official smartthings features generally follow the one minute rule, Webcore has many more options.

FAQ: What is WebCoRE? (And what was CoRE?)

Thanks. I’m in the UK.
THe reason I need to sequence is that on the current remote, I need to press 1 button, and then the next one to get the remote to send the 2.4ghz signal.

What happens if the buttons get pressed in the reverse order?

Also, can you post a picture of the remote?

The Primary solution for this in the UK used to be the fortrezz mimolite, but there have been recent reports that it does not work with the new V3 app, so I am not sure where that stands. :disappointed_relieved:

Fortrezz Mimo2+ no longer supported for Smartthings

What are you actually trying to do??
If you just want to send rf signals have you checked out the Broadlink rm4 Pro? (Available at loads of places inc. EBay, Amazon etc.
This is both an ir and rf blaster and can learn existing remotes. With their app you can create scenes (so send multiple signals) and it also connects with alexa so you can activate via her or even setup a virtual device in smartthings to trigger the action.

1 Like

Hi, to try and answer some of the questions:

  1. a broadlink will not work, as what I am trying to control uses a 2.4ghz proprietary carrier signal. Nothing will ‘clone’ it.

  2. With regards to relay sequencing, which I invisage is:

  • smartthigns will send a single signal to a board or controller (pi, arduino or something). I need advice as to what will work with smartthings.
  • depending on this signal the board will then sequence the relays.
  • in getting the board or controller to do the sequencing, then the issue of out of sequence commands is going to be much reduced.
  1. A picture of the remove is attached.
  • one button press is needed to select the group 1/2/3/4/5 or all
  • one butten press is needed to select the position. 10483_1.bbf79d7bc76a74770aa6d173f31c50aa

So back to the problem… I need a controller that can accept smartthings commands, and can then activate relays in sequence.

the answer looks like…
smartthings connected to a raspberry pi running omnithing, and then python scripts to control a relayboard

Tagging @ogiewon

Seems like a very simple NodeMCU ESP8266 or NodeMCU ESP32 would handle this without any issues. Would still need to understand how many ‘button sequences’ are required to more fully design exactly how this ‘device’ would be mapped into standard ST capabilities.

For example, a simple “Switch” device, can have two commands, ‘on’ and ‘off’. When these commands are sent to the microcontroller, it could easily sequence a set of digital outputs uniquely for ‘on’ and ‘off’.

If two sequences are all that it needed, then a switch capability is all that it needed. However, if the requirement is for more than 2 sequences, perhaps it makes more sense to implement the “Switch Level” capability which will provide 99 possible ‘dimmer levels’ that could be interpreted as unique digital output sequences.

This one sounds interesting, and I’d be willing to assist the creation of such a device using my ST_Anything integration.

1 Like

Hi Ogiewon,
For the majority of cases, two button presses:

  • press one button for say 0.5 seconds then release
  • Pause for say 0.25 seconds
  • Press another button for say 0.5 seconds then release~

Will cover a large number of use cases.
To cover every use case, then 3 button presses (with a similar sequence as above) would likely suffice.


Got it… But how many unique sequences are required? What does the remote control?

For example, if the remote was for a USA garage door opener, it would only need one sequence. Momentarily pushing the button causes the door to change state regardless of its current state.

But if this was for an adjustable bed, one might have 5 favorite positions, each one equating to a unique sequence of ‘button presses.’ Thus we’d need to be able to handle 5 unique commands from ST to the microcontroller, so the microcontroller knows which particular button sequence to run.

If this remote was controlling a lock, there might simply be two sequences of button presses. One to UNLOCK and another to LOCK. Each of these sequences could ‘push’ whatever ‘buttons’ you want for whatever durations are required.

Hope that helps to explain my question a little better.

1 Like

now i get what you are asking.

The remote is for window shutter control. In fact there are 11 shutter groups in the house. this perhaps can be brought down to 10. So there are two remotes that need to be opened, and soldered onto and controlled by relays.
then per remote, there are 5 groups + all, and 5 commands:
fully close
fully open
open (button is pressed for as long as needed to get to the position)
close (button is pressed for as long as needed to get to the poisition)

for the last two, open close, to make this digital, there could be three options, short press, medium press, long press and the relay would stay on for a short, medium, or long time).

So for two presses:
so this gives per remote a 6 (5 groups plus all) by 5 (function), so 30 unique commands.
it becomes 6 by 9 if we put in some timing to the open / close function, so 54 unique commands.

For sizing purposes, lets add in 54 unique commands where 3 presses are needed in sequence. and lets do the same for 4 presses.

so (54+54+54)*2 (for two remotes) gives 324 unique sequences I think… does this make sense?


1 Like

Ummmm, no it really doesn’t make sense to me, truth be told.

So, you’re wanting to be able to command a microcontroller to from ST to perform 324 unique actions? That seems a little crazy, as I have to believe no human being, operating that remote control would remember 324 unique button press combinations. Thus, I have to believe you and I are still not exactly on the same page.

Let’s try it from a different angle. You have 11 shutter groups, that you’d like SmartThings to be able to control, correct?

  • How many remote controls are you planning on hacking?
    • Is there one remote per shutter group?
    • Or one remote to control all of them?
  • How many microcontrollers do you believe are required?

In SmartThings, how are you planning on controlling these groups of shutters?

  • Will you be trying to use standard Automations and Scenes?
  • Will you be using webCoRE?

In SmartThings, what exact ‘high level’ commands are you planning on issuing to the groups of shutters?

  • Will all of the groups of shutters always be controlled to the exact same position (Fully Open, Fully Closed, Partially Open) in unison?
  • Or will each group of shutters be controlled independently?
  • What will you use to trigger the group(s) of shutters to change their state?

I am trying to understand your requirements, however I am not quite there yet. Please try to describe exactly what you expect SmartThings to do throughout the course of a typical 24 hours with respect to your shutters.

To be honest, I was sort of expecting you to say something like… “I’d like for ST to be able to send commands to Fully Open, Fully Close, and Partially Open my shutters.” I would translate this to mean that the microcontroller needs to handle three command sequences. To implement this, we could use a device that supports the “Switch” and “Switch Level” capability. This would allow us to map OFF/0% = Fully Closed, ON/100% = Fully Open, and ON/50% = Partially Open. The microcontroller would then interpret these three possible combinations in a specific ‘sequence of button presses’ on the hacked remote control. This would be ‘3’ Button Sequences in my mind.

Help simplify your requirements down to exactly what you’d like to accomplish during a typical day. That will help immensely.

For example, maybe the desire is to simply adjust all groups of shutters 3 times a day. Once in the morning, once in the afternoon, and once in the evening. This would wake up the microcontroller at each of these three specific times. For each event (morning, afternoon, evening), the microcontroller could issue whatever sequence of button presses on the remote control you’d like (i.e. control 1 group of shutters, or all 11 groups, whatever you’d like.)

However, if you’re looking to be able to manually control every group of shutters independently via the ST Mobile App, or a dashboard like SharpTools or ActionTiles, then a true integration between ST and the vendor needs to be explored.